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

avieira at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-05
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from avieira at gcc dot gnu.org ---
So I can confirm this ICE and it was exposed rather than caused by my patch.

The problem arises because it seems we have never tried to simplify a:
(subreg:<poly-sized mode> (subreg:<...> (<non-poly-sized-mode>) N) M)

This makes simplify_subreg neter the if (GET_CODE (op) == SUBREG) which calls:
'paradoxical_subreg_p (VNx4SImode, OImode)'
Which seems to assume these are ordered with an assert.

I am not sure what the right fix is here, I did check and changing
paradoxical_subreg_p to return false if the mode sizes are not ordered leads to
some bizarre fail, it looks like simplify_gen_subreg then just returns 0 ...
rather than the original nested subregs.

Before I dig deeper I'll get richi and Richard S to comment.

Reply via email to