diff options
| author | Chandler Carruth <chandlerc@gmail.com> | 2014-09-21 11:40:39 +0000 |
|---|---|---|
| committer | Chandler Carruth <chandlerc@gmail.com> | 2014-09-21 11:40:39 +0000 |
| commit | 3dccabaf35a51989cc1fcd4bb4e748419fbe9801 (patch) | |
| tree | 2f1b2a6889572ff504692537973c152e5ed48471 /llvm/lib/Target/X86 | |
| parent | e81bfbada94615231ae24efd186155a2c6bc1152 (diff) | |
| download | bcm5719-llvm-3dccabaf35a51989cc1fcd4bb4e748419fbe9801.tar.gz bcm5719-llvm-3dccabaf35a51989cc1fcd4bb4e748419fbe9801.zip | |
[x86] Explicitly lower to a blend early if it is trivial to do so for
v8f32 shuffles in the new vector shuffle lowering code.
This is very cheap to do and makes it much more clear that anything more
expensive but overlapping with this lowering should be selected
afterward (for example using AVX2's VPERMPS). However, no functionality
changed here as without this code we would fall through to create no-op
shuffles of each input and a blend. =]
llvm-svn: 218209
Diffstat (limited to 'llvm/lib/Target/X86')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index a3871339a49..bfe52247b7a 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -7238,6 +7238,7 @@ static SDValue lowerVectorShuffleAsBlend(SDLoc DL, MVT VT, SDValue V1, case MVT::v2f64: case MVT::v4f32: case MVT::v4f64: + case MVT::v8f32: return DAG.getNode(X86ISD::BLENDI, DL, VT, V1, V2, DAG.getConstant(BlendMask, MVT::i8)); @@ -9319,6 +9320,10 @@ static SDValue lowerV8F32VectorShuffle(SDValue Op, SDValue V1, SDValue V2, isSingleInputShuffleMask(Mask)) return splitAndLower256BitVectorShuffle(Op, V1, V2, Subtarget, DAG); + if (SDValue Blend = + lowerVectorShuffleAsBlend(DL, MVT::v8f32, V1, V2, Mask, DAG)) + return Blend; + // Shuffle the input elements into the desired positions in V1 and V2 and // blend them together. int V1Mask[] = {-1, -1, -1, -1, -1, -1, -1, -1}; |

