[PATCH] D135451: [TTI] New PPC target hook enableUncondDivisionSpeculation
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 20 10:19:52 PDT 2022
arsenm added a comment.
In D135451#3859075 <https://reviews.llvm.org/D135451#3859075>, @alexgatea wrote:
> In D135451#3849697 <https://reviews.llvm.org/D135451#3849697>, @arsenm wrote:
>
>> Could you instead insert a clamp of the divisor and then pattern match that out during selection?
>
> Hmm not sure what you mean by selection. Could you please elaborate (perhaps with an example)?
If you speculate sdiv x, y, replace it with sdiv x, (y == 0 ? 1 : y) or whatever behavior you get for this case. In your backend, then pattern match the divide by 0 check when selecting to the instruction
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