This is an archive of the discontinued LLVM Phabricator instance.

[SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt[bhwd]_pat
ClosedPublic

Authored by sdesmalen on Apr 6 2020, 3:14 PM.

Details

Summary

Add the IsOverloadNone flag to tell CGBuiltin that it does not have
an overloaded type. This is used for e.g. svpfalse which does
not take any arguments and always returns a svbool_t.

This patch also adds builtins for svcntb_pat, svcnth_pat, svcntw_pat
and svcntd_pat, as those don't require custom codegen.

Diff Detail

Event Timeline

sdesmalen created this revision.Apr 6 2020, 3:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2020, 3:14 PM
Herald added a subscriber: tschuett. · View Herald Transcript

Would it make sense to generalize getSVEType() to getSVETypeList()? It seems like the current approach won't generalize well once you're dealing with more than one overloaded type (for example, llvm.aarch64.sve.scvtf.nxv8f16.nxv8i16).

clang/lib/CodeGen/CGBuiltin.cpp
7665

getElementType().

sdesmalen updated this revision to Diff 257824.Apr 15 2020, 1:40 PM
sdesmalen retitled this revision from [SveEmitter] Add NoOverload flag and builtin for svpfalse to [SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt[bhwd]_pat.
sdesmalen edited the summary of this revision. (Show Details)
  • Addressed suggestion to have separate function that returns a list of overloaded types.
  • For IsOverloadNone as needed by this patch, this list will be empty.
  • Also added builtins for svcntb_pat, svcnth_pat, svcntw_pat and svcntd_pat, because those don't require custom codegen.
This revision is now accepted and ready to land.Apr 15 2020, 2:40 PM
This revision was automatically updated to reflect the committed changes.