[llvm] f68dbbb - [VectorCombine] Add test coverage for #121110
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 28 01:54:38 PST 2024
Author: Simon Pilgrim
Date: 2024-12-28T09:21:31Z
New Revision: f68dbbbd57dd0947730300d1e827ad16c2dfffb5
URL: https://github.com/llvm/llvm-project/commit/f68dbbbd57dd0947730300d1e827ad16c2dfffb5
DIFF: https://github.com/llvm/llvm-project/commit/f68dbbbd57dd0947730300d1e827ad16c2dfffb5.diff
LOG: [VectorCombine] Add test coverage for #121110
Added:
Modified:
llvm/test/Transforms/VectorCombine/X86/shuffle-of-cmps.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/VectorCombine/X86/shuffle-of-cmps.ll b/llvm/test/Transforms/VectorCombine/X86/shuffle-of-cmps.ll
index b3360b61e66e81..6ee60287e62dc8 100644
--- a/llvm/test/Transforms/VectorCombine/X86/shuffle-of-cmps.ll
+++ b/llvm/test/Transforms/VectorCombine/X86/shuffle-of-cmps.ll
@@ -275,3 +275,26 @@ define <4 x i32> @shuf_icmp_ugt_v4i32_use(<4 x i32> %x, <4 x i32> %y, <4 x i32>
%r = sext <4 x i1> %s to <4 x i32>
ret <4 x i32> %r
}
+
+; TODO: PR121110 - don't merge equivalent (but not matching) predicates
+define <2 x i1> @PR121110() {
+; CHECK-LABEL: define <2 x i1> @PR121110(
+; CHECK-SAME: ) #[[ATTR0]] {
+; CHECK-NEXT: ret <2 x i1> zeroinitializer
+;
+ %ugt = icmp samesign ugt <2 x i32> < i32 0, i32 0 >, < i32 0, i32 0 >
+ %sgt = icmp sgt <2 x i32> < i32 0, i32 0 >, < i32 6, i32 4294967292 >
+ %res = shufflevector <2 x i1> %ugt, <2 x i1> %sgt, <2 x i32> <i32 0, i32 3>
+ ret <2 x i1> %res
+}
+
+define <2 x i1> @PR121110_commute() {
+; CHECK-LABEL: define <2 x i1> @PR121110_commute(
+; CHECK-SAME: ) #[[ATTR0]] {
+; CHECK-NEXT: ret <2 x i1> zeroinitializer
+;
+ %sgt = icmp sgt <2 x i32> < i32 0, i32 0 >, < i32 6, i32 4294967292 >
+ %ugt = icmp samesign ugt <2 x i32> < i32 0, i32 0 >, < i32 0, i32 0 >
+ %res = shufflevector <2 x i1> %sgt, <2 x i1> %ugt, <2 x i32> <i32 0, i32 3>
+ ret <2 x i1> %res
+}
More information about the llvm-commits
mailing list