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 Tue, 2008-09-16 at 14:43 -0600, Jeff Law wrote:

> I haven't followed the whole thread -- did someone object to fixing this 
> in regrename?  ISTM that if that's what you fixed that you were dead-on 
> correct.
> 
> Jeff

Peter was questioning whether or not we should be setting REG_POINTER on
hard registers in regrename.c.  But I just did a quick experiment and if
I change my patch to only set REG_POINTER on psuedo-regs then it doesn't
fix the bug.  I did try his predicate change as an alternative:

--- config/ia64/predicates.md   (revision 140251)
+++ 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)]);
 })

And that did fix the test case I have (I didn't do a full testing).
But it seems that if we aren't setting REG_POINTER for hard regs in
regrename.c then we shouldn't be copying attributes for them either and
we are doing that.

Steve Ellcey
sje@cup.hp.com


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