[Bug tree-optimization/51848] GCC is not able to vectorize when a constant value is also added to the sum of array expression inside a loop.

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 16 10:16:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51848

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization
                 CC|                            |rguenth at gcc dot gnu.org
          Component|middle-end                  |tree-optimization

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-16 10:14:08 UTC ---
(In reply to comment #2)
> We don't recognize this as reduction because we look for:
> 
>      a1 = phi < a0, a2 >
>      a3 = ...
>      a2 = operation (a3, a1)
> 
> and here we have
> 
>      a1 = phi < a0, a2 >
>      a3 = ...
>      a4 = operation (a3, a1)
>      a2 = a4 + 1

It seems reassociation should "fix" this.  IIRC we had some special code
in there that was supposed to handle this.



More information about the Gcc-bugs mailing list