summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-09-10 22:09:31 +0000
committerBob Wilson <bob.wilson@apple.com>2009-09-10 22:09:31 +0000
commit39f51320cad0a96ec6577d107f3de3f155ad179c (patch)
tree2a2ab6477325393fc3c4cb85432b605f9bf1bd99 /llvm/lib/CodeGen
parent50f0376f49775aeb580b9428d8ac081e395b21c5 (diff)
downloadbcm5719-llvm-39f51320cad0a96ec6577d107f3de3f155ad179c.tar.gz
bcm5719-llvm-39f51320cad0a96ec6577d107f3de3f155ad179c.zip
Don't swap the operands of a subtraction when trying to create a
post-decrement load/store. llvm-svn: 81464
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 58f931234e1..8236ca404df 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4715,7 +4715,7 @@ bool DAGCombiner::CombineToPostIndexedLoadStore(SDNode *N) {
SDValue Offset;
ISD::MemIndexedMode AM = ISD::UNINDEXED;
if (TLI.getPostIndexedAddressParts(N, Op, BasePtr, Offset, AM, DAG)) {
- if (Ptr == Offset)
+ if (Ptr == Offset && Op->getOpcode() == ISD::ADD)
std::swap(BasePtr, Offset);
if (Ptr != BasePtr)
continue;
OpenPOWER on IntegriCloud