1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -ipsccp -S %s | FileCheck %s
6 define dso_local i32 @ham(i8* %arg, i8* %arg1) {
9 ; CHECK-NEXT: [[TMP:%.*]] = alloca i32
10 ; CHECK-NEXT: [[TMP2:%.*]] = alloca i32, align 4
11 ; CHECK-NEXT: br label [[BB19:%.*]]
13 ; CHECK-NEXT: br label [[BB6:%.*]]
15 ; CHECK-NEXT: [[TMP7:%.*]] = call i32 @hoge()
16 ; CHECK-NEXT: store i32 [[TMP7]], i32* [[TMP]]
17 ; CHECK-NEXT: [[TMP8:%.*]] = load i32, i32* [[TMP]]
18 ; CHECK-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 912730082
19 ; CHECK-NEXT: [[TMP10:%.*]] = load i32, i32* [[TMP]]
20 ; CHECK-NEXT: br i1 [[TMP9]], label [[BB11:%.*]], label [[BB16:%.*]]
22 ; CHECK-NEXT: unreachable
24 ; CHECK-NEXT: br label [[BB14:%.*]]
26 ; CHECK-NEXT: [[TMP15:%.*]] = load i32, i32* [[TMP]]
27 ; CHECK-NEXT: br label [[BB16]]
29 ; CHECK-NEXT: [[TMP17:%.*]] = phi i32 [ [[TMP10]], [[BB6]] ], [ 0, [[BB14]] ]
30 ; CHECK-NEXT: br label [[BB19]]
32 ; CHECK-NEXT: unreachable
34 ; CHECK-NEXT: br label [[BB20:%.*]]
36 ; CHECK-NEXT: indirectbr i8* null, [label [[BB4:%.*]], label [[BB13:%.*]], label %bb18]
40 %tmp2 = alloca i32, align 4
47 %tmp7 = call i32 @hoge()
48 store i32 %tmp7, i32* %tmp
49 %tmp8 = load i32, i32* %tmp
50 %tmp9 = icmp eq i32 %tmp8, 912730082
51 %tmp10 = load i32, i32* %tmp
52 br i1 %tmp9, label %bb11, label %bb16
61 %tmp15 = load i32, i32* %tmp
64 bb16: ; preds = %bb14, %bb6
65 %tmp17 = phi i32 [ %tmp10, %bb6 ], [ 0, %bb14 ]
71 bb19: ; preds = %bb16, %bb
75 indirectbr i8* null, [label %bb4, label %bb13, label %bb18]