[llvm-bugs] [Bug 36761] New: [X86] Missed opportunities to use vcvtdq2pd %xmm0, %xmm0 under AVX
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 15 16:20:00 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=36761
Bug ID: 36761
Summary: [X86] Missed opportunities to use vcvtdq2pd %xmm0,
%xmm0 under AVX
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: X86
Assignee: unassignedbugs at nondot.org
Reporter: craig.topper at gmail.com
CC: llvm-bugs at lists.llvm.org
For this IR under AVX, we should be able to use "vcvtdq2pd %xmm0, %xmm0".
define <2 x double> @sitofp_4i32_to_2f64(<4 x i32> %a) {
; SSE-LABEL: sitofp_4i32_to_2f64:
; SSE: # %bb.0:
; SSE-NEXT: cvtdq2pd %xmm0, %xmm0
; SSE-NEXT: retq
;
; AVX-LABEL: sitofp_4i32_to_2f64:
; AVX: # %bb.0:
; AVX-NEXT: vcvtdq2pd %xmm0, %ymm0
; AVX-NEXT: # kill: def $xmm0 killed $xmm0 killed $ymm0
; AVX-NEXT: vzeroupper
; AVX-NEXT: retq
%cvt = sitofp <4 x i32> %a to <4 x double>
%shuf = shufflevector <4 x double> %cvt, <4 x double> undef, <2 x i32> <i32
0, i32 1>
ret <2 x double> %shuf
}
We probably need a DAG combine to merge the extract_subvector we get from the
shuffle.
--
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/20180315/65054ca5/attachment.html>
More information about the llvm-bugs
mailing list