[SelectOpt] Support ADD and SUB with zext operands. (#115489)
[llvm-project.git] / llvm / test / MC / RISCV / compressed-relocations.s
blobc7117ab702434c39317f9b29ecc3d08beeef2fcd
1 # RUN: llvm-mc -triple riscv32 -mattr=+c -riscv-no-aliases < %s -show-encoding \
2 # RUN: | FileCheck -check-prefix=INSTR -check-prefix=FIXUP %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
4 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
5 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
6 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=RELOC %s
8 # Check prefixes:
9 # RELOC - Check the relocation in the object.
10 # FIXUP - Check the fixup on the instruction.
11 # INSTR - Check the instruction is handled properly by the ASMPrinter
12 c.jal foo
13 # A compressed jump (c.j) to an unresolved symbol will be relaxed to a (jal).
14 # RELOC: R_RISCV_JAL
15 # INSTR: c.jal foo
16 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_rvc_jump
18 c.bnez a0, foo
19 # A compressed branch (c.bnez) to an unresolved symbol will be relaxed to a (bnez).
20 # The (bnez) to an unresolved symbol will in turn be relaxed to (beqz; jal)
21 # RELOC: R_RISCV_JAL
22 # INSTR: c.bnez a0, foo
23 # FIXUP: fixup A - offset: 0, value: foo, kind: fixup_riscv_rvc_branch