On 12/21/2015 10:23 AM, Kyrill Tkachov wrote:

Here is a version integrating the new checks into bbs_ok_for_cmove_arith.
We might as well do it there since it already iterates over all the
instructions in the basic blocks.

The patch looks somewhat complicated and asymmetrical to me. I tried to debug the issue, and found that bbs_ok_for_cmove_arith wasn't called at all. After changing that, like this:

@@ -2082,7 +2082,7 @@ noce_try_cmove_arith (struct noce_if_inf
        }
     }

-  if (then_bb && else_bb && !a_simple && !b_simple
+  if (then_bb && else_bb
       && (!bbs_ok_for_cmove_arith (then_bb, else_bb)
          || !bbs_ok_for_cmove_arith (else_bb, then_bb)))
     return FALSE;

the testcase passes. Could you investigate whether this is sufficient?

     * ifcvt.c (cond_exec_get_condition): Rename to...
     (get_condition_from_jump): ... This.

Please don't.

+/* { dg-options "-Og -fif-conversion -flive-range-shrinkage -fpeel-loops 
-frerun-cse-after-loop" } */

That's a very specific set of options there, I wonder how Zdenek even found that. Maybe we also want a copy in torture/ to test it more broadly?


Bernd

Reply via email to