--- Comment #8 from rguenth at gcc dot gnu dot org 2006-03-30 15:29 ---
Just for the record, the attached patch bootstrapped and regtested on
x86_64-unknown-linux-gnu, with the following fallout:
FAIL: gcc.dg/tree-ssa/loadpre4.c scan-tree-dump-times Eliminated: 1 1
FAIL: gcc.dg/tree-ssa
--- Comment #7 from rguenth at gcc dot gnu dot org 2006-03-30 15:11 ---
You are probably right about improving SCEV - I hope Sebastian can make it work
for this and similar cases. Wrt the loop header it is that we convert the loop
to a do-while style loop, which at least iterates once,
--- Comment #6 from dberlin at gcc dot gnu dot org 2006-03-30 14:43 ---
Subject: Re: PRE confuses loop number of
iterations analysis
On Thu, 2006-03-30 at 14:37 +, rguenth at gcc dot gnu dot org wrote:
>
> --- Comment #5 from rguenth at gcc dot gnu dot org 2006-03-30
--- Comment #5 from rguenth at gcc dot gnu dot org 2006-03-30 14:37 ---
Loop header copying for the inner loop is required for # of iterations analysis
- though we should move that header copy out of the outer loop, too, if
possible.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26
--- Comment #4 from dberlin at gcc dot gnu dot org 2006-03-30 14:04 ---
(In reply to comment #2)
> You can see that PRE makes a mess out of it because of the copied loop header
> of the inner loop. So maybe Zdeneks patch to move the loop header copy
> outside
> of the first loop helps
--- Comment #3 from rguenth at gcc dot gnu dot org 2006-03-30 13:34 ---
Created an attachment (id=11164)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11164&action=view)
candidate patch
The attached patch is maybe a fix - though a better way to detect what could be
a loop header c
--- Comment #2 from rguenth at gcc dot gnu dot org 2006-03-30 12:31 ---
You can see that PRE makes a mess out of it because of the copied loop header
of the inner loop. So maybe Zdeneks patch to move the loop header copy outside
of the first loop helps here. Though I'd prefer to preven
--- Comment #1 from rguenth at gcc dot gnu dot org 2006-03-30 12:22 ---
Note this testcase requires the fix(es) for PR26900 to figure out the number of
iterations for the inner loop. The failure to figure out the number of
iterations of the outer loop can be reproduced with mainline. B