This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52734] [4.7/4.8 Regression] Incorrect optimization of uClibc sbrk()
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 27 Mar 2012 13:19:12 +0000
- Subject: [Bug tree-optimization/52734] [4.7/4.8 Regression] Incorrect optimization of uClibc sbrk()
- Auto-submitted: auto-generated
- References: <bug-52734-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52734
--- Comment #10 from vries at gcc dot gnu.org 2012-03-27 13:19:12 UTC ---
Created attachment 27014
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27014
Tentative patch
The key element of this patch is:
...
+ if (gvn_used && vuse1 != vuse2)
+ return;
+
...
If gvn was use to prove two bbs equal, and the incoming vuses are not equal,
don't do the substitution. This is a bit too restrictive, I'm pondering about a
more precise fix.