[Bug middle-end/33181] [4.3 Regression] Revision 127766 generates bad cmov

rguenther at suse dot de gcc-bugzilla@gcc.gnu.org
Sun Aug 26 14:46:00 GMT 2007



------- Comment #8 from rguenther at suse dot de  2007-08-26 14:46 -------
Subject: Re:  [4.3 Regression]  Revision 127766 generates
 bad cmov

On Sun, 26 Aug 2007, hjl at lucon dot org wrote:

> This patch
> 
> 2007-08-26  H.J. Lu  <hongjiu.lu@intel.com>
> 
>         PR middle-end/33181
>         * ifcvt.c (noce_process_if_block): Don't move insn across
>         basic block.
> 
> --- gcc/ifcvt.c.cmov    2007-08-24 06:02:57.000000000 -0700
> +++ gcc/ifcvt.c 2007-08-26 07:35:50.000000000 -0700
> @@ -2198,6 +2198,7 @@ noce_process_if_block (struct noce_if_in
>          COND_EARLIEST to JUMP.  Make sure the relevant data is still
>          intact.  */
>        if (! insn_b
> +         || BLOCK_NUM (insn_b) != BLOCK_NUM (if_info->cond_earliest)
>           || !NONJUMP_INSN_P (insn_b)
>           || (set_b = single_set (insn_b)) == NULL_RTX
>           || ! rtx_equal_p (x, SET_DEST (set_b))
> 
> works for me. Does it make senses?

Yes.  Or if we have domiantors available check if BB(insn_b) dominates
BB(if_info->cond_earliest).

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33181



More information about the Gcc-bugs mailing list