[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / pseudo-jump.s
blob0a2e2faa1b65a62b08c946768de880697c1c0b49
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 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 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