https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116412

--- Comment #6 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> I will finish this up tomorrow but here is the patch which I will doing
> (note white spaces might be wrong):
> ```
> diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
> index 770f3629fe1..be95798a065 100644
> --- a/gcc/tree-ssa-phiopt.cc
> +++ b/gcc/tree-ssa-phiopt.cc
> @@ -368,6 +368,10 @@ factor_out_conditional_operation (edge e0, edge e1,
> gphi *phi,
>    if (!types_compatible_p (TREE_TYPE (new_arg0), TREE_TYPE (new_arg1)))
>      return NULL;
> 
> +  /* The new args need to be both gimple values. */
> +  if (!is_gimple_val (new_arg0) || !is_gimple_val (new_arg1))
> +    return NULL;
> +
>    /* Function calls can only be const or an internal function
>       as maybe_push_res_to_seq only handles those currently.  */
>    if (!arg0_op.code.is_tree_code ())
> 
> ```

That fixes `openblas-0.3.28` build for me. Thank you!

Reply via email to