https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98736

--- Comment #4 from bin cheng <amker at gcc dot gnu.org> ---
(In reply to bin cheng from comment #3)
> hmm, seems topological order isn't enough for distributing a loop nest, we
> need topological order plus inner loop depth-first.

Well, not really.  In this case, problem is that rev-post order algorithm puts
"a[c] = d[3];" before the inner loop which violates the original program order. 

Seems that it can be fixed by inner loop depth-first order wrto how we
distribute inner loop, but I am not sure if this always preserves programming
order because loop has been reformed by various optimizers.

Reply via email to