On Sat, May 7, 2016 at 11:22 PM, Eric Botcazou <ebotca...@adacore.com> wrote: > Hi, > > this is a tentative fix for the regression introduced in SRA by the machinery > which deals with the constant pool. initialize_constant_pool_replacements is > supposed to issues new loads from the pool for scalarized variables, but it > fails to do so for variables that are only partially scalarized. > > Tested on PowerPC/Linux and x86-64/Linux, OK for mainline and 6 branch?
Hmm, the patch looks obvious if it was the intent to allow constant pool replacements _not_ only when the whole constant pool entry may go away. But I think the intent was to not do this otherwise it will generate worse code by forcing all loads from the constant pool to appear at function start. So - the "real" issue may be a missing should_scalarize_away_bitmap/cannot_scalarize_away_bitmap check somewhere. Alan? Thanks, Richrd. > > 2016-05-07 Eric Botcazou <ebotca...@adacore.com> > > PR tree-optimization/70884 > * tree-sra.c (initialize_constant_pool_replacements): Process all the > candidate variables. > > > 2016-05-07 Eric Botcazou <ebotca...@adacore.com> > > * gcc.dg/pr70884.c: New test. > > -- > Eric Botcazou