On Fri, Jan 27, 2017 at 10:55:34AM +0000, Ramana Radhakrishnan wrote: > On Fri, Jan 27, 2017 at 10:30 AM, Tamar Christina > <tamar.christ...@arm.com> wrote: > > Hi all, > > > > This fixes (PR78142) by only creating one vector in the char case. > > r241590 is causing more registers to be used and so > > the SP registered happens to be picked and used. > > > > This test I believe was checking explicitly that the > > SP is not used if not needed. By creating a single vector then less > > registers are needed so SP won't be used. > > > > The test is written that way because our previuos vector > initialization code involved constructing the initializer on the stack > and then reloading it into the vector registers instead of > constructing the vector initializer through a sequence of ins > instructions which is what we changed the vector initialization code > to. I think it helped hmmer (?) but memory is fading .... :)
It seems to me that running with one vector still tests that behaviour, but removes the risk of accidentally failing when some other element of the compiler goes wrong and needs 32 general-purpose registers live to acheieve the initialisation. If there's a real bug here that causes the extra resource usage, then it would be nice to isolate it and have a PR opened. However, this patch gets the test closer to testing a single compiler behaviour, so this is OK for trunk. Thanks for the fix. James > > gcc/testsuite/ > > > > 2017-01-26 Tamar Christina <tamar.christ...@arm.com> > > > > PR middle-end/78142 > > * gcc.target/aarch64/vector_initialization_nostack.c > > (f12): Use one vector.