[PATCH] D149132: [LICM] Reassociate & hoist add expressions
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 22:07:33 PDT 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2591-2594
+ const SCEV *InvariantOpS = SE.getNegativeSCEV(SE.getSCEV(InvariantOp));
+ if (!SE.willNotOverflow(Instruction::BinaryOps::Add, /*Signed*/ true, RHSS,
+ InvariantOpS, /*CtxI*/ &I))
+ return false;
----------------
nikic wrote:
> This seems more obvious and matches the generated sub?
Yes, and it provides worse results on the tests that are here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149132/new/
https://reviews.llvm.org/D149132
More information about the llvm-commits
mailing list