[llvm] [DemandedBits] Add div/rem support (PR #148853)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 16 07:01:46 PDT 2025
nikic wrote:
> @nikic Thanks for the proofs. I will try to keep kind of the same format on the other PRs.
How about keeping it in mind for this PR as well? The new sdiv code is still incorrect. Including the sign bit is not enough: https://alive2.llvm.org/ce/z/J7yBrc
> Regarding the udiv/urem being useless, I thought that some transformations might happen to them. But, are we sure that the conversion will happen before any pass cares about DemandedBits?
It's theoretically possible, but as a rule, we don't handle non-canonical instruction forms unless there is specific proof that handling them is necessary.
https://github.com/llvm/llvm-project/pull/148853
More information about the llvm-commits
mailing list