This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Call get_ops just for SSA_NAMEs (PR tree-optimization/71987)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]