This is an archive of the discontinued LLVM Phabricator instance.

[Clang][SVE2.1] Add svpext builtins
ClosedPublic

Authored by CarolineConcatto on May 22 2023, 5:19 AM.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 5:19 AM
CarolineConcatto requested review of this revision.May 22 2023, 5:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2023, 5:19 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
sdesmalen added inline comments.
clang/include/clang/Basic/arm_sve.td
16

s/follow(eg.:2.x)/follow (e.g. 2.x)/

clang/lib/CodeGen/CGBuiltin.cpp
9835

Please add SVE to the name, i.e. FormSVEMultiVectorResult

That said, if Call is not a multi-vector builtin then it just returns the result value. So perhaps this is better named FormSVEBuiltinResult() ?

9835

Can you add a doxygen comment to this function describing what it does?

9838–9840

Can you implement this with an early exit, e.g.

auto *StructTy = dyn_cast<StructType>(Call->getType());
if (!StructTy)
  return Call;

auto *VTy = dyn_cast<ScalableVectorType>(StructTy->getTypeAtIndex(0U));
if (!VTy)
  return Call;

...
clang/utils/TableGen/SveEmitter.cpp
864

nit: "is never a type in itself" ?

Matt added a subscriber: Matt.May 23 2023, 3:15 PM
CarolineConcatto marked 2 inline comments as done.

Add doxygen comments to FormSVEBuiltinResult function

CarolineConcatto marked an inline comment as done.May 25 2023, 3:01 AM
hassnaa-arm accepted this revision.May 31 2023, 2:38 AM
This revision is now accepted and ready to land.May 31 2023, 2:38 AM
This revision was automatically updated to reflect the committed changes.