[llvm] b3d2a96 - [Test] One more test for 'ne' and-reduce pattern
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 27 21:11:50 PST 2022
Author: Max Kazantsev
Date: 2022-01-28T12:11:37+07:00
New Revision: b3d2a96d6587a9a2f49d1699090a23d0e2b477b5
URL: https://github.com/llvm/llvm-project/commit/b3d2a96d6587a9a2f49d1699090a23d0e2b477b5
DIFF: https://github.com/llvm/llvm-project/commit/b3d2a96d6587a9a2f49d1699090a23d0e2b477b5.diff
LOG: [Test] One more test for 'ne' and-reduce pattern
Added:
Modified:
llvm/test/Transforms/InstCombine/icmp-vec.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/InstCombine/icmp-vec.ll b/llvm/test/Transforms/InstCombine/icmp-vec.ll
index 80cdab1348c6..39067e68688f 100644
--- a/llvm/test/Transforms/InstCombine/icmp-vec.ll
+++ b/llvm/test/Transforms/InstCombine/icmp-vec.ll
@@ -441,6 +441,19 @@ define i1 @eq_cast_ne-1(<2 x i7> %x, <2 x i7> %y) {
ret i1 %r
}
+define i1 @eq_cast_ne-1-legal-scalar(<2 x i8> %x, <2 x i8> %y) {
+; CHECK-LABEL: @eq_cast_ne-1-legal-scalar(
+; CHECK-NEXT: [[IC:%.*]] = icmp ne <2 x i8> [[X:%.*]], [[Y:%.*]]
+; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i1> [[IC]] to i2
+; CHECK-NEXT: [[R:%.*]] = icmp ne i2 [[TMP1]], 0
+; CHECK-NEXT: ret i1 [[R]]
+;
+ %ic = icmp eq <2 x i8> %x, %y
+ %b = bitcast <2 x i1> %ic to i2
+ %r = icmp ne i2 %b, -1
+ ret i1 %r
+}
+
define i1 @ne_cast_ne-1(<3 x i5> %x, <3 x i5> %y) {
; CHECK-LABEL: @ne_cast_ne-1(
; CHECK-NEXT: [[IC:%.*]] = icmp eq <3 x i5> [[X:%.*]], [[Y:%.*]]
More information about the llvm-commits
mailing list