Skip to content

Commit e90cfcb

Browse files
committed
Test new command line flag
Created using spr 1.3.5-bogner
1 parent 4cbc231 commit e90cfcb

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

llvm/test/CodeGen/RISCV/branch.ll

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
22
; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
33
; RUN: | FileCheck -check-prefix=RV32I %s
4+
; RUN: llc -mtriple=riscv32 -verify-machineinstrs -block-placement-predecessor-limit=10 < %s \
5+
; RUN: | FileCheck -check-prefix=RV32I-MBPLIMIT %s
46

57
define void @foo(i32 %a, ptr %b, i1 %c) nounwind {
68
; RV32I-LABEL: foo:
@@ -48,6 +50,53 @@ define void @foo(i32 %a, ptr %b, i1 %c) nounwind {
4850
; RV32I-NEXT: lw zero, 0(a1)
4951
; RV32I-NEXT: .LBB0_14: # %end
5052
; RV32I-NEXT: ret
53+
;
54+
; RV32I-MBPLIMIT-LABEL: foo:
55+
; RV32I-MBPLIMIT: # %bb.0:
56+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
57+
; RV32I-MBPLIMIT-NEXT: bne a3, a0, .LBB0_2
58+
; RV32I-MBPLIMIT-NEXT: .LBB0_1: # %end
59+
; RV32I-MBPLIMIT-NEXT: ret
60+
; RV32I-MBPLIMIT-NEXT: .LBB0_2: # %test2
61+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
62+
; RV32I-MBPLIMIT-NEXT: bne a3, a0, .LBB0_1
63+
; RV32I-MBPLIMIT-NEXT: # %bb.3: # %test3
64+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
65+
; RV32I-MBPLIMIT-NEXT: blt a3, a0, .LBB0_1
66+
; RV32I-MBPLIMIT-NEXT: # %bb.4: # %test4
67+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
68+
; RV32I-MBPLIMIT-NEXT: bge a3, a0, .LBB0_1
69+
; RV32I-MBPLIMIT-NEXT: # %bb.5: # %test5
70+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
71+
; RV32I-MBPLIMIT-NEXT: bltu a3, a0, .LBB0_1
72+
; RV32I-MBPLIMIT-NEXT: # %bb.6: # %test6
73+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
74+
; RV32I-MBPLIMIT-NEXT: bgeu a3, a0, .LBB0_1
75+
; RV32I-MBPLIMIT-NEXT: # %bb.7: # %test7
76+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
77+
; RV32I-MBPLIMIT-NEXT: blt a0, a3, .LBB0_1
78+
; RV32I-MBPLIMIT-NEXT: # %bb.8: # %test8
79+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
80+
; RV32I-MBPLIMIT-NEXT: bge a0, a3, .LBB0_1
81+
; RV32I-MBPLIMIT-NEXT: # %bb.9: # %test9
82+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
83+
; RV32I-MBPLIMIT-NEXT: bltu a0, a3, .LBB0_1
84+
; RV32I-MBPLIMIT-NEXT: # %bb.10: # %test10
85+
; RV32I-MBPLIMIT-NEXT: lw a3, 0(a1)
86+
; RV32I-MBPLIMIT-NEXT: bgeu a0, a3, .LBB0_1
87+
; RV32I-MBPLIMIT-NEXT: # %bb.11: # %test11
88+
; RV32I-MBPLIMIT-NEXT: lw zero, 0(a1)
89+
; RV32I-MBPLIMIT-NEXT: andi a2, a2, 1
90+
; RV32I-MBPLIMIT-NEXT: bnez a2, .LBB0_1
91+
; RV32I-MBPLIMIT-NEXT: # %bb.12: # %test12
92+
; RV32I-MBPLIMIT-NEXT: lw a0, 0(a1)
93+
; RV32I-MBPLIMIT-NEXT: bgez a0, .LBB0_1
94+
; RV32I-MBPLIMIT-NEXT: # %bb.13: # %test13
95+
; RV32I-MBPLIMIT-NEXT: lw a0, 0(a1)
96+
; RV32I-MBPLIMIT-NEXT: blez a0, .LBB0_1
97+
; RV32I-MBPLIMIT-NEXT: # %bb.14: # %test14
98+
; RV32I-MBPLIMIT-NEXT: lw zero, 0(a1)
99+
; RV32I-MBPLIMIT-NEXT: ret
51100
%val1 = load volatile i32, ptr %b
52101
%tst1 = icmp eq i32 %val1, %a
53102
br i1 %tst1, label %end, label %test2

0 commit comments

Comments
 (0)