We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17613e1 commit a5bc84bCopy full SHA for a5bc84b
llvm/test/Analysis/ValueTracking/pr152700.ll
@@ -0,0 +1,16 @@
1
+; Check that we do not crash (see PR #152700)
2
+; RUN: opt < %s -passes=instcombine
3
+
4
+declare noundef i32 @llvm.nvvm.read.ptx.sreg.nctaid.x()
5
+declare i32 @llvm.umin.i32(i32, i32)
6
+define i32 @foo(i1 %c, i32 %arg) {
7
+entry:
8
+ %i = call i32 @llvm.nvvm.read.ptx.sreg.nctaid.x()
9
+ br i1 %c, label %bb.1, label %bb.2
10
+bb.1:
11
+ br label %bb.2
12
+bb.2:
13
+ %phi = phi i32 [ %i, %entry ], [ 0, %bb.1 ]
14
+ %res = call i32 @llvm.umin.i32(i32 %phi, i32 %arg)
15
+ ret i32 %res
16
+}
0 commit comments