> -----Original Message-----
> From: Eric Botcazou [mailto:[email protected]]
> Sent: Thursday, June 13, 2013 3:36 PM
> To: Bin Cheng
> Cc: [email protected]
> Subject: Re: [PATCH GCC]Check the code to be executed for COND_EXEC in
> noop_move_p
>
> > 2013-06-13 Bin Cheng <[email protected]>
> >
> > * 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
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;