mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
Don't do all the lowering stuff for 2-wide build_vector's. Also, minor optimization for shuffle of undef.
llvm-svn: 27946
This commit is contained in:
parent
ec33bd04fb
commit
1c33e83af5
@ -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…
Reference in New Issue
Block a user