[PATCH] D38278: [CGP] Make optimizeMemoryInst capable of handling multiple AddrModes
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 2 20:08:22 PDT 2017
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
LGTM subject to the comment below being a clear bugfix addressed before commit.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:2720
+ bool isTrivial() {
+ return (BaseGV && BaseGV == OriginalValue) ||
+ (BaseReg && BaseReg == OriginalValue);
----------------
Don't you also need to check that the offset and scale are zero? If not, then I'm still confused by what you mean by "trivial".
Repository:
rL LLVM
https://reviews.llvm.org/D38278
More information about the llvm-commits
mailing list