mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Minor optimization. sign-ext/anyext of undef is still undef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127598 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2482,6 +2482,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,
|
||||
"Vector element count mismatch!");
|
||||
if (OpOpcode == ISD::SIGN_EXTEND || OpOpcode == ISD::ZERO_EXTEND)
|
||||
return getNode(OpOpcode, DL, VT, Operand.getNode()->getOperand(0));
|
||||
else if (OpOpcode == ISD::UNDEF)
|
||||
return getUNDEF(VT);
|
||||
break;
|
||||
case ISD::ZERO_EXTEND:
|
||||
assert(VT.isInteger() && Operand.getValueType().isInteger() &&
|
||||
@@ -2512,6 +2514,8 @@ SDValue SelectionDAG::getNode(unsigned Opcode, DebugLoc DL,
|
||||
OpOpcode == ISD::ANY_EXTEND)
|
||||
// (ext (zext x)) -> (zext x) and (ext (sext x)) -> (sext x)
|
||||
return getNode(OpOpcode, DL, VT, Operand.getNode()->getOperand(0));
|
||||
else if (OpOpcode == ISD::UNDEF)
|
||||
return getUNDEF(VT);
|
||||
|
||||
// (ext (trunx x)) -> x
|
||||
if (OpOpcode == ISD::TRUNCATE) {
|
||||
|
Reference in New Issue
Block a user