https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81161
--- Comment #7 from Jeffrey A. Law <law at gcc dot gnu.org> ---
For targets without bitfield insertion capabilities, this likely must be
handled in gimple. The core issue is we'd need to combine RTL like this:
(insn 13 8 24 (set (reg:DI 10 a0 [153])
(zero_extract:DI (reg:DI 15 a5 [orig:150 *x_11(D) ] [150])
(const_int 1 [0x1])
(const_int 4 [0x4]))) "j.c":13:12 654 {*bexti}
(nil))
(insn 24 13 26 (set (reg:DI 14 a4 [164])
(zero_extract:DI (reg:DI 15 a5 [orig:150 *x_11(D) ] [150])
(const_int 1 [0x1])
(const_int 3 [0x3]))) "j.c":13:29 654 {*bexti}
(nil))
(insn 26 24 15 (set (reg:DI 14 a4 [167])
(ashift:DI (reg:DI 14 a4 [164])
(const_int 1 [0x1]))) "j.c":13:36 297 {ashldi3}
(nil))
(insn 15 26 28 (set (reg:DI 10 a0 [156])
(ashift:DI (reg:DI 10 a0 [153])
(const_int 2 [0x2]))) "j.c":13:19 297 {ashldi3}
(nil))
(insn 28 15 36 (set (reg:DI 10 a0 [168])
(ior:DI (reg:DI 10 a0 [156])
(reg:DI 14 a4 [167]))) "j.c":13:42 107 {*iordi3}
(expr_list:REG_DEAD (reg:DI 14 a4 [167])
(nil)))
Extract the two bits, move them into position, then IOR them together. That's
5 insns. No good for combine without some kind of bridge pattern.