File: branches-relax.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (113 lines) | stat: -rw-r--r-- 3,394 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=sparc64 -sparc-bpcc-offset-bits=4 | FileCheck --check-prefix=SPARC64 %s

define i32 @branch_relax_int(i32 %in) {
; SPARC64-LABEL: branch_relax_int:
; SPARC64:         .cfi_startproc
; SPARC64-NEXT:  ! %bb.0:
; SPARC64-NEXT:    save %sp, -128, %sp
; SPARC64-NEXT:    .cfi_def_cfa_register %fp
; SPARC64-NEXT:    .cfi_window_save
; SPARC64-NEXT:    .cfi_register %o7, %i7
; SPARC64-NEXT:    cmp %i0, 0
; SPARC64-NEXT:    bne %icc, .LBB0_1
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    ba .LBB0_2
; SPARC64-NEXT:    nop
; SPARC64-NEXT:  .LBB0_1: ! %false
; SPARC64-NEXT:    !APP
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    !NO_APP
; SPARC64-NEXT:    ret
; SPARC64-NEXT:    restore %g0, %g0, %o0
; SPARC64-NEXT:  .LBB0_2: ! %true
; SPARC64-NEXT:    mov 4, %i0
; SPARC64-NEXT:    !APP
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    !NO_APP
; SPARC64-NEXT:    ret
; SPARC64-NEXT:    restore
  %tst = icmp eq i32 %in, 0
  br i1 %tst, label %true, label %false

true:
  call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
  ret i32 4

false:
  call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
  ret i32 0
}

define float @branch_relax_float(float %in) {
; SPARC64-LABEL: branch_relax_float:
; SPARC64:         .cfi_startproc
; SPARC64-NEXT:  ! %bb.0:
; SPARC64-NEXT:    save %sp, -128, %sp
; SPARC64-NEXT:    .cfi_def_cfa_register %fp
; SPARC64-NEXT:    .cfi_window_save
; SPARC64-NEXT:    .cfi_register %o7, %i7
; SPARC64-NEXT:    sethi %h44(.LCPI1_0), %i0
; SPARC64-NEXT:    add %i0, %m44(.LCPI1_0), %i0
; SPARC64-NEXT:    sllx %i0, 12, %i0
; SPARC64-NEXT:    ld [%i0+%l44(.LCPI1_0)], %f0
; SPARC64-NEXT:    fcmps %fcc0, %f1, %f0
; SPARC64-NEXT:    fbe %fcc0, .LBB1_1
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    ba .LBB1_2
; SPARC64-NEXT:    nop
; SPARC64-NEXT:  .LBB1_1: ! %true
; SPARC64-NEXT:    sethi %h44(.LCPI1_1), %i0
; SPARC64-NEXT:    add %i0, %m44(.LCPI1_1), %i0
; SPARC64-NEXT:    sllx %i0, 12, %i0
; SPARC64-NEXT:    ld [%i0+%l44(.LCPI1_1)], %f0
; SPARC64-NEXT:    !APP
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    !NO_APP
; SPARC64-NEXT:    ret
; SPARC64-NEXT:    restore
; SPARC64-NEXT:  .LBB1_2: ! %false
; SPARC64-NEXT:    !APP
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    nop
; SPARC64-NEXT:    !NO_APP
; SPARC64-NEXT:    ret
; SPARC64-NEXT:    restore
  %tst = fcmp oeq float %in, 0.0
  br i1 %tst, label %true, label %false

true:
  call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
  ret float 4.0

false:
  call void asm sideeffect "nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop\0A\09nop", ""()
  ret float 0.0
}