Hi, Attached patch fixes bug 45241: CPU2006 465.tonto ICE in the vectorizer with -fno-tree-pre. When the vectorizer tries to recognize the dot_prod pattern, it traces the statements chain outside the loop. As a result, ICE occurs when it tries to access the stmt_vinfo for a stmt outside the loop. This patch stops the pattern searching when the statement is already outside the loop. It passed bootstrapping in both the trunk and 4.5 branch. The bug is 4.5/4.6 regression, and it prevents benchmarking for cpu2006 with no PRE. Is it OK to commit to 4,5 branch (and 4.6 ? Thanks, Changpeng