summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2017-07-08 17:17:30 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2017-07-08 17:17:30 +0000
commitb9edcbcb1dc9f87bfd31ec7f1e2c6a8baf66e8e8 (patch)
treebe6558d79d74cdf88a0170aa100275229483d8ef /llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
parent15689aeae972263d15e7d9c8f0eae0de1062af20 (diff)
downloadbcm5719-llvm-b9edcbcb1dc9f87bfd31ec7f1e2c6a8baf66e8e8.tar.gz
bcm5719-llvm-b9edcbcb1dc9f87bfd31ec7f1e2c6a8baf66e8e8.zip
Re-enable "[IndVars] Canonicalize comparisons between non-negative values and indvars"
The patch was reverted due to a bug. The bug was that if the IV is the 2nd operand of the icmp instruction, then the "Pred" variable gets swapped and differs from the instruction's predicate. In this patch we use the original predicate to do the transformation. Also added a test case that exercises this situation. Differentian Revision: https://reviews.llvm.org/D35107 llvm-svn: 307477
Diffstat (limited to 'llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll')
-rw-r--r--llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
index b87cd055019..2d24cd732ce 100644
--- a/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
+++ b/llvm/test/Transforms/IndVarSimplify/widen-loop-comp.ll
@@ -64,7 +64,7 @@ for.end:
; CHECK-LABEL: @test2
; CHECK: for.body4.us
; CHECK: %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
-; CHECK: %cmp2.us = icmp slt i64
+; CHECK: %cmp2.us = icmp ult i64
; CHECK-NOT: %2 = trunc i64 %indvars.iv.next to i32
; CHECK-NOT: %cmp2.us = icmp slt i32
OpenPOWER on IntegriCloud