Clobber REG_CC only for some constraint alternatives?

Hans-Peter Nilsson hp@bitrange.com
Tue Sep 1 19:38:09 GMT 2020


On Wed, 26 Aug 2020, Pip Cet via Gcc wrote:

> Note that whether there is a CC-setting variant depends not just on
> the "cc" attr, but also on the precise operands for some values of the
> "cc" attr, which requires hairy C code to figure out.
>
> Is it possible to avoid this situation by avoiding constraint
> alternatives, and defining insns separately for each of them?

Well, rather than "avoid this situation", fix it.

Besides defaulting to clobber and separate splitters like Jeff
wrote, the best action here is to make the "cc" attribute
accurate when non-clobber.  That is, make the "hairy C code"
part of the alternative-matching-expression (typically the
constraint combination).

brgds, H-P


More information about the Gcc mailing list