mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00:00
Make SelectionDAG::getVectorShuffle work properly for VECTOR_SHUFFLE
nodes with operand types that differ from the result type. (This doesn't normally happen right now, because SelectionDAGLowering::visitShuffleVector normalizes vector shuffles.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75081 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
44f7bbd531
commit
2e4284de53
@ -1187,7 +1187,7 @@ SDValue SelectionDAG::getVectorShuffle(MVT VT, DebugLoc dl, SDValue N1,
|
||||
|
||||
// Canonicalize shuffle undef, undef -> undef
|
||||
if (N1.getOpcode() == ISD::UNDEF && N2.getOpcode() == ISD::UNDEF)
|
||||
return N1;
|
||||
return getUNDEF(VT);
|
||||
|
||||
// Validate that all indices in Mask are within the range of the elements
|
||||
// input to the shuffle.
|
||||
@ -1239,7 +1239,7 @@ SDValue SelectionDAG::getVectorShuffle(MVT VT, DebugLoc dl, SDValue N1,
|
||||
if (MaskVec[i] >= 0 && MaskVec[i] != (int)i) Identity = false;
|
||||
if (MaskVec[i] >= 0) AllUndef = false;
|
||||
}
|
||||
if (Identity)
|
||||
if (Identity && NElts == N1.getValueType().getVectorNumElements())
|
||||
return N1;
|
||||
if (AllUndef)
|
||||
return getUNDEF(VT);
|
||||
|
Loading…
Reference in New Issue
Block a user