https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29256
Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wilco at gcc dot gnu.org --- Comment #66 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Aldy Hernandez from comment #65) > (In reply to Jeffrey A. Law from comment #45) > > This problem still exists and can be seen by making the arrays external and > > using -fno-tree-loop-distribute-patterns. > > Still a problem. I get the same code Jeff got for comment 45. A simple workaround for GCC8 might be to tweak the address costs when loop unrolling is enabled, so offsets are preferred over indexing (either in IVOpt or backend). For GCC9 a tree level loop optimization has been proposed which will fix this issue.