Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / RISCV / rv32zdinx-valid.s
blobbd1e23104c5ba8a61578cbe32bea074e9ccd9f3e
1 # RUN: llvm-mc %s -triple=riscv32 -mattr=+zdinx -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=+zdinx %s \
4 # RUN: | llvm-objdump --mattr=+zdinx -M no-aliases -d -r - \
5 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
6 # RUN: llvm-mc %s -triple=riscv64 -mattr=+zdinx -riscv-no-aliases -show-encoding \
7 # RUN: | FileCheck -check-prefixes=CHECK-ASM,CHECK-ASM-AND-OBJ %s
8 # RUN: llvm-mc -filetype=obj -triple=riscv64 -mattr=+zdinx %s \
9 # RUN: | llvm-objdump --mattr=+zdinx -M no-aliases -d -r - \
10 # RUN: | FileCheck --check-prefix=CHECK-ASM-AND-OBJ %s
12 # CHECK-ASM-AND-OBJ: fmadd.d a0, a2, a4, a6, dyn
13 # CHECK-ASM: encoding: [0x43,0x75,0xe6,0x82]
14 fmadd.d x10, x12, x14, x16, dyn
15 # CHECK-ASM-AND-OBJ: fmsub.d a0, a2, a4, a6, dyn
16 # CHECK-ASM: encoding: [0x47,0x75,0xe6,0x82]
17 fmsub.d x10, x12, x14, x16, dyn
18 # CHECK-ASM-AND-OBJ: fnmsub.d a0, a2, a4, a6, dyn
19 # CHECK-ASM: encoding: [0x4b,0x75,0xe6,0x82]
20 fnmsub.d x10, x12, x14, x16, dyn
21 # CHECK-ASM-AND-OBJ: fnmadd.d a0, a2, a4, a6, dyn
22 # CHECK-ASM: encoding: [0x4f,0x75,0xe6,0x82]
23 fnmadd.d x10, x12, x14, x16, dyn
25 # CHECK-ASM-AND-OBJ: fadd.d s10, t3, t5, dyn
26 # CHECK-ASM: encoding: [0x53,0x7d,0xee,0x03]
27 fadd.d x26, x28, x30, dyn
28 # CHECK-ASM-AND-OBJ: fsub.d s10, t3, t5, dyn
29 # CHECK-ASM: encoding: [0x53,0x7d,0xee,0x0b]
30 fsub.d x26, x28, x30, dyn
31 # CHECK-ASM-AND-OBJ: fmul.d s10, t3, t5, dyn
32 # CHECK-ASM: encoding: [0x53,0x7d,0xee,0x13]
33 fmul.d x26, x28, x30, dyn
34 # CHECK-ASM-AND-OBJ: fdiv.d s10, t3, t5, dyn
35 # CHECK-ASM: encoding: [0x53,0x7d,0xee,0x1b]
36 fdiv.d x26, x28, x30, dyn
37 # CHECK-ASM-AND-OBJ: fsqrt.d s4, s6, dyn
38 # CHECK-ASM: encoding: [0x53,0x7a,0x0b,0x5a]
39 fsqrt.d x20, x22, dyn
40 # CHECK-ASM-AND-OBJ: fsgnj.d s10, t3, t5
41 # CHECK-ASM: encoding: [0x53,0x0d,0xee,0x23]
42 fsgnj.d x26, x28, x30
43 # CHECK-ASM-AND-OBJ: fsgnjn.d s10, t3, t5
44 # CHECK-ASM: encoding: [0x53,0x1d,0xee,0x23]
45 fsgnjn.d x26, x28, x30
46 # CHECK-ASM-AND-OBJ: fsgnjx.d s10, t3, t5
47 # CHECK-ASM: encoding: [0x53,0x2d,0xee,0x23]
48 fsgnjx.d x26, x28, x30
49 # CHECK-ASM-AND-OBJ: fmin.d s10, t3, t5
50 # CHECK-ASM: encoding: [0x53,0x0d,0xee,0x2b]
51 fmin.d x26, x28, x30
52 # CHECK-ASM-AND-OBJ: fmax.d s10, t3, t5
53 # CHECK-ASM: encoding: [0x53,0x1d,0xee,0x2b]
54 fmax.d x26, x28, x30
56 # CHECK-ASM-AND-OBJ: fcvt.s.d s10, t3, dyn
57 # CHECK-ASM: encoding: [0x53,0x7d,0x1e,0x40]
58 fcvt.s.d x26, x28, dyn
59 # CHECK-ASM-AND-OBJ: fcvt.d.s s10, t3
60 # CHECK-ASM: encoding: [0x53,0x0d,0x0e,0x42]
61 fcvt.d.s x26, x28
62 # CHECK-ASM-AND-OBJ: fcvt.d.s s10, t3, rup
63 # CHECK-ASM: encoding: [0x53,0x3d,0x0e,0x42]
64 fcvt.d.s x26, x28, rup
65 # CHECK-ASM-AND-OBJ: feq.d s10, t3, t5
66 # CHECK-ASM: encoding: [0x53,0x2d,0xee,0xa3]
67 feq.d x26, x28, x30
68 # CHECK-ASM-AND-OBJ: flt.d s10, t3, t5
69 # CHECK-ASM: encoding: [0x53,0x1d,0xee,0xa3]
70 flt.d x26, x28, x30
71 # CHECK-ASM-AND-OBJ: fle.d s10, t3, t5
72 # CHECK-ASM: encoding: [0x53,0x0d,0xee,0xa3]
73 fle.d x26, x28, x30
74 # CHECK-ASM-AND-OBJ: fclass.d s10, t3
75 # CHECK-ASM: encoding: [0x53,0x1d,0x0e,0xe2]
76 fclass.d x26, x28
78 # CHECK-ASM-AND-OBJ: fcvt.w.d s4, s6, dyn
79 # CHECK-ASM: encoding: [0x53,0x7a,0x0b,0xc2]
80 fcvt.w.d x20, x22, dyn
81 # CHECK-ASM-AND-OBJ: fcvt.d.w s10, t3
82 # CHECK-ASM: encoding: [0x53,0x0d,0x0e,0xd2]
83 fcvt.d.w x26, x28
84 # CHECK-ASM-AND-OBJ: fcvt.d.w s10, t3, rup
85 # CHECK-ASM: encoding: [0x53,0x3d,0x0e,0xd2]
86 fcvt.d.w x26, x28, rup
87 # CHECK-ASM-AND-OBJ: fcvt.d.wu s10, t3
88 # CHECK-ASM: encoding: [0x53,0x0d,0x1e,0xd2]
89 fcvt.d.wu x26, x28
90 # CHECK-ASM-AND-OBJ: fcvt.d.wu s10, t3, rup
91 # CHECK-ASM: encoding: [0x53,0x3d,0x1e,0xd2]
92 fcvt.d.wu x26, x28, rup
94 # Rounding modes
96 # CHECK-ASM-AND-OBJ: fmadd.d a0, a2, a4, a6, rne
97 # CHECK-ASM: encoding: [0x43,0x05,0xe6,0x82]
98 fmadd.d x10, x12, x14, x16, rne
99 # CHECK-ASM-AND-OBJ: fmsub.d a0, a2, a4, a6, rtz
100 # CHECK-ASM: encoding: [0x47,0x15,0xe6,0x82]
101 fmsub.d x10, x12, x14, x16, rtz
102 # CHECK-ASM-AND-OBJ: fnmsub.d a0, a2, a4, a6, rdn
103 # CHECK-ASM: encoding: [0x4b,0x25,0xe6,0x82]
104 fnmsub.d x10, x12, x14, x16, rdn
105 # CHECK-ASM-AND-OBJ: fnmadd.d a0, a2, a4, a6, rup
106 # CHECK-ASM: encoding: [0x4f,0x35,0xe6,0x82]
107 fnmadd.d x10, x12, x14, x16, rup
109 # CHECK-ASM-AND-OBJ: fadd.d s10, t3, t5, rmm
110 # CHECK-ASM: encoding: [0x53,0x4d,0xee,0x03]
111 fadd.d x26, x28, x30, rmm
112 # CHECK-ASM-AND-OBJ: fsub.d s10, t3, t5, dyn
113 # CHECK-ASM: encoding: [0x53,0x7d,0xee,0x0b]
114 fsub.d x26, x28, x30, dyn
115 # CHECK-ASM-AND-OBJ: fmul.d s10, t3, t5, rne
116 # CHECK-ASM: encoding: [0x53,0x0d,0xee,0x13]
117 fmul.d x26, x28, x30, rne
118 # CHECK-ASM-AND-OBJ: fdiv.d s10, t3, t5, rtz
119 # CHECK-ASM: encoding: [0x53,0x1d,0xee,0x1b]
120 fdiv.d x26, x28, x30, rtz
122 # CHECK-ASM-AND-OBJ: fsqrt.d s4, s6, rdn
123 # CHECK-ASM: encoding: [0x53,0x2a,0x0b,0x5a]
124 fsqrt.d x20, x22, rdn
125 # CHECK-ASM-AND-OBJ: fcvt.s.d s4, s6, rup
126 # CHECK-ASM: encoding: [0x53,0x3a,0x1b,0x40]
127 fcvt.s.d x20, x22, rup
128 # CHECK-ASM-AND-OBJ: fcvt.w.d s4, s6, rmm
129 # CHECK-ASM: encoding: [0x53,0x4a,0x0b,0xc2]
130 fcvt.w.d x20, x22, rmm
131 # CHECK-ASM-AND-OBJ: fcvt.wu.d s4, s6, dyn
132 # CHECK-ASM: encoding: [0x53,0x7a,0x1b,0xc2]
133 fcvt.wu.d x20, x22, dyn