[llvm] b62c81b - [VectorCombine] add test with non-canonical shuffle mask; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 7 09:15:10 PST 2022
Author: Sanjay Patel
Date: 2022-11-07T12:07:37-05:00
New Revision: b62c81b836512a5d38717f47d18ef5ddf32c3e2a
URL: https://github.com/llvm/llvm-project/commit/b62c81b836512a5d38717f47d18ef5ddf32c3e2a
DIFF: https://github.com/llvm/llvm-project/commit/b62c81b836512a5d38717f47d18ef5ddf32c3e2a.diff
LOG: [VectorCombine] add test with non-canonical shuffle mask; NFC
D137341
Added:
Modified:
llvm/test/Transforms/VectorCombine/X86/load-widening.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/VectorCombine/X86/load-widening.ll b/llvm/test/Transforms/VectorCombine/X86/load-widening.ll
index 384c6fa474a00..40f610d3343c6 100644
--- a/llvm/test/Transforms/VectorCombine/X86/load-widening.ll
+++ b/llvm/test/Transforms/VectorCombine/X86/load-widening.ll
@@ -339,3 +339,14 @@ define <4 x i32> @load_v2i32_v4i32_non_canonical_mask(ptr dereferenceable(16) %p
%s = shufflevector <2 x i32> %l, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 2, i32 undef>
ret <4 x i32> %s
}
+
+define <4 x i32> @load_v2i32_v4i32_non_canonical_mask_commute(ptr dereferenceable(16) %p) {
+; CHECK-LABEL: @load_v2i32_v4i32_non_canonical_mask_commute(
+; CHECK-NEXT: [[L:%.*]] = load <2 x i32>, ptr [[P:%.*]], align 1
+; CHECK-NEXT: [[S:%.*]] = shufflevector <2 x i32> poison, <2 x i32> [[L]], <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
+; CHECK-NEXT: ret <4 x i32> [[S]]
+;
+ %l = load <2 x i32>, ptr %p, align 1
+ %s = shufflevector <2 x i32> poison, <2 x i32> %l, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
+ ret <4 x i32> %s
+}
More information about the llvm-commits
mailing list