mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-19 18:24:05 +00:00
Revert my previous change -- the subtraction of two constants was a no-op
before. This is taken care of in the selection DAG pass. In my opinion, this should be in one place or the other. I.e., it should probably be removed from the DAG combiner (along with the other arithmetic transformations on constants that are essentially no-ops). llvm-svn: 55889
This commit is contained in:
parent
91e9abe370
commit
2239de4290
@ -1111,7 +1111,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
|
||||
return DAG.getConstant(0, N->getValueType(0));
|
||||
// fold (sub c1, c2) -> c1-c2
|
||||
if (N0C && N1C)
|
||||
return DAG.getConstant(N0C->getAPIntValue() - N1C->getAPIntValue(), VT);
|
||||
return DAG.getNode(ISD::SUB, VT, N0, N1);
|
||||
// fold (sub x, c) -> (add x, -c)
|
||||
if (N1C)
|
||||
return DAG.getNode(ISD::ADD, VT, N0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user