[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv64-relax-all.s
blob84ef373b741b49da1337c3173ce5a7b3e0704c26
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
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
5 ## Check the instructions are relaxed correctly
7 NEAR:
9 # INSTR: c.beqz a0, 0x0 <NEAR>
10 # RELAX-INSTR: beq a0, zero, 0x0 <NEAR>
11 c.beqz a0, NEAR
13 # INSTR: c.j 0x0 <NEAR>
14 # RELAX-INSTR: jal zero, 0x0 <NEAR>
15 c.j NEAR