[llvm] [CodeGen] Remove checks for vectors in unsigned division prior to computing leading zeros (PR #99524)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 18 13:10:06 PDT 2024


================
@@ -5180,7 +5180,9 @@ MachineInstr *CombinerHelper::buildUDivUsingMul(MachineInstr &MI) {
   LLT ScalarShiftAmtTy = ShiftAmtTy.getScalarType();
 
   unsigned KnownLeadingZeros =
-      KB ? KB->getKnownBits(LHS).countMinLeadingZeros() : 0;
+      (!MI.getFlag(MachineInstr::MIFlag::IsExact) && KB)
----------------
topperc wrote:

This is not related to vectors and is not mentioned in the description. Separate patch?

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


More information about the llvm-commits mailing list