https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99905
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The bug seems to be on extract_compound_operation called on (zero_extract:DI (mem/c:TI (reg/f:DI 16 argp) [3 i+0 S16 A128]) (const_int 16 [0x10]) (const_int 63 [0x3f])) We have: else if (unsignedp && len < HOST_BITS_PER_WIDE_INT) tem = simplify_and_const_int (NULL_RTX, mode, simplify_shift_const (NULL_RTX, LSHIFTRT, mode, XEXP (x, 0), pos), (HOST_WIDE_INT_1U << len) - 1); but that calls simplify_shift_const with DImode and TImode MEM. I think the shift needs to be done in inner_mode and the result then converted to mode.