Home | History | Annotate | Download | only in IRCE
      1 ; RUN: opt -irce-print-changed-loops -S -irce -verify < %s 2>&1 | FileCheck %s
      2 
      3 ; CHECK-NOT: constrained loop
      4 
      5 define void @single_access_no_preloop_no_offset(i32 *%arr, i32 *%a_len_ptr, i32 %n) {
      6  entry:
      7   %first.itr.check = icmp sgt i32 %n, 0
      8   br i1 %first.itr.check, label %loop, label %exit
      9 
     10  loop:
     11   %idx = phi i32 [ 0, %entry ] , [ %idx.next, %in.bounds ]
     12   %idx.next = add i32 %idx, 1
     13   %len = load i32, i32* %a_len_ptr, !range !0
     14   %abc = icmp slt i32 %idx, %len
     15   br i1 %abc, label %in.bounds, label %out.of.bounds, !prof !1
     16 
     17  in.bounds:
     18   %addr = getelementptr i32, i32* %arr, i32 %idx
     19   store i32 0, i32* %addr
     20   %next = icmp slt i32 %idx.next, %n
     21   br i1 %next, label %loop, label %exit
     22 
     23  out.of.bounds:
     24   ret void
     25 
     26  exit:
     27   ret void
     28 }
     29 
     30 !0 = !{i32 0, i32 2147483647}
     31 !1 = !{!"branch_weights", i32 64, i32 4}
     32