[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug tree-optimization/18694] [4.0 regression] loop miscompilation at -O1 (-ftree-ch)



------- Additional Comments From law at redhat dot com  2004-12-09 16:20 -------
Subject: Re:  [4.0 regression] loop
	miscompilation at -O1 (-ftree-ch)

On Thu, 2004-12-09 at 02:51 +0000, kazu at cs dot umass dot edu wrote:
> ------- Additional Comments From kazu at cs dot umass dot edu  2004-12-09 02:51 -------
> Here are the PHI nodes that I am getting at L2 in thread_across_edge
> called on edge L23 -> L2.
> 
> TMT.0_24 = PHI <TMT.0_26(1), TMT.0_23(5)>;
> ivtmp14_6 = PHI <0(1), ivtmp14_14(5)>;
> d_5 = PHI <d23_9(1), d23_2(5)>;   <- defined
> tmp_4 = PHI <t_8(1), d_5(5)>;     <- used
> d23_3 = PHI <d23_9(1), d23_2(5)>;
> 
> Note that d_5 is defined *and* used.
> At this point, it's not safe to use SSA_NAME_VALUE for d_5.
Presumably these PHIs are at the start of a loop?  (Otherwise
we have a use that is not dominated by its def).

It shouldn't be terribly hard to build a map of the PHI defs
and if we see a use, then record nothing into our tables.  But
I'd like to sit down and rethink that code a little -- the way
it handles loops is, err STUPID.  The nice thing is fixing how
it handles loops would go a long way towards the long standing
need to improve the selection code for jump threading.

I'm deep inside revamping tree-ssa-alias.c to make it do sane
things for 15855.  But I'll try to put those changes on hold
and deal with 18694 since 18694 represents a mis-compilation.

jeff



-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: