On Wed, Nov 20, 2013 at 11:18:49AM -0700, Jeff Law wrote: > >2013-11-13 Robert Suchanek <robert.sucha...@imgtec.com> > > > > * lra.c (lra): Set lra_in_progress before check_rtl call. > > * recog.c (insn_invalid_p): Add !lra_in_progress to prevent > > adding clobber regs when LRA is running
Trying to run the testsuite with -mlra and the default -mcmodel=medium on powerpc64 now results in enormous numbers of failures like the following. /home/alanm/src/gcc-virgin/libatomic/testsuite/libatomic.c/atomic-exchange-1.c:67:1: error: insn does not satisfy its constraints: } ^ (insn 5 2 6 2 (set (reg/f:DI 212) (mem/u/c:DI (unspec:DI [ (symbol_ref/u:DI ("*.LC0") [flags 0x2]) (reg:DI 2 2) ] UNSPEC_TOCREL) [0 S8 A8])) /home/alanm/src/gcc-virgin/libatomic/testsuite/libatomic.c/atomic-exchange-1.c:14 505 {*movdi_internal64} (expr_list:REG_EQUAL (symbol_ref:DI ("v") <var_decl 0x3fff9bd00850 v>) (nil))) This is due to that innocuous seeming change of setting lra_in_progress before calling check_rtl(), in combination with previous changes Vlad made to the rs6000 backend here: http://gcc.gnu.org/ml/gcc-patches/2013-10/msg02208.html In particular the "Call legitimate_constant_pool_address_p in strict mode for LRA" change, that sets "strict" when lra_in_progress. I'm not at all familiar with lra so why Vlad made those changes to rs6000.c is totally opaque to me. If this were a reload problem I could dive in and fix it, but not lra, sorry.. What I can say is that the rtl shown above is a toc reference of the form that is valid for -mcmodel=small both before and after reload, and generates "ld offset(r2)" machine instructions. The form is valid for -mcmodel=medium/large only before reload. After reload it is supposed to be split into high/lo_sum variants that generate "addis rtmp,offset@ha(r2); ld offset@l(rtmp)". -- Alan Modra Australia Development Lab, IBM