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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 03:02:06 PST 2024


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

OK, I've made the debug output conditional.

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


More information about the llvm-commits mailing list