[PATCH] D79357: [SveEmitter] Add builtins for svdup and svindex

2020-05-12 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd6936be2ef8c: [SveEmitter] Add builtins for svdup and svindex (authored by sdesmalen). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D79357: [SveEmitter] Add builtins for svdup and svindex

2020-05-05 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 2 inline comments as done. sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:1050 def SVCOMPACT: SInst<"svcompact[_{d}]", "dPd", "ilUiUlfd", MergeNone, "aarch64_sve_compact">; -// SVDUP_LANE(to land in D78750)

[PATCH] D79480: [SveEmitter] Add builtins for SVE2 Polynomial arithmetic

2020-05-07 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3cb8b4c193c1: [SveEmitter] Add builtins for SVE2 Polynomial arithmetic (authored by sdesmalen). Herald added a project: clang. Changed prior to commit:

[PATCH] D79480: [SveEmitter] Add builtins for SVE2 Polynomial arithmetic

2020-05-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7813 + llvm::ScalableVectorType *Ty = getSVEType(TypeFlags); + return Builder.CreateBitCast(Call, Ty); +} efriedma wrote: > Please add a

[PATCH] D79579: [SveEmitter] Add builtins for svmovlb and svmovlt

2020-05-11 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4cad97595f40: [SveEmitter] Add builtins for svmovlb and svmovlt (authored by sdesmalen). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D79579?vs=262624=263125#toc

[PATCH] D79639: [SveEmitter] Builtins for SVE matrix multiply `mmla`.

2020-05-11 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:74 // q: 1/4 width elements, 4x element count +// b: 1/4 width elements, 4x element count, integer, unsigned // o: 4x width elements, 1/4 element count Can you phrase this like

[PATCH] D79639: [SveEmitter] Builtins for SVE matrix multiply `mmla`.

2020-05-14 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/test/CodeGen/aarch64-sve-intrinsics/acle_sve_mmla.c:17 + // CHECK: ret %[[RET]] + return SVE_ACLE_FUNC(svmmla, _s32, , )(x, y, z); +}

[PATCH] D76238: [SveEmitter] Implement builtins for contiguous loads/stores

2020-03-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 2 inline comments as done. sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7467 + + return IsZxtReturn ? Builder.CreateZExt(Load, VectorTy) + : Builder.CreateSExt(Load, VectorTy); SjoerdMeijer

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Addressed review comments before commititng. Thanks for the review @miyuki and @SjoerdMeijer! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75861/new/ https://reviews.llvm.org/D75861

[PATCH] D75861: [SVE] Generate overloaded functions for ACLE intrinsics.

2020-03-19 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sdesmalen marked 4 inline comments as done. Closed by commit rG981f0802b375: [SVE] Generate overloaded functions for ACLE intrinsics. (authored by sdesmalen). Changed prior to commit:

[PATCH] D76297: [clang][AArch64] readd support for 'p' inline asm constraint

2020-03-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/Basic/Targets/AArch64.h:97 Constraint += 2; break; } nit: does this need a `default: break`?

[PATCH] D76297: [clang][AArch64] readd support for 'p' inline asm constraint

2020-03-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. In D76297#1927053 , @nickdesaulniers wrote: > @sdesmalen sorry, would you mind re-reviewing. I'm not comfortable landing > with the previous version being reviewed and not the current one.

[PATCH] D75661: Remove SequentialType from the type heirarchy.

2020-03-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. Thank you for this patch! Personally I find the code more readable without the SequentialType abstraction and the use of the GEP interface (getTypeAtIndex(Type, Idx)) you added in

[PATCH] D76238: [SveEmitter] Implement builtins for contiguous loads/stores

2020-03-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 4 inline comments as done. sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:128 def SVLD1 : MInst<"svld1[_{2}]", "dPc", "csilUcUsUiUlhfd", [IsLoad]>; +def SVLD1SB : MInst<"svld1sb_{d}", "dPS", "silUsUiUl", [IsLoad],

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-03-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, Andrzej. Herald added subscribers: cfe-commits, tschuett. Herald added a project: clang. This issue was introduced when reworking D75861 . The bug isn't actually hit with current unit tests

