Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / pseudo-jump.s
blob8c72547c5bcc2a5e2cc8b07dbf704b2d9fa73659
1 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
2 # RUN: | llvm-objdump -d - | FileCheck --check-prefix=INSTR %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 < %s \
4 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
5 # RUN: llvm-mc -triple riscv32 < %s -show-encoding \
6 # RUN: | FileCheck -check-prefix=FIXUP %s
8 .long foo
10 jump foo, x31
11 # RELOC: R_RISCV_CALL_PLT foo 0x0
12 # INSTR: auipc t6, 0
13 # INSTR: jr t6
14 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_call
16 # Ensure that jumps to symbols whose names coincide with register names work.
18 jump zero, x1
19 # RELOC: R_RISCV_CALL_PLT zero 0x0
20 # INSTR: auipc ra, 0
21 # INSTR: ret
22 # FIXUP: fixup A - offset: 0, value: zero, kind: fixup_riscv_call
25 jump 1b, x31
26 # INSTR: auipc t6, 0
27 # INSTR: jr t6
28 # FIXUP: fixup A - offset: 0, value: .Ltmp0, kind: fixup_riscv_call