[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

[PATCH] D91806: [InstCombine] Update valueCoversEntireFragment to use TypeSize

2021-01-06 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/D91806/new/ https://reviews.llvm.org/D91806

[PATCH] D91806: [InstCombine] Update valueCoversEntireFragment to use TypeSize

2021-01-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/Transforms/InstCombine/debuginfo-scalable-typesize.ll:13 + +; ERR-NOT: TypeSize is not scalable + After your changes, what line causes this warning to be emitted? Does this test also pass with asserts

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

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

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

[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

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 333010. sdesmalen added a comment. Moved error reporting to llvm::reportInvalidSizeRequest in TypeSize.cpp. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98856/new/ https://reviews.llvm.org/D98856 Files:

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5052-5055 + if (isa(JA)) { +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back("-treat-scalable-fixed-error-as-warning"); + } paulwalker-arm wrote: > Are there any concerns

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 333018. sdesmalen marked 5 inline comments as done. sdesmalen added a comment. Moved implementation of EVT::getVectorNumElements back to header. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98856/new/

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/CodeGen/ValueTypes.cpp:17 +unsigned EVT::getVectorNumElements() const { + auto Error = []() { ctetreau wrote: > Out of curiosity, what is the eventual plan for this function? Does it go > away, or will it

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-04-02 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 rG0f7bbbc481e2: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag… (authored by sdesmalen). Changed prior to commit:

[PATCH] D99592: [PoC][Clang] Use TypeSize instead of uint64_t for getTypeAllocSize().

2021-03-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2856 Address AddrToStoreInto = Address::invalid(); -if (SrcSize <= DstSize) { +if (llvm::TypeSize::isKnownLE(SrcSize, DstSize)) { AddrToStoreInto =

[PATCH] D98852: [test] Fix variable definition in acle_sve_ld1.sh

2021-03-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, thanks for fixing! I'm curious, how did you find this case? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98852/new/

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-18 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: dexonsmith, hiraditya, kristof.beyls, mgorny. sdesmalen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. In order to bring up scalable vector support in LLVM

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-03-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 331820. sdesmalen added a comment. Rebased after D98736 already fixed one of the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98856/new/

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

[PATCH] D98856: Always emit error for wrong interfaces to scalable vectors, unless cmdline flag is passed.

2021-04-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5066 +CmdArgs.push_back("-mllvm"); +CmdArgs.push_back("-treat-scalable-fixed-error-as-warning"); + } MaskRay wrote: > Does this introduce an option in the CC1 command

[PATCH] D100046: [AArch64] ACLE: Fix issue for mismatching enum types with builtins.

2021-04-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. The fact that Clang chooses to (explicitly) forget about a builtin in SemaDecl.cpp was quite puzzling to me. Maybe that just shows that I don't fully understand how the builtin mechanism is supposed to work. @rsmith and @tambre, git history showed me you have more

[PATCH] D100046: [AArch64] ACLE: Fix issue for mismatching enum types with builtins.

2021-04-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: danielkiss, kristof.beyls. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes an issue with the SVE prefetch and qinc/qdec intrinsics that take an `enum`

[PATCH] D100046: [AArch64] ACLE: Fix issue for mismatching enum types with builtins.

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 336760. sdesmalen added a comment. Removed `forgetBuiltin` and the code using it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100046/new/ https://reviews.llvm.org/D100046 Files:

[PATCH] D100046: [AArch64] ACLE: Fix issue for mismatching enum types with builtins.

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for taking time from your weekend to look into this @tambre, much appreciated! Comment at: clang/lib/Sema/SemaDecl.cpp:10953-10967 if (unsigned BuiltinID = NewFD->getBuiltinID()) { ASTContext::GetBuiltinTypeError Error;

[PATCH] D100046: [AArch64] ACLE: Fix issue for mismatching enum types with builtins.

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6bf806b3e2fd: [AArch64] ACLE: Fix issue for mismatching enum types with builtins. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100297: [AArch64][SVE] Always use overloaded methods instead of preprocessor macro.

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: psnobl, kristof.beyls, tschuett. Herald added a reviewer: efriedma. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This fixes a subtle issue where: svprf(pg, ptr,

[PATCH] D100294: [AArch64][SVE] Fix dup/dupq intrinsics for C++.

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: psnobl, kristof.beyls, tschuett. Herald added a reviewer: efriedma. sdesmalen requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch changes the builtin prototype to use 'b'

[PATCH] D100225: [Clang][AArch64] Coerce integer return values through an undef vector

2021-04-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. After reading the summary/intent of the patch, I thought the same thing as @rjmccall. Simply returning an i32 for the above example and removing the rounding-up seems right to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100294: [AArch64][SVE] Fix dup/dupq intrinsics for C++.

2021-04-13 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa936b610fd0: [AArch64][SVE] Fix dup/dupq intrinsics for C++. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100294/new/

[PATCH] D100297: [AArch64][SVE] Always use overloaded methods instead of preprocessor macro.

2021-04-13 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 rG204aaf879548: [AArch64][SVE] Always use overloaded methods instead of preprocessor macro. (authored by sdesmalen). Changed prior to commit:

[PATCH] D110258: [AArch64] Always add -tune-cpu argument to -cc1 driver

2021-10-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. Thanks @david-arm, LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110258/new/ https://reviews.llvm.org/D110258 ___ cfe-commits

[PATCH] D110258: [AArch64] Always add -tune-cpu argument to -cc1 driver

2021-10-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/docs/ReleaseNotes.rst:185-188 +architectural features. For example, we can compile code with +"-mcpu=generic -mtune=cortex-a57" where the architectural features are +defined according to a "generic" CPU, but we use the

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

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

[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 , StringRef text, std::vector , llvm::AArch64::ArchKind ArchKind) {

[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 , StringRef text, std::vector , llvm::AArch64::ArchKind ArchKind) {

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

[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

[PATCH] D106277: [SVE] Remove the interface for getMaxVScale in favour of the IR attributes

2021-07-26 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. You'll want to rebase your patch on top of latest main, since D105432 moved around the call to `getMaxVScale()` in AArch64TargetTransformInfo.cpp. Comment at: clang/lib/Basic/Targets/AArch64.cpp:433 + } + if

[PATCH] D121792: [AArch64][SVE] InstCombine llvm.aarch64.sve.sel to select

2022-03-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added inline comments. This revision is now accepted and ready to land. Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:530-531 + IntrinsicInst ) { + IRBuilder<>

[PATCH] D121294: [AArch64][SVE][Clang] Fix crash for incorrect svptrue and svcnt parameters

2022-03-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. This is missing tests for svundef, svrdffr, svsetffr and svpfalse? Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/negative/acle_sve_svptrue.c:2 +// REQUIRES: aarch64-registered-target + +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu

[PATCH] D121294: [AArch64][SVE][Clang] Fix crash for incorrect svptrue and svcnt parameters

2022-03-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. In D121294#3370132 , @MattDevereau wrote: > In D121294#3370085 , @sdesmalen > wrote: > >> This is

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

2022-02-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: ctetreau, jeroen.dobbelaere, kosarev, hiraditya, kristof.beyls, tschuett. sdesmalen requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. In Clang we can attach TBAA

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

2022-02-11 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:888 if (isAllActivePredicate(Pred)) { -Builder.CreateStore(VecOp, VecPtr); +auto *Store = Builder.CreateStore(VecOp, VecPtr); +Store->copyMetadata(II);

[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=407804#toc Repository: rG LLVM

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D105169#3254757 , @nlopes wrote: > In D105169#3254692 , @DavidSpickett > wrote: > >> Hi, this patch has caused a gcc test suite failure on our SVE bots: >>

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

[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

[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

[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

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

[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

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

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

[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

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

[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

[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

[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

[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

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

2022-06-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks for your patience reviewing this patch @aaron.ballman! Comment at: clang/include/clang/AST/Type.h:4064 bool HasTrailingReturn : 1; +unsigned AArch64SMEAttributes : 8; Qualifiers TypeQuals; aaron.ballman wrote: >

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

2022-06-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 440631. sdesmalen marked 3 inline comments as done. sdesmalen added a comment. - Removed attribute handling from SemaDeclAttr.cpp, so that the type attributes are only handled in SemaType.cpp - Made ArmLocallyStreaming a DeclOrTypeAttribute again. - Added

[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

[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

[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

[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

[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] 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] 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] 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] 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] 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] D131547: [Clang][AArch64] Use generic extract/insert vector for svget/svset/svcreate tuples

2022-08-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:9077 +Value *CodeGenFunction::EmmitSVESetTuples(const SVETypeFlags , + llvm::Type *Ty, nit: s/Emmit/Emit/ How about naming 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: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

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

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

<    1   2   3   4   5   >