[llvm] [LoopUnroll] Use branch probability in multi-exit loop unrolling (PR #164799)
Marek Sedláček via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 04:19:47 PST 2026
================
@@ -0,0 +1,657 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -passes=loop-unroll -unroll-runtime=true -verify-dom-info -verify-loop-info -S | FileCheck %s
+; RUN: opt < %s -passes=loop-unroll -unroll-runtime=true -verify-dom-info -verify-loop-info -unroll-runtime-multi-exit=false -S | FileCheck %s -check-prefix=NOUNROLL
+
+; Multi exit loop with predictable exit -- unroll
+define i32 @test1(ptr nocapture %a, i64 %n) {
+; CHECK-LABEL: @test1(
----------------
mark-sed wrote:
That is a fair point, this way it will be also easier if there are some changes to unrolling, that this test won't fail because of it. Fixed.
https://github.com/llvm/llvm-project/pull/164799
More information about the llvm-commits
mailing list