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

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 12 Sep 2023, juzhe.zhong at rivai dot ai wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111337
> 
> --- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
> (In reply to Richard Biener from comment #2)
> >   vect_patt_67.34_168 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> > }>;
> >   vect_patt_68.35_169 = (vector([4,4]) int) vect_patt_67.34_168;
> > 
> > ->
> > 
> >   vect_patt_68.35_169 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> > }>;
> > 
> > this one looks odd - it's probably
> > 
> > /* Sink unary conversions to branches, but only if we do fold both 
> >    and the target's truth type is the same as we already have.  */
> > (simplify
> >  (convert (vec_cond:s @0 @1 @2))
> >  (if (VECTOR_TYPE_P (type) 
> >       && types_match (TREE_TYPE (@0), truth_type_for (type)))
> >   (vec_cond @0 (convert! @1) (convert! @2)))) 
> > 
> > the problem is that this happily produces a vec_cond we might not be able
> > to expand - having the same truth type for the data type isn't enough
> > if there's no optab with a matching data mode.  Same for the view_convert
> > case.
> > 
> > It's a bit convoluted to ask for target support here, can you double-check
> > it isn't possible to add native riscv expanders for the missing case?
> 
> You mean support(In reply to Richard Biener from comment #2)
> >   vect_patt_67.34_168 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> > }>;
> >   vect_patt_68.35_169 = (vector([4,4]) int) vect_patt_67.34_168;
> > 
> > ->
> > 
> >   vect_patt_68.35_169 = VEC_COND_EXPR <mask__5.33_165, { 1, ... }, { 0, ...
> > }>;
> > 
> > this one looks odd - it's probably
> > 
> > /* Sink unary conversions to branches, but only if we do fold both 
> >    and the target's truth type is the same as we already have.  */
> > (simplify
> >  (convert (vec_cond:s @0 @1 @2))
> >  (if (VECTOR_TYPE_P (type) 
> >       && types_match (TREE_TYPE (@0), truth_type_for (type)))
> >   (vec_cond @0 (convert! @1) (convert! @2)))) 
> > 
> > the problem is that this happily produces a vec_cond we might not be able
> > to expand - having the same truth type for the data type isn't enough
> > if there's no optab with a matching data mode.  Same for the view_convert
> > case.
> > 
> > It's a bit convoluted to ask for target support here, can you double-check
> > it isn't possible to add native riscv expanders for the missing case?
> 
> You mean we should add "vcond" patterns back ?

No, add the missing vcond_mask one?  But maybe I'm misunderstanding the
problem.

Reply via email to