forked from OSchip/llvm-project
[x86] don't create an unused constant vector
Noticed while scanning through debug spew. Creating unused nodes is inefficient and makes following the debug output harder.
This commit is contained in:
parent
c96001035d
commit
de6f7eb47e
|
@ -16100,13 +16100,14 @@ static SDValue lowerV8F32Shuffle(const SDLoc &DL, ArrayRef<int> Mask,
|
|||
// If we have a single input shuffle with different shuffle patterns in the
|
||||
// two 128-bit lanes use the variable mask to VPERMILPS.
|
||||
if (V2.isUndef()) {
|
||||
if (!is128BitLaneCrossingShuffleMask(MVT::v8f32, Mask)) {
|
||||
SDValue VPermMask = getConstVector(Mask, MVT::v8i32, DAG, DL, true);
|
||||
if (!is128BitLaneCrossingShuffleMask(MVT::v8f32, Mask))
|
||||
return DAG.getNode(X86ISD::VPERMILPV, DL, MVT::v8f32, V1, VPermMask);
|
||||
|
||||
if (Subtarget.hasAVX2())
|
||||
}
|
||||
if (Subtarget.hasAVX2()) {
|
||||
SDValue VPermMask = getConstVector(Mask, MVT::v8i32, DAG, DL, true);
|
||||
return DAG.getNode(X86ISD::VPERMV, DL, MVT::v8f32, VPermMask, V1);
|
||||
|
||||
}
|
||||
// Otherwise, fall back.
|
||||
return lowerShuffleAsLanePermuteAndShuffle(DL, MVT::v8f32, V1, V2, Mask,
|
||||
DAG, Subtarget);
|
||||
|
|
Loading…
Reference in New Issue