1 ; RUN: opt -irce-print-changed-loops -S -verify-loop-info -irce -verify < %s 2>&1 | FileCheck %s
2 ; RUN: opt -irce-print-changed-loops -S -verify-loop-info -passes='require<branch-prob>,loop(irce)' -verify < %s 2>&1 | FileCheck %s
4 ; CHECK-NOT: constrained loop
6 define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 %n) {
8 %first.itr.check = icmp sgt i32 %n, 0
9 br i1 %first.itr.check, label %loop, label %exit
12 %idx = phi i32 [ 0, %entry ] , [ %idx.next, %in.bounds ]
13 %idx.next = add i32 %idx, 1
14 %len = load i32, i32* %a_len_ptr, !range !0
15 %abc = icmp slt i32 %idx, %len
16 br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1
19 %addr = getelementptr i32, i32* %arr, i32 %idx
20 store i32 0, i32* %addr
21 %next = icmp slt i32 %idx.next, %n
22 br i1 %next, label %loop, label %exit
31 !0 = !{i32 0, i32 2147483647}
32 !1 = !{!"branch_weights", i32 64, i32 4}