mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Trivial patch to speed up legalizing common i64 constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
50662beab7
commit
b360729873
@ -1234,6 +1234,13 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
if (N2C && N2C->getValue() == 0)
|
||||
return N2;
|
||||
break;
|
||||
case ISD::OR:
|
||||
case ISD::XOR:
|
||||
// (X ^| 0) -> X. This commonly occurs when legalizing i64 values, so it's
|
||||
// worth handling here.
|
||||
if (N2C && N2C->getValue() == 0)
|
||||
return N1;
|
||||
break;
|
||||
case ISD::FP_ROUND_INREG:
|
||||
if (cast<VTSDNode>(N2)->getVT() == VT) return N1; // Not actually rounding.
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user