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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2026-11-13
             Target|                            |x86_64-*-*
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

(gdb) p desc->mode
$1 = {m_mode = E_HImode}
(gdb) p debug_rtx (desc->constant)
(const_vector:V2QI [
        (const_int 5 [0x5]) repeated x2
    ])

8261    bool
8262    native_encode_rtx (machine_mode mode, rtx x, vec<target_unit> &bytes,
8263                       unsigned int first_byte, unsigned int num_bytes)
8264    {
8265      /* Check the mode is sensible.  */
8266      gcc_assert (GET_MODE (x) == VOIDmode
8267                  ? is_a <scalar_int_mode> (mode)
8268                  : mode == GET_MODE (x));

I think the assert is too narrow for CONST_VECTOR but obviously instead
of asserting a return false would be more appropriate.

I think the assert wants GET_MODE_SIZE (mode) == GET_MODE_SIZE (GET_MODE (x))
instead of mode equality.

Not sure why we end up with this constant descriptor setup btw.

Leaving to somebody who knows this more.  Jakub?

Reply via email to