Revert "[TargetVersion] Only enable on RISC-V and AArch64" (#117110)
[llvm-project.git] / bolt / test / RISCV / reloc-lohi.s
blobc882df0be61d968a67fc95d421db88bc8e612620
1 // RUN: llvm-mc -triple riscv64 -filetype=obj -o %t.o %s
2 // RUN: ld.lld -q -o %t %t.o
3 // RUN: llvm-bolt --print-cfg --print-only=_start -o %t.null %t \
4 // RUN: | FileCheck %s
6 .data
7 .globl d
8 .p2align 3
9 d:
10 .dword 0
12 // CHECK-LABEL: Binary Function "_start" after building cfg {
13 // CHECK: lui t0, %hi(d)
14 // CHECK-NEXT: ld t0, %lo(d)(t0)
15 // CHECK-NEXT: lui t0, %hi(d)
16 // CHECK-NEXT: sd t0, %lo(d)(t0)
17 .text
18 .globl _start
19 .p2align 1
20 _start:
21 lui t0, %hi(d)
22 ld t0, %lo(d)(t0)
23 lui t0, %hi(d)
24 sd t0, %lo(d)(t0)
25 ret
26 .size _start, .-_start