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

--- Comment #34 from Robin Dapp <rdapp at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #29)
> --- gcc/tree-vect-loop.cc.jj  2023-11-14 10:35:52.000000000 +0100
> +++ gcc/tree-vect-loop.cc     2023-11-15 22:42:32.782007408 +0100
> @@ -4105,9 +4105,9 @@ pop:
>       /* In case of a COND_OP (mask, op1, op2, op1) reduction we might have
>          op1 twice (once as definition, once as else) in the same operation.
>          Allow this.  */
> -       if (cond_fn_p)
> +       if (cond_fn_p && op_use_stmt == use_stmt)
>           {
> -           gcall *call = dyn_cast<gcall *> (use_stmt);
> +           gcall *call = as_a<gcall *> (use_stmt);
>             unsigned else_pos
>               = internal_fn_else_index (internal_fn (op.code));
>  
> doesn't cure the -fcompare-debug failure though.

Yeah that's what I meant to mean in the first place ;)
Thanks for the debugging efforts.  I'm going to check with your reduced
example,   could reproduce it locally with it.

Reply via email to