[llvm] LICM: hoist BO assoc when BinOp is in RHS (PR #107072)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 09:59:20 PDT 2024
artagnon wrote:
> A caveat here is that this will not work correctly if both operands are binary operators. So a more general approach would be to instead check whether the LHS is loop invariant and then swap. Unlikely to matter though.
Thanks for catching this oversight. I've pushed a fix along with some tests: could you kindly check it?
https://github.com/llvm/llvm-project/pull/107072
More information about the llvm-commits
mailing list