llvm.org GIT mirror llvm / 0cbe91b
Don't re-use existing addrec expansions if they contain casts. This fixes PR9259. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126812 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
2 changed file(s) with 24 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
857857 // loop already visited by LSR for example, but it wouldn't have
858858 // to be.
859859 do {
860 if (IncV->getNumOperands() == 0 || isa(IncV)) {
860 if (IncV->getNumOperands() == 0 || isa(IncV) ||
861 isa(IncV)) {
861862 IncV = 0;
862863 break;
863864 }
0 ; RUN: llc -march=x86-64 < %s
1
2 define void @dw2102_i2c_transfer() nounwind {
3 entry:
4 br label %bb
5
6 bb: ; preds = %bb, %entry
7 %z = phi i64 [ 0, %entry ], [ %z3, %bb ]
8 %z1 = phi i16 [ undef, %entry ], [ %z6, %bb ]
9 %z2 = phi i32 [ 0, %entry ], [ %z8, %bb ]
10 %z3 = add i64 %z, 1
11 %z4 = zext i16 %z1 to i32
12 %z5 = add nsw i32 %z4, %z2
13 %z6 = trunc i32 %z5 to i16
14 call fastcc void @dw210x_op_rw(i16 zeroext %z6)
15 %z7 = getelementptr i8* null, i64 %z
16 store i8 undef, i8* %z7, align 1
17 %z8 = add nsw i32 %z2, 1
18 br label %bb
19 }
20
21 declare fastcc void @dw210x_op_rw(i16 zeroext) nounwind