[llvm] [LoopVectorize] Fix divide-by-zero bug (#80836) (PR #81721)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 02:41:10 PST 2024


================
@@ -2106,18 +2106,20 @@ class GeneratedRTChecks {
               BestTripCount = *EstimatedTC;
           }
 
-          InstructionCost NewMemCheckCost = MemCheckCost / BestTripCount;
+          if (BestTripCount > 1) {
----------------
fhahn wrote:

Right, but in that case it would still be good to avoid increasing the indentation unnecessarily and possibly just have the debug output conditional?

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


More information about the llvm-commits mailing list