diff options
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r-- | llvm/test/Transforms/LoopStrengthReduce/2011-07-20-DoubleIV.ll | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/llvm/test/Transforms/LoopStrengthReduce/2011-07-20-DoubleIV.ll b/llvm/test/Transforms/LoopStrengthReduce/2011-07-20-DoubleIV.ll index 3ceeeb658d1..aecb06cfb87 100644 --- a/llvm/test/Transforms/LoopStrengthReduce/2011-07-20-DoubleIV.ll +++ b/llvm/test/Transforms/LoopStrengthReduce/2011-07-20-DoubleIV.ll @@ -15,7 +15,26 @@ entry: loop: %i.01 = phi i32 [ -39, %entry ], [ %inc, %loop ] - %conv7 = sitofp i32 %i.01 to double + %conv = sitofp i32 %i.01 to double + %inc = add nsw i32 %i.01, 1 + br i1 undef, label %loop, label %for.end + +for.end: + unreachable +} + +; Now check that the computed double constant is correct. +; CHECK: @doubleIV +; CHECK: phi double [ 0x43F0000000000000, %entry ] +; CHECK: br +define void @doubleIV() nounwind { +entry: + br label %loop + +loop: + %i.01 = phi i32 [ -39, %entry ], [ %inc, %loop ] + %conv = sitofp i32 %i.01 to double + %div = fdiv double %conv, 4.000000e+01 %inc = add nsw i32 %i.01, 1 br i1 undef, label %loop, label %for.end |