This is the mail archive of the
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: <firstname.lastname@example.org>
On Mon, Jul 25, 2016 at 10:56 AM, Martin Liška <email@example.com> wrote:
> 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))
- &&!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.