[Bug tree-optimization/26360] [4.2 Regression] Autovectorization of char -> int loop gets ICE

dorit at il dot ibm dot com gcc-bugzilla@gcc.gnu.org
Sun Feb 19 08:50:00 GMT 2006



------- Comment #2 from dorit at il dot ibm dot com  2006-02-19 08:50 -------
This happens because we actually rely on dce taking place after the vectorizer
to clean up dead code. When we detect a pattern (widneing-summation in this
case) we create a "dummy" stmt ("pattern-stmt") that represents the pattern and
that will be vectorized instead of the original sequence of stmts (that
involves in this case type promotions etc). The def of that "pattern-stmt" is
not connected to any use. This "pattern-stmt" is never meant to remain in the
code in its scalar form (if the loop is vectorized, there will be a vectorized
form of that stmt in the loop, but the scalar "pattern-stmt" will always remain
dead). So, two ways to handle this - either (1) have a "special" dce pass after
the vectorizer that is not disabled by -fno-tree-dce if -ftree-vectorize is on.
or (2) have the vectorizer clean up these pattern-stmts itself when it's done
with the loop; the vectorizer actually does scan the loop after it's done (in
order to free various data structures), so it basically wouldn't cost anything
to do this extra cleanup; the question is - wouldn't it be nicer if a pass
could rely on dce taking place right after, it instead of trying to do some of
the job itself?  


-- 


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



More information about the Gcc-bugs mailing list