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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|10.1.0, 7.1.0               |
           Severity|normal                      |enhancement
     Ever confirmed|0                           |1
             Blocks|                            |114527
   Last reconfirmed|                            |2025-01-09

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> It is kinda of vectorized:
> 
>   <bb 5>:
>   # vect_vec_iv_.37_29 = PHI <vect_vec_iv_.37_30(5), {
> 1.00000001490116119384765625e-1, 2.0000000298023223876953125e-1,
> 3.00000011920928955078125e-1, 4.000000059604644775390625e-1 }(4)>
>   # ivtmp.43_16 = PHI <ivtmp.43_13(5), 0(4)>
>   vect_vec_iv_.37_30 = vect_vec_iv_.37_29 + { 4.000000059604644775390625e-1,
> 4.000000059604644775390625e-1, 4.000000059604644775390625e-1,
> 4.000000059604644775390625e-1 };
>   vect_s_10.38_32 = vect_vec_iv_.37_29 + { 1.00000001490116119384765625e-1,
> 1.00000001490116119384765625e-1, 1.00000001490116119384765625e-1,
> 1.00000001490116119384765625e-1 };
>   ivtmp.43_13 = ivtmp.43_16 + 1;
>   if (ivtmp.43_13 >= bnd.33_20)
>     goto <bb 7>;
>   else
>     goto <bb 5>;
> 
> But then the vectorization part is removed:
>   <bb 7>:
>   _33 = BIT_FIELD_REF <vect_s_10.38_32, 32, 96>;
> 
> 
> This is odd.

I was misunderstanding what was happening.

GCC vectorized the loop but that just decreased the number of iterations by a
factor of 4 but really. We should just produce n * tenth here.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114527
[Bug 114527] [meta-bug] missed sccp (final value) optimizations

Reply via email to