[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / RISCV / rvv / fadd.s
blob7feddd25d061cf198f4b77f7b93ae27a0abdfc17
1 # RUN: llvm-mc -triple=riscv64 -show-encoding --mattr=+experimental-v %s \
2 # RUN: --mattr=+f \
3 # RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
4 # RUN: not llvm-mc -triple=riscv64 -show-encoding %s 2>&1 \
5 # RUN: | FileCheck %s --check-prefix=CHECK-ERROR
6 # RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \
7 # RUN: --mattr=+f \
8 # RUN: | llvm-objdump -d --mattr=+experimental-v --mattr=+f - \
9 # RUN: | FileCheck %s --check-prefix=CHECK-INST
10 # RUN: llvm-mc -triple=riscv64 -filetype=obj --mattr=+experimental-v %s \
11 # RUN: --mattr=+f \
12 # RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
14 vfadd.vv v8, v4, v20, v0.t
15 # CHECK-INST: vfadd.vv v8, v4, v20, v0.t
16 # CHECK-ENCODING: [0x57,0x14,0x4a,0x00]
17 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
18 # CHECK-UNKNOWN: 57 14 4a 00 <unknown>
20 vfadd.vv v8, v4, v20
21 # CHECK-INST: vfadd.vv v8, v4, v20
22 # CHECK-ENCODING: [0x57,0x14,0x4a,0x02]
23 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
24 # CHECK-UNKNOWN: 57 14 4a 02 <unknown>
26 vfadd.vf v8, v4, fa0, v0.t
27 # CHECK-INST: vfadd.vf v8, v4, fa0, v0.t
28 # CHECK-ENCODING: [0x57,0x54,0x45,0x00]
29 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
30 # CHECK-UNKNOWN: 57 54 45 00 <unknown>
32 vfadd.vf v8, v4, fa0
33 # CHECK-INST: vfadd.vf v8, v4, fa0
34 # CHECK-ENCODING: [0x57,0x54,0x45,0x02]
35 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
36 # CHECK-UNKNOWN: 57 54 45 02 <unknown>
38 vfwadd.vv v8, v4, v20, v0.t
39 # CHECK-INST: vfwadd.vv v8, v4, v20, v0.t
40 # CHECK-ENCODING: [0x57,0x14,0x4a,0xc0]
41 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
42 # CHECK-UNKNOWN: 57 14 4a c0 <unknown>
44 vfwadd.vv v8, v4, v20
45 # CHECK-INST: vfwadd.vv v8, v4, v20
46 # CHECK-ENCODING: [0x57,0x14,0x4a,0xc2]
47 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
48 # CHECK-UNKNOWN: 57 14 4a c2 <unknown>
50 vfwadd.vf v8, v4, fa0, v0.t
51 # CHECK-INST: vfwadd.vf v8, v4, fa0, v0.t
52 # CHECK-ENCODING: [0x57,0x54,0x45,0xc0]
53 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
54 # CHECK-UNKNOWN: 57 54 45 c0 <unknown>
56 vfwadd.vf v8, v4, fa0
57 # CHECK-INST: vfwadd.vf v8, v4, fa0
58 # CHECK-ENCODING: [0x57,0x54,0x45,0xc2]
59 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
60 # CHECK-UNKNOWN: 57 54 45 c2 <unknown>
62 vfwadd.wv v8, v4, v20, v0.t
63 # CHECK-INST: vfwadd.wv v8, v4, v20, v0.t
64 # CHECK-ENCODING: [0x57,0x14,0x4a,0xd0]
65 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
66 # CHECK-UNKNOWN: 57 14 4a d0 <unknown>
68 vfwadd.wv v8, v4, v20
69 # CHECK-INST: vfwadd.wv v8, v4, v20
70 # CHECK-ENCODING: [0x57,0x14,0x4a,0xd2]
71 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
72 # CHECK-UNKNOWN: 57 14 4a d2 <unknown>
74 vfwadd.wf v8, v4, fa0, v0.t
75 # CHECK-INST: vfwadd.wf v8, v4, fa0, v0.t
76 # CHECK-ENCODING: [0x57,0x54,0x45,0xd0]
77 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
78 # CHECK-UNKNOWN: 57 54 45 d0 <unknown>
80 vfwadd.wf v8, v4, fa0
81 # CHECK-INST: vfwadd.wf v8, v4, fa0
82 # CHECK-ENCODING: [0x57,0x54,0x45,0xd2]
83 # CHECK-ERROR: instruction requires the following: 'F'{{.*}}'V'
84 # CHECK-UNKNOWN: 57 54 45 d2 <unknown>