This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/51879] Missed tail merging with non-const/pure calls
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Jan 2012 10:36:39 +0000
- Subject: [Bug tree-optimization/51879] Missed tail merging with non-const/pure calls
- Auto-submitted: auto-generated
- References: <bug-51879-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51879
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-18 10:36:39 UTC ---
I'm afraid a lot would break. It really depends on what you use VN for and on
what code.
If you have:
D.12345_1 = bar (7);
D.12346_2 = bar (7);
and bar isn't const/pure call, then if VN equivalences D.12345_1 and D.12346_2,
it is wrong. Of course if you have:
<bb7>:
D.12345_1 = bar (7);
goto bb9;
<bb8>:
D.12346_2 = bar (7);
<bb9>:
D.12347_3 = PHI <D.12345_1(7), D.12346_2(8)>
(this case), you could VN them the same.