Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / RISCV / reloc-jt.s
blob009ce6cca95df1fdc5d63d4392af29d64fffb34f
1 /// NOTE: assign section addresses explicitly to make the symbol difference
2 /// calculation below less fragile.
3 // RUN: %clang %cflags -Wl,--section-start=.text=0x1000,--section-start=.data=0x2000 -o %t %s
4 // RUN: llvm-bolt -o %t.bolt %t
5 // RUN: llvm-readelf -x .data %t.bolt | FileCheck %s
7 .text
9 .globl _start
10 .p2align 1
11 _start:
12 .LBB0_0:
13 auipc a1, %pcrel_hi(.LJTI0_0)
14 addi a1, a1, %pcrel_lo(.LBB0_0)
15 lw a0, (a1)
16 add a0, a0, a1
17 jr a0
18 .LBB0_1:
19 ret
20 .size _start, .-_start
22 .data
23 /// .LJTI0_0 = 0x2000
24 /// .LBB0_1 = 0x40000e
25 // CHECK: Hex dump of section '.data':
26 // CHECK-NEXT: 0x00002000 0ee03f00
27 .LJTI0_0:
28 .word .LBB0_1 - .LJTI0_0