On 17 December 2013 00:03, Vladimir Makarov <vmaka...@redhat.com> wrote: > On 12/13/2013, 8:07 AM, Yvan Roux wrote: >> >> Thanks for your help Vlad. Another bad news about this PR fix, is >> that it has resurrected the thumb_movhi_clobber bug (PR 58785) but in >> a different manner as the original failing testcase still pass. I >> attached a testcase to be compiled with : >> >> cc1 -mthumb -mcpu=cortex-m0 -O2 m.c >> >> And Thumb bootstrap seems to be broken with an ICE in check_rtl, I'm >> checking if it is the same issue. >> > > The compiler crashes because a reload pattern is trying to take address of > memory which is actually a spilled pseudo for LRA. The pattern is designed > for reload which always uses memory not a spilled pseudo as LRA does. > > But we don't need to adjust the pattern for LRA. LRA can manage by itself > without reload patterns. > > I found that I missed to switch off these patterns for LRA fully. The > following patch solves the problem. The same was done for > THUMB_SECONDARY_INPUT_RELOAD_CLASS long ago. > > Yvan, could go from this patch by yourself. I mean testing and getting its > approval from an ARM maintainer. Thanks.
I remember having tested that very same patch when we changed THUMB_SECONDARY_INPUT_RELOAD_CLASS and having build issues, but with the fixes made since the summer, the build and the testsuite are now ok. Before submitting this patch I wanted to check if it is not more general fix which is needed, and modifying SECONDARY_OUTPUT_RELOAD_CLASS and SECONDARY_INPUT_RELOAD_CLASS instead of the THUMB macros, because this is here that the target IWMMXT is handled and that we have the lra loop issue during the constraint solving for that target. First results shows that it fixes also some Thumb1 regressions, but I don't have the full results for the moment. Thanks Yvan