[llvm] [CodeGen] Emit a more efficient magic number multiplication for exact udivs (PR #87161)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 14:03:23 PDT 2024
================
@@ -5087,7 +5117,7 @@ MachineInstr *CombinerHelper::buildUDivUsingMul(MachineInstr &MI) {
// TODO: Use undef values for divisor of 1.
if (!Divisor.isOne()) {
UnsignedDivisionByConstantInfo magics =
- UnsignedDivisionByConstantInfo::get(Divisor);
+ UnsignedDivisionByConstantInfo::get(Divisor, KnownLeadingZeros);
----------------
AtariDreams wrote:
I will split this into another PR, sorry.
https://github.com/llvm/llvm-project/pull/87161
More information about the llvm-commits
mailing list