summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/GVNHoist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNHoist.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/GVNHoist.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
index 3d458f760f7..79b901ac0db 100644
--- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp
+++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp
@@ -899,8 +899,8 @@ private:
++NumStoresRemoved;
} else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) {
ReplacementAlloca->setAlignment(
- std::max(ReplacementAlloca->getAlignment(),
- cast<AllocaInst>(I)->getAlignment()));
+ MaybeAlign(std::max(ReplacementAlloca->getAlignment(),
+ cast<AllocaInst>(I)->getAlignment())));
} else if (isa<CallInst>(Repl)) {
++NumCallsRemoved;
}
OpenPOWER on IntegriCloud