summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-03-26 17:28:26 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-03-26 17:28:26 +0000
commit14598830fe9ea08c1cb073390b2d79f79a2a9342 (patch)
tree719c4bb0297e9d3805a4ea894a08f6b4de498f4a /llvm/test
parent0781e98cc74223fd73491bc44a9d406f2c0b41c1 (diff)
downloadbcm5719-llvm-14598830fe9ea08c1cb073390b2d79f79a2a9342.tar.gz
bcm5719-llvm-14598830fe9ea08c1cb073390b2d79f79a2a9342.zip
[SCEV] Revert bailout added in r75511.
Summary: With the introduction of MarkPendingLoopPredicates in r157092, I don't think the bailout is needed anymore. Reviewers: atrick, nicholas Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8624 llvm-svn: 233296
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/ext-antecedent.ll45
1 files changed, 45 insertions, 0 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/ext-antecedent.ll b/llvm/test/Analysis/ScalarEvolution/ext-antecedent.ll
new file mode 100644
index 00000000000..e8d38133ad3
--- /dev/null
+++ b/llvm/test/Analysis/ScalarEvolution/ext-antecedent.ll
@@ -0,0 +1,45 @@
+; RUN: opt -S -indvars < %s | FileCheck %s
+
+declare void @use(i1)
+
+define void @sext_condition(i8 %t) {
+; CHECK-LABEL: sext_condition
+ entry:
+ %st = sext i8 %t to i16
+ %ecmp = icmp slt i16 %st, 42
+ br i1 %ecmp, label %loop, label %exit
+
+ loop:
+; CHECK-LABEL: loop
+ %idx = phi i8 [ %t, %entry ], [ %idx.inc, %loop ]
+ %idx.inc = add i8 %idx, 1
+ %c = icmp slt i8 %idx, 42
+; CHECK: call void @use(i1 true)
+ call void @use(i1 %c)
+ %be = icmp slt i8 %idx.inc, 42
+ br i1 %be, label %loop, label %exit
+
+ exit:
+ ret void
+}
+
+define void @zext_condition(i8 %t) {
+; CHECK-LABEL: zext_condition
+ entry:
+ %st = zext i8 %t to i16
+ %ecmp = icmp ult i16 %st, 42
+ br i1 %ecmp, label %loop, label %exit
+
+ loop:
+; CHECK-LABEL: loop
+ %idx = phi i8 [ %t, %entry ], [ %idx.inc, %loop ]
+ %idx.inc = add i8 %idx, 1
+ %c = icmp ult i8 %idx, 42
+; CHECK: call void @use(i1 true)
+ call void @use(i1 %c)
+ %be = icmp ult i8 %idx.inc, 42
+ br i1 %be, label %loop, label %exit
+
+ exit:
+ ret void
+}
OpenPOWER on IntegriCloud