Hi, The test in PR 49318 fails because the vectorizer recognizes address computation sequence as a widening-multiplication pattern, while such sequence is not relevant to vectorization. The problem is that the vectorizer doesn't check if a statement is going to be vectorized before replacing it with a pattern. Moreover, the vectorizer first detects the patterns and only after that looks for relevant statements. Changing the order is not a good option, since statements relevance is defined also by their belonging to a pattern. This patch solves the problem by removing pattern statements that were created for statements that are not supposed to be vectorized. Bootstrapped with vectorization enabled on powerpc64-suse-linux and tested on powerpc64-suse-linux and x86_64-suse-linux. Committed. Ira ChangeLog: PR tree-optimization/49318 * tree-vect-loop.c (vect_determine_vectorization_factor): Remove irrelevant pattern statements. testsuite/ChangeLog: PR tree-optimization/49318 * gcc.dg/vect/pr49318.c: New test.