[PATCH] D146350: [InstCombine] More aggressively try and fold irem/idiv/mul into selects.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 21 14:09:07 PDT 2023


nikic added a comment.

I think this is basically okay if you drop the mul handling. As @xbolva00 pointed out (thanks, this is the bit I was missing here!) the mul case is already handled by foldBinOpIntoSelectOrPhi() and you're duplicating the transform for a special case now. If we want to extend handling to more cases, we should do so generically inside foldBinOpIntoSelectOrPhi(), not by repeating the transform with different arguments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146350



More information about the llvm-commits mailing list