https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71720
Bug ID: 71720
Summary: initialization of a vector of floats generates
incorrect code for -mcpu=power9
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acsawdey at gcc dot gnu.org
CC: meissner at gcc dot gnu.org, wschmidt at gcc dot gnu.org
Target Milestone: ---
Target: powerpc64le-linux
Created attachment 38807
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38807&action=edit
test case
This test case is derived from test pr63594-2.c.
The attached test case generates the following:
test1float4:
.LFB0:
.file 1 "pr63594-2nl.i"
.loc 1 4 0
.cfi_startproc
.LVL0:
.loc 1 7 0
xscvdpspn 34,1
xxspltw 34,34,3
blr
The second instruction should be xxspltw 34,34,0 because xscvdpspn places the
result in word 0 not word 3.
Tested against trunk 237715
compile flags are -mcpu=power9 -fno-diagnostics-show-caret
-fdiagnostics-color=never -O2 -Wno-psabi -ggdb -g3 -lm