Patchwork Check the code to be executed for COND_EXEC in noop_move_p

login
register
mail settings
Submitter Bin Cheng
Date June 13, 2013, 8:43 a.m.
Message ID <00b201ce6812$13c3eb70$3b4bc250$@cheng@arm.com>
Download mbox | patch
Permalink /patch/251011/
State New
Headers show

Comments

Bin Cheng - June 13, 2013, 8:43 a.m.
> -----Original Message-----
> From: Eric Botcazou [mailto:ebotcazou@adacore.com]
> Sent: Thursday, June 13, 2013 3:36 PM
> To: Bin Cheng
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH GCC]Check the code to be executed for COND_EXEC in
> noop_move_p
> 
> > 2013-06-13  Bin Cheng  <bin.cheng@arm.com>
> >
> > 	* rtlanal.c (noop_move_p): Check the code to be executed for
> > 	COND_EXEC.
> 
> OK if you use COND_EXEC_CODE instead of EXP and remove the useless
assertion.
> 
Hi Eric,
Attached patch is applied as r200061, modified according to your comments.

Thanks.
bin

Patch

Index: gcc/rtlanal.c
===================================================================
--- gcc/rtlanal.c	(revision 199949)
+++ gcc/rtlanal.c	(working copy)
@@ -1199,6 +1199,10 @@  noop_move_p (const_rtx insn)
   if (find_reg_note (insn, REG_EQUAL, NULL_RTX))
     return 0;
 
+  /* Check the code to be executed for COND_EXEC.  */
+  if (GET_CODE (pat) == COND_EXEC)
+    pat = COND_EXEC_CODE (pat);
+
   if (GET_CODE (pat) == SET && set_noop_p (pat))
     return 1;