On Fri, Oct 17, 2014 at 6:08 AM, Yuri Rumyantsev <ysrum...@gmail.com> wrote: > Jeff, > > I prepared another patch that includes test-case as you requested. > > Below are answers on your questions. > >> First, for the benefit of anyone trying to understand what you're doing, >> defining what "cd equivalent" means would be >helpful. > > I added the following comment to function: > > fwe call basic blocks bb1 and bb2 > cd-equivalent if they are executed under the same condition. > > > Is it sufficient? > >>So, do you have a case where the dominated_by_p test above is true and >>is_predicated(bb) returns true as well? I think this >part of the change is >>largely responsible for the hack you're doing with having the function scoped >>static variable join_bb. > > I don't have such test-case and I assume that if bb is always > executed, it is not predicated. > > I also deleted "join_bb" in my changes. > > > Is it OK for trunk now. > > Thanks. > Yuri. > > 2014-10-17 Yuri Rumyantsev <ysrum...@gmail.com> > gcc/ChangeLog > > * tree-if-conv.c (add_to_predicate_list): Check unconditionally > that bb is always executed to early exit. Use predicate of > cd-equivalent block for join blocks if it exists. > (if_convertible_loop_p_1): Recompute POST_DOMINATOR tree. > (tree_if_conversion): Free post-dominance information. > > gcc/testsuite/ChangeLog > > * gcc/dg/tree-ssa/ifc-cd.c: New test. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63941 -- H.J.