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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #4)
> Given the code looks like this:
> 
>   b_2 = a_1(D) > 0; 
>   t_3 = b_2 ? 10 : 20;
>   t_4 = t_3 + 20;
> 
> ISTM that we could have a match.pd pattern which optimizes into the b ? 30 :
> 40 form.  Essentially given X op C where X comes from a COND_EXPR where the
> true/false arms are constants we can compute trueval op C and falseval op C
> and use thoes results in the COND_EXPR.

https://gcc.gnu.org/pipermail/gcc-patches/2025-December/702665.html
Which is under review from me; I provided some review comments already too.

Reply via email to