On 10/26/2016 01:34 AM, Ulrich Weigand wrote:
Jeff Law wrote:

First, there's a missing fallthru comment in spu_sched_reorder for
TYPE_LOAD/TYPE_STORE cases.  If I'm reading the SPU docs properly a
load/store insn is handled by pipe_1 and we're also trying to model some
aspects of the load-store unit.  So we should be setting pipe_ls and pipe_1:

          case TYPE_LOAD:
           case TYPE_STORE:
             pipe_ls = i;
           case TYPE_LNOP:
           case TYPE_SHUF:
           case TYPE_BR:
           case TYPE_MULTI1:
           case TYPE_HBR:
             pipe_1 = i;
             break;

This looks like intentional fallthru and should just have an appropriate
comment to silence the warning.

Agreed.

spu_legitimate_address looks far more interesting and I think it's buggy
as written:


     case SUBREG:
       x = XEXP (x, 0);
       if (REG_P (x))
         return 0;

     case REG:
       return INT_REG_OK_FOR_BASE_P (x, reg_ok_strict);

I think the test is inverted.  We want to consider (subreg (reg)) a
valid memory address and reject all other (subreg (...)) expressions.
But this code does the opposite.

Oops, it looks like this has been broken since this commit:
https://gcc.gnu.org/ml/gcc-patches/2009-05/msg01505.html
It happens :-) And I'm encouraged to see these new warnings exposing real problems.

FWIW, I forgot there's a target independent patch necessary to build SPU with the current trunk. I'll get to pushing those forward soon enough.

jeff


Reply via email to