[llvm] [LV] Rewrite UDiv A, B -> UDiv A, UMax(B, 1) in trip counts if needed. (PR #92177)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 16 17:51:53 PDT 2024


================
@@ -527,6 +528,76 @@ exit:
   ret i64 %p
 }
 
+define i64 @multi_exit_4_exit_count_with_udiv_by_frozen_value_in_latch(ptr %dst, i64 %N) {
----------------
efriedma-quic wrote:

(The relevant code on the SCEV side is ScalarEvolution::getSequentialMinMaxExpr; it "optimizes" umin_seq to umin.)

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


More information about the llvm-commits mailing list