------- 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