mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[Tests] Add branch_weights to latches so that test is not effected by future profitability patch to LoopPredication
llvm-svn: 358506
This commit is contained in:
parent
111036dff8
commit
0687a4b90a
@ -1,6 +1,7 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -loop-predication -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -S -passes='require<scalar-evolution>,loop(loop-predication)' -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
|
||||
; RUN: opt -S -passes='require<scalar-evolution>,require<branch-prob>,loop(loop-predication)' -loop-predication-predicate-widenable-branches-to-deopt=true < %s 2>&1 | FileCheck %s
|
||||
|
||||
declare void @llvm.experimental.guard(i1, ...)
|
||||
|
||||
@ -30,7 +31,7 @@ define i32 @unsigned_loop_0_to_n_ult_check(i32* %array, i32 %length, i32 %n) {
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -64,7 +65,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -97,7 +98,7 @@ define i32 @unsigned_loop_0_to_n_ule_latch_ult_check(i32* %array, i32 %length, i
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ule i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -131,7 +132,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ule i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -164,7 +165,7 @@ define i32 @unsigned_loop_0_to_n_ugt_check(i32* %array, i32 %length, i32 %n) {
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -198,7 +199,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -231,7 +232,7 @@ define i32 @signed_loop_0_to_n_ult_check(i32* %array, i32 %length, i32 %n) {
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -266,7 +267,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -277,7 +278,7 @@ define i32 @signed_loop_0_to_n_ult_check_length_range_known(i32* %array, i32* %l
|
||||
; CHECK-LABEL: @signed_loop_0_to_n_ult_check_length_range_known(
|
||||
; CHECK-NEXT: entry:
|
||||
; CHECK-NEXT: [[TMP5:%.*]] = icmp sle i32 [[N:%.*]], 0
|
||||
; CHECK-NEXT: [[LENGTH:%.*]] = load i32, i32* [[LENGTH_PTR:%.*]], !range !1
|
||||
; CHECK-NEXT: [[LENGTH:%.*]] = load i32, i32* [[LENGTH_PTR:%.*]], !range !2
|
||||
; CHECK-NEXT: br i1 [[TMP5]], label [[EXIT:%.*]], label [[LOOP_PREHEADER:%.*]]
|
||||
; CHECK: loop.preheader:
|
||||
; CHECK-NEXT: [[TMP0:%.*]] = icmp sle i32 [[N]], [[LENGTH]]
|
||||
@ -299,7 +300,7 @@ define i32 @signed_loop_0_to_n_ult_check_length_range_known(i32* %array, i32* %l
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -334,7 +335,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -367,7 +368,7 @@ define i32 @signed_loop_0_to_n_inverse_latch_predicate(i32* %array, i32 %length,
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sgt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[EXIT_LOOPEXIT:%.*]], label [[LOOP]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[EXIT_LOOPEXIT:%.*]], label [[LOOP]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -401,7 +402,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp sgt i32 %i.next, %n
|
||||
br i1 %continue, label %exit, label %loop
|
||||
br i1 %continue, label %exit, label %loop, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -434,7 +435,7 @@ define i32 @signed_loop_0_to_n_sle_latch_ult_check(i32* %array, i32 %length, i32
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -468,7 +469,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp sle i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -502,7 +503,7 @@ define i32 @signed_loop_0_to_n_preincrement_latch_check(i32* %array, i32 %length
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -536,7 +537,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add i32 %i, 1
|
||||
%continue = icmp slt i32 %i, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -570,7 +571,7 @@ define i32 @signed_loop_0_to_n_preincrement_latch_check_postincrement_guard_chec
|
||||
; CHECK-NEXT: [[ARRAY_I:%.*]] = load i32, i32* [[ARRAY_I_PTR]], align 4
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -604,7 +605,7 @@ guarded: ; preds = %loop
|
||||
%array.i = load i32, i32* %array.i.ptr, align 4
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%continue = icmp slt i32 %i, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -638,7 +639,7 @@ define i32 @signed_loop_0_to_n_sle_latch_offset_ult_check(i32* %array, i32 %leng
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -673,7 +674,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add i32 %i, 1
|
||||
%continue = icmp sle i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -707,7 +708,7 @@ define i32 @signed_loop_0_to_n_offset_sle_latch_offset_ult_check(i32* %array, i3
|
||||
; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
|
||||
; CHECK-NEXT: [[I_NEXT_OFFSET:%.*]] = add i32 [[I_NEXT]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp sle i32 [[I_NEXT_OFFSET]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -743,7 +744,7 @@ guarded: ; preds = %loop
|
||||
%i.next = add i32 %i, 1
|
||||
%i.next.offset = add i32 %i.next, 1
|
||||
%continue = icmp sle i32 %i.next.offset, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -774,7 +775,7 @@ define i32 @unsupported_latch_pred_loop_0_to_n(i32* %array, i32 %length, i32 %n)
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ne i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -808,7 +809,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nsw i32 %i, 1
|
||||
%continue = icmp ne i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -839,7 +840,7 @@ define i32 @signed_loop_0_to_n_unsupported_iv_step(i32* %array, i32 %length, i32
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 2
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -873,7 +874,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nsw i32 %i, 2
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -908,7 +909,7 @@ define i32 @signed_loop_0_to_n_equal_iv_range_check(i32* %array, i32 %length, i3
|
||||
; CHECK-NEXT: [[J_NEXT]] = add nsw i32 [[J]], 1
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -944,7 +945,7 @@ guarded: ; preds = %loop
|
||||
%j.next = add nsw i32 %j, 1
|
||||
%i.next = add nsw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -981,7 +982,7 @@ define i32 @signed_loop_start_to_n_offset_iv_range_check(i32* %array, i32 %start
|
||||
; CHECK-NEXT: [[J_NEXT]] = add i32 [[J]], 1
|
||||
; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1017,7 +1018,7 @@ guarded: ; preds = %loop
|
||||
%j.next = add i32 %j, 1
|
||||
%i.next = add i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1050,7 +1051,7 @@ define i32 @signed_loop_0_to_n_different_iv_types(i32* %array, i16 %length, i32
|
||||
; CHECK-NEXT: [[J_NEXT]] = add i16 [[J]], 1
|
||||
; CHECK-NEXT: [[I_NEXT]] = add i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1086,7 +1087,7 @@ guarded: ; preds = %loop
|
||||
%j.next = add i16 %j, 1
|
||||
%i.next = add i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1119,7 +1120,7 @@ define i32 @signed_loop_0_to_n_different_iv_strides(i32* %array, i32 %length, i3
|
||||
; CHECK-NEXT: [[J_NEXT]] = add nsw i32 [[J]], 2
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1155,7 +1156,7 @@ guarded: ; preds = %loop
|
||||
%j.next = add nsw i32 %j, 2
|
||||
%i.next = add nsw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1195,7 +1196,7 @@ define i32 @two_range_checks(i32* %array.1, i32 %length.1, i32* %array.2, i32 %l
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_1]], [[ARRAY_2_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1234,7 +1235,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc.1, %array.2.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1281,7 +1282,7 @@ define i32 @three_range_checks(i32* %array.1, i32 %length.1, i32* %array.2, i32
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_2]], [[ARRAY_3_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1325,7 +1326,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc.2, %array.3.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1384,7 +1385,7 @@ define i32 @three_guards(i32* %array.1, i32 %length.1, i32* %array.2, i32 %lengt
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC_2]], [[ARRAY_3_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED6]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1444,7 +1445,7 @@ guarded6: ; preds = %guarded1
|
||||
%loop.acc.next = add i32 %loop.acc.2, %array.3.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded6, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded6 ]
|
||||
@ -1479,7 +1480,7 @@ define i32 @unsigned_loop_0_to_n_unrelated_condition(i32* %array, i32 %length, i
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1515,7 +1516,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1550,7 +1551,7 @@ define i32 @test_no_widened_conditions(i32* %array, i32 %length, i32 %n, i32 %x1
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1588,7 +1589,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1620,7 +1621,7 @@ define i32 @signed_loop_start_to_n_loop_variant_bound(i32* %array, i32 %x, i32 %
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1655,7 +1656,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nsw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1686,7 +1687,7 @@ define i32 @signed_loop_start_to_n_non_monotonic_predicate(i32* %array, i32 %x,
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nsw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp slt i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1720,7 +1721,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nsw i32 %i, 1
|
||||
%continue = icmp slt i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1754,7 +1755,7 @@ define i32 @unsigned_loop_0_to_n_hoist_length(i32* %array, i16 %length.i16, i32
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1789,7 +1790,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1821,7 +1822,7 @@ define i32 @unsigned_loop_0_to_n_cant_hoist_length(i32* %array, i32 %length, i32
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT]] = add i32 [[LOOP_ACC]], [[ARRAY_I]]
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: [[LOOP_ACC_NEXT_LCSSA:%.*]] = phi i32 [ [[LOOP_ACC_NEXT]], [[GUARDED]] ]
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
@ -1856,7 +1857,7 @@ guarded: ; preds = %loop
|
||||
%loop.acc.next = add i32 %loop.acc, %array.i
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
%result = phi i32 [ 0, %entry ], [ %loop.acc.next, %guarded ]
|
||||
@ -1886,7 +1887,7 @@ define i32 @negative_WC_required(i32* %array, i32 %length, i32 %n, i1 %unrelated
|
||||
; CHECK-NEXT: store i32 0, i32* [[ARRAY_I_PTR]], align 4
|
||||
; CHECK-NEXT: [[I_NEXT]] = add nuw i32 [[I]], 1
|
||||
; CHECK-NEXT: [[CONTINUE:%.*]] = icmp ult i32 [[I_NEXT]], [[N]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]]
|
||||
; CHECK-NEXT: br i1 [[CONTINUE]], label [[LOOP]], label [[EXIT_LOOPEXIT:%.*]], !prof !1
|
||||
; CHECK: exit.loopexit:
|
||||
; CHECK-NEXT: br label [[EXIT]]
|
||||
; CHECK: exit:
|
||||
@ -1915,7 +1916,7 @@ guarded: ; preds = %loop
|
||||
store i32 0, i32* %array.i.ptr, align 4
|
||||
%i.next = add nuw i32 %i, 1
|
||||
%continue = icmp ult i32 %i.next, %n
|
||||
br i1 %continue, label %loop, label %exit
|
||||
br i1 %continue, label %loop, label %exit, !prof !2
|
||||
|
||||
exit: ; preds = %guarded, %entry
|
||||
ret i32 0
|
||||
@ -1931,3 +1932,4 @@ attributes #0 = { inaccessiblememonly nounwind }
|
||||
|
||||
!0 = !{!"branch_weights", i32 1048576, i32 1}
|
||||
!1 = !{i32 1, i32 -2147483648}
|
||||
!2 = !{!"branch_weights", i32 1024, i32 1}
|
||||
|
Loading…
x
Reference in New Issue
Block a user