https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97437

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #5)
> Trying 7 -> 9:
>     7: r97:SI=0x2a
>     9: {flags:CCC=cmp(r97:SI+r98:SI,r97:SI);r99:SI=r97:SI+r98:SI;}
>       REG_DEAD r98:SI
>       REG_DEAD r97:SI
> Failed to match this instruction:
> (parallel [
>         (set (reg:CC 17 flags)
>             (compare:CC (reg:SI 98 [ *b_12(D) ])
>                 (const_int -42 [0xffffffffffffffd6])))
>         (set (reg:SI 99)
>             (plus:SI (reg:SI 98 [ *b_12(D) ])
>                 (const_int 42 [0x2a])))
>     ])
> 
> On rs6000 we have four special variants for the immediate add-with-carry
> insn patterns: imm 0, imm -1, imm pos, imm neg.  All of these have
> different canonical RTL.

The i386 backend has various patterns for that too, the problem is with that
CCmode vs. CCCmode that was used originally here (otherwise sure, I can add
more).
These patterns ensure only CF is valid and so need to use CCCmode which ensures
that users will only query CF flag and nothing else.

Reply via email to