https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59533
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Oleg Endo from comment #5) The same would apply to: int test (unsigned char* x, int y, int z) { return ((*x >> 7) ^ 0) & 1; } which compiles to mov.b @r4,r1 shll r1 rts movt r0 on non-SH2A. The insn selection goes like this: zero_extract -> tstsi_t -> cmp/pz -> shll-movt