[PATCH] D119319: [AArch64] Emit TBAA metadata for SVE load/store intrinsics

2022-02-11 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0b41238ae7f9: [AArch64] Emit TBAA metadata for SVE load/store intrinsics (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D119319?vs=407060&id=407804#toc Repository: rG LLVM

[PATCH] D123605: [WIP][Sema][SVE] Move/simplify Sema testing for SVE ACLE builtins

2022-04-27 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 this @RosieSumpter. If you remove the 'WIP' and s/SVE/SVE2/ from the title and description, I'm happy to accept. The negative tests for the SVE(1) intrinsics can be added as a

[PATCH] D124850: [Sema][SVE2] Move/simplify Sema testing for SVE2 ACLE builtins

2022-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for working on this @RosieSumpter! Comment at: clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2.cpp:1 +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -target-feature +bf16 -fallow-half-arguments-and-returns -fsyntax-on

[PATCH] D124836: [AArch64] Add support for -fzero-call-used-regs

2022-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.td:1398 + (sequence "W%u", 0, 7))>; +def FPR8_ARG : RegisterClass<"AArch64", [untyped], 8, (trunc FPR8, 7)> { + let Size = 8; Should this fea

[PATCH] D124850: [Sema][SVE2] Move/simplify Sema testing for SVE2 ACLE builtins

2022-05-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/Sema/aarch64-sve2-intrinsics/acle_sve2_bfloat.cpp:8 + // expected-error@+1 {{use of undeclared identifier 'svwhilerw_bf16'}} + svwhilerw_bf16(const_bf16_ptr, const_bf16_ptr); + // expected-error@+1 {{use of undeclared ide

[PATCH] D66302: [SVE][Inline-Asm] Support for SVE asm operands

2019-08-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: lib/Target/AArch64/AArch64AsmPrinter.cpp:618 +bool hasAltName; +const TargetRegisterClass *RegClass; The use of `hasAltName` is confusing me here. When I look at the declaration and definition of `printAsmRe

[PATCH] D66524: [SVE][Inline-Asm] Add constraints for SVE predicate registers

2019-08-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: lib/IR/InlineAsm.cpp:188 + unsigned char C = static_cast(*I); + assert(isdigit(C) && "Not a single digit!"); + int N = C - '0'; `"Expected a digit"` seems more appropriate, since this code is only testin

[PATCH] D66302: [SVE][Inline-Asm] Support for SVE asm operands

2019-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. Thanks for making these changes @kmclaughlin, LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66302/new/ https://reviews.llvm.org/D66302 _

[PATCH] D67095: [SVE][Inline-Asm] Fix -Wimplicit-fallthrough in AArch64ISelLowering.cpp

2019-09-03 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 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67095/new/ https://reviews.llvm.org/D67095 ___ cfe-commi

[PATCH] D71698: [AArch64][SVE] Add intrinsic for non-faulting loads

2020-01-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/SVEInstrFormats.td:5333 + // We need a layer of indirection because early machine code passes balk at + // physical register (i.e. FFR) uses that have no previous definition. + let hasSideEffects = 1, hasNoSc

[PATCH] D72612: [AArch64][SVE] Add ImmArg property to intrinsics with immediates

2020-01-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:1099 +class AsmVectorIndexOpnd +: Operand, ComplexPattern", []> { let ParserMatchClass = mc; @efriedma @rengolin The idea here is to use a ComplexPattern to match

[PATCH] D86100: [Clang][SVE] NFC: Move info about ACLE types into separate function.

2020-08-19 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0353848cc94f: [Clang][SVE] NFC: Move info about ACLE types into separate function. (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D86100?vs=286113&id=286520#toc Repository:

[PATCH] D86100: [Clang][SVE] NFC: Move info about ACLE types into separate function.

2020-08-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/AST/ASTContext.h:1318 + BuiltinVectorTypeInfo + getElementTypeForBuiltinVector(const BuiltinType *VecTy) const; + c-rhodes wrote: > nit: not sure on the name here since it's returning more than th

[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-26 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 287911. sdesmalen added a comment. - Choose unsigned char element type for svbool_t bitpattern. - Added LLVM test to ensure debug info for the vector type is correctly codegenerated when DISubrange has upper bound instead of count. CHANGES SINCE LAST ACTI

[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-26 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:734 + if (Info.ElementType == CGM.getContext().BoolTy) +NumElemsPerVG /= 8; + efriedma wrote: > I guess NumElemsPerVG of a bool vector is always divisible by 8 because we

[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-27 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e9b66de3f04: [AArch64][SVE] Add missing debug info for ACLE types. (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D86101?vs=287911&id=288254#toc Repository: rG LLVM Githu

[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-27 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86101/new/ https://reviews.llvm.org/D86101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D87056: [POC] SVE/SVE2 implementation (LLVM 9)

2020-09-03 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: llvm-commits, cfe-commits, dang, nikic, aaron.ballman, ecnelises, dantrushin, kerbowa, s.egerton, Jim, asbirlea, jfb, arphaman, dexonsmith, rogfer01, steven_wu, atanasyan, mgrang, zzheng, jrtc27, delcypher, simoncook, haicheng, kosarev,

[PATCH] D87358: [clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bits

2020-09-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/AST/Type.cpp:2339 case BuiltinType::SveInt32: -return Ctx.IntTy; +return IsILP32 ? Ctx.LongTy : Ctx.IntTy; case BuiltinType::SveUint32: Rather than comparing with a specific triple, how about ge

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-11-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:939 +def warn_pragma_attribute_scalable_unused : Warning< + "ignoring scalable vectorize_width flag due to lack of target support">, + InGroup; From what I can see, th

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-11-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Hi @david-arm I just found that two uses of `llvm.loop.vectorize.width` are not yet updated. - WarnMissedTransforms.cpp in `warnAboutLeftoverTransformations`. - LoopUtils.cpp in `llvm::hasVectorizeTransformation`. The cases seem quite trivial to fix up, can you includ

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-11-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D89031#2391248 , @SjoerdMeijer wrote: > In D89031#2391160 , @david-arm wrote: > >> Hi @SjoerdMeijer I think that given we now support scalable vectors we >> thought it made sense to b

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-11-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. This patch needs to be retitled to what this is actually doing: changing the getTypeAllocationSizeInBits and getFragmentSizeInBits to return a TypeSize instead of `unsigned`. It would be even better if you can split those up into two patches with separate tests for ea

[PATCH] D91806: [SVE] Remove warning from debug info on scalable vector.

2020-12-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Please rename `debug-declare-no-warnings-on-scalable-vectors.ll` to something different, because these 'warnings' are only temporary and will be replaced by errors in the future. Having 'no warnings' in the name of the test name seems wrong from that perspective. In

[PATCH] D92487: [AArch64][Driver][SVE] Push missing SVE feature error from driver to frontend

2020-12-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. Other than the nit, LGTM. Comment at: clang/lib/Sema/SemaType.cpp:7789 +S.Diag(Attr.getLoc(), diag::err_attribute_unsupported) +<< Attr << "'neon' or 'mve'

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-10-30 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 Comment at: clang/lib/Sema/SemaStmtAttr.cpp:144 + assert(ValueExpr && "Attribute must have a valid value expression."); + if (S.CheckLoopHintExpr(ValueEx

[PATCH] D89031: [SVE] Add support to vectorize_width loop pragma for scalable vectors

2020-11-03 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen requested changes to this revision. sdesmalen added inline comments. This revision now requires changes to proceed. Comment at: clang/docs/LanguageExtensions.rst:3039 +useful for specifying the optimal width/count of the set of target +architectures supported by your ap

[PATCH] D102822: [Clang][CodeGen] Set the size of llvm.lifetime to unknown for scalable types.

2021-06-03 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:1327 + if (Size.isScalable()) +Size = llvm::TypeSize::Fixed(-1); + Instead of updating `Size` here, can you change line 1332 to be: llvm::Value *SizeV = llvm::ConstantInt::get(Int64

[PATCH] D96270: [release][docs] Update contributions to LLVM 12 for scalable vectors.

2021-02-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/docs/ReleaseNotes.rst:153 + compiler should use fixed-width or scalable vectorization. Fixed-width is + assumed by default. Scalable vectorization is an experimental feature for + targets that support it, such as Arm targets

[PATCH] D96270: [release][docs] Update contributions to LLVM 12 for scalable vectors.

2021-02-09 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/D96270/new/ https://reviews.llvm.org/D96270 ___ cfe-commits mailing list cfe-commi

[PATCH] D102822: [Clang][CodeGen] Set the size of llvm.lifetime to unknown for scalable types.

2021-06-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/RISCV/riscv-v-lifetime.cpp:17 +// CHECK-NEXT:[[TMP1:%.*]] = bitcast * [[REF_TMP]] to i8* +// CHECK-NEXT:call void @llvm.lifetime.start.p0i8(i64 -1, i8* [[TMP1]]) #[[ATTR3]] +// CHECK-NEXT:[[CALL:%.*]] =

[PATCH] D102822: [Clang][CodeGen] Set the size of llvm.lifetime to unknown for scalable types.

2021-06-07 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 @HsiangKai Comment at: clang/test/CodeGen/RISCV/riscv-v-lifetime.cpp:3 +// REQUIRES: riscv-registered-target +// RUN: %clang_cc1 -std=c++11 -triple riscv64

[PATCH] D104539: [Sema][SVE] Properly match builtin ID when using aux target

2021-06-18 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104539/new/ https://reviews.llvm.org/D104539

[PATCH] D112406: [Driver][AArch64]Add driver support for neoverse-512tvb target

2021-10-27 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: llvm/lib/Target/AArch64/AArch64.td:840 +def TuneNeoverse512TVB : SubtargetFeature<"neoverse512tvb", "ARMProcFamily", "Neoverse512T

[PATCH] D113294: [IR] Remove unbounded as possible value for vscale_range minimum

2021-11-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. It would be nice if the LLVM interfaces could be updated as well (could also be done in a follow-up patch) From: std::pair getVScaleRangeArgs() To: Optional getVScaleRangeMax(); unsigned getVScaleRangeMin(); Since that would simplify some of the queries to th

[PATCH] D98030: [IR] Add vscale_range IR function attribute

2021-03-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for this patch, it's great to have an IR attribute for this. The mechanics of this patch look mostly fine to me. I added a few more subscribers to give this some wider visibility. Comment at: llvm/docs/LangRef.rst:1998 +function. A value o

[PATCH] D98030: [IR] Add vscale_range IR function attribute

2021-03-12 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. Looks fine to me, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98030/new/ https://reviews.llvm.org/D98030 __

[PATCH] D113776: [Clang][SVE] Properly enable/disable dependant SVE target features based upon +(no)sve.* options

2021-11-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:73 static bool DecodeAArch64Features(const Driver &D, StringRef text, std::vector &Features, llvm::AArch64::ArchKind Ar

[PATCH] D113776: [Clang][SVE] Properly enable/disable dependant SVE target features based upon +(no)sve.* options

2021-11-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:73 static bool DecodeAArch64Features(const Driver &D, StringRef text, std::vector &Features, llvm::AArch64::ArchKind Ar

[PATCH] D113776: [Clang][SVE] Properly enable/disable dependant SVE target features based upon +(no)sve.* options

2021-11-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:82-88 +if (Feature == "sve2") + Features.push_back("+sve"); +else if (Feature == "sve2-bitperm" || Feature == "sve2-sha3" || + Feature == "sve2-aes" || Feature == "s

[PATCH] D113776: [Clang][SVE] Properly enable/disable dependant SVE target features based upon +(no)sve.* options

2021-11-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! Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:82-88 +if (Feature == "sve2") + Features.push_back("+sve"); +else if (Feature == "sve2-bitpe

[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, w

[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 te

[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 rebas

[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:22 +; CHECK-NEXT:mov z4.d, z8.d +; CHECK-NEXT:bl llvm.aarch64.vector.insert.nxv8f64.nx2f64 +; CHECK-NEXT:mov w0, #2 There is something going wrong h

[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, #2,

[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 w

[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 we

[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 parts)?

[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] 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}); + uns

[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] 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 met

[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: llvm-co

[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 https://lists.

[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] 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 flags

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

2022-06-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: paulwalker-arm, aaron.ballman, aemerson, t.p.northover. Herald added subscribers: jdoerfert, kristof.beyls. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber

[PATCH] D127910: [Clang][AArch64] Add SME C intrinsics for load and store

2022-06-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Hi @sagarkulkarni19, this patch will have to wait until the ABI is implemented so that the builtins can be decorated with the attributes. A first patch proposing these attributes is in D127762 . LLVM patches that use these attributes

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

2022-06-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 437580. sdesmalen marked 10 inline comments as done. sdesmalen added a comment. Addressed bunch of the review comments (though not all yet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127762/new/ https://r

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

2022-06-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks @aaron.ballman for your elaborate review, that was very helpful! I'm still working through some of your suggestions (although some of them weren't entirely clear to me), but I've addressed a number of them already. In D127762#3582753

[PATCH] D127910: [Clang][AArch64] Add SME C intrinsics for load and store

2022-06-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:342 + if (HasSME) +Builder.defineMacro("__ARM_FEATURE_SME", "1"); + sagarkulkarni19 wrote: > sdesmalen wrote: > > When this macro is non-zero, it suggests that the compiler impl

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

2022-06-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 438624. sdesmalen added a comment. - Increased test-coverage by adding positive tests for: - template instantiations - function overloading - lambda function with attribute - (indirect) pointer to pointer to an attributed function type. - Also added

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

2022-06-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: aaron.ballman, sunfish. Herald added subscribers: pmatos, asb, jdoerfert, kristof.beyls, sbc100. Herald added a project: All. sdesmalen requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a proje

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

2022-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9835-9839 + if (D.isFunctionDefinition()) { +NewFD->setWillHaveBody(); +ProcessDeclAttributes(S, NewFD, D); +NewFD->setWillHaveBody(false); + } else aaron.ballman wrote: > This

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

2022-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 439330. sdesmalen marked 7 inline comments as done. sdesmalen added a comment. - Limited attribute to GNU spelling __attribute__((...)) - Changed `arm_locally_streaming` attribute to be `DeclOrStmtAttr` because it does not apply to type (only the definition

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

2022-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2322 +def ArmStreamingCompatible : DeclOrTypeAttr, TargetSpecificAttr { + let Spellings = [Clang<"arm_streaming_compatible">]; aaron.ballman wrote: > sdesmalen wrote: > > aaron.bal

[PATCH] D126642: [Clang] NFCI: Repurpose HasExtParameterInfos for HasExtraBitfields

2022-05-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: aaron.ballman, erichkeane, efriedma. Herald added a project: All. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The FunctionTypeExtraBitfields is currently only availab

[PATCH] D126642: [Clang] NFCI: Repurpose HasExtParameterInfos for HasExtraBitfields

2022-05-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. This patch follows from some discussion on D124998 as well as the need for more bits to represent future function type attributes :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126642

[PATCH] D126642: [Clang] NFCI: Repurpose HasExtParameterInfos for HasExtraBitfields

2022-05-31 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D126642#3547284 , @erichkeane wrote: > I'm not sure I'm grokking hte difference between the ExtraBitfields and > ExtParamInfos here. The reason I repurposed the bit was because I previously tried adding a bit to `unsigned

[PATCH] D126642: [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.

2022-05-31 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 433140. sdesmalen marked 4 inline comments as done. sdesmalen retitled this revision from "[Clang] NFCI: Repurpose HasExtParameterInfos for HasExtraBitfields" to "[Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.". sdesmalen edited the summary

[PATCH] D126642: [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.

2022-05-31 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D126642#3547526 , @erichkeane wrote: > Right, yeah. One thing to consider: `ExtInfo` was 'first', and so it got to > keep the 'in bitfield bits'. However, much of what is in there is, IMO, not > something that is used oft

[PATCH] D126642: [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.

2022-06-01 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 rG3ec78d9ff1b3: [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType. (authored by sdesmalen). Changed prior to commit: https://reviews.llv

[PATCH] D126642: [Clang] NFCI: Add a new bit HasExtraBitfields to FunctionType.

2022-06-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for the review and comments @erichkeane and @aaron.ballman! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126642/new/ https://reviews.llvm.org/D126642 ___ cfe-commits ma

[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] 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] 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 tha

[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] 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 h

[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 Mono

[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 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 clang/tes

[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 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-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] 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/ https://reviews.llvm.org/D1585

[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/ https://reviews.llvm.or

[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 ove

[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 NumE

[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] 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: llvm-commits

[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 required

[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 https://reviews.llvm.org

[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 https://reviews.llvm.org/D152141/

[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: - `fu

[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 pointers

[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 https://reviews.llvm.org/D157269/new/

[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: clang/test/Sema/aarch64-sme-func-at

[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 https://reviews.llvm.org/D1572

[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 indire

[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: https://reviews.llvm.org/D12

[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 wrote

<    1   2   3   4   5   >