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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-11-28
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For aarch64. this can be done on the rtl leve really:
```
(set (reg:SI 107 [ _6 ])
    (mult:SI (if_then_else:SI (eq (reg:CC 66 cc)
                (const_int 0 [0]))
            (const_int 1 [0x1])
            (const_int -1 [0xffffffffffffffff]))
        (reg:SI 108 [ c_5 ])))
```
simplify that into:
```
(set (reg:SI 107 [ _6 ])
     (if_then_else:SI (eq (reg:CC 66 cc)
                          (const_int 0 [0]))
                      (reg:SI 108 [ c_5 ])
                      (neg:SI (reg:SI 108 [ c_5 ]))))
```
Or match the first form for a define_insn_and_split and split it into the
second form.

This won't solve PR 122837 though.
PR111078  is needed for a different reason though.

Reply via email to