llvm.org GIT mirror llvm / 6afd9d5
[Tests] Add branch_weights to latches so that test is not effected by future profitability patch to LoopPredication git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358506 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 5 months ago
1 changed file(s) with 57 addition(s) and 55 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
11 ; RUN: opt -S -loop-predication -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
22 ; RUN: opt -S -passes='require,loop(loop-predication)' -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
3 ; RUN: opt -S -passes='require,require,loop(loop-predication)' -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
34
45 declare void @llvm.experimental.guard(i1, ...)
56
2930 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
3031 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
3132 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
32 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
33 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
3334 ; CHECK: exit.loopexit:
3435 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
3536 ; CHECK-NEXT: br label [[EXIT]]
6364 %loop.acc.next = add i32 %loop.acc, %array.i
6465 %i.next = add nuw i32 %i, 1
6566 %continue = icmp ult i32 %i.next, %n
66 br i1 %continue, label %loop, label %exit
67 br i1 %continue, label %loop, label %exit, !prof !2
6768
6869 exit: ; preds = %guarded, %entry
6970 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
9697 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
9798 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
9899 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ule i32 [[I_NEXT]], [[N]]
99 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
100 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
100101 ; CHECK: exit.loopexit:
101102 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
102103 ; CHECK-NEXT: br label [[EXIT]]
130131 %loop.acc.next = add i32 %loop.acc, %array.i
131132 %i.next = add nuw i32 %i, 1
132133 %continue = icmp ule i32 %i.next, %n
133 br i1 %continue, label %loop, label %exit
134 br i1 %continue, label %loop, label %exit, !prof !2
134135
135136 exit: ; preds = %guarded, %entry
136137 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
163164 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
164165 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
165166 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
166 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
167 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
167168 ; CHECK: exit.loopexit:
168169 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
169170 ; CHECK-NEXT: br label [[EXIT]]
197198 %loop.acc.next = add i32 %loop.acc, %array.i
198199 %i.next = add nuw i32 %i, 1
199200 %continue = icmp ult i32 %i.next, %n
200 br i1 %continue, label %loop, label %exit
201 br i1 %continue, label %loop, label %exit, !prof !2
201202
202203 exit: ; preds = %guarded, %entry
203204 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
230231 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
231232 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
232233 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
233 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
234 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
234235 ; CHECK: exit.loopexit:
235236 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
236237 ; CHECK-NEXT: br label [[EXIT]]
265266 %loop.acc.next = add i32 %loop.acc, %array.i
266267 %i.next = add nuw i32 %i, 1
267268 %continue = icmp slt i32 %i.next, %n
268 br i1 %continue, label %loop, label %exit
269 br i1 %continue, label %loop, label %exit, !prof !2
269270
270271 exit: ; preds = %guarded, %entry
271272 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
276277 ; CHECK-LABEL: @signed_loop_0_to_n_ult_check_length_range_known(
277278 ; CHECK-NEXT: entry:
278279 ; CHECK-NEXT: [[TMP5:%.*]] = icmp sle i32 [[N:%.*]], 0
279 ; CHECK-NEXT: [[LENGTH:%.*]] = load i32, i32* [[LENGTH_PTR:%.*]], !range !1
280 ; CHECK-NEXT: [[LENGTH:%.*]] = load i32, i32* [[LENGTH_PTR:%.*]], !range !2
280281 ; CHECK-NEXT: br i1 [[TMP5]], label [[EXIT:%.*]], label [[LOOP_PREHEADER:%.*]]
281282 ; CHECK: loop.preheader:
282283 ; CHECK-NEXT: [[TMP0:%.*]] = icmp sle i32 [[N]], [[LENGTH]]
298299 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
299300 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
300301 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
301 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
302 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
302303 ; CHECK: exit.loopexit:
303304 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
304305 ; CHECK-NEXT: br label [[EXIT]]
333334 %loop.acc.next = add i32 %loop.acc, %array.i
334335 %i.next = add nuw i32 %i, 1
335336 %continue = icmp slt i32 %i.next, %n
336 br i1 %continue, label %loop, label %exit
337 br i1 %continue, label %loop, label %exit, !prof !2
337338
338339 exit: ; preds = %guarded, %entry
339340 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
366367 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
367368 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
368369 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sgt i32 [[I_NEXT]], [[N]]
369 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[EXIT_LOOPEXIT:%.*]], label [[LOOP]]
370 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[EXIT_LOOPEXIT:%.*]], label [[LOOP]], !prof !1
370371 ; CHECK: exit.loopexit:
371372 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
372373 ; CHECK-NEXT: br label [[EXIT]]
400401 %loop.acc.next = add i32 %loop.acc, %array.i
401402 %i.next = add nuw i32 %i, 1
402403 %continue = icmp sgt i32 %i.next, %n
403 br i1 %continue, label %exit, label %loop
404 br i1 %continue, label %exit, label %loop, !prof !2
404405
405406 exit: ; preds = %guarded, %entry
406407 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
433434 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
434435 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
435436 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT]], [[N]]
436 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
437 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
437438 ; CHECK: exit.loopexit:
438439 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
439440 ; CHECK-NEXT: br label [[EXIT]]
467468 %loop.acc.next = add i32 %loop.acc, %array.i
468469 %i.next = add nuw i32 %i, 1
469470 %continue = icmp sle i32 %i.next, %n
470 br i1 %continue, label %loop, label %exit
471 br i1 %continue, label %loop, label %exit, !prof !2
471472
472473 exit: ; preds = %guarded, %entry
473474 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
501502 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
502503 ; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
503504 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I]], [[N]]
504 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
505 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
505506 ; CHECK: exit.loopexit:
506507 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
507508 ; CHECK-NEXT: br label [[EXIT]]
535536 %loop.acc.next = add i32 %loop.acc, %array.i
536537 %i.next = add i32 %i, 1
537538 %continue = icmp slt i32 %i, %n
538 br i1 %continue, label %loop, label %exit
539 br i1 %continue, label %loop, label %exit, !prof !2
539540
540541 exit: ; preds = %guarded, %entry
541542 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
569570 ; CHECK-NEXT: [[ARRAY_I:%.*]] = load i32, i32* [[ARRAY_I_PTR]], align 4
570571 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
571572 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I]], [[N]]
572 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
573 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
573574 ; CHECK: exit.loopexit:
574575 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
575576 ; CHECK-NEXT: br label [[EXIT]]
603604 %array.i = load i32, i32* %array.i.ptr, align 4
604605 %loop.acc.next = add i32 %loop.acc, %array.i
605606 %continue = icmp slt i32 %i, %n
606 br i1 %continue, label %loop, label %exit
607 br i1 %continue, label %loop, label %exit, !prof !2
607608
608609 exit: ; preds = %guarded, %entry
609610 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
637638 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
638639 ; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
639640 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT]], [[N]]
640 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
641 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
641642 ; CHECK: exit.loopexit:
642643 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
643644 ; CHECK-NEXT: br label [[EXIT]]
672673 %loop.acc.next = add i32 %loop.acc, %array.i
673674 %i.next = add i32 %i, 1
674675 %continue = icmp sle i32 %i.next, %n
675 br i1 %continue, label %loop, label %exit
676 br i1 %continue, label %loop, label %exit, !prof !2
676677
677678 exit: ; preds = %guarded, %entry
678679 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
706707 ; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
707708 ; CHECK-NEXT: [[I_NEXT_OFFSET:%.*]] = add i32 [[I_NEXT]], 1
708709 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT_OFFSET]], [[N]]
709 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
710 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
710711 ; CHECK: exit.loopexit:
711712 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
712713 ; CHECK-NEXT: br label [[EXIT]]
742743 %i.next = add i32 %i, 1
743744 %i.next.offset = add i32 %i.next, 1
744745 %continue = icmp sle i32 %i.next.offset, %n
745 br i1 %continue, label %loop, label %exit
746 br i1 %continue, label %loop, label %exit, !prof !2
746747
747748 exit: ; preds = %guarded, %entry
748749 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
773774 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
774775 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
775776 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ne i32 [[I_NEXT]], [[N]]
776 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
777 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
777778 ; CHECK: exit.loopexit:
778779 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
779780 ; CHECK-NEXT: br label [[EXIT]]
807808 %loop.acc.next = add i32 %loop.acc, %array.i
808809 %i.next = add nsw i32 %i, 1
809810 %continue = icmp ne i32 %i.next, %n
810 br i1 %continue, label %loop, label %exit
811 br i1 %continue, label %loop, label %exit, !prof !2
811812
812813 exit: ; preds = %guarded, %entry
813814 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
838839 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
839840 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 2
840841 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
841 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
842 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
842843 ; CHECK: exit.loopexit:
843844 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
844845 ; CHECK-NEXT: br label [[EXIT]]
872873 %loop.acc.next = add i32 %loop.acc, %array.i
873874 %i.next = add nsw i32 %i, 2
874875 %continue = icmp slt i32 %i.next, %n
875 br i1 %continue, label %loop, label %exit
876 br i1 %continue, label %loop, label %exit, !prof !2
876877
877878 exit: ; preds = %guarded, %entry
878879 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
907908 ; CHECK-NEXT: [[J_NEXT]] = add nsw i32 [[J]], 1
908909 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
909910 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
910 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
911 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
911912 ; CHECK: exit.loopexit:
912913 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
913914 ; CHECK-NEXT: br label [[EXIT]]
943944 %j.next = add nsw i32 %j, 1
944945 %i.next = add nsw i32 %i, 1
945946 %continue = icmp slt i32 %i.next, %n
946 br i1 %continue, label %loop, label %exit
947 br i1 %continue, label %loop, label %exit, !prof !2
947948
948949 exit: ; preds = %guarded, %entry
949950 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
980981 ; CHECK-NEXT: [[J_NEXT]] = add i32 [[J]], 1
981982 ; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
982983 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
983 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
984 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
984985 ; CHECK: exit.loopexit:
985986 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
986987 ; CHECK-NEXT: br label [[EXIT]]
10161017 %j.next = add i32 %j, 1
10171018 %i.next = add i32 %i, 1
10181019 %continue = icmp slt i32 %i.next, %n
1019 br i1 %continue, label %loop, label %exit
1020 br i1 %continue, label %loop, label %exit, !prof !2
10201021
10211022 exit: ; preds = %guarded, %entry
10221023 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
10491050 ; CHECK-NEXT: [[J_NEXT]] = add i16 [[J]], 1
10501051 ; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
10511052 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
1052 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1053 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
10531054 ; CHECK: exit.loopexit:
10541055 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
10551056 ; CHECK-NEXT: br label [[EXIT]]
10851086 %j.next = add i16 %j, 1
10861087 %i.next = add i32 %i, 1
10871088 %continue = icmp slt i32 %i.next, %n
1088 br i1 %continue, label %loop, label %exit
1089 br i1 %continue, label %loop, label %exit, !prof !2
10891090
10901091 exit: ; preds = %guarded, %entry
10911092 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
11181119 ; CHECK-NEXT: [[J_NEXT]] = add nsw i32 [[J]], 2
11191120 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
11201121 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
1121 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1122 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
11221123 ; CHECK: exit.loopexit:
11231124 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
11241125 ; CHECK-NEXT: br label [[EXIT]]
11541155 %j.next = add nsw i32 %j, 2
11551156 %i.next = add nsw i32 %i, 1
11561157 %continue = icmp slt i32 %i.next, %n
1157 br i1 %continue, label %loop, label %exit
1158 br i1 %continue, label %loop, label %exit, !prof !2
11581159
11591160 exit: ; preds = %guarded, %entry
11601161 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
11941195 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_1]], [[ARRAY_2_I]]
11951196 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
11961197 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1197 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1198 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
11981199 ; CHECK: exit.loopexit:
11991200 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
12001201 ; CHECK-NEXT: br label [[EXIT]]
12331234 %loop.acc.next = add i32 %loop.acc.1, %array.2.i
12341235 %i.next = add nuw i32 %i, 1
12351236 %continue = icmp ult i32 %i.next, %n
1236 br i1 %continue, label %loop, label %exit
1237 br i1 %continue, label %loop, label %exit, !prof !2
12371238
12381239 exit: ; preds = %guarded, %entry
12391240 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
12801281 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_2]], [[ARRAY_3_I]]
12811282 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
12821283 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1283 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1284 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
12841285 ; CHECK: exit.loopexit:
12851286 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
12861287 ; CHECK-NEXT: br label [[EXIT]]
13241325 %loop.acc.next = add i32 %loop.acc.2, %array.3.i
13251326 %i.next = add nuw i32 %i, 1
13261327 %continue = icmp ult i32 %i.next, %n
1327 br i1 %continue, label %loop, label %exit
1328 br i1 %continue, label %loop, label %exit, !prof !2
13281329
13291330 exit: ; preds = %guarded, %entry
13301331 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
13831384 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_2]], [[ARRAY_3_I]]
13841385 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
13851386 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1386 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1387 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
13871388 ; CHECK: exit.loopexit:
13881389 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED6]] ]
13891390 ; CHECK-NEXT: br label [[EXIT]]
14431444 %loop.acc.next = add i32 %loop.acc.2, %array.3.i
14441445 %i.next = add nuw i32 %i, 1
14451446 %continue = icmp ult i32 %i.next, %n
1446 br i1 %continue, label %loop, label %exit
1447 br i1 %continue, label %loop, label %exit, !prof !2
14471448
14481449 exit: ; preds = %guarded6, %entry
14491450 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded6 ]
14781479 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
14791480 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
14801481 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1481 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1482 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
14821483 ; CHECK: exit.loopexit:
14831484 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
14841485 ; CHECK-NEXT: br label [[EXIT]]
15141515 %loop.acc.next = add i32 %loop.acc, %array.i
15151516 %i.next = add nuw i32 %i, 1
15161517 %continue = icmp ult i32 %i.next, %n
1517 br i1 %continue, label %loop, label %exit
1518 br i1 %continue, label %loop, label %exit, !prof !2
15181519
15191520 exit: ; preds = %guarded, %entry
15201521 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
15491550 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
15501551 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
15511552 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1552 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1553 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
15531554 ; CHECK: exit.loopexit:
15541555 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
15551556 ; CHECK-NEXT: br label [[EXIT]]
15871588 %loop.acc.next = add i32 %loop.acc, %array.i
15881589 %i.next = add nuw i32 %i, 1
15891590 %continue = icmp ult i32 %i.next, %n
1590 br i1 %continue, label %loop, label %exit
1591 br i1 %continue, label %loop, label %exit, !prof !2
15911592
15921593 exit: ; preds = %guarded, %entry
15931594 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
16191620 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
16201621 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
16211622 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
1622 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1623 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
16231624 ; CHECK: exit.loopexit:
16241625 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
16251626 ; CHECK-NEXT: br label [[EXIT]]
16541655 %loop.acc.next = add i32 %loop.acc, %array.i
16551656 %i.next = add nsw i32 %i, 1
16561657 %continue = icmp slt i32 %i.next, %n
1657 br i1 %continue, label %loop, label %exit
1658 br i1 %continue, label %loop, label %exit, !prof !2
16581659
16591660 exit: ; preds = %guarded, %entry
16601661 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
16851686 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
16861687 ; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
16871688 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
1688 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1689 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
16891690 ; CHECK: exit.loopexit:
16901691 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
16911692 ; CHECK-NEXT: br label [[EXIT]]
17191720 %loop.acc.next = add i32 %loop.acc, %array.i
17201721 %i.next = add nsw i32 %i, 1
17211722 %continue = icmp slt i32 %i.next, %n
1722 br i1 %continue, label %loop, label %exit
1723 br i1 %continue, label %loop, label %exit, !prof !2
17231724
17241725 exit: ; preds = %guarded, %entry
17251726 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
17531754 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
17541755 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
17551756 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1756 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1757 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
17571758 ; CHECK: exit.loopexit:
17581759 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
17591760 ; CHECK-NEXT: br label [[EXIT]]
17881789 %loop.acc.next = add i32 %loop.acc, %array.i
17891790 %i.next = add nuw i32 %i, 1
17901791 %continue = icmp ult i32 %i.next, %n
1791 br i1 %continue, label %loop, label %exit
1792 br i1 %continue, label %loop, label %exit, !prof !2
17921793
17931794 exit: ; preds = %guarded, %entry
17941795 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
18201821 ; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
18211822 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
18221823 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1823 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1824 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
18241825 ; CHECK: exit.loopexit:
18251826 ; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
18261827 ; CHECK-NEXT: br label [[EXIT]]
18551856 %loop.acc.next = add i32 %loop.acc, %array.i
18561857 %i.next = add nuw i32 %i, 1
18571858 %continue = icmp ult i32 %i.next, %n
1858 br i1 %continue, label %loop, label %exit
1859 br i1 %continue, label %loop, label %exit, !prof !2
18591860
18601861 exit: ; preds = %guarded, %entry
18611862 %result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
18851886 ; CHECK-NEXT: store i32 0, i32* [[ARRAY_I_PTR]], align 4
18861887 ; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
18871888 ; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
1888 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
1889 ; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
18891890 ; CHECK: exit.loopexit:
18901891 ; CHECK-NEXT: br label [[EXIT]]
18911892 ; CHECK: exit:
19141915 store i32 0, i32* %array.i.ptr, align 4
19151916 %i.next = add nuw i32 %i, 1
19161917 %continue = icmp ult i32 %i.next, %n
1917 br i1 %continue, label %loop, label %exit
1918 br i1 %continue, label %loop, label %exit, !prof !2
19181919
19191920 exit: ; preds = %guarded, %entry
19201921 ret i32 0
19301931
19311932 !0 = !{!"branch_weights", i32 1048576, i32 1}
19321933 !1 = !{i32 1, i32 -2147483648}
1934 !2 = !{!"branch_weights", i32 1024, i32 1}