On Sun, Jun 28, 2020 at 2:32 PM yangyang (ET) <yangyang...@huawei.com> wrote:
>
> Hi,
>
>     This is a simple fix for pr95855.
>
>     With this fix, pass_split_paths can recognize the if-conversion 
> opportunity of the testcase and doesn't duplicate the corresponding block.
>
>     Added one testcase for this. Bootstrap and tested on both aarch64 and x86 
> Linux platform, no new regression witnessed.
>
>     Ok for trunk?

Can you try using the num_stmts_in_pred[12] counts instead of using
empty_block_p?

Your matching doesn't allow for FP constants like

 dmax[0] = d1[i] < 1.0 ? 1.0 : d1[i];

since FP constants are not shared.  You likely want to use
operand_equal_p to do the
PHI argument comparison.

Thanks,
Richard.

> Thanks,
> Yang Yang
>
>
> +2020-06-28  Yang Yang  <yangyang...@huawei.com>
> +
> +       PR tree-optimization/95855
> +       * gimple-ssa-split-paths.c (is_feasible_trace): Add extra
> +       checks to recognize a missed if-conversion opportunity when
> +       judging whether to duplicate a block.
> +
>
> +2020-06-28 Yang Yang  <yangyang...@huawei.com>
> +
> +       PR tree-optimization/95855
> +       * gcc.dg/tree-ssa/split-paths-12.c: New testcase.
> +

Reply via email to