[llvm] 1f88048 - [CVP] Add test for !range being ignored on supported intrinsic (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 06:06:57 PST 2023
Author: Nikita Popov
Date: 2023-01-26T15:06:48+01:00
New Revision: 1f88048f2d62d982885efa938f43a643ac4565a5
URL: https://github.com/llvm/llvm-project/commit/1f88048f2d62d982885efa938f43a643ac4565a5
DIFF: https://github.com/llvm/llvm-project/commit/1f88048f2d62d982885efa938f43a643ac4565a5.diff
LOG: [CVP] Add test for !range being ignored on supported intrinsic (NFC)
Added:
Modified:
llvm/test/Transforms/CorrelatedValuePropagation/range.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/CorrelatedValuePropagation/range.ll b/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
index 435a096a6e1ef..458ecae0cbc3d 100644
--- a/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
+++ b/llvm/test/Transforms/CorrelatedValuePropagation/range.ll
@@ -946,5 +946,19 @@ define i1 @intrinsic_range(i16 %x) {
ret i1 %res
}
+define i1 @supported_intrinsic_range(i16 %x) {
+; CHECK-LABEL: @supported_intrinsic_range(
+; CHECK-NEXT: [[ABS:%.*]] = call i16 @llvm.abs.i16(i16 [[X:%.*]], i1 false), !range [[RNG5]]
+; CHECK-NEXT: [[TRUNC:%.*]] = trunc i16 [[ABS]] to i8
+; CHECK-NEXT: [[RES:%.*]] = icmp ult i8 [[TRUNC]], 8
+; CHECK-NEXT: ret i1 [[RES]]
+;
+ %abs = call i16 @llvm.abs.i16(i16 %x, i1 false), !range !{i16 0, i16 8}
+ %trunc = trunc i16 %abs to i8
+ %res = icmp ult i8 %trunc, 8
+ ret i1 %res
+}
+
declare i16 @llvm.ctlz.i16(i16, i1)
+declare i16 @llvm.abs.i16(i16, i1)
declare void @llvm.assume(i1)
More information about the llvm-commits
mailing list