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]

RFA: RL78: Scan inside PARALLELs when looking for dead code


Hi DJ,

  Here is a small patch to fix a code-gen problem for the RL78.  The bug
  was that the register death pass was not looking inside PARALLELs, and
  thus missing some USE and SET cases.  I considered adding code to scan
  all of the elements in the PARALLEL, but the only ones that can be
  generated for the RL78 are the SImode shift patterns and these always
  consist of a SET as the first element and a CLOBBER as the second
  element.  So I decided to keep things simple and create the patch
  below.

  OK to apply ?

Cheers
  Nick
  
2015-01-20  Nick Clifton  <nickc@redhat.com>

	* config/rl78/rl78.c (rl78_calculate_death_notes): Look inside
	PARALLELs.

Index: gcc/config/rl78/rl78.c
===================================================================
--- gcc/config/rl78/rl78.c	(revision 219891)
+++ gcc/config/rl78/rl78.c	(working copy)
@@ -3583,6 +3583,8 @@
 	{
 	case INSN:
 	  p = PATTERN (insn);
+	  if (GET_CODE (p) == PARALLEL)
+	    p = XVECEXP (p, 0, 0);
 	  switch (GET_CODE (p))
 	    {
 	    case SET:


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