[llvm] [CodeGen] Emit a more efficient magic number multiplication for exact udivs (PR #87161)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 14:00:51 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);
----------------
topperc wrote:
This is a non-exact udiv change right?
https://github.com/llvm/llvm-project/pull/87161
More information about the llvm-commits
mailing list