[llvm] [DemandedBits] Add div/rem support (PR #148853)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 16 03:51:33 PDT 2025


nikic wrote:

@karouzakisp Here are the proofs: https://alive2.llvm.org/ce/z/hYWDwZ

This shows that urem, udiv and srem handling is correct and sdiv handling is incorrect. Please try to provide this form of proof for all demanded bits transform.

Note that handling urem and udiv for power of two divisor is actually useless because these will be converted to and / lshr. Only handling srem and sdiv is useful.

https://github.com/llvm/llvm-project/pull/148853


More information about the llvm-commits mailing list