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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Robin Dapp from comment #3)
> Before:
> _ifc__35 = .MASK_LEN_FOLD_LEFT_PLUS (res_20, vect__7.13_62, mask__27.10_57,
> _66, 0); 
> 
> After:
> _ifc__35 = .FOLD_LEFT_PLUS (res_20, vect__7.13_62); 
> 
> The issue is that the patch uses
> 
>  SLP_TREE_VECTYPE (SLP_TREE_CHILDREN (slp_node)[0]);
> 
> but here we have a cond reduction on an IFN_COND where the first child is
> the mask.  So we try to find an optab for a mask reduction and fail, using a
> FOLD_LEFT_PLUS instead (didn't check why we didn't give up then, though).
> 
> So I guess we need to adjust the operand number for cond reductions as we do
> in other places.

Ah, yes.  I think we can use SLP_TREE_CHILDREN (slp_node)[SLP_TREE_REDUC_IDX
(slp_node)] here now.  I'll check and submit a fix.

Reply via email to