1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=sccp -S | FileCheck %s
6 define void @read_dmatrix() #0 {
7 ; CHECK-LABEL: @read_dmatrix(
9 ; CHECK-NEXT: [[HEIGHT:%.*]] = alloca i32, align 4
10 ; CHECK-NEXT: br label [[FOR_COND:%.*]]
12 ; CHECK-NEXT: [[TMP0:%.*]] = load i32, ptr [[HEIGHT]], align 4
13 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 0, [[TMP0]]
14 ; CHECK-NEXT: br i1 [[CMP]], label [[FOR_COND6:%.*]], label [[FOR_END16:%.*]]
16 ; CHECK-NEXT: br label [[FOR_COND]]
18 ; CHECK-NEXT: ret void
21 %height = alloca i32, align 4
24 for.cond: ; preds = %for.cond6, %entry
25 %j.0 = phi i32 [ undef, %entry ], [ 0, %for.cond6 ]
26 %0 = load i32, ptr %height, align 4
27 %cmp = icmp slt i32 0, %0
28 br i1 %cmp, label %for.cond6, label %for.end16
30 for.cond6: ; preds = %for.cond
33 for.end16: ; preds = %for.cond
34 %sub21 = sub nsw i32 %j.0, 1
40 define void @emptyTT() #0 {
41 ; CHECK-LABEL: @emptyTT(
43 ; CHECK-NEXT: br label [[FOR_COND:%.*]]
45 ; CHECK-NEXT: [[C:%.*]] = call i1 @cond()
46 ; CHECK-NEXT: br i1 [[C]], label [[FOR_COND]], label [[EXIT:%.*]]
48 ; CHECK-NEXT: ret void
53 for.cond: ; preds = %for.cond, %entry
54 %.compoundliteral.sroa.0.0 = phi i64 [ undef, %entry ], [ 0, %for.cond ]
55 %bf.clear = and i64 %.compoundliteral.sroa.0.0, -67108864
57 br i1 %c, label %for.cond, label %exit