------- Comment #5 from wilson at codesourcery dot com 2010-03-13 08:23 ------- Subject: Re: [ia64] Inappropriate address spills
On third thought... The code here makes sense if we were having problems with invalid constant recombinations. symbol+const gets split by ia64_expand_move into symbol+highpart which is put in the got, and lowpart which is added with adds. If a late optimization pass saw a REG_EQUAL note and tried to put the constant back together again, that would be inconvenient. The ia64_legitimate_constant_p code would prevent that. Unfortunately, this code also prevents us to accepting a constant before ia64_expand_move is called, which prevents us from splitting it in the first place. This looks to be more complicated than I hoped. There is a variable we can check to see if we are in the expand phase, currently_expanding_to_rtl. Perhaps we need to accept any constant if currently_expanding_to_rtl is true, and only accept symbol+highpart (the current code) if it is false. Or alternatively, if this problem only happened at reload time, then checking reload_in_progress and/or reload_completed might work. I will have to look at PR28490 again and try to remember what the original problem that we were fixing was. Jim -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42040