[PATCH] D140647: Handle simple diamond CFG hoisting in DivRemPairs.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 09:39:01 PST 2022


nikic added a comment.

Hm, could you provide some more information on what the motivation for this transform is? If we don't have a domination relationship, then we won't be able to reuse a result we have to compute anyway, so is the intention here a code size improvement for the case where a divrem op exists, because we now only need to materialize the instruction once? In that case though, does this transform make sense if we are going to use expanded form, as in the PowerPC example? We are replacing a div/rem on disjoint code paths with a common div plus mul+sub on one code path, which seems strictly worse?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140647



More information about the llvm-commits mailing list