This is an archive of the discontinued LLVM Phabricator instance.

[Clang][SVE2p1] Add svpsel builtins
ClosedPublic

Authored by CarolineConcatto on May 23 2023, 3:32 AM.

Details

Summary

As described in: https://github.com/ARM-software/acle/pull/257

Patch by : Sander de Smalen<sander.desmalen@arm.com>

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 3:32 AM
CarolineConcatto requested review of this revision.May 23 2023, 3:32 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2023, 3:32 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Matt added a subscriber: Matt.May 23 2023, 3:16 PM
CarolineConcatto added a subscriber: sdesmalen.
hassnaa-arm added inline comments.Jun 8 2023, 10:18 AM
clang/include/clang/Basic/arm_sve.td
1869

In the section of prototype modifiers: "}}Pmi"
According to the used modifiers, I see that they refer to 4 parameters, while in the testing file I see the function takes 3 parameters only.
Isn't that 'i' modifier extra ?
The same case for all the builtins.
Am I correct ?

clang/lib/CodeGen/CGBuiltin.cpp
10018–10020

for the case of sve::BI__builtin_sve_svpsel_lane_b8,
what is the expected value of IsSVCount ? and how the assertion statement didn't assert for the check of :
(cast<TargetExtType>(Ops[0]->getType())->getName() ==

"aarch64.svcount"))

how is the parameter type considered as aarch64.svcount ?

10027

Isn't the type of 'SVCountTy' = 'aarch64.svcount' as a result of the statement at line 9637 ?
So why do we need to aarch64_sve_convert_from_svbool while it's not svbool.
Am I missing something ?

hassnaa-arm added inline comments.Jun 9 2023, 5:30 AM
clang/lib/CodeGen/CGBuiltin.cpp
10018–10020

Hi Carol,
I understood that part, ignore my comment.

10027

I understood that part, please ignore my comment.

clang/include/clang/Basic/arm_sve.td
1869

It looks we have a change in the way we use slice. Now the base and offset are only 1 parameter.
So this prototype has changed.
I will update this patch
See https://github.com/ARM-software/acle/pull/217/files

-Remove immediate+base from psel and rebase

kmclaughlin accepted this revision.Oct 18 2023, 3:37 AM
kmclaughlin added a subscriber: kmclaughlin.

Thank you for updating this @CarolineConcatto, LGTM

clang/include/clang/Basic/arm_sve.td
1885

nit: extra whitespace

This revision is now accepted and ready to land.Oct 18 2023, 3:37 AM
CarolineConcatto marked an inline comment as done.Oct 18 2023, 5:39 AM
This revision was automatically updated to reflect the committed changes.