1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -O0 -verify-machineinstrs -mtriple=x86_64-unknown-unknown --show-mc-encoding -mattr=+avxneconvert | FileCheck %s --check-prefixes=CHECK,X64
3 ; RUN: llc < %s -O0 -verify-machineinstrs -mtriple=i686-unknown-unknown --show-mc-encoding -mattr=+avxneconvert | FileCheck %s --check-prefixes=CHECK,X86
5 define <4 x float> @test_int_x86_vbcstnebf162ps128(ptr %A) {
6 ; X64-LABEL: test_int_x86_vbcstnebf162ps128:
8 ; X64-NEXT: vbcstnebf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb1,0x07]
9 ; X64-NEXT: retq # encoding: [0xc3]
11 ; X86-LABEL: test_int_x86_vbcstnebf162ps128:
13 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
14 ; X86-NEXT: vbcstnebf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb1,0x00]
15 ; X86-NEXT: retl # encoding: [0xc3]
16 %ret = call <4 x float> @llvm.x86.vbcstnebf162ps128(ptr %A)
19 declare <4 x float> @llvm.x86.vbcstnebf162ps128(ptr %A)
21 define <8 x float> @test_int_x86_vbcstnebf162ps256(ptr %A) {
22 ; X64-LABEL: test_int_x86_vbcstnebf162ps256:
24 ; X64-NEXT: vbcstnebf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb1,0x07]
25 ; X64-NEXT: retq # encoding: [0xc3]
27 ; X86-LABEL: test_int_x86_vbcstnebf162ps256:
29 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
30 ; X86-NEXT: vbcstnebf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb1,0x00]
31 ; X86-NEXT: retl # encoding: [0xc3]
32 %ret = call <8 x float> @llvm.x86.vbcstnebf162ps256(ptr %A)
35 declare <8 x float> @llvm.x86.vbcstnebf162ps256(ptr %A)
37 define <4 x float> @test_int_x86_vbcstnesh2ps128(ptr %A) {
38 ; X64-LABEL: test_int_x86_vbcstnesh2ps128:
40 ; X64-NEXT: vbcstnesh2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb1,0x07]
41 ; X64-NEXT: retq # encoding: [0xc3]
43 ; X86-LABEL: test_int_x86_vbcstnesh2ps128:
45 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
46 ; X86-NEXT: vbcstnesh2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb1,0x00]
47 ; X86-NEXT: retl # encoding: [0xc3]
48 %ret = call <4 x float> @llvm.x86.vbcstnesh2ps128(ptr %A)
51 declare <4 x float> @llvm.x86.vbcstnesh2ps128(ptr %A)
53 define <8 x float> @test_int_x86_vbcstnesh2ps256(ptr %A) {
54 ; X64-LABEL: test_int_x86_vbcstnesh2ps256:
56 ; X64-NEXT: vbcstnesh2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb1,0x07]
57 ; X64-NEXT: retq # encoding: [0xc3]
59 ; X86-LABEL: test_int_x86_vbcstnesh2ps256:
61 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
62 ; X86-NEXT: vbcstnesh2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb1,0x00]
63 ; X86-NEXT: retl # encoding: [0xc3]
64 %ret = call <8 x float> @llvm.x86.vbcstnesh2ps256(ptr %A)
67 declare <8 x float> @llvm.x86.vbcstnesh2ps256(ptr %A)
69 define <4 x float> @test_int_x86_vcvtneebf162ps128(ptr %A) {
70 ; X64-LABEL: test_int_x86_vcvtneebf162ps128:
72 ; X64-NEXT: vcvtneebf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb0,0x07]
73 ; X64-NEXT: retq # encoding: [0xc3]
75 ; X86-LABEL: test_int_x86_vcvtneebf162ps128:
77 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
78 ; X86-NEXT: vcvtneebf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7a,0xb0,0x00]
79 ; X86-NEXT: retl # encoding: [0xc3]
80 %ret = call <4 x float> @llvm.x86.vcvtneebf162ps128(ptr %A)
83 declare <4 x float> @llvm.x86.vcvtneebf162ps128(ptr %A)
85 define <8 x float> @test_int_x86_vcvtneebf162ps256(ptr %A) {
86 ; X64-LABEL: test_int_x86_vcvtneebf162ps256:
88 ; X64-NEXT: vcvtneebf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb0,0x07]
89 ; X64-NEXT: retq # encoding: [0xc3]
91 ; X86-LABEL: test_int_x86_vcvtneebf162ps256:
93 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
94 ; X86-NEXT: vcvtneebf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7e,0xb0,0x00]
95 ; X86-NEXT: retl # encoding: [0xc3]
96 %ret = call <8 x float> @llvm.x86.vcvtneebf162ps256(ptr %A)
99 declare <8 x float> @llvm.x86.vcvtneebf162ps256(ptr %A)
101 define <4 x float> @test_int_x86_vcvtneeph2ps128(ptr %A) {
102 ; X64-LABEL: test_int_x86_vcvtneeph2ps128:
104 ; X64-NEXT: vcvtneeph2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb0,0x07]
105 ; X64-NEXT: retq # encoding: [0xc3]
107 ; X86-LABEL: test_int_x86_vcvtneeph2ps128:
109 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
110 ; X86-NEXT: vcvtneeph2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x79,0xb0,0x00]
111 ; X86-NEXT: retl # encoding: [0xc3]
112 %ret = call <4 x float> @llvm.x86.vcvtneeph2ps128(ptr %A)
115 declare <4 x float> @llvm.x86.vcvtneeph2ps128(ptr %A)
117 define <8 x float> @test_int_x86_vcvtneeph2ps256(ptr %A) {
118 ; X64-LABEL: test_int_x86_vcvtneeph2ps256:
120 ; X64-NEXT: vcvtneeph2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb0,0x07]
121 ; X64-NEXT: retq # encoding: [0xc3]
123 ; X86-LABEL: test_int_x86_vcvtneeph2ps256:
125 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
126 ; X86-NEXT: vcvtneeph2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7d,0xb0,0x00]
127 ; X86-NEXT: retl # encoding: [0xc3]
128 %ret = call <8 x float> @llvm.x86.vcvtneeph2ps256(ptr %A)
131 declare <8 x float> @llvm.x86.vcvtneeph2ps256(ptr %A)
133 define <4 x float> @test_int_x86_vcvtneobf162ps128(ptr %A) {
134 ; X64-LABEL: test_int_x86_vcvtneobf162ps128:
136 ; X64-NEXT: vcvtneobf162ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x7b,0xb0,0x07]
137 ; X64-NEXT: retq # encoding: [0xc3]
139 ; X86-LABEL: test_int_x86_vcvtneobf162ps128:
141 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
142 ; X86-NEXT: vcvtneobf162ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x7b,0xb0,0x00]
143 ; X86-NEXT: retl # encoding: [0xc3]
144 %ret = call <4 x float> @llvm.x86.vcvtneobf162ps128(ptr %A)
147 declare <4 x float> @llvm.x86.vcvtneobf162ps128(ptr %A)
149 define <8 x float> @test_int_x86_vcvtneobf162ps256(ptr %A) {
150 ; X64-LABEL: test_int_x86_vcvtneobf162ps256:
152 ; X64-NEXT: vcvtneobf162ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7f,0xb0,0x07]
153 ; X64-NEXT: retq # encoding: [0xc3]
155 ; X86-LABEL: test_int_x86_vcvtneobf162ps256:
157 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
158 ; X86-NEXT: vcvtneobf162ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7f,0xb0,0x00]
159 ; X86-NEXT: retl # encoding: [0xc3]
160 %ret = call <8 x float> @llvm.x86.vcvtneobf162ps256(ptr %A)
163 declare <8 x float> @llvm.x86.vcvtneobf162ps256(ptr %A)
165 define <4 x float> @test_int_x86_vcvtneoph2ps128(ptr %A) {
166 ; X64-LABEL: test_int_x86_vcvtneoph2ps128:
168 ; X64-NEXT: vcvtneoph2ps (%rdi), %xmm0 # encoding: [0xc4,0xe2,0x78,0xb0,0x07]
169 ; X64-NEXT: retq # encoding: [0xc3]
171 ; X86-LABEL: test_int_x86_vcvtneoph2ps128:
173 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
174 ; X86-NEXT: vcvtneoph2ps (%eax), %xmm0 # encoding: [0xc4,0xe2,0x78,0xb0,0x00]
175 ; X86-NEXT: retl # encoding: [0xc3]
176 %ret = call <4 x float> @llvm.x86.vcvtneoph2ps128(ptr %A)
179 declare <4 x float> @llvm.x86.vcvtneoph2ps128(ptr %A)
181 define <8 x float> @test_int_x86_vcvtneoph2ps256(ptr %A) {
182 ; X64-LABEL: test_int_x86_vcvtneoph2ps256:
184 ; X64-NEXT: vcvtneoph2ps (%rdi), %ymm0 # encoding: [0xc4,0xe2,0x7c,0xb0,0x07]
185 ; X64-NEXT: retq # encoding: [0xc3]
187 ; X86-LABEL: test_int_x86_vcvtneoph2ps256:
189 ; X86-NEXT: movl {{[0-9]+}}(%esp), %eax # encoding: [0x8b,0x44,0x24,0x04]
190 ; X86-NEXT: vcvtneoph2ps (%eax), %ymm0 # encoding: [0xc4,0xe2,0x7c,0xb0,0x00]
191 ; X86-NEXT: retl # encoding: [0xc3]
192 %ret = call <8 x float> @llvm.x86.vcvtneoph2ps256(ptr %A)
195 declare <8 x float> @llvm.x86.vcvtneoph2ps256(ptr %A)
197 define <8 x bfloat> @test_int_x86_vcvtneps2bf16128(<4 x float> %A) {
198 ; CHECK-LABEL: test_int_x86_vcvtneps2bf16128:
200 ; CHECK-NEXT: {vex} vcvtneps2bf16 %xmm0, %xmm0 # encoding: [0xc4,0xe2,0x7a,0x72,0xc0]
201 ; CHECK-NEXT: ret{{[l|q]}} # encoding: [0xc3]
202 %ret = call <8 x bfloat> @llvm.x86.vcvtneps2bf16128(<4 x float> %A)
203 ret <8 x bfloat> %ret
205 declare <8 x bfloat> @llvm.x86.vcvtneps2bf16128(<4 x float> %A)
207 define <8 x bfloat> @test_int_x86_vcvtneps2bf16256(<8 x float> %A) {
208 ; CHECK-LABEL: test_int_x86_vcvtneps2bf16256:
210 ; CHECK-NEXT: {vex} vcvtneps2bf16 %ymm0, %xmm0 # encoding: [0xc4,0xe2,0x7e,0x72,0xc0]
211 ; CHECK-NEXT: vzeroupper # encoding: [0xc5,0xf8,0x77]
212 ; CHECK-NEXT: ret{{[l|q]}} # encoding: [0xc3]
213 %ret = call <8 x bfloat> @llvm.x86.vcvtneps2bf16256(<8 x float> %A)
214 ret <8 x bfloat> %ret
216 declare <8 x bfloat> @llvm.x86.vcvtneps2bf16256(<8 x float> %A)