Page MenuHomePhabricator

[SLP] Calculate overload types from intrinsic description
Needs ReviewPublic

Authored by sepavloff on Sep 8 2021, 10:24 PM.

Details

Summary

The previous way to determine overload types of an intrinsic could work
only with functions that have return value of overloaded type. Functions
having return type described with SameVecWidthArgument were not
supported. This change implements overload type determination based on
intrinsic description provided by getIntrinsicInfoTableEntries.

The change does not affect functionality now but represents a
prerequisite for subsequent patches.

Diff Detail

Event Timeline

sepavloff created this revision.Sep 8 2021, 10:24 PM
sepavloff requested review of this revision.Sep 8 2021, 10:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 8 2021, 10:24 PM

Any feedback?

Matt added a subscriber: Matt.Sep 16 2021, 8:06 AM
bjope added inline comments.Sep 16 2021, 8:46 AM
llvm/include/llvm/IR/Intrinsics.h
193

This did not assert on PtrToElt in the past? Since commit msg says that this does not affect functionality I wonder if this was an intentional change or not?

RKSimon added inline comments.Sep 16 2021, 8:50 AM
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
5563

Can we pull some of this out into a helper - SLP is far too large already......

Also, won't we need most of this for LoopVectorizer as well?

Is this D109049 without the isnan intrinsic changes?
Is it possible to show a SLP difference with some existing intrinsic with mixed/complex types like @llvm.uadd.with.overflow?

Is this D109049 without the isnan intrinsic changes?
Is it possible to show a SLP difference with some existing intrinsic with mixed/complex types like @llvm.uadd.with.overflow?

For reference, this is PR40853

Is this D109049 without the isnan intrinsic changes?
Is it possible to show a SLP difference with some existing intrinsic with mixed/complex types like @llvm.uadd.with.overflow?

For reference, this is PR40853

And a stretch goal would be PR38424 - vectorizing math calls containing pointers, sincos/modf etc.