https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94850
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |segher at gcc dot gnu.org Component|rtl-optimization |target Status|UNCONFIRMED |NEW Last reconfirmed| |2020-04-29 Ever confirmed|0 |1 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Probably a missing combine helper or a non-canonical pattern. It looks like (define_insn "x86_64_shrd" [(set (match_operand:DI 0 "nonimmediate_operand" "+r*m") (ior:DI (lshiftrt:DI (match_dup 0) (match_operand:QI 2 "nonmemory_operand" "Jc")) (ashift:DI (match_operand:DI 1 "register_operand" "r") (minus:QI (const_int 64) (match_dup 2))))) (clobber (reg:CC FLAGS_REG))] it tries for example Failed to match this instruction: (parallel [ (set (reg:DI 93) (ior:DI (ashift:DI (reg:DI 102) (minus:QI (subreg:QI (reg:SI 95) 0) (subreg:QI (reg/v:SI 92 [ x ]) 0))) (reg:DI 97))) (clobber (reg:CC 17 flags)) ]) or Failed to match this instruction: (parallel [ (set (reg:DI 93) (ior:DI (lshiftrt:DI (reg:DI 103) (subreg:QI (reg/v:SI 92 [ x ]) 0)) (ashift:DI (reg:DI 102) (subreg:QI (reg:SI 94) 0)))) (clobber (reg:CC 17 flags)) ]) but the insn with basically four ops is likely too complex for combines little mind. Ah here: (set (reg:DI 93) (ior:DI (lshiftrt:DI (reg:DI 103) (subreg:QI (reg/v:SI 92 [ x ]) 0)) (ashift:DI (reg:DI 102) (minus:QI (subreg:QI (reg:SI 95) 0) (subreg:QI (reg/v:SI 92 [ x ]) 0))))) but no (const 64) which is still separate here: (insn 11 8 12 2 (set (reg:SI 95) (const_int 64 [0x40])) "y.c":8:31 67 {*movsi_internal} (nil)) not sure if combine could help out here by propagating constants?