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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-09-21
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
ix86_carry_flag_operator can't match, because we heavily canonicalize the
comparison to GT, and so
(parallel [
        (set (reg:SI 95 [ jout ])
            (plus:SI (gt:SI (reg:CCFP 17 flags)
                    (const_int 0 [0]))
                (reg:SI 100)))
        (clobber (reg:CC 17 flags))
    ])
can't match addsi3_carry, as after conversion to integral conditions it is GEU
which requires test of two flags.
So I think we'd need instead to add patterns that would catch
(parallel [
        (set (reg:SI 95 [ jout ])
            (plus:SI (gt:SI (reg:DF 99)
                    (reg/v:DF 89 [ r2_0 ]))
                (reg:SI 100)))
        (clobber (reg:CC 17 flags))
    ])
and swap the operand order and split it back to two instructions, comparison
and and add with carry.

Reply via email to