mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
Back out previous commit, it isn't safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26006 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1288,12 +1288,6 @@ SDOperand DAGCombiner::visitSHL(SDNode *N) {
|
|||||||
// fold (shl 0, x) -> 0
|
// fold (shl 0, x) -> 0
|
||||||
if (N0C && N0C->isNullValue())
|
if (N0C && N0C->isNullValue())
|
||||||
return N0;
|
return N0;
|
||||||
// fold (shl c1, (add x, c2)) -> (shl c1 << c2, x)
|
|
||||||
if (N0C && N1.getOpcode() == ISD::ADD &&
|
|
||||||
N1.getOperand(1).getOpcode() == ISD::Constant) {
|
|
||||||
SDOperand LHS = DAG.getNode(ISD::SHL, VT, N0, N1.getOperand(1));
|
|
||||||
return DAG.getNode(ISD::SHL, VT, LHS, N1.getOperand(0));
|
|
||||||
}
|
|
||||||
// fold (shl x, c >= size(x)) -> undef
|
// fold (shl x, c >= size(x)) -> undef
|
||||||
if (N1C && N1C->getValue() >= OpSizeInBits)
|
if (N1C && N1C->getValue() >= OpSizeInBits)
|
||||||
return DAG.getNode(ISD::UNDEF, VT);
|
return DAG.getNode(ISD::UNDEF, VT);
|
||||||
|
Reference in New Issue
Block a user