On Apr 17, 2012, at 2:08 PM, Bernd Schmidt wrote:
> This patch enables GET_MODE_WIDER_MODE for MODE_PARTIAL_INT (by setting
> the wider mode to the one the partial mode is based on), which is useful
> for the port I'm working on: I can avoid defining operations on the
> partial modes.

I think this breaks my port, in emit-rtl.c:

B       for (mode = GET_CLASS_NARROWEST_MODE (MODE_PARTIAL_INT);
             mode != VOIDmode;
             mode = GET_MODE_WIDER_MODE (mode))
  =>      const_tiny_rtx[i][(int) mode] = GEN_INT (i);

Doesn't work, as that does expects to step through all partial int modes.  The 
problem is, we went from P1QI -> P1SI, and now we go from P1QI to QI.  The 
problem is this, we never initialize P1SI anymore, and later, when initializing 
vector constants, things like V2P1SI dies, as P1SI was never built:

    /* We need to call this function after we set the scalar const_tiny_rtx     
                          
       entries.  */
    gcc_assert (const_tiny_rtx[constant][(int) inner]);

So, maybe we want to go through all modes, and just ask, are you a 
MODE_PARTIAL_INT, and initialize them that way?  Thoughts?

Reply via email to