[PATCH] D159188: [AArch64][SME] Make the overloaded svreinterpret_* functions streaming-compatible.

2023-09-04 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG916415b83732: [AArch64][SME] Make the overloaded svreinterpret_* functions streaming… (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D159188: [AArch64][SME] Make the overloaded svreinterpret_* functions streaming-compatible.

2023-09-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Attr.td:418 def TargetARM : TargetArch<["arm", "thumb", "armeb", "thumbeb"]>; -def TargetAArch64 : TargetArch<["aarch64"]>; +def TargetAArch64 : TargetArch<["aarch64", "aarch64_be"]>; def TargetAnyArm :

[PATCH] D159188: [AArch64][SME] Make the overloaded svreinterpret_* functions streaming-compatible.

2023-09-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 555402. sdesmalen marked an inline comment as done. sdesmalen added a comment. Added "aarch64_32" to TargetAArch64. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159188/new/ https://reviews.llvm.org/D159188

[PATCH] D159188: [AArch64][SME] Make the overloaded svreinterpret_* functions streaming-compatible.

2023-08-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: david-arm, paulwalker-arm. Herald added a subscriber: kristof.beyls. Herald added a reviewer: aaron.ballman. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D137556: [POC] Clang implementation for AArch64 SME and SME2 builtins

2023-08-29 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 554399. sdesmalen added a comment. Herald added a subscriber: qcolombet. The latest patch contains a number of fixes and has been rebased to a more recent commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158522: [NFC][CLANG] Fix static analyzer bugs about large copy by values

2023-08-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. It indeed makes sense to pass these by reference. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158522/new/

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-09 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. sdesmalen marked 4 inline comments as done. Closed by commit rG453c30e9e633: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions. (authored by

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-09 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGecb7b9c5c589: [Clang][AArch64] Diagnostics for SME attributes when target doesnt have sme (authored by sdesmalen). Repository: rG LLVM Github

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 548526. sdesmalen added a comment. Updated LLVM MC tests which were failing because smstart/smstop are no longer predicated by 'sme'. Sorry, I only just noticed that I hadn't run all the tests yet. @paulwalker-arm could you give this another look?

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs-without-target-feature.cpp:13-17 +__attribute__((target("sme"))) void streaming_compatible_def_sme_attr() __arm_streaming_compatible {} // OK +__attribute__((target("sme"))) void

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 548168. sdesmalen marked 10 inline comments as done. sdesmalen added a comment. Address further review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157269/new/ https://reviews.llvm.org/D157269

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 548131. sdesmalen added a comment. Added test-cases for indirect calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157270/new/ https://reviews.llvm.org/D157270 Files:

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 548130. sdesmalen added a comment. - (Clang) Added test-cases for indirect calls. - (LLVM) Moved the pseudo definition out of the 'let Predicates = [HasSME] {}' block as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs.c:181 +void non_za_definition(void) { + sme_arm_new_za(); // OK rsandifo-arm wrote: > sdesmalen wrote: > > rsandifo-arm wrote: > > > sdesmalen wrote: > > > > rsandifo-arm

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-08 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG28b5f3087a3f: [Clang][AArch64] Add/implement ACLE keywords for SME. (authored by sdesmalen). Changed prior to commit:

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs.c:181 +void non_za_definition(void) { + sme_arm_new_za(); // OK rsandifo-arm wrote: > sdesmalen wrote: > > rsandifo-arm wrote: > > > Would be good to have some tests for

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 547936. sdesmalen marked an inline comment as done. sdesmalen added a comment. - Replaced `|=` into normal assignment `=` - Added test for global initializer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a subscriber: paulwalker-arm. sdesmalen added a comment. Thanks for the review of the Clang side @aaron.ballman and @rsandifo-arm. @paulwalker-arm would you be happy to have a look at the LLVM side of this patch? Comment at:

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 547933. sdesmalen marked 2 inline comments as done. sdesmalen added a comment. Removed double error message for missing 'sme' for both ZA and Streaming Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs.c:181 +void non_za_definition(void) { + sme_arm_new_za(); // OK rsandifo-arm wrote: > Would be good to have some tests for indirect function calls too (via > function

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 547782. sdesmalen marked 4 inline comments as done. sdesmalen added a comment. - Renamed `sme` to `'sme'` to make it clear that it relates to the target feature - Split `function executed in streaming-SVE mode or using ZA state, requires sme` into: -

[PATCH] D152141: [Clang] Make __arm_streaming apply only to prototyped functions.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4d3e91783938: [Clang] Make __arm_streaming apply only to prototyped functions. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D128256: [Clang][AArch64] Limit arm_locally_streaming to function definitions only.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen abandoned this revision. sdesmalen added a comment. This patch can be abandoned, since this is now properly implemented in D127762 as a declaration attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: rsandifo-arm, aaron.ballman. Herald added a subscriber: kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The caller is

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: rsandifo-arm, aaron.ballman. Herald added subscribers: ctetreau, hiraditya, kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers:

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 547696. sdesmalen added a comment. Added `enum AArch64SMECallConversionKind` to make it explicit when calling `IsInvalidSMECallConversion` whether or not 'preserves_za' can be dropped (e.g. in assignment), can be added (e.g. when overriding a parent method)

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks both for the detailed review and latest round of comments, I've tried to address them all. Comment at: clang/include/clang/AST/Type.h:3987 /// [implimits] 8 bits would be enough here. -uint16_t NumExceptionType = 0; +uint16_t

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 546479. sdesmalen marked 19 inline comments as done. sdesmalen added a comment. - The attributes no longer require +sme to be passed. - Fixed IsInvalidSMECallConversion to consider the correct To/From types and added a corresponding test for the virtual

[PATCH] D152141: [Clang] Make __arm_streaming apply only to prototyped functions.

2023-08-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 546465. sdesmalen added a comment. Remove changes that limited the attribute from being valid only when compiled with '+sme'. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152141/new/

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-26 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG907fb338a2df: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics (authored by sdesmalen). Repository: rG LLVM Github Monorepo

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-25 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sme.td:254 [IsStreaming, IsSharedZA], - [ImmCheck<0, ImmCheck0_3>]>; + [ImmCheck<0, ImmCheck0_0>]>; }

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-25 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 543841. sdesmalen added a comment. Replace by ImmCheck0_7. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156128/new/ https://reviews.llvm.org/D156128 Files: clang/include/clang/Basic/arm_sme.td

[PATCH] D156121: [Clang][AArch64] svldr_vnum/svstr_vnum should use cntsb iso vscale for the offset

2023-07-24 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa8cbd27d1f23: [Clang][AArch64] svldr_vnum/svstr_vnum should use cntsb iso vscale for the… (authored by sdesmalen). Repository: rG LLVM Github

[PATCH] D156128: [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added a reviewer: bryanpkc. Herald added a subscriber: kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D156121: [Clang][AArch64] svldr_vnum/svstr_vnum should use cntsb iso vscale for the offset

2023-07-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: bryanpkc, CarolineConcatto, dtemirbulatov. Herald added subscribers: ctetreau, kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D156115: [Clang][SVE] Permit specific predicate-as-counter registers in inline assembly

2023-07-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-inline-asm.c:3 +// RUN: -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK void test_sve_asm(void) { Could you also add a RUN line that compiles this to asm, just to make sure

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-07-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Gentle ping @aaron.ballman and @erichkeane. I've addressed all comments and suggestions and believe we found agreement on the approach (to use a keyword instead of an attribute). Are you happy to accept the patch? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D134678: [Clang][AArch64][SME] Add intrinsics for ZA array load/store (LDR/STR)

2023-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. Thanks for the quick fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134678/new/ https://reviews.llvm.org/D134678

[PATCH] D128648: [Clang][AArch64][SME] Add vector read/write (mova) intrinsics

2023-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128648/new/ https://reviews.llvm.org/D128648 ___ cfe-commits mailing list

[PATCH] D134678: [Clang][AArch64][SME] Add intrinsics for ZA array load/store (LDR/STR)

2023-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_str.c:24 +// CHECK-NEXT:[[TMP0:%.*]] = getelementptr i8, ptr [[PTR:%.*]], i64 [[MULVL]] +// CHECK-NEXT:tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr

[PATCH] D134677: [Clang][AArch64][SME] Add ZA zeroing intrinsics

2023-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134677/new/ https://reviews.llvm.org/D134677 ___ cfe-commits mailing list

[PATCH] D128648: [Clang][AArch64][SME] Add vector read/write (mova) intrinsics

2023-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. Patch LGTM, thanks. Just a note that you'll need to remove the trailing `__arm_streaming` attribute from `acle_sme_read.c` in order to be able to land the patch without causing test failures. Comment at:

[PATCH] D142702: [Clang][AArch64][SME] Generate target features from +(no)sme.* options

2023-07-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:87-90 +if (Feature == "sme") { + Features.push_back("+sve"); + Features.push_back("+sve2"); + Features.push_back("+bf16"); SME shouldn't require SVE or

[PATCH] D134677: [Clang][AArch64][SME] Add ZA zeroing intrinsics

2023-07-03 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Other than my comment on the test, the patch looks good to me. Comment at: clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_zero.c:20 +// +ARM_SHARED_ZA_ATTR void test_svzero_mask_za() { + svzero_mask_za(0); The new keyword

[PATCH] D128648: [Clang][AArch64][SME] Add vector read/write (mova) intrinsics

2023-07-03 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_read.c:13 +#else +#define ARM_STREAMING_ATTR __attribute__((arm_streaming)) +#endif The spelling has recently changed to the `__arm_streaming`. Also with the new

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3940 +/// on declarations and function pointers. +unsigned AArch64SMEAttributes : 8; + erichkeane wrote: > sdesmalen wrote: > > erichkeane wrote: > > > sdesmalen wrote: > > > >

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 536260. sdesmalen marked 11 inline comments as done. sdesmalen added a comment. Updated patch: - Addressed review comments (clarified documentation, minor refactoring) - Added new tests (codegen + sema tests to make sure attributes are propagated to types

[PATCH] D137556: [POC] Clang implementation for AArch64 SME and SME2 builtins

2023-06-29 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 535645. sdesmalen retitled this revision from "[POC] Clang implementation for AArch64 SME and some SME2 builtins" to "[POC] Clang implementation for AArch64 SME and SME2 builtins". sdesmalen edited the summary of this revision. sdesmalen added a comment.

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-06 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7013a751f170: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134677: [Clang][AArch64][SME] Add ZA zeroing intrinsics

2023-06-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9921-9922 return EmitSMEReadWrite(TypeFlags, Ops, Builtin->LLVMIntrinsic); + else if (TypeFlags.isZero()) +return EmitSMEZero(TypeFlags, Ops, Builtin->LLVMIntrinsic); Given

[PATCH] D128648: [Clang][AArch64][SME] Add vector read/write (mova) intrinsics

2023-06-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Other than the two nits, the patch looks good. Thanks. Comment at: clang/include/clang/Basic/arm_sme.td:82 +def NAME # _H : SInst<"svread_hor_" # n_suffix # "[_{d}]", "ddPimi", t, MergeOp1, + "aarch64_sme_read" #

[PATCH] D152197: [NFC][CLANG] Fix static analyzer bugs with null pointer dereferences in CheckSizelessVectorOperands()

2023-06-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:9 if ((OperationKind == ACK_Arithmetic) && ((LHSBuiltinTy && LHSBuiltinTy->isSVEBool()) || (RHSBuiltinTy && RHSBuiltinTy->isSVEBool( { This doesn't seem like a

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/AST/Type.cpp:3374 auto = *getTrailingObjects(); -ExtraBits.NumExceptionType = epi.ExceptionSpec.Exceptions.size(); +auto NumExceptions = epi.ExceptionSpec.Exceptions.size(); +assert(NumExceptions <=

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 528433. sdesmalen added a comment. Use size_t instead of auto. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152140/new/ https://reviews.llvm.org/D152140 Files: clang/include/clang/AST/Type.h

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3956 /// [implimits] 8 bits would be enough here. -unsigned NumExceptionType = 0; +unsigned NumExceptionType : 16; + erichkeane wrote: > sdesmalen wrote: > > erichkeane

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 528431. sdesmalen added a comment. Use uint16_t instead of unsigned bitfield. Also removed accessor methods in favour of assert at point of writing NumExceptionType. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3956 /// [implimits] 8 bits would be enough here. -unsigned NumExceptionType = 0; +unsigned NumExceptionType : 16; + erichkeane wrote: > tbaeder wrote: > > Isn't using a

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added a comment. In D127762#4395509 , @erichkeane wrote: > We ended up getting the regular-attribute-like-keywords patch in a different > form. Do we still want to do this as is? Does it need

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 4 inline comments as done. sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3940 +/// on declarations and function pointers. +unsigned AArch64SMEAttributes : 8; + erichkeane wrote: > sdesmalen wrote: > >

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 528376. sdesmalen marked 15 inline comments as done. sdesmalen added a comment. - Use only 6 bits for AArch64SMEAttributes to reduce the size of ExtProtoInfo. - Added test for implicit instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D152142: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen abandoned this revision. sdesmalen added a comment. Accidentally created a duplicate, I was meant to update D127762 , so abandoning this patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152142/new/

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 528366. sdesmalen retitled this revision from "[Clang][AArch64] Add ACLE attributes for SME." to "[Clang][AArch64] Add/implement ACLE keywords for SME.". sdesmalen edited the summary of this revision. sdesmalen added a comment. - Rebased patch after patch

[PATCH] D152142: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: jdoerfert, kristof.beyls. Herald added a reviewer: aaron.ballman. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds all the

[PATCH] D152141: [Clang] Make __arm_streaming apply only to prototyped functions.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added a reviewer: rsandifo-arm. Herald added subscribers: jdoerfert, kristof.beyls. Herald added a reviewer: aaron.ballman. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D152140: [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: erichkeane, aaron.ballman. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In https://reviews.llvm.org/D127762#4102578 @erichkeane suggested

[PATCH] D150953: [Clang][SVE2.1] Add clang support for prototypes using svcount_t

2023-05-31 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:56 // P: boolean +// Qa: svcount // U: unsigned The typespec modifier in this file can remain `Q` rather than `Qa`. Can you change it back? Repository: rG LLVM Github

[PATCH] D150953: [Clang][SVE2.1] Add clang support for prototypes using svcount_t

2023-05-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:42 // q -> Scalable vector, followed by the number of elements and the base type. +// Q -> AArch64 svcount_t builtin type. // E -> ext_vector, followed by the number of elements and the base

[PATCH] D151081: [Clang][SVE2.1] Add svpext builtins

2023-05-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:64 +// 2,3,4: array of vectors +// .: indicator for multi-vector modifier that will follow(eg.:2.x) // v: void `s/follow(eg.:2.x)/follow (e.g. 2.x)/` Comment

[PATCH] D150953: [Clang][SVE2.1] Add clang support for prototypes using svcount_t

2023-05-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:42 // q -> Scalable vector, followed by the number of elements and the base type. +// Q -> AArch64 svcount_t builtin type. // E -> ext_vector, followed by the number of elements and the base

[PATCH] D127910: [Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

2023-05-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. Thanks @bryanpkc this patch looks good to me now. I'll make some time to review the other patches in the series as well after you update them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D150863: [CLANG][AArch64][SVE2.1] Add UCLAMP/SCLAMP/FCLAMP function prototypes

2023-05-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM with nit addressed Comment at: clang/include/clang/Basic/arm_sve.td:2113 +let TargetGuard = "sve2p1" in { + def SVSCLAMP : SInst<"svclamp[_{d}]", "",

[PATCH] D127910: [Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

2023-05-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:726 -if (Feature == "+sme") { - HasSME = true; Why did you remove this? Comment at: clang/test/CodeGen/aarch64-sme-intrinsics/acle_sme_ld1.c:16 +//

[PATCH] D150140: [NFC][CLANG] Fix Static Code Analysis Concerns

2023-05-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:302 unsigned Shift = llvm::countr_zero(Mask); + assert(Shift >= 64 && "Shift is out of encodable range"); return (V << Shift) & Mask; erichkeane wrote: >

[PATCH] D150140: [NFC][CLANG] Fix Static Code Analysis Concerns

2023-05-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:302 unsigned Shift = llvm::countr_zero(Mask); + assert(Shift >= 64 && "Shift is out of encodable range"); return (V << Shift) & Mask; erichkeane wrote: >

[PATCH] D148822: [clang][BFloat] Avoid redefining bfloat16_t in arm_neon.h

2023-05-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. I agree it makes sense to remove the typedef if they are also defined in `arm_bf16.h`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D146146: [Clang] Stop demoting ElementCount/TypeSize conversion errors to warnings.

2023-03-15 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. It gives me great joy to see this code removed :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146146/new/ https://reviews.llvm.org/D146146

[PATCH] D136864: [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t.

2023-03-07 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG07158c54add9: [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D136864: [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t.

2023-03-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 502649. sdesmalen added a comment. - Added assert to check that NumVectors=1 for svcount_t. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136864/new/ https://reviews.llvm.org/D136864 Files:

[PATCH] D127910: [Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

2023-02-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:332 + # Generate arm_sme.h + clang_generate_header(-gen-arm-sme-header arm_sme.td arm_sme.h) # Generate arm_bf16.h bryanpkc wrote: > bryanpkc wrote: > > sdesmalen wrote: > > > The

[PATCH] D136864: [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t.

2023-02-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 496103. sdesmalen added a comment. Rebased patch to use target("aarch64.svcount") Changed debug info for svcount to only print the first 2 bytes (rather than vscale x 2 bytes) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D127910: [Clang][AArch64][SME] Add vector load/store (ld1/st1) intrinsics

2023-02-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Headers/CMakeLists.txt:332 + # Generate arm_sme.h + clang_generate_header(-gen-arm-sme-header arm_sme.td arm_sme.h) # Generate arm_bf16.h The ACLE specification is still in a draft (ALP) state, which

[PATCH] D141939: [SVE][Builtins] Lower X forms of binop arithmetic builtins to dedicated intrinsics.

2023-02-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM. Feel free to ignore the nit if you think the explicit `x_intrinsic` is better. Comment at: clang/include/clang/Basic/arm_sve.td:762 -multiclass SInstZPZZ

[PATCH] D141240: [SVE][Builtins] Add metadata to intrinsic calls for builtins that don't define the result of inactive lanes.

2023-01-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Using metadata seems sensible, but did you also identify any downsides? I could imagine that we'd need to manually propagate metadata to any nodes after we do a combine (which can't be blindly copied?), e.g. add + mul -> mla, this new intrinsic would also need the

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-12-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 482440. sdesmalen added a comment. Changed arm_new_za to be a declaration attribute instead of a type attribute (this was something that @rsandifo-arm pointed out to me recently) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D138788: [SVE] Change some bfloat lane intrinsics to use i32 immediates

2022-11-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsAArch64.td:2527 -def int_aarch64_sve_bfdot_lane : SVE_4Vec_BF16_Indexed; -def int_aarch64_sve_bfmlalb_lane : SVE_4Vec_BF16_Indexed; -def int_aarch64_sve_bfmlalt_lane : SVE_4Vec_BF16_Indexed; +def

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3940 +/// on declarations and function pointers. +unsigned AArch64SMEAttributes : 8; + erichkeane wrote: > sdesmalen wrote: > > erichkeane wrote: > > > We seem to be missing all

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 477116. sdesmalen marked 10 inline comments as done. sdesmalen added a comment. Addressed review comments. These include: - Allow dropping the arm_preserves_za attribute. - Added tests for serializing/deserializing the AST. - Changed descriptions in

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-15 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/Type.h:3940 +/// on declarations and function pointers. +unsigned AArch64SMEAttributes : 8; + erichkeane wrote: > We seem to be missing all of the modules-storage code for these. Since

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Gentle ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127762/new/ https://reviews.llvm.org/D127762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D137556: [POC] Clang implementation for AArch64 SME and some SME2 builtins

2022-11-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: ecnelises, jdoerfert, mgrang, hiraditya, kristof.beyls. Herald added a reviewer: aaron.ballman. Herald added a project: All. sdesmalen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers:

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-10-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a subscriber: rsandifo-arm. sdesmalen added a comment. The past few months we've worked to get the attributes at the LLVM IR side implemented. Since that work has now landed, this patch should no longer be held up by the LLVM side of things. @aaron.ballman I've updated and

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-10-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 471515. sdesmalen marked 9 inline comments as done. sdesmalen edited the summary of this revision. sdesmalen added a comment. - Rebased patch - Use `InheritableAttr` for the `ArmLocallyStreaming` attribute instead of `DeclOrTypeAttr` - Added test-case to

[PATCH] D136864: [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t.

2022-10-27 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: kristof.beyls, tschuett. Herald added a project: All. sdesmalen requested review of this revision. Herald added subscribers: cfe-commits, alextsao1999. Herald added a project: clang. This patch adds the builtin type __SVCount_t to Clang,

[PATCH] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM, thanks @CarolineConcatto. Please land D132137 before landing this one to avoid regressions on combines that previously worked on svget/svset.

[PATCH] D131687: [Clang]Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM with nit addressed, thanks @CarolineConcatto! Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8866 + Value *Call = Builder.CreateCall(F, {Predicate, BasePtr}); +

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-18 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Can you also split this patch in two: - One for Clang where it will no longer use the legacy ld2/3/4 intrinsics - One for LLVM where it removes the old intrinsics and AutoUpgrades the old intrinsics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-18 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for addressing the comments @CarolineConcatto! In D131547#3731310 , @dmgreen wrote: >> Is there a formal requirement that LLVM must remain backward compatible with >> older LLVM IR (beyond the target-independent

[PATCH] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D131547#3728867 , @dmgreen wrote: > In D131547#3728842 , @sdesmalen > wrote: > >> In D131547#3723083 , @dmgreen >> wrote: >> >>> I think

[PATCH] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D131547#3723083 , @dmgreen wrote: > I think we usually try to do the same, if the intrinsics have been in > released compilers. There is an example in > https://reviews.llvm.org/D98487#change-tOTTgECYYAO5, hopefully these

[PATCH] D131687: [AArch64] Replace aarch64_sve_ldN intrinsic by aarch64_sve_ldN.sret

2022-08-15 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-calling-convention-mixed.ll:127 ; CHECK-NEXT:ptrue p0.d -; CHECK-NEXT:st1d { z16.d }, p0, [sp] -; CHECK-NEXT:st1d { z17.d }, p0, [sp, #1, mul vl] -; CHECK-NEXT:st1d { z18.d }, p0, [sp,

  1   2   3   4   5   >