mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Optimize away insertelement of an undef value. This shows up in
test/Codegen/ARM/reg_sequence.ll but it doesn't affect the generated code because the coalescer cleans it up. Radar 7998853. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a7f1354eb5
commit
492fd454ca
@ -6024,6 +6024,10 @@ SDValue DAGCombiner::visitINSERT_VECTOR_ELT(SDNode *N) {
|
||||
SDValue InVal = N->getOperand(1);
|
||||
SDValue EltNo = N->getOperand(2);
|
||||
|
||||
// If the inserted element is an UNDEF, just use the input vector.
|
||||
if (InVal.getOpcode() == ISD::UNDEF)
|
||||
return InVec;
|
||||
|
||||
// If the invec is a BUILD_VECTOR and if EltNo is a constant, build a new
|
||||
// vector with the inserted element.
|
||||
if (InVec.getOpcode() == ISD::BUILD_VECTOR && isa<ConstantSDNode>(EltNo)) {
|
||||
|
Loading…
Reference in New Issue
Block a user