Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / RISCV / reloc-pcrel.s
blob3ad3015a0a57fadaa65fa8e2902b63a76f6e9f8d
1 // RUN: %clang %cflags -o %t %s
2 // RUN: llvm-bolt --print-cfg --print-only=_start -o /dev/null %t \
3 // RUN: | FileCheck %s
5 .data
6 .globl d
7 .p2align 3
8 d:
9 .dword 0
11 .text
12 .globl _start
13 .p2align 1
14 // CHECK: Binary Function "_start" after building cfg {
15 _start:
16 nop // Here to not make the _start and .Ltmp0 symbols coincide
17 // CHECK: auipc t0, %pcrel_hi(d) # Label: .Ltmp0
18 // CHECK-NEXT: ld t0, %pcrel_lo(.Ltmp0)(t0)
19 ld t0, d
20 // CHECK-NEXT: auipc t1, %pcrel_hi(d) # Label: .Ltmp1
21 // CHECK-NEXT: sd t0, %pcrel_lo(.Ltmp1)(t1)
22 sd t0, d, t1
23 ret
24 .size _start, .-_start