1 // RUN: llvm-mc -triple x86_64-unknown-unknown -x86-asm-syntax=intel -output-asm-variant=1 -mcpu=knl --show-encoding %s | FileCheck %s
3 // CHECK: vaddps zmm1 , zmm1, zmmword ptr [rax]
4 // CHECK: encoding: [0x62,0xf1,0x74,0x48,0x58,0x08]
5 vaddps zmm1, zmm1, zmmword ptr [rax]
7 // CHECK: vaddpd zmm1 , zmm1, zmm2
8 // CHECK: encoding: [0x62,0xf1,0xf5,0x48,0x58,0xca]
11 // CHECK: vaddpd zmm1 {k5}, zmm1, zmm2
12 // CHECK: encoding: [0x62,0xf1,0xf5,0x4d,0x58,0xca]
13 vaddpd zmm1{k5},zmm1,zmm2
15 // CHECK: vaddpd zmm1 {k5} {z}, zmm1, zmm2
16 // CHECK: encoding: [0x62,0xf1,0xf5,0xcd,0x58,0xca]
17 vaddpd zmm1{k5} {z},zmm1,zmm2
19 // CHECK: vaddpd zmm1 , zmm1, zmm2, {rn-sae}
20 // CHECK: encoding: [0x62,0xf1,0xf5,0x18,0x58,0xca]
21 vaddpd zmm1,zmm1,zmm2,{rn-sae}
23 // CHECK: vaddpd zmm1 , zmm1, zmm2, {ru-sae}
24 // CHECK: encoding: [0x62,0xf1,0xf5,0x58,0x58,0xca]
25 vaddpd zmm1,zmm1,zmm2,{ru-sae}
27 // CHECK: vaddpd zmm1 , zmm1, zmm2, {rd-sae}
28 // CHECK: encoding: [0x62,0xf1,0xf5,0x38,0x58,0xca]
29 vaddpd zmm1,zmm1,zmm2,{rd-sae}
31 // CHECK: vaddpd zmm1 , zmm1, zmm2, {rz-sae}
32 // CHECK: encoding: [0x62,0xf1,0xf5,0x78,0x58,0xca]
33 vaddpd zmm1,zmm1,zmm2,{rz-sae}
35 // CHECK: vcmppd k2 , zmm12, zmm26, 171
36 // CHECK: encoding: [0x62,0x91,0x9d,0x48,0xc2,0xd2,0xab]
37 vcmppd k2,zmm12,zmm26,0xab
39 // CHECK: vcmppd k2 {k3}, zmm12, zmm26, 171
40 // CHECK: encoding: [0x62,0x91,0x9d,0x4b,0xc2,0xd2,0xab]
41 vcmppd k2{k3},zmm12,zmm26,0xab
43 // CHECK: vcmppd k2 , zmm12, zmm26,{sae}, 171
44 // CHECK: encoding: [0x62,0x91,0x9d,0x18,0xc2,0xd2,0xab]
45 vcmppd k2,zmm12,zmm26,{sae},0xab
47 // CHECK: vcmppd k2 , zmm12, zmm26, 123
48 // CHECK: encoding: [0x62,0x91,0x9d,0x48,0xc2,0xd2,0x7b]
49 vcmppd k2 ,zmm12,zmm26,0x7b
51 // CHECK: vcmppd k2 , zmm12, zmm26,{sae}, 123
52 // CHECK: encoding: [0x62,0x91,0x9d,0x18,0xc2,0xd2,0x7b]
53 vcmppd k2,zmm12,zmm26,{sae},0x7b
55 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rcx], 123
56 // CHECK: encoding: [0x62,0xf1,0x9d,0x48,0xc2,0x11,0x7b]
57 vcmppd k2,zmm12,zmmword PTR [rcx],0x7b
59 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rax + 8*r14 + 291], 123
60 // CHECK: encoding: [0x62,0xb1,0x9d,0x48,0xc2,0x94,0xf0,0x23,0x01,0x00,0x00,0x7b]
61 vcmppd k2 ,zmm12,zmmword PTR [rax+r14*8+0x123],0x7b
63 // CHECK: vcmppd k2 , zmm12, qword ptr [rcx]{1to8}, 123
64 // CHECK: encoding: [0x62,0xf1,0x9d,0x58,0xc2,0x11,0x7b]
65 vcmppd k2,zmm12,QWORD PTR [rcx]{1to8},0x7b
67 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rdx + 8128], 123
68 // CHECK: encoding: [0x62,0xf1,0x9d,0x48,0xc2,0x52,0x7f,0x7b]
69 vcmppd k2,zmm12,zmmword PTR [rdx+0x1fc0],0x7b
71 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rdx + 8192], 123
72 // CHECK: encoding: [0x62,0xf1,0x9d,0x48,0xc2,0x92,0x00,0x20,0x00,0x00,0x7b]
73 vcmppd k2,zmm12,zmmword PTR [rdx+0x2000],0x7b
75 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rdx - 8192], 123
76 // CHECK: encoding: [0x62,0xf1,0x9d,0x48,0xc2,0x52,0x80,0x7b]
77 vcmppd k2,zmm12,zmmword PTR [rdx-0x2000],0x7b
79 // CHECK: vcmppd k2 , zmm12, zmmword ptr [rdx - 8256], 123
80 // CHECK: encoding: [0x62,0xf1,0x9d,0x48,0xc2,0x92,0xc0,0xdf,0xff,0xff,0x7b]
81 vcmppd k2,zmm12,zmmword PTR [rdx-0x2040],0x7b
83 // CHECK: vcmppd k2 , zmm12, qword ptr [rdx + 1016]{1to8}, 123
84 // CHECK: encoding: [0x62,0xf1,0x9d,0x58,0xc2,0x52,0x7f,0x7b]
85 vcmppd k2,zmm12,QWORD PTR [rdx+0x3f8]{1to8},0x7b
87 // CHECK: vcmppd k2 , zmm12, qword ptr [rdx + 1024]{1to8}, 123
88 // CHECK: encoding: [0x62,0xf1,0x9d,0x58,0xc2,0x92,0x00,0x04,0x00,0x00,0x7b]
89 vcmppd k2,zmm12,QWORD PTR [rdx+0x400]{1to8},0x7b
91 // CHECK: vcmppd k2 , zmm12, qword ptr [rdx - 1024]{1to8}, 123
92 // CHECK: encoding: [0x62,0xf1,0x9d,0x58,0xc2,0x52,0x80,0x7b]
93 vcmppd k2,zmm12,QWORD PTR [rdx-0x400]{1to8},0x7b
95 // CHECK: vcmppd k2 , zmm12, qword ptr [rdx - 1032]{1to8}, 123
96 // CHECK: encoding: [0x62,0xf1,0x9d,0x58,0xc2,0x92,0xf8,0xfb,0xff,0xff,0x7b]
97 vcmppd k2,zmm12,QWORD PTR [rdx-0x408]{1to8},0x7b
99 // CHECK: vcmpps k2 , zmm17, zmm22, 171
100 // CHECK: encoding: [0x62,0xb1,0x74,0x40,0xc2,0xd6,0xab]
101 vcmpps k2,zmm17,zmm22,0xab
103 // CHECK: vcmpps k2 {k3}, zmm17, zmm22, 171
104 // CHECK: encoding: [0x62,0xb1,0x74,0x43,0xc2,0xd6,0xab]
105 vcmpps k2{k3},zmm17,zmm22,0xab
107 // CHECK: vcmpps k2 , zmm17, zmm22,{sae}, 171
108 // CHECK: encoding: [0x62,0xb1,0x74,0x10,0xc2,0xd6,0xab]
109 vcmpps k2,zmm17,zmm22,{sae},0xab
111 // CHECK: vcmpps k2 , zmm17, zmm22, 123
112 // CHECK: encoding: [0x62,0xb1,0x74,0x40,0xc2,0xd6,0x7b]
113 vcmpps k2,zmm17,zmm22,0x7b
115 // CHECK: vcmpps k2 , zmm17, zmm22,{sae}, 123
116 // CHECK: encoding: [0x62,0xb1,0x74,0x10,0xc2,0xd6,0x7b]
117 vcmpps k2,zmm17,zmm22,{sae},0x7b
119 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rcx], 123
120 // CHECK: encoding: [0x62,0xf1,0x74,0x40,0xc2,0x11,0x7b]
121 vcmpps k2,zmm17,zmmword PTR [rcx],0x7b
123 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rax + 8*r14 + 291], 123
124 // CHECK: encoding: [0x62,0xb1,0x74,0x40,0xc2,0x94,0xf0,0x23,0x01,0x00,0x00,0x7b]
125 vcmpps k2,zmm17,zmmword PTR [rax+r14*8+0x123],0x7b
127 // CHECK: vcmpps k2 , zmm17, dword ptr [rcx]{1to16}, 123
128 // CHECK: encoding: [0x62,0xf1,0x74,0x50,0xc2,0x11,0x7b]
129 vcmpps k2,zmm17,DWORD PTR [rcx]{1to16},0x7b
131 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rdx + 8128], 123
132 // CHECK: encoding: [0x62,0xf1,0x74,0x40,0xc2,0x52,0x7f,0x7b]
133 vcmpps k2,zmm17,zmmword PTR [rdx+0x1fc0],0x7b
135 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rdx + 8192], 123
136 // CHECK: encoding: [0x62,0xf1,0x74,0x40,0xc2,0x92,0x00,0x20,0x00,0x00,0x7b]
137 vcmpps k2,zmm17,zmmword PTR [rdx+0x2000],0x7b
139 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rdx - 8192], 123
140 // CHECK: encoding: [0x62,0xf1,0x74,0x40,0xc2,0x52,0x80,0x7b]
141 vcmpps k2,zmm17,zmmword PTR [rdx-0x2000],0x7b
143 // CHECK: vcmpps k2 , zmm17, zmmword ptr [rdx - 8256], 123
144 // CHECK: encoding: [0x62,0xf1,0x74,0x40,0xc2,0x92,0xc0,0xdf,0xff,0xff,0x7b]
145 vcmpps k2,zmm17,zmmword PTR [rdx-0x2040],0x7b
147 // CHECK: vcmpps k2 , zmm17, dword ptr [rdx + 508]{1to16}, 123
148 // CHECK: encoding: [0x62,0xf1,0x74,0x50,0xc2,0x52,0x7f,0x7b]
149 vcmpps k2,zmm17,DWORD PTR [rdx+0x1fc]{1to16},0x7b
151 // CHECK: vcmpps k2 , zmm17, dword ptr [rdx + 512]{1to16}, 123
152 // CHECK: encoding: [0x62,0xf1,0x74,0x50,0xc2,0x92,0x00,0x02,0x00,0x00,0x7b]
153 vcmpps k2,zmm17,DWORD PTR [rdx+0x200]{1to16},0x7b
155 // CHECK: vcmpps k2 , zmm17, dword ptr [rdx - 512]{1to16}, 123
156 // CHECK: encoding: [0x62,0xf1,0x74,0x50,0xc2,0x52,0x80,0x7b]
157 vcmpps k2,zmm17,DWORD PTR [rdx-0x200]{1to16},0x7b
159 // CHECK: vcmpps k2 , zmm17, dword ptr [rdx - 516]{1to16}, 123
160 // CHECK: encoding: [0x62,0xf1,0x74,0x50,0xc2,0x92,0xfc,0xfd,0xff,0xff,0x7b]
161 vcmpps k2,zmm17,DWORD PTR [rdx-0x204]{1to16},0x7b
164 // CHECK: vfixupimmss xmm15 , xmm18, xmm28, 171
165 // CHECK: encoding: [0x62,0x13,0x6d,0x00,0x55,0xfc,0xab]
166 vfixupimmss xmm15,xmm18,xmm28,0xab
168 // CHECK: vfixupimmss xmm15 {k5}, xmm18, xmm28, 171
169 // CHECK: encoding: [0x62,0x13,0x6d,0x05,0x55,0xfc,0xab]
170 vfixupimmss xmm15{k5},xmm18,xmm28,0xab
172 // CHECK: vfixupimmss xmm15 {k5} {z}, xmm18, xmm28, 171
173 // CHECK: encoding: [0x62,0x13,0x6d,0x85,0x55,0xfc,0xab]
174 vfixupimmss xmm15{k5} {z},xmm18,xmm28,0xab
176 // CHECK: vfixupimmss xmm15 , xmm18, xmm28,{sae}, 171
177 // CHECK: encoding: [0x62,0x13,0x6d,0x10,0x55,0xfc,0xab]
178 vfixupimmss xmm15,xmm18,xmm28,{sae},0xab
180 // CHECK: vfixupimmss xmm15 , xmm18, xmm28, 123
181 // CHECK: encoding: [0x62,0x13,0x6d,0x00,0x55,0xfc,0x7b]
182 vfixupimmss xmm15,xmm18,xmm28,0x7b
184 // CHECK: vfixupimmss xmm15 , xmm18, xmm28,{sae}, 123
185 // CHECK: encoding: [0x62,0x13,0x6d,0x10,0x55,0xfc,0x7b]
186 vfixupimmss xmm15,xmm18,xmm28,{sae},0x7b
188 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rcx], 123
189 // CHECK: encoding: [0x62,0x73,0x6d,0x00,0x55,0x39,0x7b]
190 vfixupimmss xmm15,xmm18,DWORD PTR [rcx],0x7b
192 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rax + 8*r14 + 291], 123
193 // CHECK: encoding: [0x62,0x33,0x6d,0x00,0x55,0xbc,0xf0,0x23,0x01,0x00,0x00,0x7b]
194 vfixupimmss xmm15,xmm18,DWORD PTR [rax+r14*8+0x123],0x7b
196 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rdx + 508], 123
197 // CHECK: encoding: [0x62,0x73,0x6d,0x00,0x55,0x7a,0x7f,0x7b]
198 vfixupimmss xmm15,xmm18,DWORD PTR [rdx+0x1fc],0x7b
200 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rdx + 512], 123
201 // CHECK: encoding: [0x62,0x73,0x6d,0x00,0x55,0xba,0x00,0x02,0x00,0x00,0x7b]
202 vfixupimmss xmm15,xmm18,DWORD PTR [rdx+0x200],0x7b
204 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rdx - 512], 123
205 // CHECK: encoding: [0x62,0x73,0x6d,0x00,0x55,0x7a,0x80,0x7b]
206 vfixupimmss xmm15,xmm18,DWORD PTR [rdx-0x200],0x7b
208 // CHECK: vfixupimmss xmm15 , xmm18, dword ptr [rdx - 516], 123
209 // CHECK: encoding: [0x62,0x73,0x6d,0x00,0x55,0xba,0xfc,0xfd,0xff,0xff,0x7b]
210 vfixupimmss xmm15,xmm18,DWORD PTR [rdx-0x204],0x7b
212 // CHECK: vfixupimmsd xmm13 , xmm26, xmm5, 171
213 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0xed,0xab]
214 vfixupimmsd xmm13,xmm26,xmm5,0xab
216 // CHECK: vfixupimmsd xmm13 {k6}, xmm26, xmm5, 171
217 // CHECK: encoding: [0x62,0x73,0xad,0x06,0x55,0xed,0xab]
218 vfixupimmsd xmm13{k6},xmm26,xmm5,0xab
220 // CHECK: vfixupimmsd xmm13 {k6} {z}, xmm26, xmm5, 171
221 // CHECK: encoding: [0x62,0x73,0xad,0x86,0x55,0xed,0xab]
222 vfixupimmsd xmm13{k6} {z},xmm26,xmm5,0xab
224 // CHECK: vfixupimmsd xmm13 , xmm26, xmm5,{sae}, 171
225 // CHECK: encoding: [0x62,0x73,0xad,0x10,0x55,0xed,0xab]
226 vfixupimmsd xmm13,xmm26,xmm5,{sae},0xab
228 // CHECK: vfixupimmsd xmm13 , xmm26, xmm5, 123
229 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0xed,0x7b]
230 vfixupimmsd xmm13,xmm26,xmm5,0x7b
232 // CHECK: vfixupimmsd xmm13 , xmm26, xmm5,{sae}, 123
233 // CHECK: encoding: [0x62,0x73,0xad,0x10,0x55,0xed,0x7b]
234 vfixupimmsd xmm13,xmm26,xmm5,{sae},0x7b
236 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rcx], 123
237 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0x29,0x7b]
238 vfixupimmsd xmm13,xmm26,QWORD PTR [rcx],0x7b
240 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rax + 8*r14 + 291], 123
241 // CHECK: encoding: [0x62,0x33,0xad,0x00,0x55,0xac,0xf0,0x23,0x01,0x00,0x00,0x7b]
242 vfixupimmsd xmm13,xmm26,QWORD PTR [rax+r14*8+0x123],0x7b
244 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rdx + 1016], 123
245 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0x6a,0x7f,0x7b]
246 vfixupimmsd xmm13,xmm26,QWORD PTR [rdx+0x3f8],0x7b
248 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rdx + 1024], 123
249 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0xaa,0x00,0x04,0x00,0x00,0x7b]
250 vfixupimmsd xmm13,xmm26,QWORD PTR [rdx+0x400],0x7b
252 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rdx - 1024], 123
253 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0x6a,0x80,0x7b]
254 vfixupimmsd xmm13,xmm26,QWORD PTR [rdx-0x400],0x7b
256 // CHECK: vfixupimmsd xmm13 , xmm26, qword ptr [rdx - 1032], 123
257 // CHECK: encoding: [0x62,0x73,0xad,0x00,0x55,0xaa,0xf8,0xfb,0xff,0xff,0x7b]
258 vfixupimmsd xmm13,xmm26,QWORD PTR [rdx-0x408],0x7b
260 // CHECK: vcomisd xmm23, qword ptr [rcx]
261 // CHECK: encoding: [0x62,0xe1,0xfd,0x08,0x2f,0x39]
262 vcomisd xmm23, QWORD PTR [rcx]
264 // CHECK: vcomiss xmm16, dword ptr [rcx]
265 // CHECK: encoding: [0x62,0xe1,0x7c,0x08,0x2f,0x01]
266 vcomiss xmm16, DWORD PTR [rcx]