mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +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))
|
ShouldXformToMOVLP(V1.Val, PermMask.Val))
|
||||||
return CommuteVectorShuffle(Op, DAG);
|
return CommuteVectorShuffle(Op, DAG);
|
||||||
|
|
||||||
bool V1IsSplat = isSplatVector(V1.Val);
|
bool V1IsSplat = isSplatVector(V1.Val) || V1.getOpcode() == ISD::UNDEF;
|
||||||
bool V2IsSplat = isSplatVector(V2.Val);
|
bool V2IsSplat = isSplatVector(V2.Val) || V2.getOpcode() == ISD::UNDEF;
|
||||||
if (V1IsSplat && !V2IsSplat) {
|
if (V1IsSplat && !V2IsSplat) {
|
||||||
Op = CommuteVectorShuffle(Op, DAG);
|
Op = CommuteVectorShuffle(Op, DAG);
|
||||||
V1 = Op.getOperand(0);
|
V1 = Op.getOperand(0);
|
||||||
@ -3137,6 +3137,9 @@ SDOperand X86TargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
|||||||
return Op;
|
return Op;
|
||||||
|
|
||||||
unsigned NumElems = Op.getNumOperands();
|
unsigned NumElems = Op.getNumOperands();
|
||||||
|
if (NumElems == 2)
|
||||||
|
return SDOperand();
|
||||||
|
|
||||||
unsigned Half = NumElems/2;
|
unsigned Half = NumElems/2;
|
||||||
MVT::ValueType VT = Op.getValueType();
|
MVT::ValueType VT = Op.getValueType();
|
||||||
MVT::ValueType EVT = MVT::getVectorBaseType(VT);
|
MVT::ValueType EVT = MVT::getVectorBaseType(VT);
|
||||||
|
Loading…
Reference in New Issue
Block a user