[llvm] [InstCombine] Implemented missed optimization in muldivrem (PR #140916)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 2 01:28:56 PDT 2025


nikic wrote:

@kshitijvp The udiv is optimized to work on a smaller bit width, which is likely faster. I think in that case the proposed transform would be non-profitable, as it would require performing the division on the full 64-bit width.

(Though I'm not sure to what degree this holds on modern CPU. Agner lists a latency of 12 for idiv r8 and 10-18 for idiv r64.)

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


More information about the llvm-commits mailing list