diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Transforms/Scalar/GVNHoist.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Transforms/Scalar/GVNHoist.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVNHoist.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVNHoist.cpp b/llvm/lib/Transforms/Scalar/GVNHoist.cpp index e1796f6bf05a..9c4cdf2feb56 100644 --- a/llvm/lib/Transforms/Scalar/GVNHoist.cpp +++ b/llvm/lib/Transforms/Scalar/GVNHoist.cpp @@ -890,18 +890,16 @@ private: void updateAlignment(Instruction *I, Instruction *Repl) { if (auto *ReplacementLoad = dyn_cast<LoadInst>(Repl)) { - ReplacementLoad->setAlignment(MaybeAlign(std::min( - ReplacementLoad->getAlignment(), cast<LoadInst>(I)->getAlignment()))); + ReplacementLoad->setAlignment( + std::min(ReplacementLoad->getAlign(), cast<LoadInst>(I)->getAlign())); ++NumLoadsRemoved; } else if (auto *ReplacementStore = dyn_cast<StoreInst>(Repl)) { - ReplacementStore->setAlignment( - MaybeAlign(std::min(ReplacementStore->getAlignment(), - cast<StoreInst>(I)->getAlignment()))); + ReplacementStore->setAlignment(std::min(ReplacementStore->getAlign(), + cast<StoreInst>(I)->getAlign())); ++NumStoresRemoved; } else if (auto *ReplacementAlloca = dyn_cast<AllocaInst>(Repl)) { - ReplacementAlloca->setAlignment( - MaybeAlign(std::max(ReplacementAlloca->getAlignment(), - cast<AllocaInst>(I)->getAlignment()))); + ReplacementAlloca->setAlignment(std::max( + ReplacementAlloca->getAlign(), cast<AllocaInst>(I)->getAlign())); } else if (isa<CallInst>(Repl)) { ++NumCallsRemoved; } |