[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rv32fc-valid.s
blob12bccdfbbdd9020f1bcf166859238c522ffc860d
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+c,+f -riscv-no-aliases -show-encoding \
2 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
3 # RUN: llvm-mc -filetype=obj -triple=riscv32 -mattr=+c,+f < %s \
4 # RUN: | llvm-objdump --mattr=+c,+f -M no-aliases -d -r - \
5 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
7 # RUN: not llvm-mc -triple riscv32 -mattr=+c \
8 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
9 # RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-F %s
10 # RUN: not llvm-mc -triple riscv32 \
11 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
12 # RUN: | FileCheck -check-prefixes=CHECK-NO-EXT-FC %s
13 # RUN: not llvm-mc -triple riscv64 -mattr=+c,+f \
14 # RUN: -riscv-no-aliases -show-encoding < %s 2>&1 \
15 # RUN: | FileCheck -check-prefixes=CHECK-NO-RV32 %s
17 # FIXME: error messages for rv64fc are misleading
19 # CHECK-ASM-AND-OBJ: c.flwsp fs0, 252(sp)
20 # CHECK-ASM: encoding: [0x7e,0x74]
21 # CHECK-NO-EXT-F: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
22 # CHECK-NO-EXT-FC: error: instruction requires the following: 'C' (Compressed Instructions), 'F' (Single-Precision Floating-Point)
23 # CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set
24 c.flwsp fs0, 252(sp)
25 # CHECK-ASM-AND-OBJ: c.fswsp fa7, 252(sp)
26 # CHECK-ASM: encoding: [0xc6,0xff]
27 # CHECK-NO-EXT-F: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
28 # CHECK-NO-EXT-FC: error: instruction requires the following: 'C' (Compressed Instructions), 'F' (Single-Precision Floating-Point)
29 # CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set
30 c.fswsp fa7, 252(sp)
32 # CHECK-ASM-AND-OBJ: c.flw fa3, 124(a5)
33 # CHECK-ASM: encoding: [0xf4,0x7f]
34 # CHECK-NO-EXT-F: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
35 # CHECK-NO-EXT-FC: error: instruction requires the following: 'C' (Compressed Instructions), 'F' (Single-Precision Floating-Point)
36 # CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set
37 c.flw fa3, 124(a5)
38 # CHECK-ASM-AND-OBJ: c.fsw fa2, 124(a1)
39 # CHECK-ASM: encoding: [0xf0,0xfd]
40 # CHECK-NO-EXT-F: error: instruction requires the following: 'F' (Single-Precision Floating-Point)
41 # CHECK-NO-EXT-FC: error: instruction requires the following: 'C' (Compressed Instructions), 'F' (Single-Precision Floating-Point)
42 # CHECK-NO-RV32: error: instruction requires the following: RV32I Base Instruction Set
43 c.fsw fa2, 124(a1)