[llvm] [GlobalISel] Add G_UDIV/G_SDIV computeKnownBits (PR #181307)
Alex Wang via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 13 00:16:56 PST 2026
aeft wrote:
Note three *.ll files are also updated.
After supporting `computeKnownBits` for `G_UDIV`, the compiler can now infer leading zeros of the udiv result. When the divisor is also known to be narrow (e.g., zero-extended from i8), the compiler selects narrower multiply-subtract instructions: mls -> umlsl (vector, in `rem.ll` and `arm64-neon-mul-div.ll`), msub -> umsubl (scalar, in `funnel-shift.ll`).
https://github.com/llvm/llvm-project/pull/181307
More information about the llvm-commits
mailing list