@@ -21,28 +21,26 @@ define i32 @d(i32 %base) {
2121; CHECK-NEXT: Classifying expressions for: @d
2222; CHECK-NEXT: %e = alloca [1 x [1 x i8]], align 1
2323; CHECK-NEXT: --> %e U: full-set S: full-set
24- ; CHECK-NEXT: %0 = bitcast ptr %e to ptr
25- ; CHECK-NEXT: --> %e U: full-set S: full-set
2624; CHECK-NEXT: %f.0 = phi i32 [ %base, %entry ], [ %inc, %for.cond ]
2725; CHECK-NEXT: --> {%base,+,1}<nsw><%for.cond> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Computable }
2826; CHECK-NEXT: %idxprom = sext i32 %f.0 to i64
2927; CHECK-NEXT: --> {(sext i32 %base to i64),+,1}<nsw><%for.cond> U: [-2147483648,-9223372036854775808) S: [-2147483648,-9223372036854775808) Exits: <<Unknown>> LoopDispositions: { %for.cond: Computable }
3028; CHECK-NEXT: %arrayidx = getelementptr inbounds [1 x [1 x i8]], ptr %e, i64 0, i64 %idxprom
3129; CHECK-NEXT: --> {((sext i32 %base to i64) + %e),+,1}<nw><%for.cond> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Computable }
32- ; CHECK-NEXT: %1 = load ptr, ptr @c, align 8
33- ; CHECK-NEXT: --> %1 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
34- ; CHECK-NEXT: %sub.ptr.lhs.cast = ptrtoint ptr %1 to i64
35- ; CHECK-NEXT: --> (ptrtoint ptr %1 to i64) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
30+ ; CHECK-NEXT: %load1 = load ptr, ptr @c, align 8
31+ ; CHECK-NEXT: --> %load1 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
32+ ; CHECK-NEXT: %sub.ptr.lhs.cast = ptrtoint ptr %load1 to i64
33+ ; CHECK-NEXT: --> (ptrtoint ptr %load1 to i64) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
3634; CHECK-NEXT: %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, ptrtoint (ptr @b to i64)
37- ; CHECK-NEXT: --> ((-1 * (ptrtoint ptr @b to i64)) + (ptrtoint ptr %1 to i64)) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
35+ ; CHECK-NEXT: --> ((-1 * (ptrtoint ptr @b to i64)) + (ptrtoint ptr %load1 to i64)) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
3836; CHECK-NEXT: %sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 4
3937; CHECK-NEXT: --> %sub.ptr.div U: [-2305843009213693952,2305843009213693952) S: [-2305843009213693952,2305843009213693952) Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
4038; CHECK-NEXT: %arrayidx1 = getelementptr inbounds [1 x i8], ptr %arrayidx, i64 0, i64 %sub.ptr.div
4139; CHECK-NEXT: --> ({((sext i32 %base to i64) + %e),+,1}<nw><%for.cond> + %sub.ptr.div) U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
42- ; CHECK-NEXT: %2 = load i8, ptr %arrayidx1, align 1
43- ; CHECK-NEXT: --> %2 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
44- ; CHECK-NEXT: %conv = sext i8 %2 to i32
45- ; CHECK-NEXT: --> (sext i8 %2 to i32) U: [-128,128) S: [-128,128) Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
40+ ; CHECK-NEXT: %load2 = load i8, ptr %arrayidx1, align 1
41+ ; CHECK-NEXT: --> %load2 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
42+ ; CHECK-NEXT: %conv = sext i8 %load2 to i32
43+ ; CHECK-NEXT: --> (sext i8 %load2 to i32) U: [-128,128) S: [-128,128) Exits: <<Unknown>> LoopDispositions: { %for.cond: Variant }
4644; CHECK-NEXT: %inc = add nsw i32 %f.0, 1
4745; CHECK-NEXT: --> {(1 + %base),+,1}<nw><%for.cond> U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %for.cond: Computable }
4846; CHECK-NEXT: Determining loop execution counts for: @d
@@ -52,21 +50,20 @@ define i32 @d(i32 %base) {
5250;
5351entry:
5452 %e = alloca [1 x [1 x i8 ]], align 1
55- %0 = bitcast ptr %e to ptr
56- call void @llvm.lifetime.start.p0 (i64 1 , ptr %0 ) #2
53+ call void @llvm.lifetime.start.p0 (i64 1 , ptr %e ) #2
5754 br label %for.cond
5855
5956for.cond: ; preds = %for.cond, %entry
6057 %f.0 = phi i32 [ %base , %entry ], [ %inc , %for.cond ]
6158 %idxprom = sext i32 %f.0 to i64
6259 %arrayidx = getelementptr inbounds [1 x [1 x i8 ]], ptr %e , i64 0 , i64 %idxprom
63- %1 = load ptr , ptr @c , align 8
64- %sub.ptr.lhs.cast = ptrtoint ptr %1 to i64
60+ %load1 = load ptr , ptr @c , align 8
61+ %sub.ptr.lhs.cast = ptrtoint ptr %load1 to i64
6562 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast , ptrtoint (ptr @b to i64 )
6663 %sub.ptr.div = sdiv exact i64 %sub.ptr.sub , 4
6764 %arrayidx1 = getelementptr inbounds [1 x i8 ], ptr %arrayidx , i64 0 , i64 %sub.ptr.div
68- %2 = load i8 , ptr %arrayidx1 , align 1
69- %conv = sext i8 %2 to i32
65+ %load2 = load i8 , ptr %arrayidx1 , align 1
66+ %conv = sext i8 %load2 to i32
7067 store i32 %conv , ptr @a , align 4
7168 %inc = add nsw i32 %f.0 , 1
7269 br label %for.cond
0 commit comments