This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/52448] [4.4/4.5/4.6/4.7 Regression] cselim broken with calls
- From: "matz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Mar 2012 14:10:08 +0000
- Subject: [Bug tree-optimization/52448] [4.4/4.5/4.6/4.7 Regression] cselim broken with calls
- Auto-submitted: auto-generated
- References: <bug-52448-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52448
--- Comment #4 from Michael Matz <matz at gcc dot gnu.org> 2012-03-01 14:10:08 UTC ---
Bah, no. That won't generally work. In particular it might be calls that
don't necessarily dominate the "non-trapping" stmt that make it trapping
again:
*X = a;
if (cond)
free_everything();
if (bla)
*X = b;
The call doesn't dominate the second store, but the latter still might
trap (when cond is true). Hmm, this needs a different approach. If there's
any path from the dominating access to the access in question, which contains
a (problematic) call, it makes it trapping again. We can ignore back edges,
hence the path between both accesses are acyclic, so we might still get away
with a non-iterating algorithm. I'm still working on it.