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

--- Comment #3 from Robin Dapp <rdapp at gcc dot gnu.org> ---
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.

Reply via email to