-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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?
Conversation
|
2cefacd to
5e6d5bb
Compare
|
(I don't have much time to wait CI results so I'm re-opening this PR now, during CIs are running) |
| // d_square3, the extra float is the original return value (x * x) | ||
| // CHECK: define internal { float, [4 x float] } @fwddiffe4square.1(ptr noalias noundef readonly align 4 captures(none) dereferenceable(4) %x, [4 x ptr] %"x'") | ||
| // d_square1, the extra float is the original return value (x * x) | ||
| // CHECK: define internal fastcc { float, [4 x float] } @fwddiffe4square.{{[0-9]+}}(float %x.0.val, [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.
same idea as my comment on R26
| // CHECK-NEXT: %4 = fadd fast float %"_2'ipl", %"_2'ipl" | ||
| // CHECK-NEXT: %5 = fmul fast float %4, %x.0.val | ||
| // CHECK-NEXT: %6 = insertvalue [4 x float] undef, float %5, 0 | ||
| // CHECK-NEXT: %7 = fadd fast float %"_2'ipl1", %"_2'ipl1" | ||
| // CHECK-NEXT: %8 = fmul fast float %7, %x.0.val | ||
| // CHECK-NEXT: %9 = insertvalue [4 x float] %6, float %8, 1 | ||
| // CHECK-NEXT: %10 = fadd fast float %"_2'ipl2", %"_2'ipl2" | ||
| // CHECK-NEXT: %11 = fmul fast float %10, %x.0.val | ||
| // CHECK-NEXT: %12 = insertvalue [4 x float] %9, float %11, 2 | ||
| // CHECK-NEXT: %13 = fadd fast float %"_2'ipl3", %"_2'ipl3" | ||
| // CHECK-NEXT: %14 = fmul fast float %13, %x.0.val |
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.
| // CHECK-NEXT: %_0 = fmul float %x.0.val, %x.0.val | ||
| // CHECK-NEXT: %4 = fadd fast float %"_2'ipl", %"_2'ipl" | ||
| // CHECK-NEXT: %5 = fmul fast float %4, %x.0.val | ||
| // CHECK-NEXT: %6 = insertvalue [4 x float] undef, float %5, 0 | ||
| // CHECK-NEXT: %7 = fadd fast float %"_2'ipl1", %"_2'ipl1" | ||
| // CHECK-NEXT: %8 = fmul fast float %7, %x.0.val | ||
| // CHECK-NEXT: %9 = insertvalue [4 x float] %6, float %8, 1 | ||
| // CHECK-NEXT: %10 = fadd fast float %"_2'ipl2", %"_2'ipl2" | ||
| // CHECK-NEXT: %11 = fmul fast float %10, %x.0.val | ||
| // CHECK-NEXT: %12 = insertvalue [4 x float] %9, float %11, 2 | ||
| // CHECK-NEXT: %13 = fadd fast float %"_2'ipl3", %"_2'ipl3" | ||
| // CHECK-NEXT: %14 = fmul fast float %13, %x.0.val | ||
| // CHECK-NEXT: %15 = insertvalue [4 x float] %12, float %14, 3 | ||
| // CHECK-NEXT: %16 = insertvalue { float, [4 x float] } undef, float %_0, 0 | ||
| // CHECK-NEXT: %17 = insertvalue { float, [4 x float] } %16, [4 x float] %15, 1 | ||
| // CHECK-NEXT: ret { float, [4 x float] } %17 | ||
| // CHECK-NEXT: } |
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
| // 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 |
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.
what is its return type now?
| // CHECK: define internal{{.*}} @diffe_{{.*}}generic6square | ||
| // CHECK-SAME: double | ||
| // CHECK: f{{add|mul}} {{.*}} double |
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.
hm. this looks very different, now?
Co-authored-by: Jubilee <[email protected]>
Co-authored-by: Jubilee <[email protected]>
Co-authored-by: Jubilee <[email protected]>




related pr: #149271
r? @ZuseZ4