This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42906] [4.5 Regression] Empty loop not removed
- From: "changpeng dot fang at amd dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2010 00:22:39 -0000
- Subject: [Bug tree-optimization/42906] [4.5 Regression] Empty loop not removed
- References: <bug-42906-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from changpeng dot fang at amd dot com 2010-03-17 00:22 -------
(In reply to comment #16)
> > In this case, the loop itself is "empty" and we can replace every use of the
> > phi with "n" (exit value of the iv).
>
> I don't think that is done by remove_empty_loop anyways and it is already done
> by sccp (Propagation of constants using scev) which is enabled at -O1.
>
But n "is" not a constant. Of course we can modify the pass to compute the exit
value of iv (integer overflow may be an issue).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42906