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]

__builtin_expect buglet


Stormy16 has a (clobber (match_scratch)) on its conditional 
branches, which means the jump pattern is a PARALLEL.  Here
we weren't using the proper method to access that pattern.


r~


        * predict.c (expected_value_to_br_prob): Use pc_set.

Index: predict.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/predict.c,v
retrieving revision 1.11
diff -c -p -d -r1.11 predict.c
*** predict.c	2001/09/13 13:15:59	1.11
--- predict.c	2001/09/21 20:42:47
*************** expected_value_to_br_prob ()
*** 573,579 ****
  	 as canonicalize_condition will render this to us as
  		(lt r70, r71)
  	 Could use cselib to try and reduce this further.  */
!       cond = XEXP (SET_SRC (PATTERN (insn)), 0);
        cond = canonicalize_condition (insn, cond, 0, NULL, ev_reg);
        if (! cond
  	  || XEXP (cond, 0) != ev_reg
--- 573,579 ----
  	 as canonicalize_condition will render this to us as
  		(lt r70, r71)
  	 Could use cselib to try and reduce this further.  */
!       cond = XEXP (SET_SRC (pc_set (insn)), 0);
        cond = canonicalize_condition (insn, cond, 0, NULL, ev_reg);
        if (! cond
  	  || XEXP (cond, 0) != ev_reg


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