[llvm-commits] [llvm] r45402 - /llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Chris Lattner sabre at nondot.org
Fri Dec 28 23:15:46 PST 2007


Author: lattner
Date: Sat Dec 29 01:15:45 2007
New Revision: 45402

URL: http://llvm.org/viewvc/llvm-project?rev=45402&view=rev
Log:
make sure not to zap volatile stores, thanks a lot to Dale for noticing this!

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=45402&r1=45401&r2=45402&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sat Dec 29 01:15:45 2007
@@ -4252,7 +4252,8 @@
   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;
     }





More information about the llvm-commits mailing list