Re: [PATCH] phiopt: do factor_out_conditional_operation for all phis [PR112418]

2024-11-04 Thread Jeff Law
On 10/21/24 3:18 AM, Richard Biener wrote: Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/112418 gcc/ChangeLog: * tree-ssa-phiopt.cc (is_factor_profitable): New function. (factor_out_conditional_operation): Add merge argument. Remove arg0/arg

Re: [PATCH] phiopt: do factor_out_conditional_operation for all phis [PR112418]

2024-10-21 Thread Richard Biener
On Sat, Oct 19, 2024 at 5:08 PM Jeff Law wrote: > > > > On 10/18/24 7:41 PM, Andrew Pinski wrote: > > Sometimes factor_out_conditional_operation can factor out > > an operation that causes a phi node to become the same element. > > Other times, we want to factor out a binary operator because > > i

Re: [PATCH] phiopt: do factor_out_conditional_operation for all phis [PR112418]

2024-10-19 Thread Jeff Law
On 10/18/24 7:41 PM, Andrew Pinski wrote: Sometimes factor_out_conditional_operation can factor out an operation that causes a phi node to become the same element. Other times, we want to factor out a binary operator because it can improve code generation, an example is PR 110015 (openjpeg).

[PATCH] phiopt: do factor_out_conditional_operation for all phis [PR112418]

2024-10-18 Thread Andrew Pinski
Sometimes factor_out_conditional_operation can factor out an operation that causes a phi node to become the same element. Other times, we want to factor out a binary operator because it can improve code generation, an example is PR 110015 (openjpeg). Note this includes a heuristic to decide if fac