[llvm] 3218570 - [X86] Add shuffle test case for Issue #86068
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 10:57:15 PDT 2024
Author: Simon Pilgrim
Date: 2024-03-21T17:56:58Z
New Revision: 3218570620a320573dfd3315da8277600a010bc1
URL: https://github.com/llvm/llvm-project/commit/3218570620a320573dfd3315da8277600a010bc1
DIFF: https://github.com/llvm/llvm-project/commit/3218570620a320573dfd3315da8277600a010bc1.diff
LOG: [X86] Add shuffle test case for Issue #86068
Added:
Modified:
llvm/test/CodeGen/X86/oddshuffles.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/oddshuffles.ll b/llvm/test/CodeGen/X86/oddshuffles.ll
index 5da18ee6ad7c48..01056a8b2c24a9 100644
--- a/llvm/test/CodeGen/X86/oddshuffles.ll
+++ b/llvm/test/CodeGen/X86/oddshuffles.ll
@@ -2369,6 +2369,31 @@ define void @PR41097() {
ret void
}
+; FIXME - should use INSERTPS
+define <2 x float> @PR86068(<2 x float> %0, <2 x float> %1) {
+; SSE2-LABEL: PR86068:
+; SSE2: # %bb.0: # %entry
+; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1],xmm1[1,1]
+; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm1[1,1]
+; SSE2-NEXT: retq
+;
+; SSE42-LABEL: PR86068:
+; SSE42: # %bb.0: # %entry
+; SSE42-NEXT: movshdup {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; SSE42-NEXT: blendps {{.*#+}} xmm0 = xmm1[0],xmm0[1],xmm1[2,3]
+; SSE42-NEXT: retq
+;
+; AVX-LABEL: PR86068:
+; AVX: # %bb.0: # %entry
+; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm1[1,1,3,3]
+; AVX-NEXT: vblendps {{.*#+}} xmm0 = xmm1[0],xmm0[1],xmm1[2,3]
+; AVX-NEXT: retq
+entry:
+ %3 = shufflevector <2 x float> %1, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
+ %4 = shufflevector <2 x float> %3, <2 x float> %0, <2 x i32> <i32 0, i32 3>
+ ret <2 x float> %4
+}
+
define void @D107009(ptr %input, ptr %output) {
; SSE-LABEL: D107009:
; SSE: # %bb.0:
More information about the llvm-commits
mailing list