[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv32c-only-valid.s
blob0b10b3f0e90e1fecb0401ce59261778a6587b618
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+c -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck --check-prefix=CHECK-ASM %s
3 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c < %s \
4 # RUN: | llvm-objdump --mattr=+c -M no-aliases -d -r - \
5 # RUN: | FileCheck --check-prefix=CHECK-OBJ %s
7 # RUN: not llvm-mc -triple riscv32 \
8 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
9 # RUN: | FileCheck --check-prefix=CHECK-NO-EXT %s
10 # RUN: not llvm-mc -triple riscv64 -mattr=+c \
11 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
12 # RUN: | FileCheck --check-prefix=CHECK-NO-RV32 %s
13 # RUN: not llvm-mc -triple riscv64 \
14 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
15 # RUN: | FileCheck --check-prefix=CHECK-NO-RV32-AND-EXT %s
17 # CHECK-OBJ: c.jal 0x7fe
18 # CHECK-ASM: c.jal 2046
19 # CHECK-ASM: encoding: [0xfd,0x2f]
20 # CHECK-NO-EXT: error: instruction requires the following: 'C' (Compressed Instructions)
21 # CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set
22 # CHECK-NO-RV32-AND-EXT: error: instruction requires the following: 'C' (Compressed Instructions), RV32I Base Instruction Set
23 c.jal 2046