summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2022-01-04 09:10:02 -0800
committerPhilip Reames <listmail@philipreames.com>2022-01-04 09:44:23 -0800
commite18157c26b8e2a442bced5aeea6b4d99f54a6adb (patch)
treec6c6ec8382353f624095d4f86919e5c338d8b425
parentbc1df1fabb578c7efb33fb59e8aec6b85720f863 (diff)
downloadllvm-e18157c26b8e2a442bced5aeea6b4d99f54a6adb.tar.gz
Add extra test for D116499 requested in review
-rw-r--r--llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll b/llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll
index de05551ab7df..942f312599da 100644
--- a/llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll
+++ b/llvm/test/Analysis/ScalarEvolution/overflow-intrinsics-trip-count.ll
@@ -237,6 +237,30 @@ for.end: ; preds = %for.body, %entry
ret void
}
+define void @sadd_symbolic_swapped(i16 %start) {
+; CHECK-LABEL: 'sadd_symbolic_swapped'
+; CHECK-NEXT: Determining loop execution counts for: @sadd_symbolic_swapped
+; CHECK-NEXT: Loop %for.body: Unpredictable backedge-taken count.
+; CHECK-NEXT: Loop %for.body: Unpredictable max backedge-taken count.
+; CHECK-NEXT: Loop %for.body: Unpredictable predicated backedge-taken count.
+;
+entry:
+ br i1 undef, label %for.end, label %for.body.preheader
+
+for.body.preheader: ; preds = %entry
+ br label %for.body
+
+for.body: ; preds = %for.body.preheader, %for.body
+ %indvars.iv = phi i16 [ %math, %for.body ], [ %start, %for.body.preheader ]
+ %0 = call { i16, i1 } @llvm.sadd.with.overflow.i16(i16 %indvars.iv, i16 1)
+ %math = extractvalue { i16, i1 } %0, 0
+ %ov = extractvalue { i16, i1 } %0, 1
+ br i1 %ov, label %for.body, label %for.end
+
+for.end: ; preds = %for.body, %entry
+ ret void
+}
+
define void @usub_symbolic_start(i16 %start) {
; CHECK-LABEL: 'usub_symbolic_start'
; CHECK-NEXT: Determining loop execution counts for: @usub_symbolic_start