Skip to content

Commit 3218570

Browse files
committed
[X86] Add shuffle test case for Issue #86068
1 parent e84a985 commit 3218570

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

llvm/test/CodeGen/X86/oddshuffles.ll

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,31 @@ define void @PR41097() {
23692369
ret void
23702370
}
23712371

2372+
; FIXME - should use INSERTPS
2373+
define <2 x float> @PR86068(<2 x float> %0, <2 x float> %1) {
2374+
; SSE2-LABEL: PR86068:
2375+
; SSE2: # %bb.0: # %entry
2376+
; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[1,1],xmm1[1,1]
2377+
; SSE2-NEXT: shufps {{.*#+}} xmm0 = xmm0[2,0],xmm1[1,1]
2378+
; SSE2-NEXT: retq
2379+
;
2380+
; SSE42-LABEL: PR86068:
2381+
; SSE42: # %bb.0: # %entry
2382+
; SSE42-NEXT: movshdup {{.*#+}} xmm1 = xmm1[1,1,3,3]
2383+
; SSE42-NEXT: blendps {{.*#+}} xmm0 = xmm1[0],xmm0[1],xmm1[2,3]
2384+
; SSE42-NEXT: retq
2385+
;
2386+
; AVX-LABEL: PR86068:
2387+
; AVX: # %bb.0: # %entry
2388+
; AVX-NEXT: vmovshdup {{.*#+}} xmm1 = xmm1[1,1,3,3]
2389+
; AVX-NEXT: vblendps {{.*#+}} xmm0 = xmm1[0],xmm0[1],xmm1[2,3]
2390+
; AVX-NEXT: retq
2391+
entry:
2392+
%3 = shufflevector <2 x float> %1, <2 x float> poison, <2 x i32> <i32 1, i32 poison>
2393+
%4 = shufflevector <2 x float> %3, <2 x float> %0, <2 x i32> <i32 0, i32 3>
2394+
ret <2 x float> %4
2395+
}
2396+
23722397
define void @D107009(ptr %input, ptr %output) {
23732398
; SSE-LABEL: D107009:
23742399
; SSE: # %bb.0:

0 commit comments

Comments
 (0)