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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2025-10-15
             Status|UNCONFIRMED                 |ASSIGNED
                 CC|                            |pinskia at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot 
gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Take:
> void f(float *myVector, float *result, int i )
> {
> for(int n = 0; n < 1024; n++)
> if (myVector[n] > 0.5){
>     result[n] = 0.8f;
> }
> else {
>     result[n] = 0.1f;
> }
> }
> 
> This loop does get vectorized at -O3 and produces the conditional move at
> -O2 but the tree level for the scalar side has a store inside the
> conditional still.

Since GCC 11, sink1 is able to do the sinking of the store.
To do it in phiopt1/2 you need to be able to commonalize the stores which we
don't do currently because we look for exact operand_equal_p and we don't hoist
common code out earlier.

Reply via email to