[Bug target/95046] New: Vectorize V2SFmode operations
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon May 11 07:12:21 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95046
Bug ID: 95046
Summary: Vectorize V2SFmode operations
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
The compiler should vectorize V2SF operations using XMM registers.
The same principles as applied to integer MMX operations (mmx-with-sse) should
also apply to V2SF mode operations, but to avoid unwanted secondary effects
(e.g. exceptions) extra care should be taken to load values to registers with
parts outside V2SFmode cleared.
Following testcase:
--cut here--
float r[2], a[2], b[2];
void foo (void)
{
for (int i = 0; i < 2; i++)
r[i] = a[i] + b[i];
}
--cut here--
should vectorize to:
movq a(%rip), %xmm0
movq b(%rip), %xmm1
addps %xmm1, %xmm0
movlps %xmm0, r(%rip)
Please note movq insn that assures clearing of top 64bits of 128bit xmm
register.
More information about the Gcc-bugs
mailing list