[PATCH] D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation

Alex Gatea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 7 09:20:21 PDT 2022


alexgatea added a comment.

In D135451#3842992 <https://reviews.llvm.org/D135451#3842992>, @fhahn wrote:

> IIUC this proposal would effectively re-define `udiv` and `urem`'s semantics on the IR level to not have undefined behavior for PPC?

I don't think that's quite correct. We still view them as undefined, it's just that we allow further optimizations to happen that before we bailed out of. The example I gave shows exactly this; without the speculative execution the div is still hoisted to the preheader, but this is done much later in the pipeline by MachineLICM so we do not optimize it fully (because IndVarSimplifyPass occurs earlier).

In D135451#3842992 <https://reviews.llvm.org/D135451#3842992>, @fhahn wrote:

> Adding some other reviewers for additional who might have additional thoughts.

Of course, I'd like to get other reviewers' thoughts as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135451



More information about the llvm-commits mailing list