Georg-Johann Lay <[email protected]> writes:
> Is insn combine allowed to match the insn because from combine's
> perspective just a CONST_INT (i.e. low_io_address_operand) is moved
> across the access of UDR0?
Yes.
> Or is this a bug in insn combine?
No.
> If combine is right -- and thus the pattern is wrong -- how must the
> insn be rewritten to produce respective instructions?
The backend must define and use a new recog predicate which recognizes
(mem:QI x)
where x satisfies low_io_address_operand. The predicate should also
check that its operand satisfies general_operand. E.g., something along
the lines of
(define_predicate "low_io_mem"
(and (match_operand 0 "general_operand")
(and (match_code "mem")
(match_test "low_io_address_operand (XEXP (op, 0))"))))
Ian