mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
[X86][AVX2] Prevent unary interleaving patterns from calling lowerVectorShuffleAsSplitOrBlend (PR32453)
llvm-svn: 298993
This commit is contained in:
parent
f862ab88d3
commit
68651f86d5
@ -12838,9 +12838,10 @@ static SDValue lowerV8I32VectorShuffle(const SDLoc &DL, ArrayRef<int> Mask,
|
||||
// For non-AVX512 if the Mask is of 16bit elements in lane then try to split
|
||||
// since after split we get a more efficient code than vblend by using
|
||||
// vpunpcklwd and vpunpckhwd instrs.
|
||||
if (isUnpackWdShuffleMask(Mask, MVT::v8i32) && !Subtarget.hasAVX512())
|
||||
if (SDValue V = lowerVectorShuffleAsSplitOrBlend(DL, MVT::v8i32, V1, V2,
|
||||
Mask, DAG))
|
||||
if (isUnpackWdShuffleMask(Mask, MVT::v8i32) && !V2.isUndef() &&
|
||||
!Subtarget.hasAVX512())
|
||||
if (SDValue V =
|
||||
lowerVectorShuffleAsSplitOrBlend(DL, MVT::v8i32, V1, V2, Mask, DAG))
|
||||
return V;
|
||||
|
||||
if (SDValue Blend = lowerVectorShuffleAsBlend(DL, MVT::v8i32, V1, V2, Mask,
|
||||
|
@ -2072,6 +2072,21 @@ define <8 x i32> @shuffle_v8i32_5555uuuu(<8 x i32> %a, <8 x i32> %b) {
|
||||
ret <8 x i32> %shuffle
|
||||
}
|
||||
|
||||
; PR32453
|
||||
define <8 x i32> @shuffle_v8i32_uuuuuu7u(<8 x i32> %a, <8 x i32> %b) nounwind {
|
||||
; AVX1-LABEL: shuffle_v8i32_uuuuuu7u:
|
||||
; AVX1: # BB#0:
|
||||
; AVX1-NEXT: vmovshdup {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7]
|
||||
; AVX1-NEXT: retq
|
||||
;
|
||||
; AVX2OR512VL-LABEL: shuffle_v8i32_uuuuuu7u:
|
||||
; AVX2OR512VL: # BB#0:
|
||||
; AVX2OR512VL-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[0,1,3,3,4,5,7,7]
|
||||
; AVX2OR512VL-NEXT: retq
|
||||
%shuffle = shufflevector <8 x i32> %a, <8 x i32> %b, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 undef, i32 7, i32 undef>
|
||||
ret <8 x i32> %shuffle
|
||||
}
|
||||
|
||||
define <8 x float> @splat_mem_v8f32_2(float* %p) {
|
||||
; ALL-LABEL: splat_mem_v8f32_2:
|
||||
; ALL: # BB#0:
|
||||
|
Loading…
Reference in New Issue
Block a user