This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to fix gcc.c-torture/compile/20010102-1.c on IA64 HP-UX


On Thu, Oct 30, 2008 at 12:38:09PM -0600, Jeff Law wrote:
> Peter Bergner wrote:
>> On Thu, 2008-10-30 at 10:52 -0700, Steve Ellcey wrote:
>> --- config/ia64/predicates.md   (revision 140417)
>> +++ config/ia64/predicates.md   (working copy)
>> @@ -585,6 +585,6 @@ (define_predicate "ar_pfs_reg_operand"
>>  (define_predicate "basereg_operand"
>>    (match_operand 0 "register_operand")
>>  {
>> -  return REG_P (op) && REG_POINTER (op);
>> +  return REG_P (op) && REG_POINTER (regno_reg_rtx[ORIGINAL_REGNO (op)]);
>>  })
>>
>> If you recall, that did solve the ICE you were hitting.  The rerename.c
>> change was just handling a case that looked like should be handled, but
>> wasn't necessary for fixing your IC
>>   
> We shouldn't be hacking up backends to deal with this problem, it's  
> entirely the wrong approach.

Why?  REG_POINTER can't (reliably) work on hard registers, because through
the life of one function one hard register might contain in some places
a pointer and in others non-pointer.  While pseudos should be always either
pointer or non-pointer.  IMHO (almost) all uses of REG_POINTER should
be changed to work on ORIGINAL_REGNO.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]