[PATCH] D132658: [InstCombine] Distributive or+mul with const operand

chenglin.bi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 25 08:55:06 PDT 2022


bcl5980 added inline comments.


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:224
   // Simplify mul instructions with a constant RHS.
   if (isa<Constant>(Op1)) {
     // Canonicalize (X+C1)*CI -> X*CI+C1*CI.
----------------
If we update current code, Op1 should be m_ImmConstant also


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132658/new/

https://reviews.llvm.org/D132658



More information about the llvm-commits mailing list