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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 03:57:55 PST 2024


================
@@ -2106,16 +2106,18 @@ class GeneratedRTChecks {
               BestTripCount = *EstimatedTC;
           }
 
+          BestTripCount = std::max(BestTripCount, (unsigned)1);
----------------
paulwalker-arm wrote:

Not a strongly held view but can `(unsigned)1` become `1U`?

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


More information about the llvm-commits mailing list