This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Call get_ops just for SSA_NAMEs (PR tree-optimization/71987)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Liška <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, kuganv at linaro dot org
- Date: Mon, 25 Jul 2016 12:08:42 +0200
- Subject: Re: [PATCH] Call get_ops just for SSA_NAMEs (PR tree-optimization/71987)
- Authentication-results: sourceware.org; auth=none
- References: <853beec4-fd71-f93d-e9fc-7d8c6802936b@suse.cz>
On Mon, Jul 25, 2016 at 10:56 AM, Martin Liška <mliska@suse.cz> wrote:
> Hi.
>
> As other calls of get_ops is guarded with TREE_CODE (x) == SSA_NAME, I guess the
> same should be done for the call that causes the ICE.
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?
- else if (is_gimple_assign (stmt)
+ else if (TREE_CODE (lhs) == SSA_NAME
+ && is_gimple_assign (stmt)
&& (TREE_CODE_CLASS (gimple_assign_rhs_code (stmt))
== tcc_comparison)
- &&!get_ops (lhs, code, &ops,
- loop_containing_stmt (stmt))
+ && !get_ops (lhs, code, &ops,
+ loop_containing_stmt (stmt))
the check is redundant here (the is_gimple_assign check as well). If the
RHS code is a tcc_comparison the lhs has to be an SSA name. Ok with
the is_gimple_assign check removed instead.
Thanks,
Richard.
> Martin