mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Revise my previous change 68996 as suggested by Duncan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69607 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -3811,12 +3811,8 @@ ConstantFoldBIT_CONVERTofBUILD_VECTOR(SDNode *BV, MVT DstEltVT) {
|
||||
SDValue Op = BV->getOperand(i);
|
||||
// If the vector element type is not legal, the BUILD_VECTOR operands
|
||||
// are promoted and implicitly truncated. Make that explicit here.
|
||||
if (Op.getValueType() != SrcEltVT) {
|
||||
if (Op.getOpcode() == ISD::UNDEF)
|
||||
Op = DAG.getUNDEF(SrcEltVT);
|
||||
else
|
||||
Op = DAG.getNode(ISD::TRUNCATE, BV->getDebugLoc(), SrcEltVT, Op);
|
||||
}
|
||||
if (Op.getValueType() != SrcEltVT)
|
||||
Op = DAG.getNode(ISD::TRUNCATE, BV->getDebugLoc(), SrcEltVT, Op);
|
||||
Ops.push_back(DAG.getNode(ISD::BIT_CONVERT, BV->getDebugLoc(),
|
||||
DstEltVT, Op));
|
||||
AddToWorkList(Ops.back().getNode());
|
||||
|
Reference in New Issue
Block a user