https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99905
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Trying 7, 11, 13 -> 14: 7: r109:TI=[argp:DI] REG_EQUIV [argp:DI] 11: {r110:TI=r109:TI 0>>0x3f;clobber flags:CC;} REG_DEAD r109:TI REG_UNUSED flags:CC 13: {r85:HI=r110:TI#0<-<0x8;clobber flags:CC;} REG_DEAD r110:TI REG_UNUSED flags:CC 14: r86:SI=zero_extend(r85:HI#0) REG_DEAD r85:HI Successfully matched this instruction: (set (reg:SI 86 [ _6 ]) (const_int 0 [0])) looks like the bug. We have (set (reg:SI 86 [ _6 ]) (zero_extend:SI (subreg:QI (rotate:HI (subreg:HI (lshiftrt:TI (reg/v:TI 109 [ i ]) (const_int 63 [0x3f])) 0) (const_int 8 [0x8])) 0))) and are substing (mem/c:TI (reg/f:DI 16 argp) [3 i+0 S16 A128]) into (reg/v:TI 109 [ i ]) and that gives the SET_SRC of const0_rtx. subst first makes (set (reg:SI 86 [ _6 ]) (and:SI (subreg:SI (rotate:HI (subreg:HI (lshiftrt:TI (mem/c:TI (reg/f:DI 16 argp) [3 i+0 S16 A128]) (const_int 63 [0x3f])) 0) (const_int 8 [0x8])) 0) (const_int 255 [0xff]))) which still LGTM.