[PATCH] D76679: [SveEmitter] Add more immediate operand checks.

2020-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer, rovka. Herald added a subscriber: tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. sdesmalen added a parent revision: D76678: [SveEmitter] Add range checks for immediates and predicate

[PATCH] D76680: [SveEmitter] Add immediate checks for lanes and complex imms

2020-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer, rovka. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a parent revision: D76679: [SveEmitter] Add more immediate operand checks.. Adds another bunch of of intrinsics that take

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer, rovka. Herald added subscribers: mgrang, tschuett, mgorny. Herald added a project: clang. sdesmalen added a child revision: D76679: [SveEmitter] Add more immediate operand checks.. This patch adds a mechanism to

[PATCH] D76617: [SveEmitter] Fix encoding/decoding of SVETypeFlags

2020-03-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D76617#1938787 , @SjoerdMeijer wrote: > Patches with functional changes but without tests are a bit "suspicious". In > this case, I see it might be tricky. You could argue that it should be > incorporated in the patch

[PATCH] D78756: [SveEmitter] Add builtins for svreinterpret

2020-05-05 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5ba329059f9c: [SveEmitter] Add builtins for svreinterpret (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78756/new/

[PATCH] D79480: [SveEmitter] Add builtins for SVE2 Polynomial arithmetic

2020-05-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma. Herald added a subscriber: tschuett. Herald added a reviewer: rengolin. This patch adds builtins for: - sveorbt - sveortb - svpmul - svpmullb, svpmullb_pair - svpmullt, svpmullt_pair The svpmullb and svpmullt

[PATCH] D79579: [SveEmitter] Add builtins for svmovlb and svmovlt

2020-05-07 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer. Herald added a subscriber: tschuett. These builtins are expanded in CGBuiltin to use intrinsics for (signed/unsigned) shift left long top/bottom. https://reviews.llvm.org/D79579 Files:

[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

[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

[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-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: rsandifo-arm, efriedma, rjmccall. Herald added subscribers: llvm-commits, danielkiss, psnobl, hiraditya, kristof.beyls, tschuett, aprantl. Herald added a reviewer: rengolin. Herald added projects: clang, LLVM. sdesmalen requested review

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

2020-08-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: c-rhodes, efriedma. Herald added subscribers: psnobl, tschuett. Herald added a project: clang. sdesmalen requested review of this revision. This function returns a struct `BuiltinVectorTypeInfo` that contains the builtin vector's element

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

[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

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

[PATCH] D80740: [SveEmitter] Add SVE ACLE for svld1ro.

2020-05-29 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/D80740/new/ https://reviews.llvm.org/D80740

[PATCH] D83550: [PATCH 1/4][Sema][AArch64] Add parsing support for arm_sve_vector_bits attribute

2020-07-15 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 changes @c-rhodes, the use of a LANGOPT for this makes sense to me. With my nits addressed, I'm happy with the patch if @aaron.ballman is. Comment at:

[PATCH] D82623: [sve][acle] Enable feature macros for SVE ACLE extensions.

2020-06-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 with comment addressed. Comment at: clang/lib/Basic/Targets/AArch64.cpp:325 + if ((FPU & SveMode) && HasMatmulInt8) +

[PATCH] D83079: [clang] Default target features implied by `-march` on AArch64.

2020-07-02 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:118 + case llvm::AArch64::ArchKind::ARMV8_6A: +Features.push_back("+i8mm"); +Features.push_back("+bf16"); Looking at what Clang emits for e.g. `-march=armv8.5-a`,

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:369 + if (llvm::is_contained(Features, "+v8.6a")) { +if (!llvm::is_contained(Features, "-i8mm") && +!llvm::is_contained(Features, "+noi8mm")) Is this correct

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:369 + if (llvm::is_contained(Features, "+v8.6a")) { +if (!llvm::is_contained(Features, "-i8mm") && +!llvm::is_contained(Features, "+noi8mm")) fpetrogalli

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-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 Comment at: clang/test/Preprocessor/aarch64-target-features.c:415 // CHECK-BFLOAT: __ARM_FEATURE_BF16_VECTOR_ARITHMETIC 1 - nit: unrelated

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:370 + if (V8_6Pos != std::end(Features)) { +V8_6Pos = Features.insert(std::next(V8_6Pos), "+i8mm"); +V8_6Pos = Features.insert(V8_6Pos, "+bf16"); Both `+i8mm` and

[PATCH] D83551: [PATCH 2/4][Sema][AArch64] Add semantics for arm_sve_vector_bits attribute

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1541 +def ArmSveVectorBits128 : TypeAttr { + let Spellings = []; nit: Can you add a comment saying why these are undocumented (and have no spellings) Comment

[PATCH] D83553: [PATCH 3/4][Sema][AArch64] Add codegen for arm_sve_vector_bits attribute

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D83553#2145227 , @efriedma wrote: > What's the tradeoff of representing these in IR as vscale'ed vector types, as > opposed to fixed-wdith vector types? If you mean alloca's for single vectors, then that's partly to do

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:370 + if (V8_6Pos != std::end(Features)) { +V8_6Pos = Features.insert(std::next(V8_6Pos), "+i8mm"); +V8_6Pos = Features.insert(V8_6Pos, "+bf16"); sdesmalen wrote:

[PATCH] D83550: [PATCH 1/4][Sema][AArch64] Add parsing support for arm_sve_vector_bits attribute

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2806 +def err_attribute_bad_sve_vector_size : Error< + "unsupported SVE vector size '%0'">; +def err_attribute_arm_feature_sve_bits_macro_not_defined : Error< Do you

[PATCH] D83079: [clang][aarch64] Generate preprocessor macros for -march=armv8.6a+sve.

2020-07-13 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. LGTM again! Comment at: clang/test/Preprocessor/aarch64-target-features.c:163 + +// RUN: %clang -target aarch64-none-linux-gnu -march=armv8.6-a+sve+noi8mm+nobf16+nof32mm -x c -E -dM %s -o - | FileCheck

[PATCH] D83551: [PATCH 2/4][Sema][AArch64] Add semantics for arm_sve_vector_bits attribute

2020-07-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1541 +def ArmSveVectorBits128 : TypeAttr { + let Spellings = []; aaron.ballman wrote: > sdesmalen wrote: > > nit: Can you add a comment saying why these are undocumented (and have

[PATCH] D83553: [PATCH 3/4][Sema][AArch64] Add codegen for arm_sve_vector_bits attribute

2020-07-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D83553#2148429 , @efriedma wrote: > > If you mean alloca's for single vectors > > I was really referring to the IR values themselves, not the memory > representation. Since the width of the vectors is known, you could emit

[PATCH] D83550: [PATCH 1/4][Sema][AArch64] Add parsing support for arm_sve_vector_bits attribute

2020-07-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7784 + // The __ARM_FEATURE_SVE_BITS macro must be defined when using this attribute. + auto = S.getPreprocessor(); + if (!PP.isMacroDefined("__ARM_FEATURE_SVE_BITS")) { efriedma

[PATCH] D82908: [SVE] ACLE: Fix builtins for svdup_lane_bf16 and svcvtnt_bf16_f32_x

2020-06-30 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added a reviewer: fpetrogalli. Herald added subscribers: cfe-commits, psnobl, rkruppe, tschuett. Herald added a reviewer: efriedma. Herald added a project: clang. bfloat16 variants of svdup_lane were missing, and svcvtnt_bf16_x was implemented

[PATCH] D82908: [SVE] ACLE: Fix builtins for svdup_lane_bf16 and svcvtnt_bf16_f32_x

2020-07-02 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf255656a97f7: [SVE] ACLE: Fix builtins for svdup_lane_bf16 and svcvtnt_bf16_f32_x (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82668: [AArch64][SVE] clang: Add missing svbfloat16_t tests

2020-06-29 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/D82668/new/ https://reviews.llvm.org/D82668

[PATCH] D82391: [AArch64][SVE] Add bfloat16 support to svext intrinsic

2020-06-29 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82391/new/ https://reviews.llvm.org/D82391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D81462: [SveEmitter] Add builtins for svtbl2

2020-06-17 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe51c1d06a992: [SveEmitter] Add builtins for svtbl2 (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81462/new/

[PATCH] D81304: [llvm][SveEmitter] Emit the bfloat version of `svld1ro`.

2020-06-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ro-bfloat.c:1 +// RUN: %clang_cc1 -D__ARM_FEATURE_SVE_MATMUL_FP64 -D__ARM_FEATURE_BF16_SCALAR_ARITHMETIC -D__ARM_FEATURE_SVE -triple aarch64-none-linux-gnu -target-feature +sve

[PATCH] D81304: [llvm][SveEmitter] Emit the bfloat version of `svld1ro`.

2020-06-16 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/include/clang/Basic/AArch64SVEACLETypes.def:44 #define SVE_VECTOR_TYPE(Name, MangledName, Id, SingletonId, NumEls, ElBits, \ -

[PATCH] D81464: [SveEmitter] Add builtins to insert/extract subvectors from tuples (svget/svset)

2020-06-18 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4ea8e27a642c: [SveEmitter] Add builtins to insert/extract subvectors from tuples (svget/svset) (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81304: [llvm][SveEmitter] Emit the bfloat version of `svld1ro`.

2020-06-18 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ld1ro-bfloat.c:1 +// RUN: %clang_cc1 -D__ARM_FEATURE_SVE_MATMUL_FP64 -D__ARM_FEATURE_BF16_SCALAR_ARITHMETIC -D__ARM_FEATURE_SVE -triple aarch64-none-linux-gnu -target-feature +sve

[PATCH] D82141: [sve][acle] Add SVE BFloat16 extensions.

2020-06-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:494 +let ArchGuard = "defined(__ARM_FEATURE_SVE_BF16)" in { + def SVBFDOT : SInst<"svbfdot[_{0}]", "dd$$", "f", MergeNone, "aarch64_sve_bfdot">; + def SVBFMLALB : SInst<"svbfmlalb[_{0}]",

[PATCH] D82178: [AArch64][SVE] Guard svbfloat16_t with feature macro in ACLE

2020-06-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:1091 + OS << "#if defined(__ARM_FEATURE_SVE_BF16)\n"; + OS << "typedef __SVBFloat16_t svbfloat16_t;\n"; + OS << "#endif\n\n"; Can you also add an error if

[PATCH] D82187: [AArch64][SVE] ACLE: Add bfloat16 to struct load/stores.

2020-06-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 272342. sdesmalen added a comment. - Updated RUN line in tests to fix test failures. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82187/new/ https://reviews.llvm.org/D82187 Files: clang/include/clang/Basic/AArch64SVEACLETypes.def

[PATCH] D82187: [AArch64][SVE] ACLE: Add bfloat16 to struct load/stores.

2020-06-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 2 inline comments as done. sdesmalen added inline comments. Comment at: clang/include/clang/Basic/AArch64SVEACLETypes.def:69 -SVE_VECTOR_TYPE("__SVBFloat16_t", "__SVBFloat16_t", SveBFloat16, SveBFloat16Ty, 8, 16, false, false, true)

[PATCH] D82187: [AArch64][SVE] ACLE: Add bfloat16 to struct load/stores.

2020-06-19 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: stuij, efriedma, c-rhodes, fpetrogalli. Herald added subscribers: llvm-commits, lldb-commits, cfe-commits, danielkiss, psnobl, rkruppe, hiraditya, kristof.beyls, tschuett. Herald added projects: clang, LLDB, LLVM. sdesmalen added a

[PATCH] D82369: [SveEmitter] Add verify-checks to Clang bfloat16 tests

2020-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: c-rhodes, fpetrogalli, kmclaughlin. Herald added a subscriber: tschuett. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D82369 Files:

[PATCH] D82182: [AArch64][SVE] Add bfloat16 support to perm and select intrinsics

2020-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_sel.c:2 // REQUIRES: aarch64-registered-target -// RUN: %clang_cc1 -D__ARM_FEATURE_SVE -triple aarch64-none-linux-gnu -target-feature +sve -fallow-half-arguments-and-returns -S -O1

[PATCH] D82298: [AArch64][SVE] Add bfloat16 support to load intrinsics

2020-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_ldnf1.c:2-4 +// RUN: %clang_cc1 -D__ARM_FEATURE_SVE -D__ARM_FEATURE_BF16_SCALAR_ARITHMETIC -D__ARM_FEATURE_SVE_BF16 -triple aarch64-none-linux-gnu -target-feature +sve

[PATCH] D82187: [AArch64][SVE] ACLE: Add bfloat16 to struct load/stores.

2020-06-23 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG121e585ec8aa: [AArch64][SVE] ACLE: Add bfloat16 to struct load/stores. (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D82187?vs=272342=272678#toc Repository: rG LLVM

[PATCH] D82450: [AArch64][SVE] Add multiclass for bfloat16 intrinsic definitions

2020-06-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:264 + list arch_features = []> { + let ArchGuard = !foldl("", arch_features, lhs, rhs, + lhs # !if(!ne(lhs, ""), " && ", "") # rhs) in {

[PATCH] D82298: [AArch64][SVE] Add bfloat16 support to load intrinsics

2020-06-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-intrinsics-ld1-addressing-mode-reg-imm.ll:217 + %base_scalar = bitcast * %base to bfloat* + %load = call @llvm.aarch64.sve.ld1.nxv8bf16( %pg, bfloat* %base_scalar) + ret %load Sorry

[PATCH] D82182: [AArch64][SVE] Add bfloat16 support to perm and select intrinsics

2020-06-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/test/CodeGen/AArch64/sve-intrinsics-perm-select.ll:809 +define @rev_bf16( %a) { +; CHECK-LABEL: rev_bf16 Does this test not need the `+bf16` attribute to work? (which implies the patterns are missing the

[PATCH] D82391: [AArch64][SVE] Add bfloat16 support to svext intrinsic

2020-06-25 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:1479 + let Predicates = [IsLE, HasBF16] in { +def : Pat<(nxv16i8 (bitconvert (nxv8bf16 ZPR:$src))), (nxv16i8 ZPR:$src)>; + These patterns are missing tests in

[PATCH] D82298: [AArch64][SVE] Add bfloat16 support to load intrinsics

2020-06-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. LGTM Comment at: clang/include/clang/Basic/arm_sve.td:275 +let ArchGuard = "defined(__ARM_FEATURE_SVE_BF16)" in { + def SVLD1_BF : MInst<"svld1[_{2}]", "dPc", "b", [IsLoad], MemEltTyDefault,

[PATCH] D82578: [AArch64][SVE2] Guard while intrinsics on scalar bfloat feature macro

2020-06-26 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82578/new/ https://reviews.llvm.org/D82578 ___ cfe-commits mailing list

[PATCH] D82623: [sve][acle] Enable feature macros for SVE ACLE extensions.

2020-06-26 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Hi @fpetrogalli , I see the patch is still missing a few tests to `clang/test/Preprocessor/aarch64-target-features.c`. Not specifically to be done in this patch, but we'll also needs changes to make sure that the bfloat macros are set for armv8.6 (e.g.

[PATCH] D81459: [SveEmitter] Add SVE tuple types and builtins for svundef.

2020-06-15 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG91a4a592edb0: [SveEmitter] Add SVE tuple types and builtins for svundef. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81459/new/

[PATCH] D81721: [SVE] Ensure proper mangling of ACLE tuple types

2020-06-15 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG98100353d784: [SVE] Ensure proper mangling of ACLE tuple types (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81721/new/

[PATCH] D80851: [llvm][SveEmitter] SVE ACLE for quadword permute intrinsics.

2020-06-15 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/D80851/new/ https://reviews.llvm.org/D80851

[PATCH] D82141: [sve][acle] Add SVE BFloat16 extensions.

2020-06-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsAArch64.td:1345 +: Intrinsic<[llvm_nxv4f32_ty], +[llvm_nxv4f32_ty, + llvm_nxv8bf16_ty, nit: keep this on one line. Repository: rG LLVM Github

[PATCH] D82141: [sve][acle] Add SVE BFloat16 extensions.

2020-06-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. LGTM Comment at: llvm/include/llvm/IR/IntrinsicsAArch64.td:1811 +def int_aarch64_sve_cvt_bf16f32 : Builtin_SVCVT<"svcvt_bf16_f32_m", llvm_nxv8bf16_ty,

[PATCH] D81725: [AArch64][SVE] Enable __ARM_FEATURE_SVE macros.

2020-06-25 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfabe67728eea: [AArch64][SVE] Enable __ARM_FEATURE_SVE macros. (authored by sdesmalen). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D81463: [SveEmitter] Add builtins for tuple creation (svcreate2/svcreate3/etc)

2020-06-18 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1d7b4a7e5e4a: [SveEmitter] Add builtins for tuple creation (svcreate2/svcreate3/etc) (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80712: [SVE] Add checks for no warnings in SVE tests

2020-06-10 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_abd.c:6 +// ASM-NOT: warning #include Just thinking out loud here; we don't need to test for the specific warnings, because LLVM doesn't emit any other warnings

[PATCH] D81459: [SveEmitter] Add SVE tuple types and builtins for svundef.

2020-06-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: c-rhodes, david-arm, ctetreau, efriedma. Herald added a subscriber: tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. This patch adds new SVE types to Clang that describe tuples of SVE vectors. For example

[PATCH] D81464: [SveEmitter] Add builtins to insert/extract subvectors from tuples (svget/svset)

2020-06-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added subscribers: cfe-commits, tschuett. Herald added a project: clang. sdesmalen added a parent revision: D81459: [SveEmitter] Add SVE tuple types and builtins for svundef.. For example: svint32_t svget4(svint32x4_t tuple, uint64_t imm_index) returns

[PATCH] D81463: [SveEmitter] Add builtins for tuple creation (svcreate2/svcreate3/etc)

2020-06-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a parent revision: D81459: [SveEmitter] Add SVE tuple types and builtins for svundef.. The svcreate builtins allow constructing a tuple from individual vectors, e.g.

[PATCH] D81462: [SveEmitter] Add builtins for svtbl2

2020-06-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: david-arm, efriedma, c-rhodes. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a parent revision: D81459: [SveEmitter] Add SVE tuple types and builtins for svundef.. Repository: rG LLVM Github

[PATCH] D81304: [llvm][SveEmitter] Emit the bfloat version of `svld1ro`.

2020-06-08 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Thanks @fpetrogalli, the changes look good to me. Just added some minor comments. Comment at: clang/include/clang/Basic/AArch64SVEACLETypes.def:63 -SVE_VECTOR_TYPE("__SVFloat16_t", SveFloat16, SveFloat16Ty, 8, 16, true, true)

[PATCH] D81252: [SVE ACLE] Remove redundant bool_t typedef.

2020-06-05 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/D81252/new/ https://reviews.llvm.org/D81252

[PATCH] D81721: [SVE] Ensure proper mangling of ACLE tuple types

2020-06-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: rsandifo-arm, c-rhodes, efriedma. Herald added subscribers: cfe-commits, psnobl, rkruppe, kristof.beyls, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. sdesmalen added a parent revision: D81459: [SveEmitter]

[PATCH] D81721: [SVE] Ensure proper mangling of ACLE tuple types

2020-06-12 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. See https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#appendix-c-mangling for details on the mangling rules. I thought it would be easier to review if I kept these changes separate from D81459 . Repository:

[PATCH] D84021: [Driver] Add support for -msve-vector-bits=scalable.

2020-07-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Still LGTM :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84021/new/ https://reviews.llvm.org/D84021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D84021: [Driver] Add suppoort for -msve-vector-bits=scalable.

2020-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. nit: s/suppoort/support/ (in title) LGTM otherwise! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84021/new/

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

2021-01-06 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/docs/LanguageExtensions.rst:3034 +integer and the type of vectorization can be specified with an optional +second parameter. In this case 'fixed' is the default and refers to fixed width +vectorization, whereas 'scalable'

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

2021-01-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 for all the changes @david-arm! Comment at: clang/lib/AST/AttrImpl.cpp:46 + else if (state == FixedWidth || state == ScalableWidth) { +if (value) { +

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

[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

[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

[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

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

<    1   2   3   4   5   >