[PATCH] D96648: [InstCombine] fold fdiv with pow divisor (PR49147)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 13 10:40:10 PST 2021
spatel added a comment.
In D96648#2561821 <https://reviews.llvm.org/D96648#2561821>, @RKSimon wrote:
> In D96648#2561810 <https://reviews.llvm.org/D96648#2561810>, @RKSimon wrote:
>
>> llvm.powi ?
>
> Sorry - just read your comment on PR49147. Could we at least support inrange constant ints?
We could do that, but it won't solve the example in the bug report. I think we need to check if the call has an fdiv use and suppress the conversion to powi in SimplifyLibCalls:
// powf(x, itofp(y)) -> powi(x, y)
...or fold the whole pattern at once.
Otherwise, we lose information when we fold the cast into the call. Either way, I think we want to do that in an independent patch. I can work on that next.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96648/new/
https://reviews.llvm.org/D96648
More information about the llvm-commits
mailing list