mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-11 00:39:36 +00:00
Remove an incorrect optimization that is performed correctly by
the target independent legalizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45631 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2281a99141
commit
219f67f0a5
@ -3608,17 +3608,7 @@ X86TargetLowering::LowerINSERT_VECTOR_ELT(SDOperand Op, SelectionDAG &DAG) {
|
||||
N2 = DAG.getConstant(cast<ConstantSDNode>(N2)->getValue(),getPointerTy());
|
||||
return DAG.getNode(X86ISD::PINSRW, VT, N0, N1, N2);
|
||||
}
|
||||
|
||||
N1 = DAG.getNode(ISD::SCALAR_TO_VECTOR, VT, N1);
|
||||
unsigned Idx = cast<ConstantSDNode>(N2)->getValue();
|
||||
MVT::ValueType MaskVT = MVT::getIntVectorWithNumElements(4);
|
||||
MVT::ValueType MaskEVT = MVT::getVectorElementType(MaskVT);
|
||||
SmallVector<SDOperand, 4> MaskVec;
|
||||
for (unsigned i = 0; i < 4; ++i)
|
||||
MaskVec.push_back(DAG.getConstant((i == Idx) ? i+4 : i, MaskEVT));
|
||||
return DAG.getNode(ISD::VECTOR_SHUFFLE, VT, N0, N1,
|
||||
DAG.getNode(ISD::BUILD_VECTOR, MaskVT,
|
||||
&MaskVec[0], MaskVec.size()));
|
||||
return SDOperand();
|
||||
}
|
||||
|
||||
SDOperand
|
||||
|
Loading…
x
Reference in New Issue
Block a user