aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commit3d98c49d173bdccb5fc23a73691701af6ef033cc (patch)
tree4fe46ae87cf750f2ccc75358b566b9ff2bc59680 /lib
parent8b815c2c69c523237b07180988a73636994e66f7 (diff)
downloadexternal_llvm-3d98c49d173bdccb5fc23a73691701af6ef033cc.tar.gz
external_llvm-3d98c49d173bdccb5fc23a73691701af6ef033cc.tar.bz2
external_llvm-3d98c49d173bdccb5fc23a73691701af6ef033cc.zip
make sure not to zap volatile stores, thanks a lot to Dale for noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45402 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/DAGCombiner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0ee4557563..cfa46e6b59 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/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;
}