mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-26 20:57:15 +00:00
Don't do all the lowering stuff for 2-wide build_vector's. Also, minor optimization for shuffle of undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27946 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a083af14c8
commit
1900c012f5
@ -2977,8 +2977,8 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||
ShouldXformToMOVLP(V1.Val, PermMask.Val))
|
||||
return CommuteVectorShuffle(Op, DAG);
|
||||
|
||||
bool V1IsSplat = isSplatVector(V1.Val);
|
||||
bool V2IsSplat = isSplatVector(V2.Val);
|
||||
bool V1IsSplat = isSplatVector(V1.Val) || V1.getOpcode() == ISD::UNDEF;
|
||||
bool V2IsSplat = isSplatVector(V2.Val) || V2.getOpcode() == ISD::UNDEF;
|
||||
if (V1IsSplat && !V2IsSplat) {
|
||||
Op = CommuteVectorShuffle(Op, DAG);
|
||||
V1 = Op.getOperand(0);
|
||||
@ -3137,6 +3137,9 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||
return Op;
|
||||
|
||||
unsigned NumElems = Op.getNumOperands();
|
||||
if (NumElems == 2)
|
||||
return SDOperand();
|
||||
|
||||
unsigned Half = NumElems/2;
|
||||
MVT::ValueType VT = Op.getValueType();
|
||||
MVT::ValueType EVT = MVT::getVectorBaseType(VT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user