1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=ipsccp -S %s | FileCheck %s
6 define dso_local i32 @ham(ptr %arg, ptr %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]], ptr [[TMP]]
17 ; CHECK-NEXT: [[TMP8:%.*]] = load i32, ptr [[TMP]]
18 ; CHECK-NEXT: [[TMP9:%.*]] = icmp eq i32 [[TMP8]], 912730082
19 ; CHECK-NEXT: [[TMP10:%.*]] = load i32, ptr [[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, ptr [[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 ptr null, [label [[BB4:%.*]], label [[BB13:%.*]], label %bb18]
40 %tmp2 = alloca i32, align 4
47 %tmp7 = call i32 @hoge()
48 store i32 %tmp7, ptr %tmp
49 %tmp8 = load i32, ptr %tmp
50 %tmp9 = icmp eq i32 %tmp8, 912730082
51 %tmp10 = load i32, ptr %tmp
52 br i1 %tmp9, label %bb11, label %bb16
61 %tmp15 = load i32, ptr %tmp
64 bb16: ; preds = %bb14, %bb6
65 %tmp17 = phi i32 [ %tmp10, %bb6 ], [ 0, %bb14 ]
71 bb19: ; preds = %bb16, %bb
75 indirectbr ptr null, [label %bb4, label %bb13, label %bb18]