[llvm] [SelectionDAG] Optimize 32-bit udiv with 33-bit magic constants on 64-bit targets (PR #181288)
MITSUNARI Shigeo via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 13 00:10:44 PST 2026
herumi wrote:
I agree that we can also optimize udiv for i8 and i16 as well, but the form (x * c) >> a without a pre-shift would probably be better.
The reason is that a right shift is faster than extracting the upper bits of a 32/64-bit register.
Since that would be a different approach from the method used here, I think it’s better handled separately.
https://github.com/llvm/llvm-project/pull/181288
More information about the llvm-commits
mailing list