[llvm] 6a28fa3 - [X86] Add test coverage for shuffle with freeze
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 22 12:18:02 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-22T20:12:41+01:00
New Revision: 6a28fa35302cf58e26c943b0a27e18782523abf2
URL: https://github.com/llvm/llvm-project/commit/6a28fa35302cf58e26c943b0a27e18782523abf2
DIFF: https://github.com/llvm/llvm-project/commit/6a28fa35302cf58e26c943b0a27e18782523abf2.diff
LOG: [X86] Add test coverage for shuffle with freeze
Added:
Modified:
llvm/test/CodeGen/X86/freeze-vector.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/freeze-vector.ll b/llvm/test/CodeGen/X86/freeze-vector.ll
index af34e5667fa9..c30805979c2c 100644
--- a/llvm/test/CodeGen/X86/freeze-vector.ll
+++ b/llvm/test/CodeGen/X86/freeze-vector.ll
@@ -12,3 +12,15 @@ define <4 x i32> @freeze_insert_subvector(<8 x i32> %a0) nounwind {
%z = shufflevector <8 x i32> %y, <8 x i32> poison, <4 x i32> <i32 4, i32 5, i32 6, i32 7>
ret <4 x i32> %z
}
+
+define <4 x i32> @freeze_shufflevector(<4 x i32> %a0) nounwind {
+; CHECK-LABEL: freeze_shufflevector:
+; CHECK: # %bb.0:
+; CHECK-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
+; CHECK-NEXT: vpermilps {{.*#+}} xmm0 = xmm0[3,2,1,0]
+; CHECK-NEXT: ret{{[l|q]}}
+ %x = shufflevector <4 x i32> %a0, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+ %y = freeze <4 x i32> %x
+ %z = shufflevector <4 x i32> %y, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
+ ret <4 x i32> %z
+}
More information about the llvm-commits
mailing list