[llvm-bugs] [Bug 39205] New: [X86][AVX512] Strange uitofp v2i64 to v2f32 legalization
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Oct 6 12:44:13 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39205
Bug ID: 39205
Summary: [X86][AVX512] Strange uitofp v2i64 to v2f32
legalization
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: llvm-dev at redking.me.uk
CC: craig.topper at gmail.com, llvm-bugs at lists.llvm.org,
zvi.rackover at intel.com
https://gcc.godbolt.org/z/-HRm6i
Why 3 vcvtusi2ssq entries?
llc -matrr=+avx512f
define <4 x float> @uitofp_2i64_2f32(<2 x i64> %a) {
%cvt = uitofp <2 x i64> %a to <2 x float>
%ext = shufflevector <2 x float> %cvt, <2 x float> undef, <4 x i32> <i32 0,
i32 1, i32 undef, i32 undef>
ret <4 x float> %ext
}
define <4 x float> @uitofp_2i64_4f32(<2 x i64> %a) {
%ext = shufflevector <2 x i64> %a, <2 x i64> undef, <4 x i32> <i32 0, i32 1,
i32 undef, i32 undef>
%cvt = uitofp <4 x i64> %ext to <4 x float>
ret <4 x float> %cvt
}
uitofp_2i64_2f32: # @uitofp_2i64_2f32
vpextrq $1, %xmm0, %rax
vcvtusi2ssq %rax, %xmm1, %xmm1
vmovq %xmm0, %rax
vcvtusi2ssq %rax, %xmm2, %xmm0
vinsertps $16, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
vcvtusi2ssq %rax, %xmm2, %xmm1
vshufps $4, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,1],xmm1[0,0]
retq
uitofp_2i64_4f32: # @uitofp_2i64_4f32
vpextrq $1, %xmm0, %rax
vcvtusi2ssq %rax, %xmm1, %xmm1
vmovq %xmm0, %rax
vcvtusi2ssq %rax, %xmm2, %xmm0
vinsertps $16, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[2,3]
vcvtusi2ssq %rax, %xmm2, %xmm1
vshufps $4, %xmm1, %xmm0, %xmm0 # xmm0 = xmm0[0,1],xmm1[0,0]
retq
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181006/e0608a54/attachment-0001.html>
More information about the llvm-bugs
mailing list