Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / fixups-binary-expression.s
blobdc1de5d6b324a4038fdd7bd6694aa277837f77f1
1 # RUN: llvm-mc -triple riscv32 -mattr=+c -riscv-no-aliases < %s -show-encoding \
2 # RUN: | FileCheck -check-prefix=CHECK-FIXUP %s
3 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c < %s \
4 # RUN: | llvm-objdump -M no-aliases -d - \
5 # RUN: | FileCheck -check-prefix=CHECK-INSTR %s
6 # RUN: llvm-mc -filetype=obj -triple riscv32 -mattr=+c,+relax < %s \
7 # RUN: | llvm-readobj -r - | FileCheck -check-prefix=CHECK-RELOC %s
9 .LBB0:
11 .LBB1:
13 jal zero, .LBB0+16
14 # CHECK-FIXUP: fixup A - offset: 0, value: .LBB0+16, kind: fixup_riscv_jal
15 # CHECK-INSTR: jal zero, 0x10
16 # CHECK-RELOC: R_RISCV_JAL
18 beq a0, a1, .LBB1+32
19 # CHECK-FIXUP: fixup A - offset: 0, value: .LBB1+32, kind: fixup_riscv_branch
20 # CHECK-INSTR: beq a0, a1, 0x20
21 # CHECK-RELOC: R_RISCV_BRANCH
23 c.j .+32
24 # CHECK: fixup A - offset: 0, value: .Ltmp0+32, kind: fixup_riscv_rvc_jump
25 # CHECK-INSTR: c.j 0x28
26 # CHECK-RELOC: R_RISCV_RVC_JUMP
28 c.beqz a0, .-2
29 # CHECK-FIXUP: fixup A - offset: 0, value: .Ltmp1-2, kind: fixup_riscv_rvc_branch
30 # CHECK-INSTR: c.beqz a0, 0x8
31 # CHECK-RELOC: R_RISCV_RVC_BRANCH