summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-11-25 05:02:20 +0000
committerBill Wendling <isanbard@gmail.com>2013-11-25 05:02:20 +0000
commite1679735d6df98bd71808f3c34a32599de0f40a1 (patch)
tree359550a452de65864e3d75d459b586ec2174dd2a /lib/CodeGen/SelectionDAG
parentd49c8fca79093f3eaaae3ee03ada65ef258f80b8 (diff)
downloadllvm-e1679735d6df98bd71808f3c34a32599de0f40a1.tar.gz
llvm-e1679735d6df98bd71808f3c34a32599de0f40a1.tar.bz2
llvm-e1679735d6df98bd71808f3c34a32599de0f40a1.tar.xz
Merging r195599:
------------------------------------------------------------------------ r195599 | void | 2013-11-24 21:01:21 -0800 (Sun, 24 Nov 2013) | 4 lines Don't look past volatile loads. A volatile load should block us from trying to coalesce stores. PR18023 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@195600 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 20b0981e97..e0732fa693 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -8703,6 +8703,11 @@ bool DAGCombiner::MergeConsecutiveStores(StoreSDNode* St) {
Index = STn;
break;
} else if (LoadSDNode *Ldn = dyn_cast<LoadSDNode>(NextInChain)) {
+ if (Ldn->isVolatile()) {
+ Index = NULL;
+ break;
+ }
+
// Save the load node for later. Continue the scan.
AliasLoadNodes.push_back(Ldn);
NextInChain = Ldn->getChain().getNode();