diff options
-rw-r--r-- | lib/Target/XCore/XCoreISelLowering.cpp | 10 | ||||
-rw-r--r-- | lib/Target/XCore/XCoreISelLowering.h | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index ad4dcfc67f..90d29871d8 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -584,7 +584,7 @@ LowerUMUL_LOHI(SDValue Op, SelectionDAG &DAG) } SDValue XCoreTargetLowering:: -TryExpandADDSUBWithMul(SDNode *N, SelectionDAG &DAG) +TryExpandADDWithMul(SDNode *N, SelectionDAG &DAG) { SDValue Mul; SDValue Other; @@ -650,9 +650,11 @@ ExpandADDSUB(SDNode *N, SelectionDAG &DAG) (N->getOpcode() == ISD::ADD || N->getOpcode() == ISD::SUB) && "Unknown operand to lower!"); - SDValue Result = TryExpandADDSUBWithMul(N, DAG); - if (Result.getNode() != 0) - return Result; + if (N->getOpcode() == ISD::ADD) { + SDValue Result = TryExpandADDWithMul(N, DAG); + if (Result.getNode() != 0) + return Result; + } DebugLoc dl = N->getDebugLoc(); diff --git a/lib/Target/XCore/XCoreISelLowering.h b/lib/Target/XCore/XCoreISelLowering.h index 6928138386..f597780d69 100644 --- a/lib/Target/XCore/XCoreISelLowering.h +++ b/lib/Target/XCore/XCoreISelLowering.h @@ -151,7 +151,7 @@ namespace llvm { EVT VT) const; // Expand specifics - SDValue TryExpandADDSUBWithMul(SDNode *Op, SelectionDAG &DAG); + SDValue TryExpandADDWithMul(SDNode *Op, SelectionDAG &DAG); SDValue ExpandADDSUB(SDNode *Op, SelectionDAG &DAG); virtual SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const; |