[flang][cuda] Do not apply implicit data attribute on dummy arg with VALUE (#119927)
[llvm-project.git] / bolt / test / X86 / fragment-lite.s
blob9a5e5f83bc3f2fb6b8913d4d32a76dcc9ee3931b
1 ## Check that BOLT in lite mode processes fragments as expected.
3 # RUN: split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/main.s -o %t.o
5 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/baz.s -o %t.baz.o
6 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %t/baz2.s -o %t.baz2.o
7 # RUN: link_fdata %s %t.o %t.main.fdata
8 # RUN: link_fdata %s %t.baz.o %t.baz.fdata
9 # RUN: link_fdata %s %t.baz2.o %t.baz2.fdata
10 # RUN: merge-fdata %t.main.fdata %t.baz.fdata %t.baz2.fdata > %t.fdata
11 # RUN: %clang %cflags %t.o %t.baz.o %t.baz2.o -o %t.exe -Wl,-q
12 # RUN: llvm-bolt %t.exe -o %t.out --lite=1 --data %t.fdata -v=1 -print-cfg \
13 # RUN: 2>&1 | FileCheck %s
15 # CHECK: BOLT-INFO: processing main.cold.1 as a sibling of non-ignored function
16 # CHECK: BOLT-INFO: processing foo.cold.1/1(*2) as a sibling of non-ignored function
17 # CHECK: BOLT-INFO: processing bar.cold.1/1(*2) as a sibling of non-ignored function
18 # CHECK: BOLT-INFO: processing baz.cold.1 as a sibling of non-ignored function
19 # CHECK: BOLT-INFO: processing baz.cold.1/1(*2) as a sibling of non-ignored function
20 # CHECK: BOLT-INFO: processing baz.cold.1/2(*2) as a sibling of non-ignored function
22 # CHECK: Binary Function "main.cold.1" after building cfg
23 # CHECK: Parent : main
25 # CHECK: Binary Function "foo.cold.1/1(*2)" after building cfg
26 # CHECK: Parent : foo
28 # CHECK: Binary Function "bar.cold.1/1(*2)" after building cfg
29 # CHECK: Parent : bar/1(*2)
31 # CHECK: Binary Function "baz.cold.1" after building cfg
32 # CHECK: Parent : baz{{$}}
34 # CHECK: Binary Function "baz.cold.1/1(*2)" after building cfg
35 # CHECK: Parent : baz/1(*2)
37 # CHECK: Binary Function "baz.cold.1/2(*2)" after building cfg
38 # CHECK: Parent : baz/2(*2)
40 #--- main.s
41 .file "main.s"
42 .globl main
43 .type main, %function
44 main:
45 .cfi_startproc
46 # FDATA: 0 [unknown] 0 1 main 0 1 0
47 cmpl $0x0, %eax
48 je main.cold.1
49 retq
50 .cfi_endproc
51 .size main, .-main
53 .globl foo
54 .type foo, %function
55 foo:
56 .cfi_startproc
57 # FDATA: 0 [unknown] 0 1 foo 0 1 0
58 cmpl $0x0, %eax
59 je foo.cold.1
60 retq
61 .cfi_endproc
62 .size foo, .-foo
64 .local bar
65 .type bar, %function
66 bar:
67 .cfi_startproc
68 # FDATA: 0 [unknown] 0 1 bar/1 0 1 0
69 cmpl $0x0, %eax
70 je bar.cold.1
71 retq
72 .cfi_endproc
73 .size bar, .-bar
75 .globl baz
76 .type baz, %function
77 baz:
78 .cfi_startproc
79 # FDATA: 0 [unknown] 0 1 baz 0 1 0
80 cmpl $0x0, %eax
81 je baz.cold.1
82 retq
83 .cfi_endproc
84 .size baz, .-baz
86 .section .text.cold
87 .globl main.cold.1
88 .type main.cold.1, %function
89 main.cold.1:
90 .cfi_startproc
91 pushq %rbp
92 movq %rsp, %rbp
93 movl $0x0, %eax
94 popq %rbp
95 retq
96 .cfi_endproc
97 .size main.cold.1, .-main.cold.1
99 .local foo.cold.1
100 .type foo.cold.1, %function
101 foo.cold.1:
102 .cfi_startproc
103 pushq %rbp
104 movq %rsp, %rbp
105 movl $0x0, %eax
106 popq %rbp
107 retq
108 .cfi_endproc
109 .size foo.cold.1, .-foo.cold.1
111 .local bar.cold.1
112 .type bar.cold.1, %function
113 bar.cold.1:
114 .cfi_startproc
115 pushq %rbp
116 movq %rsp, %rbp
117 movl $0x0, %eax
118 popq %rbp
119 retq
120 .cfi_endproc
121 .size bar.cold.1, .-bar.cold.1
123 .globl baz.cold.1
124 .type baz.cold.1, %function
125 baz.cold.1:
126 .cfi_startproc
127 pushq %rbp
128 movq %rsp, %rbp
129 movl $0x0, %eax
130 popq %rbp
131 retq
132 .cfi_endproc
133 .size baz.cold.1, .-baz.cold.1
135 #--- baz.s
136 .file "baz.s"
137 .local baz
138 .type baz, %function
139 baz:
140 .cfi_startproc
141 # FDATA: 0 [unknown] 0 1 baz/1 0 1 0
142 cmpl $0x0, %eax
143 je baz.cold.1
144 retq
145 .cfi_endproc
146 .size baz, .-baz
148 .section .text.cold
149 .local baz.cold.1
150 .type baz.cold.1, %function
151 baz.cold.1:
152 .cfi_startproc
153 pushq %rbp
154 movq %rsp, %rbp
155 movl $0x0, %eax
156 popq %rbp
157 retq
158 .cfi_endproc
159 .size baz.cold.1, .-baz.cold.1
161 #--- baz2.s
162 .file "baz2.s"
163 .local baz
164 .type baz, %function
165 baz:
166 .cfi_startproc
167 # FDATA: 0 [unknown] 0 1 baz/2 0 1 0
168 cmpl $0x0, %eax
169 je baz.cold.1
170 retq
171 .cfi_endproc
172 .size baz, .-baz
174 .section .text.cold
175 .local baz.cold.1
176 .type baz.cold.1, %function
177 baz.cold.1:
178 .cfi_startproc
179 pushq %rbp
180 movq %rsp, %rbp
181 movl $0x0, %eax
182 popq %rbp
183 retq
184 .cfi_endproc
185 .size baz.cold.1, .-baz.cold.1