summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-12-29 07:15:45 +0000
committerChris Lattner <sabre@nondot.org>2007-12-29 07:15:45 +0000
commit2de9b852979be1123919c7c5d11a4b962fae6495 (patch)
treed9b385ed95518b0e0e26ba55d242362d9f48285d /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent07ccbfa64a66018d76d6249fb12108952fb8a7da (diff)
downloadbcm5719-llvm-2de9b852979be1123919c7c5d11a4b962fae6495.tar.gz
bcm5719-llvm-2de9b852979be1123919c7c5d11a4b962fae6495.zip
make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
llvm-svn: 45402
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0ee45575633..cfa46e6b591 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -4252,7 +4252,8 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
if (LoadSDNode *Ld = dyn_cast<LoadSDNode>(Value)) {
if (Chain.Val == Ld && Ld->getBasePtr() == Ptr &&
ST->getAddressingMode() == ISD::UNINDEXED &&
- ST->getStoredVT() == Ld->getLoadedVT()) {
+ ST->getStoredVT() == Ld->getLoadedVT() &&
+ !ST->isVolatile()) {
// The store is dead, remove it.
return Chain;
}
OpenPOWER on IntegriCloud