[llvm] [DAG] Lower frem of power-2 using div/trunc/mul+sub (PR #91148)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue May 7 05:50:24 PDT 2024
https://github.com/davemgreen commented:
> This expansion should also work for negative power-of-two divisors like -4.0.
>
> This expansion should also work for fractional power-of-two divisors like +/ 0.25, unless there is some concern about the division overflowing?
Thanks for the suggestions. Negative power-2 sounds good -- I'll add those in. Values smaller than 1 unfortunately make it round to infinity in cases where the frem would be valid.
https://github.com/llvm/llvm-project/pull/91148
More information about the llvm-commits
mailing list