I'm OK with adding patterns in general, but I wonder if gcc would produce better code if they were split into QImode ops earlier?
+ [(set (match_operand:HI 0 "register_operand" "=Av") + (and:HI (match_operand:HI 1 "register_operand" "0") + (match_operand:HI 2 "immediate_operand" "n"))) + ] + "rl78_real_insns_ok ()" + "and\t%q0, %q2 \; and\t%Q0, %Q2" You can't use %Q with AX and AND. +;; operations upon pointers. Failure to provide these patterns +;; results in GCC generating illegal subregs, eg: (SUBREG:QI (REG:HI 33) 1) Why is that subreg illegal? +(define_insn "*nandhi3_virt" Is this one just an optimization?
