On 09/30/2015 08:17 AM, Marek Polacek wrote:
Another instance of out of date SSA range info.  Before phiopt1 we had

   <bb 2>:
   if (N_2(D) >= 0)
     goto <bb 3>;
   else
     goto <bb 4>;

   <bb 3>:
   iftmp.0_3 = MIN_EXPR <N_2(D), 16>;

   <bb 4>:
   # iftmp.0_5 = PHI <0(2), iftmp.0_3(3)>
   value_4 = (short int) iftmp.0_5;
   return value_4;

and after phiop1:

   <bb 2>:
   iftmp.0_3 = MIN_EXPR <N_2(D), 16>;
   iftmp.0_6 = MAX_EXPR <iftmp.0_3, 0>;
   value_4 = (short int) iftmp.0_6;
   return value_4;

But the flow-sensitive info in this BB hasn't been cleared up.

This problem doesn't show up in GCC5 but might be latent there.

Bootstrapped/regtested on x86_64-linux, ok for trunk and 5 as well?

2015-09-30  Marek Polacek  <pola...@redhat.com>

        PR tree-optimization/67769
        * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Call
        reset_flow_sensitive_info_in_bb when changing the CFG.

        * gcc.dg/torture/pr67769.c: New test.
OK.
jeff

Reply via email to