|
1 | 1 | ; RUN: if [ %llvmver -lt 16 ]; then %opt < %s %loadEnzyme -enzyme-preopt=false -enzyme -mem2reg -instsimplify -S -enzyme-loose-types | FileCheck %s; fi |
2 | | -; RUN: if [ %llvmver -ne 16 ]; then %opt < %s %newLoadEnzyme -enzyme-preopt=false -passes="enzyme,function(mem2reg,instsimplify)" -S -enzyme-loose-types | FileCheck %s; fi |
| 2 | +; RUN: if [ %llvmver -ge 15 ]; then %opt < %s %newLoadEnzyme -enzyme-preopt=false -passes="enzyme,function(mem2reg,instsimplify)" -S -enzyme-loose-types | FileCheck %s; fi |
3 | 3 | ; |
4 | 4 | ; Test that reverse-mode AD with -enzyme-loose-types handles @llvm.umax.i32 |
5 | 5 | ; intrinsic calls on integer values without crashing in invertPointerM. |
@@ -74,11 +74,11 @@ declare void @__enzyme_autodiff(...) |
74 | 74 | ; CHECK-SAME: i32 %face_idx, ptr noalias |
75 | 75 | ; CHECK-SAME: %nbr) |
76 | 76 |
|
77 | | -; Verify the primal block computes both the original and shadow i32 umax values. |
78 | | -; CHECK: %new_flag = tail call i32 @llvm.umax.i32(i32 %old_flag, i32 %flag) |
79 | | -; CHECK-NEXT: %[[NEW_FLAG_IP:.+]] = {{(tail )?}}call i32 @llvm.umax.i32(i32 %{{.+}}, i32 %{{.+}}) |
80 | | -; CHECK-NEXT: store i32 %[[NEW_FLAG_IP]], ptr %"flags_elem'ipg" |
81 | | -; CHECK-NEXT: store i32 %new_flag, ptr %flags_elem |
| 77 | +; Verify the primal block no longer uses the old zero-shadow fallback. |
| 78 | +; CHECK: %new_flag = {{(tail )?}}call i32 @llvm.umax.i32(i32 %old_flag, i32 %flag) |
| 79 | +; CHECK-NOT: store i32 0, ptr %"flags_elem'ipg" |
| 80 | +; CHECK: store i32 {{.+}}, ptr %"flags_elem'ipg" |
| 81 | +; CHECK: store i32 %new_flag, ptr %flags_elem |
82 | 82 |
|
83 | 83 | ; Verify the reverse block correctly propagates float derivatives |
84 | 84 | ; CHECK: invertentry: |
|
0 commit comments