[PATCH] D156109: [AArch64][SME] Create new interface for isFullSVEAvailable.
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 30 01:47:50 PDT 2023
sdesmalen marked an inline comment as done.
sdesmalen added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64Subtarget.cpp:495-496
+ // function attributes.
+ if (ForceStreamingCompatibleSVE.getNumOccurrences() > 0)
+ return !ForceStreamingCompatibleSVE;
+
----------------
MattDevereau wrote:
> Using just `if (ForceStreamingCompatibleSVE)` is passing check-llvm for me, so either this can be simplified or a test is missing.
>
> If a test is missing, this check is copy/pasted from `isNeonAvailable` above. We can separate this into a new function such as
>
> ```
> bool AArch64Subtarget::isForceStreamingCompatibleSVE() const{
> return ForceStreamingCompatibleSVE.getNumOccurrences() > 0;
> }
> ```
> Then we can simplify things to
> ```
> bool AArch64Subtarget::isFullSVEAvailable() const{
> return hasSVEorSME() && !StreamingSVEMode && !StreamingCompatibleSVEMode && !isForceStreamingCompatibleSVE();
> }
> ```
> And provide a nice check from the subtarget.
>
> If `ForceStreamingCompatibleSVE.getNumOccurrences() > 0;` and `ForceStreamingCompatibleSVE` are equivalent then you can just do
>
> `return hasSVEorSME() && !StreamingSVEMode && !StreamingCompatibleSVEMode && !ForceStreamingCompatibleSVEMode;`
You're right, in this case they are equivalent.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156109/new/
https://reviews.llvm.org/D156109
More information about the llvm-commits
mailing list