This is an archive of the discontinued LLVM Phabricator instance.

[Clang][SVE2p1] Add svpsel builtins

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



As described in:

Patch by : Sander de Smalen<>

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

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 ?


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() ==


how is the parameter type considered as aarch64.svcount ?


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

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


I understood that part, please ignore my comment.


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

-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


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.