diff options
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/IndVarSimplify/loop_evaluate_6.ll | 5 | ||||
-rw-r--r-- | test/Transforms/IndVarSimplify/no-iv-rewrite.ll | 9 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/Transforms/IndVarSimplify/loop_evaluate_6.ll b/test/Transforms/IndVarSimplify/loop_evaluate_6.ll index da38de538f..af01fe5386 100644 --- a/test/Transforms/IndVarSimplify/loop_evaluate_6.ll +++ b/test/Transforms/IndVarSimplify/loop_evaluate_6.ll @@ -1,9 +1,4 @@ ; RUN: opt < %s -indvars -loop-deletion -S | grep phi | count 1 -; XFAIL: * - -; Indvars can't evaluate this loop, because ScalarEvolution can't compute -; an exact trip count, because it doesn't know if dividing by the stride will -; have a remainder. It could be done with more aggressive VRP though. define i32 @test(i32 %x_offs) nounwind readnone { entry: diff --git a/test/Transforms/IndVarSimplify/no-iv-rewrite.ll b/test/Transforms/IndVarSimplify/no-iv-rewrite.ll index 507f695e67..057669277c 100644 --- a/test/Transforms/IndVarSimplify/no-iv-rewrite.ll +++ b/test/Transforms/IndVarSimplify/no-iv-rewrite.ll @@ -223,13 +223,18 @@ entry: %halfLim = ashr i32 %limit, 2 br label %loop -; Test cloning an or, which is not an OverflowBinaryOperator. +; This test originally checked that the OR instruction was cloned. Now the +; ScalarEvolution is able to understand the loop evolution and that '%iv' at the +; end of the loop is an even value. Thus '%val' is computed at the end of the +; loop and the OR instruction is replaced by an ADD keeping the result +; equivalent. ; ; CHECK: loop: ; CHECK: phi i64 ; CHECK-NOT: sext -; CHECK: or i64 +; CHECK: icmp slt i32 ; CHECK: exit: +; CHECK: add i64 loop: %iv = phi i32 [ 0, %entry], [ %iv.next, %loop ] %t1 = sext i32 %iv to i64 |