https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95756
Bug ID: 95756
Summary: Failure to optimize memory operations with _Complex
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: gabravier at gmail dot com
Target Milestone: ---
float _Complex f()
{
return {0, 0};
}
With -O3, LLVM outputs this :
f(): # @f()
xorps xmm0, xmm0
ret
GCC outputs this :
f():
mov DWORD PTR [rsp-8], 0x00000000
mov DWORD PTR [rsp-4], 0x00000000
movq xmm0, QWORD PTR [rsp-8]
ret