-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; RUN: if [ %llvmver -lt 16 ]; then %opt < %s %loadEnzyme -enzyme-preopt=false -enzyme -S | FileCheck %s; fi | ||
; RUN: %opt < %s %newLoadEnzyme -enzyme-preopt=false -passes="enzyme" -S | FileCheck %s | ||
|
||
define double @_Z3food(double %0) { | ||
ret double %0 | ||
} | ||
|
||
define i32 @main() { | ||
%a5 = alloca i8*, align 8 | ||
store i8* bitcast (double (double)* @_Z3food to i8*), i8** %a5, align 8 | ||
%a17 = load i8*, i8** %a5, align 8 | ||
%q = call double (...) @__enzyme_autodiff(i8* %a17, metadata !"enzyme_dup", double 1.0, double 1.0) | ||
ret i32 0 | ||
} | ||
|
||
declare double @__enzyme_autodiff(...) | ||
|
||
; CHECK: define internal void @diffe_Z3food |