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]
Other format: [Raw text]

Re: Cleanup for linear transform: use standard_iv_increment_position


Richard Henderson wrote:
> > 	* tree-ssa-loop-manip.c (standard_iv_increment_position): Ensure 
> > 	that the statement is not inserted after a condition expression: 
> > 	i.e. the inserted code should not be the last statement in a
> > 	basic block.
> 
> This part is surely unrelated?  

Yes it is related, because without it the callers potentially could
produce ICEs.  Until recently standard_iv_increment_position was never
used, so this code was never exercised.

> Do you have a test case that suggests that conditionals appear in
> latch blocks?

Yes.  On autovect branch, when inserting ivs at
standard_iv_increment_position (as it is in the original form),
verify_flow_info fails with:

../../gcc/gcc/tree-cfg.c: In function 'get_cases_for_edge':
../../gcc/gcc/tree-cfg.c:725: error: Control flow in the middle of basic block 14

../../gcc/gcc/tree-cfg.c:725: internal compiler error: verify_flow_info failed

bb 14 contains the following code:

      bb_14 (preds = {bb_13}, succs = {bb_14bb_14})
      {
      <L15>:;
        #   VUSE <elt_129>;
        #   VUSE <tree_code_type_128>;
        #   VUSE <__FUNCTION___127>;
        #   VUSE <tree_code_length_126>;
        D.21988_124 = vec_64->vec.length;
        if (__i_130 >= D.21988_124) goto <L16>; else goto <L17>;
>>>     ivtmp.1388_21 = ivtmp.1388_22 + 1;

      }


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