https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101900
Bug ID: 101900
Summary: -mtune-ctrl=use_vector_fp_converts,use_vector_converts
doesn't work with AVX
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
CC: crazylht at gmail dot com
Target Milestone: ---
Target: i386,x86-64
[hjl@gnu-tgl-2 pr87007]$ cat x.c
extern float f;
extern double d;
extern int i;
void
foo (void)
{
d = f;
f = i;
}
[hjl@gnu-tgl-2 pr87007]$ make CC=gcc
gcc -O2 -march=skylake -mtune-ctrl=use_vector_fp_converts,use_vector_converts
-S x.c
[hjl@gnu-tgl-2 pr87007]$ cat x.s
.file "x.c"
.text
.p2align 4
.globl foo
.type foo, @function
foo:
.LFB0:
.cfi_startproc
vxorps %xmm0, %xmm0, %xmm0
vcvtss2sd f(%rip), %xmm0, %xmm1
vcvtsi2ssl i(%rip), %xmm0, %xmm0
vmovsd %xmm1, d(%rip)
vmovss %xmm0, f(%rip)
ret
.cfi_endproc
.LFE0:
.size foo, .-foo
.ident "GCC: (GNU) 11.2.1 20210728 (Red Hat 11.2.1-1)"
.section .note.GNU-stack,"",@progbits
[hjl@gnu-tgl-2 pr87007]$