https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88212
Bug ID: 88212
Summary: IRA Register Coalescing not working for the testcase
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: kugan at gcc dot gnu.org
Target Milestone: ---
When compiling the following on aarch64 with -O2:
#include <arm_neon.h>
void g(int32_t *p, int32x2x2_t val, int x)
{
vst2_lane_s32(p,val,0);
}
generates:
.cfi_startproc
mov v2.8b, v0.8b
mov v3.8b, v1.8b
st2 {v2.s - v3.s}[0], [x0]
ret
clang produces:
st2 { v0.s, v1.s }[0], [x0]
ret
Essentially the problem is that access to part-registers doesn't get
coalesced, so IRA generates moves which aren't actually required.