Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / RISCV / reloc-label-diff.s
blob9ad38f86ff541421b82f0bf88e4db342384e3a5d
1 // RUN: %clang %cflags -o %t %s
2 // RUN: llvm-bolt -o %t.bolt %t
3 // RUN: llvm-readelf -x .data %t.bolt | FileCheck %s
5 .text
6 .option norvc
7 .globl _start
8 .p2align 1
9 _start:
10 // Force BOLT into relocation mode
11 .reloc 0, R_RISCV_NONE
12 // BOLT removes this nop so the label difference is initially 8 but should be
13 // 4 after BOLT processes it.
14 nop
15 beq x0, x0, _test_end
16 _test_end:
17 ret
18 .size _start, .-_start
20 .data
21 // CHECK: Hex dump of section '.data':
22 // CHECK: 0x{{.*}} 04000000
23 .word _test_end - _start