mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
shift X, 0 -> X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19453 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6c07aee7c9
commit
a8d9cc8705
@ -612,6 +612,12 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
|
||||
}
|
||||
break;
|
||||
|
||||
case ISD::SHL:
|
||||
case ISD::SRL:
|
||||
case ISD::SRA:
|
||||
if (C2 == 0) return N1;
|
||||
break;
|
||||
|
||||
case ISD::AND:
|
||||
if (!C2) return N2; // X and 0 -> 0
|
||||
if (N2C->isAllOnesValue())
|
||||
|
Loading…
Reference in New Issue
Block a user