summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/IndVarSimplify
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-06-17 19:27:45 +0000
committerPhilip Reames <listmail@philipreames.com>2019-06-17 19:27:45 +0000
commit58c75565f319bd18c82992689fd97d7d2a86500e (patch)
tree56492bf0332d1f00dc750bb199f977530ee68ba6 /llvm/test/Transforms/IndVarSimplify
parent8af7198c6caa17b82b4ed1f0ea95f8e8a046fc41 (diff)
downloadbcm5719-llvm-58c75565f319bd18c82992689fd97d7d2a86500e.tar.gz
bcm5719-llvm-58c75565f319bd18c82992689fd97d7d2a86500e.zip
Reduced test case for pr42279 in advance of the relevant re-commit + fix
llvm-svn: 363601
Diffstat (limited to 'llvm/test/Transforms/IndVarSimplify')
-rw-r--r--llvm/test/Transforms/IndVarSimplify/lftr.ll31
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/Transforms/IndVarSimplify/lftr.ll b/llvm/test/Transforms/IndVarSimplify/lftr.ll
index 114e4ae8e88..8a510b91ff7 100644
--- a/llvm/test/Transforms/IndVarSimplify/lftr.ll
+++ b/llvm/test/Transforms/IndVarSimplify/lftr.ll
@@ -599,3 +599,34 @@ for.end: ; preds = %for.end.loopexit, %
%sum.0.lcssa = phi float [ 0.000000e+00, %entry ], [ %add1.lcssa, %for.end.loopexit ]
ret float %sum.0.lcssa
}
+
+define void @ptr_non_cmp_exit_test() {
+; CHECK-LABEL: @ptr_non_cmp_exit_test(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: br label [[FOR_BODY29:%.*]]
+; CHECK: for.body29:
+; CHECK-NEXT: [[IV:%.*]] = phi i8* [ null, [[ENTRY:%.*]] ], [ [[IV_NEXT:%.*]], [[FOR_BODY29]] ]
+; CHECK-NEXT: [[TMP0:%.*]] = load volatile i8, i8* [[IV]], align 1
+; CHECK-NEXT: [[IV_NEXT]] = getelementptr inbounds i8, i8* [[IV]], i64 1
+; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ne i8* [[IV_NEXT]], inttoptr (i64 11 to i8*)
+; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_BODY29]], label [[EXIT:%.*]]
+; CHECK: exit:
+; CHECK-NEXT: ret void
+;
+entry:
+ br label %for.body29
+
+for.body29:
+ %iv = phi i8* [ null, %entry ], [ %iv.next, %for.body29 ]
+ load volatile i8, i8* %iv, align 1
+ %iv.next = getelementptr inbounds i8, i8* %iv, i64 1
+ %cmp = icmp ne i8* %iv.next, inttoptr (i64 11 to i8*)
+ %and = and i1 %cmp, %cmp
+ br i1 %and, label %for.body29, label %exit
+
+exit:
+ ret void
+}
+
+
+
OpenPOWER on IntegriCloud