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

--- Comment #10 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Which means we need cond[_len]_[pack_]{u,s}fix to recover, same for float.

It'll likely need to be a convert optab too, since SVE can do e.g. short ->
float,  and short -> double.

(In reply to Richard Biener from comment #4)
> (In reply to Richard Biener from comment #3)
> > Which means we need cond[_len]_[pack_]{u,s}fix to recover, same for float.
> 
> I'll note that vectorizable_call does not yet implement pack/unpack for
> conditional calls, much less do we have sth like
> get_{un,}pack_{lo,hi}_internal_fn (internal_fn) given if-conversion would
> generate the non-{un,}pack variants but the vectorizer eventually would
> use the {un,}pack ones.
> 
> So this is going to be quite some leg-work.

For SVE we'd need {top,bottom} too.  Perhaps it's easier to have ifcvt
do integer promotion/trunction to the same bitsize as the destination and just
support 1-1 cond_ conversions? since the integer conversions don't trap and
don't need to be conditional.

We can use patterns in the vectorizer to optimize for targets that can do
double steps like SVE.

The above would be simple enough to do and should recover the codegen to what
it was.

Reply via email to