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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
                 CC|                            |pinskia at gcc dot gnu.org

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> Whether this is better suited for GIMPLE or RTL if-conversion remains to be
> seen.

I suspect we could do something in isel. phiopt has something similar for casts
already though too. I have some ideas on how we undo the conditional xor and
then see if we do another phiopt if so don't put it back as conditional. And
then in isel if we see `a ? x ^ CST : 0` do it as `x ^ (a ? CST : 0)` if the
target has cmov but there needs to be some cost model; I am not sure how
though.

(I still wonder if x86's cmov has improved in recent years so that doing 2 cmov
back to back still worse than a branch; LLVM seems not to care about doing cmov
cost model and the performance there is ok).

Reply via email to