This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/66925] New: [3.9 optimization regression] _mm_cvtsi32_si128 spilling to memory
- From: "thiago at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 18 Jul 2015 06:35:43 +0000
- Subject: [Bug target/66925] New: [3.9 optimization regression] _mm_cvtsi32_si128 spilling to memory
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66925
Bug ID: 66925
Summary: [3.9 optimization regression] _mm_cvtsi32_si128
spilling to memory
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: thiago at kde dot org
Target Milestone: ---
Consider the following function:
float __attribute__((target("f16c"))) fromf16(unsigned short v)
{
__m128i m = _mm_cvtsi32_si128(v);
return _mm_cvtss_f32(_mm_cvtph_ps(m));
}
With GCC 4.9, this generates:
movzwl %di, %edi
vmovd %edi, %xmm0
vcvtph2ps %xmm0, %xmm0
ret
With GCC 5.2.1, it became:
movzwl %di, %edi
movl %edi, -12(%rsp)
vmovd -12(%rsp), %xmm0
vcvtph2ps %xmm0, %xmm0
ret
The same still applies to GCC 6.
Note that the problem disappears if -march=sandybridge or -march=ivybridge are
active