1# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c %s | llvm-objdump -d -M no-aliases --no-show-raw-insn - | FileCheck %s --check-prefix=INSTR
2
3# RUN: llvm-mc -filetype=obj -triple riscv64 -mattr=+c %s --mc-relax-all | llvm-objdump -d -M no-aliases --no-show-raw-insn - | FileCheck %s --check-prefix=RELAX-INSTR
4
5## Check the instructions are relaxed correctly
6
7NEAR:
8
9# INSTR:           c.beqz    a0, 0x0 <NEAR>
10# RELAX-INSTR:     beq    a0, zero, 0x0 <NEAR>
11c.beqz a0, NEAR
12
13# INSTR:           c.j    0x0 <NEAR>
14# RELAX-INSTR:     jal    zero, 0x0 <NEAR>
15c.j NEAR
16