[PATCH] D149132: [LICM] Reassociate & hoist add expressions
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 25 03:44:01 PDT 2023
mkazantsev added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2564
+ }
+ if (L.isLoopInvariant(LHS) || !L.isLoopInvariant(RHS) || !LHS->hasOneUse())
+ return false;
----------------
skatkov wrote:
> Any comments?
> Why LHS invariant is not interested to you? Covered in other place? Assert instead of if?
>
> Is hasOneUse a cost model? We want to remove original add?
Yes, we want to remove the original add.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149132/new/
https://reviews.llvm.org/D149132
More information about the llvm-commits
mailing list