On 12/03/2015 07:45 AM, Richard Biener wrote:


Ah, some EEMBC one.

Btw, the testcase that was added shows

        if (xc < xm)
          {
            xk = (unsigned char) (xc < xy ? xc : xy);
          }
        else
         {
           xk = (unsigned char) (xm < xy ? xm : xy);
         }

which might be better handled by phiopt transforming it into
I don't think the included testcase is a particularly good one for this transformation -- I didn't see that the transformation made any significant difference on x86_64. That why I asked for Ajit for more data on the benchmarking.



xk = MIN (xc, MIN (xm, xy))

phiopt1 sees (hooray to GENERIC folding)

   xc_26 = ~xr_21;
   xm_27 = ~xg_23;
   xy_28 = ~xb_25;
   if (xr_21 > xg_23)
     goto <bb 5>;
   else
     goto <bb 6>;

   <bb 5>:
   xk_29 = MIN_EXPR <xc_26, xy_28>;
   goto <bb 7>;

   <bb 6>:
   xk_30 = MIN_EXPR <xm_27, xy_28>;

   <bb 7>:
   # xk_4 = PHI <xk_29(5), xk_30(6)>

btw, see PR67438 for a similar testcase and the above pattern.
That may be elsewhere in BZ database as well. I've seen stuff that looks awful close to that when going through the bug lists in prior releases.

jeff

Reply via email to