rv64-relax-all.s 564 Bytes
# 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

# 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

## Check the instructions are relaxed correctly

NEAR:

# INSTR:           c.beqz    a0, 0 <NEAR>
# RELAX-INSTR:     beq    a0, zero, 0 <NEAR>
c.beqz a0, NEAR

# INSTR:           c.j    -2 <NEAR>
# RELAX-INSTR:     jal    zero, -4 <NEAR>
c.j NEAR