From ea670df852cb33fff0d24ce3fa3b4d075ff93f1e Mon Sep 17 00:00:00 2001 From: Richard Osborne Date: Wed, 10 Mar 2010 17:16:29 +0000 Subject: [PATCH] Fix checking of intermediates having one use in isADDADDMUL git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98164 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/XCore/XCoreISelLowering.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index 7dc0274f268..82492193d20 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -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);