[llvm-commits] [llvm] r105914 - /llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Jun 13 07:35:54 PDT 2010
Author: d0k
Date: Sun Jun 13 09:35:54 2010
New Revision: 105914
URL: http://llvm.org/viewvc/llvm-project?rev=105914&view=rev
Log:
SimplifyCFG: don't turn volatile stores to null/undef into unreachable. Fixes PR7369.
Modified:
llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp?rev=105914&r1=105913&r2=105914&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimplifyCFGPass.cpp Sun Jun 13 09:35:54 2010
@@ -137,6 +137,9 @@
// they should be changed to unreachable by passes that can't modify the
// CFG.
if (StoreInst *SI = dyn_cast<StoreInst>(BBI)) {
+ // Don't touch volatile stores.
+ if (SI->isVolatile()) continue;
+
Value *Ptr = SI->getOperand(1);
if (isa<UndefValue>(Ptr) ||
More information about the llvm-commits
mailing list