[clang] [clang] Add missing streaming attributes to SVE builtins (PR #79134)

2024-01-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/79134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add diagnostics for builtins that use ZT0. (PR #79140)

2024-01-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/79140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [AArch64] Replace LLVM IR function attributes for PSTATE.ZA. (PR #79166)

2024-01-23 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/79166 Since https://github.com/ARM-software/acle/pull/276 the ACLE defines attributes to better describe the use of a given SME state. Previously the attributes merely described the possibility of it being 'shar

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-27 Thread Sander de Smalen via cfe-commits
@@ -263,3 +263,38 @@ multiclass ZAFPOuterProd { defm SVMOPA : ZAFPOuterProd<"mopa">; defm SVMOPS : ZAFPOuterProd<"mops">; + + +// SME2 - ADD, SUB + +multiclass ZAAddSub { sdesmalen

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-27 Thread Sander de Smalen via cfe-commits
@@ -10266,35 +10288,13 @@ Value *CodeGenFunction::EmitAArch64SVEBuiltinExpr(unsigned BuiltinID, Value *CodeGenFunction::EmitAArch64SMEBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { - // Find out if any arguments are req

[clang] [Clang][SME2] Add multi-vector add/sub builtins (PR #69725)

2023-10-27 Thread Sander de Smalen via cfe-commits
@@ -9571,22 +9571,17 @@ Value *CodeGenFunction::EmitSVEStructStore(const SVETypeFlags &TypeFlags, Value *BasePtr = Ops[1]; // Does the store have an offset? - if (Ops.size() > 3) + if (Ops.size() > (2 + N)) sdesmalen-arm wrote: `EmitSVEStructStore` doe

[clang] 0353848 - [Clang][SVE] NFC: Move info about ACLE types into separate function.

2020-08-19 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-08-19T11:04:20+01:00 New Revision: 0353848cc94f0fc23a953f8f420be7ee3342c8dc URL: https://github.com/llvm/llvm-project/commit/0353848cc94f0fc23a953f8f420be7ee3342c8dc DIFF: https://github.com/llvm/llvm-project/commit/0353848cc94f0fc23a953f8f420be7ee3342c8dc.di

[clang] 4e9b66d - [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-27 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-08-27T10:56:42+01:00 New Revision: 4e9b66de3f046c1e97b34c938b0920fa6401f40c URL: https://github.com/llvm/llvm-project/commit/4e9b66de3f046c1e97b34c938b0920fa6401f40c DIFF: https://github.com/llvm/llvm-project/commit/4e9b66de3f046c1e97b34c938b0920fa6401f40c.di

[clang] 3ec78d9 - [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.

2022-06-01 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2022-06-01T12:40:33+02:00 New Revision: 3ec78d9ff1b3f430dab27434fe8f9a3790d08808 URL: https://github.com/llvm/llvm-project/commit/3ec78d9ff1b3f430dab27434fe8f9a3790d08808 DIFF: https://github.com/llvm/llvm-project/commit/3ec78d9ff1b3f430dab27434fe8f9a3790d08808.di

[clang] a8cbd27 - [Clang][AArch64] svldr_vnum/svstr_vnum should use cntsb iso vscale for the offset

2023-07-24 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-07-24T14:29:45Z New Revision: a8cbd27d1f238e104a5d5ca345d93bc1f4d4ab1f URL: https://github.com/llvm/llvm-project/commit/a8cbd27d1f238e104a5d5ca345d93bc1f4d4ab1f DIFF: https://github.com/llvm/llvm-project/commit/a8cbd27d1f238e104a5d5ca345d93bc1f4d4ab1f.diff L

[clang] 907fb33 - [Clang][AArch64] Fix up immediate range of f64f64 mopa/mops intrinsics

2023-07-26 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-07-26T07:13:18Z New Revision: 907fb338a2df8fe0f41ddace487b05661ecdc6aa URL: https://github.com/llvm/llvm-project/commit/907fb338a2df8fe0f41ddace487b05661ecdc6aa DIFF: https://github.com/llvm/llvm-project/commit/907fb338a2df8fe0f41ddace487b05661ecdc6aa.diff L

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/68565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -9665,18 +9665,34 @@ Value *CodeGenFunction::EmitSMEZero(const SVETypeFlags &TypeFlags, Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, SmallVectorImpl &Ops, unsigned IntID) { -

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -44,10 +44,9 @@ defm SVLD1_ZA32 : ZALoad<"za32", "i", "aarch64_sme_ld1w", [ImmCheck<0, ImmCheck0 defm SVLD1_ZA64 : ZALoad<"za64", "l", "aarch64_sme_ld1d", [ImmCheck<0, ImmCheck0_7>]>; defm SVLD1_ZA128 : ZALoad<"za128", "q", "aarch64_sme_ld1q", [ImmCheck<0, ImmCheck0_15>]>;

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
@@ -2680,9 +2680,9 @@ let TargetPrefix = "aarch64" in { // Spill + fill def int_aarch64_sme_ldr : DefaultAttrsIntrinsic< -[], [llvm_i32_ty, llvm_ptr_ty]>; +[], [llvm_i32_ty, llvm_i32_ty, llvm_ptr_ty], [ImmArg>]>; sdesmalen-arm wrote: Is it easier

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-10 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: The changes to the LLVM IR intrinsics are to better utilise the reg+imm form of the instructions, but they aren't required to remove the immediate-argument restriction for svldr/svstr. I think it would be better to split the PR into two PRs: * One pa

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68908)

2023-10-13 Thread Sander de Smalen via cfe-commits
@@ -9716,13 +9716,16 @@ Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, if (Ops.size() == 3) { Function *Cntsb = CGM.getIntrinsic(Intrinsic::aarch64_sme_cntsb); llvm::Value *CntsbCall = Builder.CreateCall(Cntsb, {}, "svlb"); -llvm::Value *Mul

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68908)

2023-10-17 Thread Sander de Smalen via cfe-commits
@@ -38,3 +38,18 @@ void test_svstr_vnum_za_1(uint32_t slice_base, void *ptr) { void test_svstr_za(uint32_t slice_base, void *ptr) { svstr_za(slice_base, ptr); } + +// CHECK-C-LABEL: @test_svstr_vnum_za_var( +// CHECK-CXX-LABEL: @_Z22test_svstr_vnum_za_varjPvm( +// CHECK-NEXT:

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68908)

2023-10-17 Thread Sander de Smalen via cfe-commits
@@ -9716,13 +9711,17 @@ Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, if (Ops.size() == 3) { Function *Cntsb = CGM.getIntrinsic(Intrinsic::aarch64_sme_cntsb); llvm::Value *CntsbCall = Builder.CreateCall(Cntsb, {}, "svlb"); -llvm::Value *Mul

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68908)

2023-10-17 Thread Sander de Smalen via cfe-commits
@@ -34,6 +34,22 @@ void test_svldr_vnum_za_1(uint32_t slice_base, const void *ptr) { // CHECK-NEXT: entry: // CHECK-NEXT:tail call void @llvm.aarch64.sme.ldr(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]]) // CHECK-NEXT:ret void +// void test_svldr_za(uint32_t slice_base,

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68908)

2023-10-17 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM, thanks. https://github.com/llvm/llvm-project/pull/68908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SVE ACLE] Allow default zero initialisation for svcount_t. (PR #69321)

2023-10-18 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/69321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4d3e917 - [Clang] Make __arm_streaming apply only to prototyped functions.

2023-08-07 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-08-07T11:31:44Z New Revision: 4d3e91783938291cc53880a0e6c0689b8f2b2970 URL: https://github.com/llvm/llvm-project/commit/4d3e91783938291cc53880a0e6c0689b8f2b2970 DIFF: https://github.com/llvm/llvm-project/commit/4d3e91783938291cc53880a0e6c0689b8f2b2970.diff L

[clang] 28b5f30 - [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-08 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-08-08T07:00:59Z New Revision: 28b5f3087a3fcd39c80e2b1470a950da17e4cd08 URL: https://github.com/llvm/llvm-project/commit/28b5f3087a3fcd39c80e2b1470a950da17e4cd08 DIFF: https://github.com/llvm/llvm-project/commit/28b5f3087a3fcd39c80e2b1470a950da17e4cd08.diff L

[clang] ecb7b9c - [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-09 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-08-09T12:31:02Z New Revision: ecb7b9c5c589b693e8a7351461db5b520be0bc90 URL: https://github.com/llvm/llvm-project/commit/ecb7b9c5c589b693e8a7351461db5b520be0bc90 DIFF: https://github.com/llvm/llvm-project/commit/ecb7b9c5c589b693e8a7351461db5b520be0bc90.diff L

[clang] 453c30e - [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-09 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-08-09T12:37:41Z New Revision: 453c30e9e633f5b1e9bebed950592e3e51645a94 URL: https://github.com/llvm/llvm-project/commit/453c30e9e633f5b1e9bebed950592e3e51645a94 DIFF: https://github.com/llvm/llvm-project/commit/453c30e9e633f5b1e9bebed950592e3e51645a94.diff L

[clang] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM with nit addressed! https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
@@ -84,8 +76,8 @@ ARM_STREAMING_ATTR void test_svld1_hor_za64(uint32_t slice_base, svbool_t pg, co // ARM_STREAMING_ATTR void test_svld1_hor_za128(uint32_t slice_base, svbool_t pg, const void *ptr) { uint32_t slice = slice_base; - svld1_hor_za128(0, slice, pg, ptr); - svl

[libunwind] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM with nit addressed! https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
@@ -84,8 +76,8 @@ ARM_STREAMING_ATTR void test_svld1_hor_za64(uint32_t slice_base, svbool_t pg, co // ARM_STREAMING_ATTR void test_svld1_hor_za128(uint32_t slice_base, svbool_t pg, const void *ptr) { uint32_t slice = slice_base; - svld1_hor_za128(0, slice, pg, ptr); - svl

[clang-tools-extra] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. LGTM with nit addressed! https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/65582 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [AArch64][SME]Update intrinsic interface for ld1/st1 (PR #65582)

2023-09-13 Thread Sander de Smalen via cfe-commits
@@ -84,8 +76,8 @@ ARM_STREAMING_ATTR void test_svld1_hor_za64(uint32_t slice_base, svbool_t pg, co // ARM_STREAMING_ATTR void test_svld1_hor_za128(uint32_t slice_base, svbool_t pg, const void *ptr) { uint32_t slice = slice_base; - svld1_hor_za128(0, slice, pg, ptr); - svl

[clang] 916415b - [AArch64][SME] Make the overloaded svreinterpret_* functions streaming-compatible.

2023-09-04 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-09-04T10:15:26Z New Revision: 916415b83732332d15125dee6d7a4b55438c8d7b URL: https://github.com/llvm/llvm-project/commit/916415b83732332d15125dee6d7a4b55438c8d7b DIFF: https://github.com/llvm/llvm-project/commit/916415b83732332d15125dee6d7a4b55438c8d7b.diff L

[clang] 49b307e - [AArch64][SVE] CodeGen of ACLE Builtin Types

2020-02-19 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-02-19T12:10:47Z New Revision: 49b307e96d47a74e4aa8f60f3d493eac10849d4b URL: https://github.com/llvm/llvm-project/commit/49b307e96d47a74e4aa8f60f3d493eac10849d4b DIFF: https://github.com/llvm/llvm-project/commit/49b307e96d47a74e4aa8f60f3d493eac10849d4b.diff L

[clang] 5087ace - [Clang][SVE] Parse builtin type string for scalable vectors

2020-03-15 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-15T14:34:52Z New Revision: 5087ace65197471c07b78d16e3d599187c442cbf URL: https://github.com/llvm/llvm-project/commit/5087ace65197471c07b78d16e3d599187c442cbf DIFF: https://github.com/llvm/llvm-project/commit/5087ace65197471c07b78d16e3d599187c442cbf.diff L

[clang] 8b409ea - [SVE] Auto-generate builtins and header for svld1.

2020-03-16 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-16T10:52:37Z New Revision: 8b409eabaf755c88a7d652fe99d3ad858a4fe82a URL: https://github.com/llvm/llvm-project/commit/8b409eabaf755c88a7d652fe99d3ad858a4fe82a DIFF: https://github.com/llvm/llvm-project/commit/8b409eabaf755c88a7d652fe99d3ad858a4fe82a.diff L

[clang] 6ce537c - Revert "[SVE] Auto-generate builtins and header for svld1."

2020-03-16 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-16T15:22:15Z New Revision: 6ce537ccfcfc9262ecb8472f7f3c86285b7198fb URL: https://github.com/llvm/llvm-project/commit/6ce537ccfcfc9262ecb8472f7f3c86285b7198fb DIFF: https://github.com/llvm/llvm-project/commit/6ce537ccfcfc9262ecb8472f7f3c86285b7198fb.diff L

[clang] c5b8146 - Reland D75470 [SVE] Auto-generate builtins and header for svld1.

2020-03-18 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-18T11:16:28Z New Revision: c5b81466c2bcc194e5563f39f5be3638760b4849 URL: https://github.com/llvm/llvm-project/commit/c5b81466c2bcc194e5563f39f5be3638760b4849 DIFF: https://github.com/llvm/llvm-project/commit/c5b81466c2bcc194e5563f39f5be3638760b4849.diff L

[clang] 981f080 - [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-19 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-03-19T09:36:23Z New Revision: 981f0802b37597975606d2b5f5bbc25974c4c3df URL: https://github.com/llvm/llvm-project/commit/981f0802b37597975606d2b5f5bbc25974c4c3df DIFF: https://github.com/llvm/llvm-project/commit/981f0802b37597975606d2b5f5bbc25974c4c3df.diff L

[clang] 07158c5 - [Clang] Create opaque type for AArch64 SVE2p1/SME2 svcount_t.

2023-03-07 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-03-07T14:43:50Z New Revision: 07158c54add927057690aa8c073d35d42eac7006 URL: https://github.com/llvm/llvm-project/commit/07158c54add927057690aa8c073d35d42eac7006 DIFF: https://github.com/llvm/llvm-project/commit/07158c54add927057690aa8c073d35d42eac7006.diff L

[clang] 7013a75 - [Clang] Limit FunctionTypeExtraBitfields::NumExceptionType to 16 bits.

2023-06-06 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2023-06-06T12:07:43Z New Revision: 7013a751f170d829b35e7bb153d3334d144d5d54 URL: https://github.com/llvm/llvm-project/commit/7013a751f170d829b35e7bb153d3334d144d5d54 DIFF: https://github.com/llvm/llvm-project/commit/7013a751f170d829b35e7bb153d3334d144d5d54.diff L

r323956 - Reverting patch rL323952 due to build errors that I

2018-02-01 Thread Sander de Smalen via cfe-commits
Author: s.desmalen Date: Thu Feb 1 04:27:13 2018 New Revision: 323956 URL: http://llvm.org/viewvc/llvm-project?rev=323956&view=rev Log: Reverting patch rL323952 due to build errors that I haven't encountered in local builds. Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp cfe/trunk/lib/Cod

r323952 - [DebugInfo] Enable debug information for C99 VLA types

2018-02-01 Thread Sander de Smalen via cfe-commits
Author: s.desmalen Date: Thu Feb 1 03:25:10 2018 New Revision: 323952 URL: http://llvm.org/viewvc/llvm-project?rev=323952&view=rev Log: [DebugInfo] Enable debug information for C99 VLA types Summary: This patch enables debugging of C99 VLA types by generating more precise LLVM Debug metadata, us

r324173 - Recommit rL323952: [DebugInfo] Enable debug information for C99 VLA types.

2018-02-03 Thread Sander de Smalen via cfe-commits
Author: s.desmalen Date: Sat Feb 3 05:55:59 2018 New Revision: 324173 URL: http://llvm.org/viewvc/llvm-project?rev=324173&view=rev Log: Recommit rL323952: [DebugInfo] Enable debug information for C99 VLA types. Fixed build issue when building with g++-4.8 (specialization after instantiation).

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7517,34 +7517,37 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } auto *CallerFD = dyn_cast(CurContext); -if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && -!FD->getBuiltinID()) { +bool IsCalleeStreaming

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,14 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def warn_sme_streaming_pass_return_vl_to_

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & + FunctionType::SME_PStateSMEna

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if (NewFD->getReturnType()->isSiz

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void conflicting_state_attrs_preserves_inou

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if (NewFD->getReturnType()->isSiz

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12239,7 +12239,8 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (UsesSM) { sdesmalen-arm wrote: The comment on line 12232-12233 needs an update. https://github.com/llvm/llvm-project/pull/79842 ___

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & + FunctionType::SME_PStateSMEna

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-21 Thread Sander de Smalen via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -S -target-feature +sme -verify -DTEST_NONE -x c %s +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -S -target-feature +sme -verify -DTEST_COMPATIBLE -x c %s +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-21 Thread Sander de Smalen via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -S -target-feature +sme -verify -DTEST_NONE -x c %s sdesmalen-arm wrote: Doing `-x c` on a .c file is redundant, as it's already interpreted as a C source file. https://github.com/llvm/llvm-pr

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-21 Thread Sander de Smalen via cfe-commits
@@ -814,6 +820,43 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +static bool isStreaming(const FunctionDecl *F) { + if (F->hasAttr()) +return true; + if (const auto *T = F->getTy

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
@@ -814,6 +820,43 @@ Address AArch64ABIInfo::EmitMSVAArg(CodeGenFunction &CGF, Address VAListAddr, /*allowHigherAlign*/ false); } +static bool isStreaming(const FunctionDecl *F) { + if (F->hasAttr()) +return true; + if (const auto *T = F->getTy

[clang] [llvm] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/77936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Fix 'svzero_za' intrinsic to take no arguments. (PR #82648)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/82648 We previously defined svzero_za as: void svzero_za(); rather than: void svzero_za(void); Which meant that Clang accepted arguments. Compiling for example `svzero_za()` ended up with incorrect IR and

[clang] [Clang][AArch64] Add missing prototypes for streaming-compatible rout… (PR #82649)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/82649 …ines >From 6b75aabe4e098d5faef01cacb5b00e5b59231a3b Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Wed, 21 Feb 2024 12:23:21 + Subject: [PATCH] [Clang][AArch64] Add missing prototypes for stre

[clang] [Clang][AArch64] Add missing prototypes for streaming-compatible routines (PR #82649)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/82649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add missing prototypes for streaming-compatible routines (PR #82649)

2024-02-22 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/82649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][Clang][SVE] Refactor AArch64SVEACLETypes.def to enabled more uses. (PR #107599)

2024-09-10 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. Looks like a nice improvement to the code. https://github.com/llvm/llvm-project/pull/107599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [Clang][SVE] Change LLVM representation of ACLE tuple types to be struct based. (PR #108008)

2024-09-11 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. https://github.com/llvm/llvm-project/pull/108008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-11 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: > > The SME type attributes are not part of the name mangling > > If `int(&)() __arm_streaming` is a different type from `int(&)()` for > template instantiation, it should have different mangling. If it doesn't, > that's a bug. If there is no spec for the correct mangling,

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-12 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/88380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-12 Thread Sander de Smalen via cfe-commits
@@ -3756,12 +3756,11 @@ def err_sme_definition_using_za_in_non_sme_target : Error< def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; def warn_sme_streaming_pass_return_vl_to_non_streaming : Warning< - "passing a VL-dep

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-12 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: Left two nits, but otherwise looks good. https://github.com/llvm/llvm-project/pull/88380 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Extend diagnostics when warning non/streaming about … (PR #88380)

2024-04-12 Thread Sander de Smalen via cfe-commits
@@ -3756,12 +3756,11 @@ def err_sme_definition_using_za_in_non_sme_target : Error< def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; def warn_sme_streaming_pass_return_vl_to_non_streaming : Warning< - "passing a VL-dep

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-05 Thread Sander de Smalen via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { sdesmalen-arm wrote: @efriedma-quic I think the issue is that when we emit unwind info that is _not_

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. Some very minor nits, but overall LGTM. https://github.com/llvm/llvm-project/pull/83301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Sander de Smalen via cfe-commits
@@ -3062,7 +3131,68 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters( Size = 2; Alignment = Align(2); break; +case RegPairInfo::VG: + StrOpc = AArch64::STRXui; + Size = 8; + Alignment = Align(8); + break; +} + +unsigne

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Sander de Smalen via cfe-commits
@@ -3062,7 +3131,68 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters( Size = 2; Alignment = Align(2); break; +case RegPairInfo::VG: + StrOpc = AArch64::STRXui; + Size = 8; + Alignment = Align(8); + break; +} + +unsigne

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/83301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Sander de Smalen via cfe-commits
@@ -2995,7 +3062,9 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters( ArrayRef CSI, const TargetRegisterInfo *TRI) const { MachineFunction &MF = *MBB.getParent(); const TargetInstrInfo &TII = *MF.getSubtarget().getInstrInfo(); + AArch64FunctionInfo *AFI = MF.getI

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-14 Thread Sander de Smalen via cfe-commits
@@ -559,31 +559,86 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, - const FunctionDecl *FD, -

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-14 Thread Sander de Smalen via cfe-commits
@@ -622,7 +679,8 @@ bool SemaARM::CheckSMEBuiltinFunctionCall(unsigned BuiltinID, } if (BuiltinType) - checkArmStreamingBuiltin(SemaRef, TheCall, FD, *BuiltinType); + HasError |= checkArmStreamingBuiltin(SemaRef, TheCall, FD, *BuiltinType, s

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-14 Thread Sander de Smalen via cfe-commits
@@ -559,31 +559,86 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema &S, CallExpr *TheCall, - const FunctionDecl *FD, -

[clang] [AArch64] Extend SVE diagnostics. (PR #94976)

2024-06-14 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm approved this pull request. Thanks for fixing this, Clang shouldn't trigger an assertion failure. I also agree that changing the diagnostic location is an improvement. https://github.com/llvm/llvm-project/pull/94976 __

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-16 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/93802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. (PR #95982)

2024-06-18 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/95982 Depending on the platform, the parameter for __arm_get_sme_state requires a `unsigned long long*` instead of a `unsigned long*`. >From ASTContext.cpp: case 'W': // This modifier represents int64 typ

[clang] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. (PR #95982)

2024-06-18 Thread Sander de Smalen via cfe-commits
sdesmalen-arm wrote: I've tested this change locally, but wasn't sure how to write a test for it. https://github.com/llvm/llvm-project/pull/95982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. (PR #95982)

2024-06-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm updated https://github.com/llvm/llvm-project/pull/95982 >From a41a740d5e77303febbd4e0cb4d8def2010e32ed Mon Sep 17 00:00:00 2001 From: Sander de Smalen Date: Tue, 18 Jun 2024 16:04:08 + Subject: [PATCH 1/2] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_st

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-19 Thread Sander de Smalen via cfe-commits
@@ -286,10 +290,13 @@ let TargetGuard = "sve,f64mm,bf16" in { } let TargetGuard = "sve,bf16" in { + def SVBFMMLA : SInst<"svbfmmla[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmmla", [IsOverloadNone]>; +} + +let TargetGuard = "(sve,bf16)|sme" in { --

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-19 Thread Sander de Smalen via cfe-commits
@@ -2264,6 +2278,18 @@ let TargetGuard = "sve2p1" in { defm SVPMOV_TO_VEC_LANE_D : PMOV_TO_VEC<"svpmov", "lUl", "aarch64_sve_pmov_to_vector_lane" ,[], ImmCheck1_7>; } +let TargetGuard = "sve2p1|sme2" in { sdesmalen-arm wrote: Good spot! https://github.com

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-19 Thread Sander de Smalen via cfe-commits
@@ -1781,7 +1781,12 @@ void SVEEmitter::createStreamingAttrs(raw_ostream &OS, ACLEKind Kind) { uint64_t VerifyRuntimeMode = getEnumValueForFlag("VerifyRuntimeMode"); uint64_t IsStreamingCompatibleFlag = getEnumValueForFlag("IsStreamingCompatible"); + for (auto &De

[clang] [Clang][AArch64] Use 'uint64_t*' for _arm_get_sme_state builtin. (PR #95982)

2024-06-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/95982 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AArch64] SVE2 is an optional feature in ARMv9.0a (PR #96007)

2024-06-20 Thread Sander de Smalen via cfe-commits
@@ -108,6 +108,12 @@ Changes to the AArch64 Backend in ``standard`` being equal to ``bti+pac-ret+pc`` when ``+pauth-lr`` is passed as part of ``-mcpu=`` options. +* SVE and SVE2 have been moved to the default extensions list for ARMv9.0, + making them optional per the Arm

[clang] [llvm] [llvm][AArch64] SVE2 is an optional feature in ARMv9.0a (PR #96007)

2024-06-20 Thread Sander de Smalen via cfe-commits
@@ -955,6 +955,11 @@ Arm and AArch64 Support * Arm Neoverse-N3 (neoverse-n3). * Arm Neoverse-V3 (neoverse-v3). * Arm Neoverse-V3AE (neoverse-v3ae). +- SVE and SVE2 have been moved to the default extensions list for ARMv9.0, sdesmalen-arm wrote: I d

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Sander de Smalen via cfe-commits
@@ -17,7 +25,7 @@ // CPP-CHECK-NEXT:[[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT:ret i64 [[TMP1]] // -uint64_t test_svcntb() +uint64_t test_svcntb(void) MODE_ATTR sdesmalen-arm wrote: I don't think so. The ACLE describes that the SME k

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-21 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm closed https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a078416 - [AArch64] Fix up failing test that should have been caught by precommit

2024-06-21 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-06-21T08:54:18Z New Revision: a078416a8594a5981367d9096e2181abe7811c5f URL: https://github.com/llvm/llvm-project/commit/a078416a8594a5981367d9096e2181abe7811c5f DIFF: https://github.com/llvm/llvm-project/commit/a078416a8594a5981367d9096e2181abe7811c5f.diff L

[clang] 1d57594 - [Clang][AArch64] NFC: Remove -DTEST_SME from RUN lines

2024-05-30 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-05-30T10:25:27Z New Revision: 1d57594d3dce3c7605a414dfecf8b06b3b62c40f URL: https://github.com/llvm/llvm-project/commit/1d57594d3dce3c7605a414dfecf8b06b3b62c40f DIFF: https://github.com/llvm/llvm-project/commit/1d57594d3dce3c7605a414dfecf8b06b3b62c40f.diff L

[clang] 8eb0945 - [Clang][AArch64] NFC: Simplify checkArmStreamingBuiltin.

2024-05-30 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2024-05-30T10:26:14Z New Revision: 8eb0945373173213e7454a475f6e227da12d6d3a URL: https://github.com/llvm/llvm-project/commit/8eb0945373173213e7454a475f6e227da12d6d3a DIFF: https://github.com/llvm/llvm-project/commit/8eb0945373173213e7454a475f6e227da12d6d3a.diff L

[clang] [libcxx] [lld] [llvm] Triple::normalize: Set OS for 3-component triple with none as middle (PR #89638)

2024-04-23 Thread Sander de Smalen via cfe-commits
@@ -1149,6 +1149,13 @@ std::string Triple::normalize(StringRef Str) { } } + // For 3-component triples, the middle component is used to set Vendor; + // while if it is "none", we'd prefer to set OS. + // This is for some baremetal cases, such as "arm-none-elf". + if

[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

2024-07-24 Thread Sander de Smalen via cfe-commits
@@ -11145,7 +11148,24 @@ bool Sema::areMultiversionVariantFunctionsCompatible( FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo(); FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo(); -if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) +const auto *Ol

[clang] [clang][FMV][AArch64] Improve streaming mode compatibility. (PR #100181)

2024-07-24 Thread Sander de Smalen via cfe-commits
@@ -11145,7 +11148,24 @@ bool Sema::areMultiversionVariantFunctionsCompatible( FunctionType::ExtInfo OldTypeInfo = OldType->getExtInfo(); FunctionType::ExtInfo NewTypeInfo = NewType->getExtInfo(); -if (OldTypeInfo.getCC() != NewTypeInfo.getCC()) +const auto *Ol

<    1   2   3   4   5   6   7   >