https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99648

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #10)
> Created attachment 50566 [details]
> gcc11-pr99648.patch
> 
> Updated patch which doesn't ICE anymore.  While I think the right thing
> would be to always punt on SUBREGs of constants, I think that is quite risky
> this late and so restricting it to MODE_COMPOSITE_P outermodes will make it
> restricted to
> powerpc IBM double double format and nothing else (well, there is also
> mips_extended_format, but no target seems to use it fortunately).

  if (MODE_COMPOSITE_P (outermode)

7347    

      && (CONST_SCALAR_INT_P (op)

7348    

          || CONST_DOUBLE_AS_FLOAT_P (op)

7349    

          || CONST_FIXED_P (op)

7350    

          || GET_CODE (op) == CONST_VECTOR))

7351    

    return NULL_RTX;

it's odd to reject CONST_INT_P but not CONST_DOUBLE-as-int, no?  Did you
mean to do

   if (MODE_COMPOSITE_P (outermode))
     switch (GET_CODE (op))
      {
      CASE_CONST_ANY:
        return NULL_RTX;
      default:;
      }

?  (yeah, CONST_ANY_P is missing it seems)

Reply via email to