1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=sparc64 -sparc-bpcc-offset-bits=4 -sparc-bpr-offset-bits=4 | FileCheck --check-prefix=SPARC64 %s
4 define i32 @branch_relax_int(i32 %in) {
5 ; SPARC64-LABEL: branch_relax_int:
6 ; SPARC64: .cfi_startproc
7 ; SPARC64-NEXT: ! %bb.0:
8 ; SPARC64-NEXT: save %sp, -128, %sp
9 ; SPARC64-NEXT: .cfi_def_cfa_register %fp
10 ; SPARC64-NEXT: .cfi_window_save
11 ; SPARC64-NEXT: .cfi_register %o7, %i7
12 ; SPARC64-NEXT: cmp %i0, 0
13 ; SPARC64-NEXT: bne %icc, .LBB0_1
15 ; SPARC64-NEXT: ba .LBB0_2
17 ; SPARC64-NEXT: .LBB0_1: ! %false
27 ; SPARC64-NEXT: !NO_APP
29 ; SPARC64-NEXT: restore %g0, %g0, %o0
30 ; SPARC64-NEXT: .LBB0_2: ! %true
31 ; SPARC64-NEXT: mov 4, %i0
41 ; SPARC64-NEXT: !NO_APP
43 ; SPARC64-NEXT: restore
44 %tst = icmp eq i32 %in, 0
45 br i1 %tst, label %true, label %false
48 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
52 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
56 define i64 @branch_relax_reg(i64 %in) {
57 ; SPARC64-LABEL: branch_relax_reg:
58 ; SPARC64: .cfi_startproc
59 ; SPARC64-NEXT: ! %bb.0:
60 ; SPARC64-NEXT: save %sp, -128, %sp
61 ; SPARC64-NEXT: .cfi_def_cfa_register %fp
62 ; SPARC64-NEXT: .cfi_window_save
63 ; SPARC64-NEXT: .cfi_register %o7, %i7
64 ; SPARC64-NEXT: brnz %i0, .LBB1_1
66 ; SPARC64-NEXT: ba .LBB1_2
68 ; SPARC64-NEXT: .LBB1_1: ! %false
78 ; SPARC64-NEXT: !NO_APP
80 ; SPARC64-NEXT: restore %g0, %g0, %o0
81 ; SPARC64-NEXT: .LBB1_2: ! %true
82 ; SPARC64-NEXT: mov 4, %i0
92 ; SPARC64-NEXT: !NO_APP
94 ; SPARC64-NEXT: restore
95 %tst = icmp eq i64 %in, 0
96 br i1 %tst, label %true, label %false
99 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
103 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
107 define float @branch_relax_float(float %in) {
108 ; SPARC64-LABEL: branch_relax_float:
109 ; SPARC64: .cfi_startproc
110 ; SPARC64-NEXT: ! %bb.0:
111 ; SPARC64-NEXT: save %sp, -128, %sp
112 ; SPARC64-NEXT: .cfi_def_cfa_register %fp
113 ; SPARC64-NEXT: .cfi_window_save
114 ; SPARC64-NEXT: .cfi_register %o7, %i7
115 ; SPARC64-NEXT: sethi %h44(.LCPI2_0), %i0
116 ; SPARC64-NEXT: add %i0, %m44(.LCPI2_0), %i0
117 ; SPARC64-NEXT: sllx %i0, 12, %i0
118 ; SPARC64-NEXT: ld [%i0+%l44(.LCPI2_0)], %f0
119 ; SPARC64-NEXT: fcmps %fcc0, %f1, %f0
120 ; SPARC64-NEXT: fbe %fcc0, .LBB2_1
122 ; SPARC64-NEXT: ba .LBB2_2
124 ; SPARC64-NEXT: .LBB2_1: ! %true
125 ; SPARC64-NEXT: sethi %h44(.LCPI2_1), %i0
126 ; SPARC64-NEXT: add %i0, %m44(.LCPI2_1), %i0
127 ; SPARC64-NEXT: sllx %i0, 12, %i0
128 ; SPARC64-NEXT: ld [%i0+%l44(.LCPI2_1)], %f0
138 ; SPARC64-NEXT: !NO_APP
140 ; SPARC64-NEXT: restore
141 ; SPARC64-NEXT: .LBB2_2: ! %false
151 ; SPARC64-NEXT: !NO_APP
153 ; SPARC64-NEXT: restore
154 %tst = fcmp oeq float %in, 0.0
155 br i1 %tst, label %true, label %false
158 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
162 call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()