mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Fix checking of intermediates having one use in isADDADDMUL
llvm-svn: 98164
This commit is contained in:
parent
a1f3ed1aeb
commit
8e7cdbef01
@ -607,10 +607,11 @@ isADDADDMUL(SDValue Op, SDValue &Mul0, SDValue &Mul1, SDValue &Addend0,
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (requireIntermediatesHaveOneUse && !AddOp.hasOneUse())
|
||||||
|
return false;
|
||||||
if (OtherOp.getOpcode() == ISD::MUL) {
|
if (OtherOp.getOpcode() == ISD::MUL) {
|
||||||
// add(add(a,b),mul(x,y))
|
// add(add(a,b),mul(x,y))
|
||||||
if (requireIntermediatesHaveOneUse &&
|
if (requireIntermediatesHaveOneUse && !OtherOp.hasOneUse())
|
||||||
(!OtherOp.hasOneUse() || !AddOp.hasOneUse()))
|
|
||||||
return false;
|
return false;
|
||||||
Mul0 = OtherOp.getOperand(0);
|
Mul0 = OtherOp.getOperand(0);
|
||||||
Mul1 = OtherOp.getOperand(1);
|
Mul1 = OtherOp.getOperand(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user