File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
llvm/test/Analysis/ValueTracking Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1- ; Check that we do not crash (see PR #152700)
2- ; RUN: opt < %s -passes=instcombine
1+ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+ ; RUN: opt < %s -passes=instcombine -S | FileCheck %s
33
44declare noundef i32 @llvm.nvvm.read.ptx.sreg.nctaid.x ()
55declare i32 @llvm.umin.i32 (i32 , i32 )
66define i32 @foo (i1 %c , i32 %arg ) {
7+ ; CHECK-LABEL: define i32 @foo(
8+ ; CHECK-SAME: i1 [[C:%.*]], i32 [[ARG:%.*]]) {
9+ ; CHECK-NEXT: [[ENTRY:.*]]:
10+ ; CHECK-NEXT: [[I:%.*]] = call i32 @llvm.nvvm.read.ptx.sreg.nctaid.x()
11+ ; CHECK-NEXT: br i1 [[C]], label %[[BB_1:.*]], label %[[BB_2:.*]]
12+ ; CHECK: [[BB_1]]:
13+ ; CHECK-NEXT: br label %[[BB_2]]
14+ ; CHECK: [[BB_2]]:
15+ ; CHECK-NEXT: [[PHI:%.*]] = phi i32 [ [[I]], %[[ENTRY]] ], [ 0, %[[BB_1]] ]
16+ ; CHECK-NEXT: [[RES:%.*]] = call i32 @llvm.umin.i32(i32 [[PHI]], i32 [[ARG]])
17+ ; CHECK-NEXT: ret i32 [[RES]]
18+ ;
719entry:
820 %i = call i32 @llvm.nvvm.read.ptx.sreg.nctaid.x ()
921 br i1 %c , label %bb.1 , label %bb.2
You can’t perform that action at this time.
0 commit comments