summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 3365e64af05..6046f02563e 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -647,7 +647,7 @@ void LICM::findPromotableValuesInLoop(
// We can promote this alias set if it has a store, if it is a "Must" alias
// set, and if the pointer is loop invariant.
if (!AS.isForwardingAliasSet() && AS.isMod() && AS.isMustAlias() &&
- isLoopInvariant(AS.begin()->first)) {
+ !AS.isVolatile() && isLoopInvariant(AS.begin()->first)) {
assert(AS.begin() != AS.end() &&
"Must alias set should have at least one pointer element in it!");
Value *V = AS.begin()->first;
OpenPOWER on IntegriCloud