Hi,
I was tracking down an assertion failure in GCC which occured while I
was trying to bend some GCC constraints.
I came accross this function `insn_invalid_p', which calls
`added_clobbers_hard_reg_p' and before calling it, has the comment:
/* If we have to add CLOBBERs, fail if we have to add ones that
reference
hard registers since our callers can't know if they are live or
not.
Otherwise, add them. */
Now, I would expect that this function wouldn't consider FLAGS_REGNUM a
hard register in the normal sense, since I don't think it's liveliness
is important (at least it doesn't seem important if your FLAGS_REGNUM is
not a hard register from the hardware viewpoint.
I have this insn:
(set (reg:QI RAH) (reg:QI 56))
and this pattern:
(parallel [(set (match_operand:QI "register_operand" "")
(match_operand:QI "register_operand" ""))
(clobber (reg:CC CC_REG))])
`insn_invalid_p' deems the insn as invalid since CC_REG is a hard reg
and as the comment above explains it, it fails to process the new insn.
My question is, should added_clobbers_hard_reg_p take FLAGS_REGNUM into
consideration and allow it in a clobber, just as it allows a scratch?
Cheers,
--
PMatos