------- 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 <[EMAIL PROTECTED]> > > 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