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

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

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

[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 cfe-commits@lists

[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. `-march=armv8.6

[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 https://lists.llvm.org/cgi-bi

[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] 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) +Builder.defineMacro("__ARM_FEATURE_SVE_MA

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

[PATCH] D78239: [SveEmitter] Add builtins for FP conversions

2020-04-16 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D78239#1985102 , @efriedma wrote: > > as the LLVM IR intrinsics use the as the predicate. > > Why are the fp conversion intrinsics special here? Should we fix the LLVM > intrinsic definitions? I questioned that as well, b

[PATCH] D77597: [SveEmitter] Add ExpandOp1SVALL and builtin for svptrue

2020-04-16 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:7683 +if (TypeFlags.isExpandOp1SVALL()) { + if (Ops.size() <= 1) +Ops.push_back(Builder.getInt32(31)); efriedma wrote: > The

[PATCH] D78323: [clang] Fix invalid comparator in tablegen

2020-04-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, did this comparison introduce any non-determinism? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78323/new/ https://reviews.llvm.org

[PATCH] D78401: [SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]

2020-04-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a parent revision: D77597: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]. Some ACLE builtins leave out

[PATCH] D77597: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]

2020-04-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 258416. sdesmalen retitled this revision from "[SveEmitter] Add ExpandOp1SVALL and builtin for svptrue" to "[SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]". sdesmalen edited the summary of this revision. sdesmalen added a comment.

[PATCH] D78239: [SveEmitter] Add builtins for FP conversions

2020-04-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 258426. sdesmalen added a comment. - Added comment to CGBuiltin explaining that the special case for IsFPConvert will be removed in a follow-up patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78239/new/ https://reviews.llvm.org/D78239 Files

[PATCH] D78239: [SveEmitter] Add builtins for FP conversions

2020-04-17 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added a comment. In D78239#1987859 , @efriedma wrote: > I think the predicate type is something we should fix. Even if it's not > causing problems now, it seems like the sort of thing that will bite

[PATCH] D76929: [AArch64][SVE] Add SVE intrinsic for LD1RQ

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11622 + if (VT.isFloatingPoint()) +Load = DAG.getNode(ISD::BITCAST, DL, VT, Load); + kmclaughlin wrote: > sdesmalen wrote: > > I'd expect this to then use `Load.getV

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

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG515020c091e7: [SveEmitter] Add more immediate operand checks. (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D76679?vs=252246&id=258724#toc Repository: rG LLVM Github Mono

[PATCH] D77594: [SveEmitter] Add support for _n form builtins

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77594/new/ https://reviews.llvm.org/D77594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

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

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sdesmalen marked an inline comment as done. Closed by commit rGfc6453974980: [SveEmitter] Add immediate checks for lanes and complex imms (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D77735: [SveEmitter] Implement builtins for gathers/scatters

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7601 + llvm::Type *SrcDataTy = getSVEType(TypeFlags); + llvm::Type *OverloadedTy = llvm::VectorType::get( + SVEBuiltinMemEltTy(TypeFlags), SrcDataTy->getVectorElementCount()); nit

[PATCH] D77591: [SveEmitter] Explicitly merge with zero/undef

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9986b3de26d3: [SveEmitter] Explicitly merge with zero/undef (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D77591?vs=255501&id=258760#toc Repository: rG LLVM Github Monore

[PATCH] D77735: [SveEmitter] Implement builtins for gathers/scatters

2020-04-20 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7451 + } + llvm_unreachable("Unknown MemEltType"); +} SjoerdMeijer wrote: > nit: to be consistent, do this in the default clause? Doing that would lead to warning: default label in

[PATCH] D77735: [SveEmitter] Implement builtins for gathers/scatters

2020-04-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. LGTM! Cheers @andwar Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77735/new/ https://reviews.llvm.org/D77735 ___ cfe-commits mailing list c

[PATCH] D78569: [SVE][CodeGen] Lower SDIV & UDIV to SVE intrinsics

2020-04-21 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7670 + Mask, Op.getOperand(0), Op.getOperand(1)); +} + efriedma wrote: > If we're going to support these operations, we might as well just add isel >

[PATCH] D76929: [AArch64][SVE] Add SVE intrinsic for LD1RQ

2020-04-21 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/D76929/new/ https://reviews.llvm.org/D76929 ___ cfe-commits mailing list cfe-co

[PATCH] D77594: [SveEmitter] Add support for _n form builtins

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:212 + bool hasSplat() const { +return Proto.find_first_of("ajfrKLR") != std::string::npos; + } SjoerdMeijer wrote: > "ajfrKLR" -> bi

[PATCH] D77596: [SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt[bhwd]_pat

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG662cbaf6476b: [SveEmitter] Add IsOverloadNone flag and builtins for svpfalse and svcnt… (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D77596?vs=257824&id=259318#toc Reposit

[PATCH] D78238: [SveEmitter] Add builtins for svwhilerw/svwhilewr

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d1baf606ab4: [SveEmitter] Add builtins for svwhilerw/svwhilewr (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D78238?vs=257822&id=259394#toc Repository: rG LLVM Github Mo

[PATCH] D77595: [SveEmitter] Add builtins for svwhile

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1559485e6002: [SveEmitter] Add builtins for svwhile (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D77595?vs=257829&id=259392#toc Repository: rG LLVM Github Monorepo CHAN

[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen updated this revision to Diff 259403. sdesmalen added a comment. - Removed unrelated whitespace changes. This patch also add

[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

2020-04-22 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 259403. sdesmalen added a comment. - Removed unrelated whitespace changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78674/new/ https://reviews.llvm.org/D78674 Files: clang/include/clang/Basic/TargetBuiltins.h clang/include/clang/Basic/ar

[PATCH] D78677: [SveEmitter] Add builtins for gather prefetches

2020-04-22 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 project: clang. sdesmalen added a parent revision: D78674: [SveEmitter] Add builtins for contiguous prefetches. Repository: rG LLVM Github Monorepo https://re

[PATCH] D78239: [SveEmitter] Add builtins for FP conversions

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG002164461b52: [SveEmitter] Add builtins for FP conversions (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D78239?vs=258426&id=259504#toc Repository: rG LLVM Github Monorep

[PATCH] D78569: [SVE][CodeGen] Lower SDIV & UDIV to SVE intrinsics

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:7670 + Mask, Op.getOperand(0), Op.getOperand(1)); +} + efriedma wrote: > sdesmalen wrote: > > efriedma wrote: > > > If we're going to support these op

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. It seems a NVIDIA Developer Program Membership is needed in order to download the TRM. I'm not sure if that is just a matter of creating an account, but without it I can't really verify that the architecture version and the features are correct and complete. ==

[PATCH] D78401: [SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/include/clang/Basic/arm_sve.td:530 +class sat_type { string U = u; string T = t; } +def SIGNED_BYTE : sat_type<"", "c">; +def SIGNED_HALF : sat_type<"", "s">; SjoerdMeijer wrote: > nit: just won

[PATCH] D77597: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 259555. sdesmalen marked 2 inline comments as done. sdesmalen added a comment. - Added comment explaining need for expanding SV_ALL CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77597/new/ https://reviews.llvm.org/D77597 Files: clang/include/cl

[PATCH] D78401: [SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 259554. sdesmalen marked 3 inline comments as done. sdesmalen added a comment. - Changed UNSIGNED_BYTE etc from upper-case to CamelCase. - Added comment explaining need to expand SV_ALL CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78401/new/ http

[PATCH] D78677: [SveEmitter] Add builtins for gather prefetches

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 259589. sdesmalen added a comment. - Updated the tests to use `SVE_ACLE_FUNC` for the overloaded builtins. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78677/new/ https://reviews.llvm.org/D78677 Files: clang/include/clang/Basic/TargetBuiltins.

[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 259587. sdesmalen marked an inline comment as done. sdesmalen added a comment. - Don't emit bitcast+gep+bitcast when offset is 0. - Added negative tests for _vnum cases. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78674/new/ https://reviews.llvm

[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

2020-04-23 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:7727 + Value *Offset = Ops.size() > 3 ? Ops[2] : Builder.getInt32(0); + BasePtr = Builder.CreateGEP(MemoryTy, BasePtr, Offset); + efriedma w

[PATCH] D78748: [SveEmitter] Add builtins for svld1rq

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a child revision: D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane. Repository: rG LLVM Github Monorepo

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau. Herald added a subscriber: tschuett. Herald added a project: clang. sdesmalen added a parent revision: D78748: [SveEmitter] Add builtins for svld1rq. - svdupq builtins that duplicate scalars to every qua

[PATCH] D78751: [SveEmitter] Add builtins for scatter stores

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, andwar. Herald added a subscriber: tschuett. Herald added a project: clang. D77735 only added scatters for the non-temporal variants. Repository: rG LLVM Github Monorepo http

[PATCH] D78755: [SveEmitter] Add builtins for svlen

2020-04-23 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 project: clang. The svlen builtins return the number of elements in a vector and are implemented using `llvm.vscale`. Repository: rG LLVM Github Monorepo htt

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

2020-04-23 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau. Herald added subscribers: kristof.beyls, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. The reinterpret builtins are generated separately because they need the cross product o

[PATCH] D77597: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]

2020-04-24 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Gentle ping :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77597/new/ https://reviews.llvm.org/D77597 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[PATCH] D78751: [SveEmitter] Add builtins for scatter stores

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

[PATCH] D78748: [SveEmitter] Add builtins for svld1rq

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

[PATCH] D78674: [SveEmitter] Add builtins for contiguous prefetches

2020-04-24 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG823e2a670a9d: [SveEmitter] Add builtins for contiguous prefetches (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D78674?vs=259587&id=259851#toc Repository: rG LLVM Github

[PATCH] D77597: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd]

2020-04-26 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3817ca7dbf8d: [SveEmitter] Add IsAppendSVALL and builtins for svptrue and svcnt[bhwd] (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D77597?vs=259555&id=260160#toc Repositor

[PATCH] D78401: [SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd]

2020-04-27 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG03f419f3eb0c: [SveEmitter] IsInsertOp1SVALL and builtins for svqdec[bhwd] and svqinc[bhwd] (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D78401?vs=259554&id=260274#toc Repo

[PATCH] D78960: [SveEmitter] Add builtins for ternary ops (fmla, fmad, etc)

2020-04-27 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. Now that most of the functionality has been added to SveEmitter.cpp and CGBuiltin.cpp, the patches are becoming simpler and simpler. This patch is such an example, which is basically "builtin definitions + tests". This is probably a good point to ask for some feedback

[PATCH] D78755: [SveEmitter] Add builtins for svlen

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

[PATCH] D78995: [SveEmitter] NFCI: Describe splat operands like any other modifier

2020-04-28 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. For scalar operands that need to be splat to a vector, this patch adds a bool to the SVEType struct so that the `applyModifier` function sets

[PATCH] D78995: [SveEmitter] NFCI: Describe splat operands like any other modifier

2020-04-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added a comment. Thanks for having a look @SjoerdMeijer Comment at: clang/utils/TableGen/SveEmitter.cpp:68 TypeSpec TS; + bool IsSplat; bool Float, Signed, Immediate, Void, Constant, Pointer; SjoerdMe

[PATCH] D79039: [SveEmitter] Add builtins for svmov_b and svnot_b.

2020-04-28 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: SjoerdMeijer, efriedma, ctetreau. Herald added a subscriber: tschuett. Herald added a reviewer: rengolin. These are custom expanded in CGBuiltin: svmov_b_z(pg, op) <=> svand_b_z(pg, op, op) svnot_b_z(pg, op) <=> sveor_b_z(pg, op, pg)

[PATCH] D78677: [SveEmitter] Add builtins for gather prefetches

2020-04-29 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added a comment. Thanks for reviewing! Comment at: clang/lib/CodeGen/CGBuiltin.cpp:7739 + +// Index needs to be passed as scaled offset. +llvm::Type *MemEltTy = SVEBuiltinMemEltTy(TypeFlags); efriedm

[PATCH] D78677: [SveEmitter] Add builtins for gather prefetches

2020-04-29 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG42a56bf63f69: [SveEmitter] Add builtins for gather prefetches (authored by sdesmalen). Changed prior to commit: https://reviews.llvm.org/D78677?vs=259589&id=260879#toc Repository: rG LLVM Github Mono

[PATCH] D79039: [SveEmitter] Add builtins for svmov_b and svnot_b.

2020-04-29 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa4dac6d4e0ea: [SveEmitter] Add builtins for svmov_b and svnot_b. (authored by sdesmalen). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.

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

2020-04-29 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:7880 +return Builder.CreateBitCast(Val, Ty); + } + efriedma wrote: > I'm vaguely suspicious this might be wrong for big-endian targets.

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

2020-04-29 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:7880 +return Builder.CreateBitCast(Val, Ty); + } + efriedma wrote: > sdesmalen wrote: > > efriedma wrote: > > > I'm vaguely suspicious th

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-04-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: llvm/unittests/Support/TargetParserTest.cpp:1134 AArch64::ArchKind::INVALID, "sve2")); + EXPECT_TRUE( + test

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D78750#2009037 , @efriedma wrote: > Is there some reason you decided to implement these particular functions as > inline functions directly in the header? Earlier implementations of the ACLE had a lot more things done in th

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 261537. sdesmalen added a comment. - Moved dupq implementation to CGBuiltins CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78750/new/ https://reviews.llvm.org/D78750 Files: clang/include/clang/Basic/arm_sve.td clang/lib/CodeGen/CGBuiltin.cpp

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 261545. sdesmalen added a comment. - Re-added patch with diff context. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78750/new/ https://reviews.llvm.org/D78750 Files: clang/include/clang/Basic/arm_sve.td clang/lib/CodeGen/CGBuiltin.cpp clan

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-01 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked an inline comment as done. sdesmalen added inline comments. Comment at: clang/utils/TableGen/SveEmitter.cpp:98 + bool isScalarPredicate() const { +return !Float && Predicate && NumVectors == 0; + } note: the changes to isScalarPredicate and

[PATCH] D77940: [AArch64] Add NVIDIA Carmel support

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0863e94ebd87: [AArch64] Add NVIDIA Carmel support (authored by tambre, committed by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77940/new/ htt

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

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 261853. sdesmalen added a comment. - Use CreateTempAlloca instead of CreateAlloca - Added checks for alignment to the stores. - Added test with control-flow to check the alloca is added to the entry-block. CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen marked 4 inline comments as done. sdesmalen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:8054 + +Value *Alloca = Builder.CreateAlloca(EltTy, Builder.getInt32(NumOpnds)); +for (unsigned I = 0; I < NumOpnds; ++I) efriedma wro

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

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 261892. sdesmalen added a comment. - Added FIXME in CGBuiltins for big-endian svreinterpret. - Added diagnostic in arm_sve.h that big-endian is not yet supported. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78756/new/ https://reviews.llvm.org/D7

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

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen created this revision. sdesmalen added reviewers: efriedma, SjoerdMeijer, kmclaughlin. Herald added subscribers: arphaman, tschuett. sdesmalen added a parent revision: D79356: [CodeGen][SVE] Add patterns for whole vector predicate select. https://reviews.llvm.org/D79357 Files: clang/

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. sdesmalen marked an inline comment as done. Closed by commit rG6b90a6887d25: [SveEmitter] Add builtins for svdupq and svdupq_lane (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION h

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. In D78750#2018673 , @thakis wrote: > Looks like this breaks check-clang on Windows: > http://45.33.8.238/win/14483/step_7.txt > > And some other bots: > > http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/b

[PATCH] D78750: [SveEmitter] Add builtins for svdupq and svdupq_lane

2020-05-04 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added a comment. I have reverted the patch in the meantime Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78750/new/ https://reviews.llvm.org/D78750 ___ cfe-commits mailing list cfe-commits@li

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

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

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

[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: https://reviews.llvm.org/D79480?vs=262341&id=26260

[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: clang/include/clang/Basi

[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&id=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 `e

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

2020-05-11 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen updated this revision to Diff 263258. sdesmalen added a comment. - Use `llvm.aarch64.sve.dup.x` for `svdup_n_b` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79357/new/ https://reviews.llvm.org/D79357 Files: clang/include/clang/Basic/arm_sve.td clang/lib/CodeGen/CGBuiltin

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

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

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

[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 &TypeFlags, + llvm::Type *Ty, nit: s/Emmit/Emit/ How about naming these: *

[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 (has

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

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

[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 &II) { + IRBuilder<> Bui

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

[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); -

<    1   2   3   4   5   >