aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/XCore
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2010-03-10 16:27:11 +0000
committerRichard Osborne <richard@xmos.com>2010-03-10 16:27:11 +0000
commit25ab35e8c778d66df512673064a87a602e1b9184 (patch)
treed9cd8dd87cfa5f158c2f32c7928d574e1eefb792 /lib/Target/XCore
parent2dacd1e9873a4fefb97c7cdf5317c5a5c6150a76 (diff)
downloadexternal_llvm-25ab35e8c778d66df512673064a87a602e1b9184.zip
external_llvm-25ab35e8c778d66df512673064a87a602e1b9184.tar.gz
external_llvm-25ab35e8c778d66df512673064a87a602e1b9184.tar.bz2
Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r--lib/Target/XCore/XCoreISelLowering.cpp10
-rw-r--r--lib/Target/XCore/XCoreISelLowering.h2
2 files changed, 7 insertions, 5 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp
index ad4dcfc..90d2987 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 6928138..f597780 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;