This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43431] Diagnostic message is not clear for vectorization profitability analysis
- From: "spop at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Mar 2010 15:56:49 -0000
- Subject: [Bug tree-optimization/43431] Diagnostic message is not clear for vectorization profitability analysis
- References: <bug-43431-7780@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from spop at gcc dot gnu dot org 2010-03-28 15:56 -------
(In reply to comment #1)
> > What does this message mean?
> > "vector iteration cost = 2056 is divisible by scalar iteration cost = 4 by a
> > factor greater than or equal to the vectorization factor = 4 ."
> > Is the vectorization not profitable?
> > Why?
>
> The cost of one vector iteration is 2056.
> The cost of one scalar iteration is 4.
> 2056/4 = 514
> 514 > 4 (= vectorization factor)
> The vectorization is not profitable.
>
> We want to vectorize only if one vector iteration cost is lower than one scalar
> iteration cost multiplied by vectorization factor.
>
Ok. Thanks for the explanation. Could we change the diagnostic
message to read this instead: "the vector iteration cost = 2056
divided by the scalar iteration cost = 4 is greater or equal to
the vectorization factor = 4."
> (Vector cost is so high here, because of the j,i access. We should vectorize
> the outer loop, but we fail because of some unsupported features: unknown inner
> loop bound, need for versioning (for alias) in outer loop.)
I looked at whether loop interchange could help, but interchanging the
two loops seems non trivial to me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43431