Index: lib/Transforms/Scalar/LowerAtomic.cpp |
diff --git a/lib/Transforms/Scalar/LowerAtomic.cpp b/lib/Transforms/Scalar/LowerAtomic.cpp |
index 8ced4946c83225ffa594ca1b13f098225f314ac1..ebd02769d4a5ba17370de0f56eec348c77f242d2 100644 |
--- a/lib/Transforms/Scalar/LowerAtomic.cpp |
+++ b/lib/Transforms/Scalar/LowerAtomic.cpp |
@@ -122,9 +122,11 @@ namespace { |
else if (AtomicRMWInst *RMWI = dyn_cast<AtomicRMWInst>(Inst)) |
Changed |= LowerAtomicRMWInst(RMWI); |
else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) { |
+ LI->setVolatile(false); |
if (LI->isAtomic()) |
LowerLoadInst(LI); |
} else if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { |
+ SI->setVolatile(false); |
if (SI->isAtomic()) |
LowerStoreInst(SI); |
} |