Hi, PR 61393 shows that trans-mem does not play along with IPA-CP (or anything cloning cgraph_nodes for that matter). It is entirely possible that simply properly copying tm_clone flag of a node when cloning it is enough to make it work, but that is something a trans-mem person has to confirm and we probably do not want to start doing that now on a release branch anyway.
So, this branch disables IPA-CP for nodes marked as tm_clone on the 4.8 branch. I've confirmed it fixes the PR failure and passes bootstrap and testing on x86_64-linux (I did not manage to create a simple testsuite testcase within a few minutes). OK for 4.8? Thanks, Martin 2014-06-04 Martin Jambor <mjam...@suse.cz> PR ipa/61393 * ipa-cp.c (determine_versionability): Pretend that tm_clones are not versionable. diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c index d9d69b3..bd45575 100644 --- a/gcc/ipa-cp.c +++ b/gcc/ipa-cp.c @@ -447,6 +447,8 @@ determine_versionability (struct cgraph_node *node) else if (!opt_for_fn (node->symbol.decl, optimize) || !opt_for_fn (node->symbol.decl, flag_ipa_cp)) reason = "non-optimized function"; + else if (node->tm_clone) + reason = "transactional memory clone"; if (reason && dump_file && !node->alias && !node->thunk.thunk_p) fprintf (dump_file, "Function %s/%i is not versionable, reason: %s.\n",