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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> For x86_64 we might be able to solve this at the RTL level during combine:
> (set (reg/v:QI 84 [ <retval> ])
>     (if_then_else:QI (lt (subreg:QI (reg:SI 86 [ a ]) 0)
>             (const_int 0 [0]))
>         (ior:QI (subreg:QI (reg:SI 86 [ a ]) 0)
>             (const_int -128 [0xffffffffffffff80]))
>         (reg/v:QI 84 [ <retval> ])))
> 
> That is optimize:
> (a < 0) ? a | signbit : b
> to
> (a < 0) ? a : b

That didn't work either because combine could put back into place the lt.

Reply via email to