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]

[PATCH] 3.4.5 fix PR rtl-optimization/17810


This patch fixes PR 17810, which is, in fact, a duplicate of 15342.  The
back-port is straight-forward, but not entirely mechanical due to a
change in a variable name.

Tested on arm-elf and applied to the 3.4 branch.  Note that I committed
a corrupt patch the first time around, so the diff here is what I
intended to commit not what originally went in:  I really should be more
careful when working on multiple source trees at once :-)

R.
2005-09-01  Richard Earnshaw  <richard.earnshaw@arm.com>

	PR rtl-optimization/17810
	Backport
	2004-11-04  Richard Sandiford  <rsandifo@redhat.com>
	PR target/15342
	* regrename.c (scan_rtx): Treat the destinations of SETs and CLOBBERs
	as OP_INOUT if the instruction is predicated.

Index: regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.73.2.1
retrieving revision 1.73.2.3
diff -p -r1.73.2.1 -r1.73.2.3
*** regrename.c	24 Jan 2005 12:37:40 -0000	1.73.2.1
--- regrename.c	1 Sep 2005 14:54:20 -0000	1.73.2.3
*************** scan_rtx (rtx insn, rtx *loc, enum reg_c
*** 675,681 ****
  
      case SET:
        scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
!       scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 0);
        return;
  
      case STRICT_LOW_PART:
--- 675,682 ----
  
      case SET:
        scan_rtx (insn, &SET_SRC (x), class, action, OP_IN, 0);
!       scan_rtx (insn, &SET_DEST (x), class, action, 
! 		GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 0);
        return;
  
      case STRICT_LOW_PART:
*************** scan_rtx (rtx insn, rtx *loc, enum reg_c
*** 700,706 ****
        abort ();
  
      case CLOBBER:
!       scan_rtx (insn, &SET_DEST (x), class, action, OP_OUT, 1);
        return;
  
      case EXPR_LIST:
--- 701,708 ----
        abort ();
  
      case CLOBBER:
!       scan_rtx (insn, &SET_DEST (x), class, action,
! 		GET_CODE (PATTERN (insn)) == COND_EXEC ? OP_INOUT : OP_OUT, 1);
        return;
  
      case EXPR_LIST:

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