forked from OSchip/llvm-project
[SelectionDAG] fold insert subvector of undef into undef
DAGCombiner simplifies this more liberally as: // If inserting an UNDEF, just return the original vector. if (N1.isUndef()) return N0; So there's no way to make this visible in output AFAIK, but doing this at node creation time should be slightly more efficient. llvm-svn: 361287
This commit is contained in:
parent
76e5a1d3c3
commit
10f6b39899
|
@ -5367,6 +5367,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT,
|
|||
break;
|
||||
}
|
||||
case ISD::INSERT_SUBVECTOR: {
|
||||
// Inserting undef into undef is still undef.
|
||||
if (N1.isUndef() && N2.isUndef())
|
||||
return getUNDEF(VT);
|
||||
SDValue Index = N3;
|
||||
if (VT.isSimple() && N1.getValueType().isSimple()
|
||||
&& N2.getValueType().isSimple()) {
|
||||
|
|
Loading…
Reference in New Issue