1
0
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:
Richard Osborne 2010-03-10 17:16:29 +00:00
parent a1f3ed1aeb
commit 8e7cdbef01

View File

@ -607,10 +607,11 @@ isADDADDMUL(SDValue Op, SDValue &Mul0, SDValue &Mul1, SDValue &Addend0,
} else {
return false;
}
if (requireIntermediatesHaveOneUse && !AddOp.hasOneUse())
return false;
if (OtherOp.getOpcode() == ISD::MUL) {
// add(add(a,b),mul(x,y))
if (requireIntermediatesHaveOneUse &&
(!OtherOp.hasOneUse() || !AddOp.hasOneUse()))
if (requireIntermediatesHaveOneUse && !OtherOp.hasOneUse())
return false;
Mul0 = OtherOp.getOperand(0);
Mul1 = OtherOp.getOperand(1);