mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Add a missing case in visitADD.
llvm-svn: 60137
This commit is contained in:
parent
4da44412cf
commit
0d6dd4bdb9
@ -1010,6 +1010,9 @@ SDValue DAGCombiner::visitADD(SDNode *N) {
|
|||||||
// fold (A+(B-A)) -> B
|
// fold (A+(B-A)) -> B
|
||||||
if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1))
|
if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1))
|
||||||
return N1.getOperand(0);
|
return N1.getOperand(0);
|
||||||
|
// fold ((B-A)+A) -> B
|
||||||
|
if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1))
|
||||||
|
return N0.getOperand(0);
|
||||||
|
|
||||||
if (!VT.isVector() && SimplifyDemandedBits(SDValue(N, 0)))
|
if (!VT.isVector() && SimplifyDemandedBits(SDValue(N, 0)))
|
||||||
return SDValue(N, 0);
|
return SDValue(N, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user