[llvm] [profcheck] Fix profile metadata in IntegerDivision/ExpandIRinsts (PR #173114)

Jin Huang via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 8 11:57:44 PST 2026


================
@@ -251,8 +301,17 @@ static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor,
   Value *SR_1     = Builder.CreateAdd(SR, One);
   Value *Tmp2     = Builder.CreateSub(MSB, SR);
   Value *Q        = Builder.CreateShl(Dividend, Tmp2);
+  // We assume that in the common case, the dividend's magnitude is larger than
+  // the divisor's magnitude such that the loop conuter (SR) is non-zero.
----------------
jinhuang1102 wrote:

Thx

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


More information about the llvm-commits mailing list