This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix factor_out_conditional_conversion caused ICE (PR tree-optimization/83521)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Dec 2017 16:14:23 -0700
- Subject: Re: [PATCH] Fix factor_out_conditional_conversion caused ICE (PR tree-optimization/83521)
- Authentication-results: sourceware.org; auth=none
- References: <20171221175045.GA2353@tucnak>
On 12/21/2017 10:50 AM, Jakub Jelinek wrote:
> Hi!
>
> The problem here is that the code expects fold_build1 will actually not
> fold, because using gimple_build_assign (..., VIEW_CONVERT_EXPR, temp);
> is valid only if TREE_CODE (temp) == VIEW_CONVERT_EXPR.
> So, either we can replace the fold_build1 with build1, or we should just
> use the gimple_build_assign overload that will handle even what
> <view_convert_expr <SSA_NAME_result_of_phi>> will fold to (in this case
> a <nop_expr <SSA_NAME_result_of_phi>>).
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2017-12-21 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/83521
> * tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
> gimple_build_assign without code on result of
> fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
> a VIEW_CONVERT_EXPR.
>
> * gcc.dg/pr83521.c: New test.
OK.
jeff