-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
test: update llvm ir expectations for autodiff tests when dlopen #149986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
2408190
5e6d5bb
348f324
10d8b6d
d9dc67a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,7 +58,7 @@ fn f1(x: &[f32; 2]) -> f32 { | |
| // CHECK-NEXT: Function Attrs | ||
| // debug-NEXT: define internal { float, float } | ||
| // debug-SAME: (ptr %f, float %x, float %dret) | ||
| // release-NEXT: define internal fastcc float | ||
| // release-NEXT: define internal fastcc{{( noundef)?}} float | ||
| // release-SAME: (float noundef %x) | ||
|
|
||
| // CHECK-LABEL: ; abi_handling::f2 | ||
|
|
@@ -77,7 +77,7 @@ fn f2(f: fn(f32) -> f32, x: f32) -> f32 { | |
| // CHECK-NEXT: Function Attrs | ||
| // debug-NEXT: define internal { float, float } | ||
| // debug-SAME: (ptr align 4 %x, ptr align 4 %bx_0, ptr align 4 %y, ptr align 4 %by_0) | ||
| // release-NEXT: define internal fastcc { float, float } | ||
| // release-NEXT: define internal fastcc | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is its return type now? |
||
| // release-SAME: (float %x.0.val) | ||
|
|
||
| // CHECK-LABEL: ; abi_handling::f3 | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,7 @@ fn square(x: &f32) -> f32 { | |||||||||
| } | ||||||||||
|
|
||||||||||
| // d_square2 | ||||||||||
| // CHECK: define internal [4 x float] @fwddiffe4square(ptr noalias noundef readonly align 4 captures(none) dereferenceable(4) %x, [4 x ptr] %"x'") | ||||||||||
| // CHECK: define internal fastcc [4 x float] @fwddiffe4square(float %x.0.val, [4 x ptr] %"x'") | ||||||||||
|
||||||||||
| // CHECK: define internal fastcc [4 x float] @fwddiffe4square(float %x.0.val, [4 x ptr] %"x'") | |
| // CHECK: define internal {{[ a-z_]*}} [4 x float] @fwddiffe4square({{[ a-z0-9()_]*}} %x{{.*}}, [4 x ptr] %"x'") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless ZuseZ4 prefers this sort of exact matching, this could use CHECK-DAG so we can capture the operations we're actually concerned about: four insertvalues, and an fadd and fmul apiece, in any order.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one could use a capture here to avoid being so sensitive to specific values
| // CHECK-NEXT: %15 = insertvalue [4 x float] %12, float %14, 3 | |
| // CHECK-NEXT: ret [4 x float] %15 | |
| // CHECK-NEXT: %[[RETVAR:[0-9]+]] = insertvalue [4 x float] %{{[0-9]+}, float %{{[0-9]+}, 3 | |
| // CHECK-NEXT: ret [4 x float] %[[RETVAR]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same idea as my comment on R26
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all I would say here is reiterating previous commentary
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,12 +22,9 @@ fn square<T: std::ops::Mul<Output = T> + Copy>(x: &T) -> T { | |
|
|
||
| // Ensure that `d_square::<f64>` code is generated even if `square::<f64>` was never called | ||
| // | ||
| // CHECK: ; generic::square | ||
| // CHECK-NEXT: ; Function Attrs: | ||
| // CHECK-NEXT: define internal {{.*}} double | ||
| // CHECK-NEXT: start: | ||
| // CHECK-NOT: ret | ||
| // CHECK: fmul double | ||
| // CHECK: define internal{{.*}} @diffe_{{.*}}generic6square | ||
| // CHECK-SAME: double | ||
| // CHECK: f{{add|mul}} {{.*}} double | ||
|
Comment on lines
+25
to
+27
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm. this looks very different, now? |
||
|
|
||
| fn main() { | ||
| let xf32: f32 = std::hint::black_box(3.0); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw autodiff only supports main, no older versions. So I'd not mark it as optional, as I hope that we don't regress. Or, at least I'd like to learn about regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure.