[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: docs/LanguageExtensions.rst:448 +``__fp16`` is a storage and interchange format only. This means that values of +``__fp16`` promote to (at least) float when used in artimethic operations. There are +two ``__fp16`` formats. Clang

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-07-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: docs/LanguageExtensions.rst:457 +that arithmetic on ``_Float16`` is performed in half-precision, thus it is not +a storage-only format. It is recommended that portable code use the +``_Float16`` type. I think the

[PATCH] D35295: [docs] Add section 'Half-Precision Floating Point'

2017-11-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham accepted this revision. simon_tatham added a comment. This revision is now accepted and ready to land. LGTM now, thanks! (But other reviewers may still want to comment.) https://reviews.llvm.org/D35295 ___ cfe-commits mailing list

[PATCH] D47476: Support __iso_volatile_load8 etc on aarch64-win32.

2018-05-29 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. Herald added a reviewer: javed.absar. Herald added subscribers: cfe-commits, kristof.beyls. These intrinsics are used by MSVC's header files on AArch64 Windows as well as AArch32, so we should support them for both targets. I've factored them out of

[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

2018-06-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. No, I haven't measured it. Partly because that was one of the (many) things I was going to leave until after I //didn't// get feedback on the first draft that discouraged me from the whole idea :-) and also because I've already thought of one thing I can do to

[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

2018-06-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. Herald added a subscriber: cfe-commits. This option interposes a wrapper implementation of VirtualFileSystem in front of the one in the CompilerInstance. The wrapper filesystem differs from the standard one in that it tolerates backslashes as a path separator

[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

2018-06-27 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. As I mentioned on llvm-dev, this is an unfinished draft. I'm interested in review comments, but I already know things like 'needs more comments / tests / careful error handling' :-) Some 'known unknowns': - I'm caching the results of every directory scan, to save

[PATCH] D50771: [clang-tblgen] Add -print-records and -dump-json modes.

2018-08-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: nhaehnle. Herald added a subscriber: cfe-commits. Currently, if clang-tblgen is run without a mode option, it defaults to the first mode in its 'enum Action', which happens to be -gen-clang-attr-classes. I think it makes more

[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

2018-06-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. @thakis : no, the backslash support is needed for include directives //in source files//, not just on command lines, because in my experience it's not unusual for Windows-only code bases to be full of things like `#include "Subdir\Header.h"`. @mstorsjo : in this

[PATCH] D48626: New option -fwindows-filesystem, affecting #include paths.

2018-06-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. > first check all directories in a fully case sensitive manner, just like > today. And if that fails (and we'd have a real failure that we'd otherwise > return to the caller), redo it all with case insensitivity. I agree that the integration would be a bigger

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-04-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, samparker, SjoerdMeijer. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls, eraman, javed.absar. Herald added projects: clang, LLVM. "To" selects an odd-numbered GPR, and "Te" an even one.

[PATCH] D60710: [ARM] Add ACLE feature macros for MVE.

2019-04-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, samparker, SjoerdMeijer. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. If MVE is present at all, then the macro __ARM_FEATURE_MVE is defined to a value which has bit 0

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-04-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Yes, it is. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60709/new/ https://reviews.llvm.org/D60709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D60699: [ARM] add CLI support for 8.1-M and MVE.

2019-04-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, samparker, SjoerdMeijer. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. Given the existing infrastructure in LLVM side for +fp and +fp.dp, this is more or less trivial,

[PATCH] D60697: [ARM] Allow "-march=foo+fp" to vary with foo.

2019-04-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, samparker, SjoerdMeijer. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls, javed.absar. Herald added projects: clang, LLVM. Now, when clang processes an argument of the form

[PATCH] D60691: [ARM] Replace fp-only-sp and d16 with fp64 and d32.

2019-05-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: llvm/test/MC/ARM/armv8.3a-js.s:16 // REQ-V83: error: instruction requires: armv8.3a -// REQ-FP: error: instruction requires: FPARMv8 +// REQ-FP: error: invalid instruction

[PATCH] D60691: [ARM] Replace fp-only-sp and d16 with fp64 and d32.

2019-06-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added a comment. Hmm, yes, I see what you mean. It //looks// to me as if the problem is that `llvm::ARM::getFPUFeatures` is setting up a feature list including `+vfp4`, `-fp64` and `-d32` just as you'd expect, but when it's called from

[PATCH] D62729: [ARM] Fix recent breakage of -mfpu=none.

2019-06-03 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 202681. simon_tatham added a comment. Added the extra checks in `arm-mfpu.c`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62729/new/ https://reviews.llvm.org/D62729 Files:

[PATCH] D62729: [ARM] Fix recent breakage of -mfpu=none.

2019-06-03 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/test/CodeGen/arm-mfpu-none.c:2 +// REQUIRES: arm-registered-target +// RUN: %clang -target arm-none-eabi -mcpu=cortex-m4 -mfpu=none -S -o - %s | FileCheck %s +

[PATCH] D62729: [ARM] Fix recent breakage of -mfpu=none.

2019-05-31 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: SjoerdMeijer, dmgreen. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls, javed.absar. Herald added projects: clang, LLVM. The recent change D60691 introduced a bug in

[PATCH] D62729: [ARM] Fix recent breakage of -mfpu=none.

2019-05-31 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/test/CodeGen/arm-mfpu-none.c:2 +// REQUIRES: arm-registered-target +// RUN: %clang -target arm-none-eabi -mcpu=cortex-m4 -mfpu=none -S -o - %s | FileCheck %s +

[PATCH] D60691: [ARM] Replace fp-only-sp and d16 with fp64 and d32.

2019-05-28 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 4 inline comments as done. simon_tatham added inline comments. Comment at: llvm/lib/Target/ARM/ARMSubtarget.h:587 bool hasVFP2() const { return HasVFPv2; } bool hasVFP3() const { return HasVFPv3; } ostannard wrote: > Are the old

[PATCH] D62998: [ARM] Fix bugs introduced by the fp64/d32 rework.

2019-06-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: SjoerdMeijer, dmgreen, ostannard, samparker, JamesNagurne. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls, javed.absar, srhines. Herald added projects: clang, LLVM. Change D60691

[PATCH] D62998: [ARM] Fix bugs introduced by the fp64/d32 rework.

2019-06-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 203526. simon_tatham added a comment. Renamed `FeaturesAfter` to `ExtensionFeatures` and added a comment explaining why it has to be separate. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62998/new/

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 204039. simon_tatham added a comment. Remastered patch to apply cleanly against current trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60709/new/ https://reviews.llvm.org/D60709 Files:

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-25 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 206455. simon_tatham added a comment. Rebased this patch to current trunk, and also fixed a test failure by adding `arm_aapcs_vfpcc` to the test functions that use MVE vector types (since we can't support passing vector types in GPRs until we get all

[PATCH] D60709: [ARM] Support inline assembler constraints for MVE.

2019-06-26 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 3 inline comments as done. simon_tatham added inline comments. Comment at: cfe/trunk/lib/Basic/Targets/ARM.cpp:912 + return true; +} case 'U': // a memory reference... craig.topper wrote: > Is this supposed to fallthrough from 'T'

[PATCH] D63936: [ARM] Minor fixes in command line option parsing

2019-07-01 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. I can't shed as much light as you might hope, I'm afraid, but in D62998 my intention was not to make `-mcpu=anything` win over `-mfpu=anything`. It was to make an //explicit// request to enable a feature win over an //implicit//

[PATCH] D60697: [ARM] Allow "-march=foo+fp" to vary with foo.

2019-04-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 3 inline comments as done. simon_tatham added a comment. The aim of this change is that it will apply to the v8.1-M (mainline) architecture introduced in D60698 , in which `+fp` //won't// be the default: `-march=armv8.1m.main` by itself gives

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Sorry about that – I didn't want to put the discussion of rationale in too many different places. The commit message for the followup patch D67161 discusses it a bit. The usual thing in previous intrinsics systems like NEON is

[PATCH] D67160: [clang, ARM] Default to -fno-lax-vector-conversions in ARM v8.1-M.

2019-09-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, miyuki, ostannard. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. The ACLE intrinsics for the MVE instruction set have polymorphic variants: you can write vaddq(v,w) and

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, miyuki, ostannard. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows you to declare a function with a name of your choice (say `foo`), but have clang treat it as if it were a builtin

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 219691. simon_tatham added a comment. New version which renames the attribute to be MVE-specific, and locks it down as requested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/

[PATCH] D67160: [clang, ARM] Default to -fno-lax-vector-conversions in ARM v8.1-M.

2019-09-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 219692. simon_tatham added a comment. Added a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67160/new/ https://reviews.llvm.org/D67160 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 2 inline comments as done. simon_tatham added a comment. On the general discomfort with this attribute existing: I'd be happy to lock it down, or mark it as "not recommended" in some way, if that's any help. I don't personally intend any use of it outside a single system

[PATCH] D67159: [clang] New __attribute__((__clang_builtin)).

2019-09-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Come to think of it, it would also not be too hard to constrain it to //only// be usable for a particular subset of builtins, and perhaps even only with a particular set of alias names for them. (I could easily derive all that information from the same Tablegen

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:7442 + case ParsedAttr::AT_ClangBuiltinOverride: +handleClangBuiltinOverrideAttribute(S, D, AL); +break; aaron.ballman wrote:

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 222785. simon_tatham marked an inline comment as done. simon_tatham edited the summary of this revision. simon_tatham added a comment. Addressed many (but not quite all) review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 10 inline comments as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3082 +static bool ArmMveAliasValid(unsigned BuiltinID, StringRef AliasName) { + // This will be filled in by Tablegen which isn't written yet + return false;

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3107 +if (!ArmMveAliasValid(BuiltinID, getIdentifier()->getName())) { + getASTContext().getDiagnostics().Report( +getLocation(),

[PATCH] D69788: [ARM MVE] Remove accidental 64-bit vst2/vld2 intrinsics.

2019-11-06 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG38f016520f6e: [ARM MVE] Remove accidental 64-bit vst2/vld2 intrinsics. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69788/new/

[PATCH] D69790: [ARM,MVE] Integer-type nitpicks in MVE intrinsics.

2019-11-06 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf0c6890f32c0: [ARM,MVE] Integer-type nitpicks in MVE intrinsics. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69790/new/

[PATCH] D69789: [clang,MveEmitter] Fix sign/zero extension in range limits.

2019-11-06 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG26bc7cb05edd: [clang,MveEmitter] Fix sign/zero extension in range limits. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70133: [ARM, MVE] Add intrinsics for 'administrative' vector operations.

2019-11-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 3 inline comments as done. simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:384 + let params = !foldl([], T.All, tlist, srctype, !listconcat(tlist, + !if(!eq(!cast(desttype),!cast(srctype)),[],[srctype]))) in { +def

[PATCH] D70088: [ARM,MVE] Add intrinsics for contiguous load/stores.

2019-11-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Yes, `vld1` has the same semantics as `vldrw_*32` or `vldrh_*16` or `vldrb_*8`. It's just a convenience alias that makes polymorphism easier – if I remember rightly the intended use case was people writing MVE intrinsics inside C++ templates. Repository: rG

[PATCH] D70133: [ARM, MVE] Add intrinsics for 'administrative' vector operations.

2019-11-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 229111. simon_tatham added a comment. Moved the get/set lane functions out into a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70133/new/ https://reviews.llvm.org/D70133 Files:

[PATCH] D70188: [ARM,MVE] Add intrinsics for vector get/set lane.

2019-11-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: ostannard, MarkMurrayARM, dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. simon_tatham added a parent revision: D70133: [ARM,MVE] Add intrinsics for 'administrative' vector operations..

[PATCH] D70188: [ARM,MVE] Add intrinsics for vector get/set lane.

2019-11-15 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9e37892773c0: [ARM,MVE] Add intrinsics for vector get/set lane. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70188/new/

[PATCH] D70133: [ARM, MVE] Add intrinsics for 'administrative' vector operations.

2019-11-15 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG902e84556a51: [ARM,MVE] Add intrinsics for administrative vector operations. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67160: [clang, ARM] Default to -fno-lax-vector-conversions in ARM v8.1-M.

2019-11-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. In D67160#1704840 , @rsmith wrote: > If overload resolution can't distinguish between overloads that perform a lax > vector conversions and those that do not, we should fix that in overload > resolution rather than papering

[PATCH] D70133: [ARM, MVE] Add intrinsics for 'administrative' vector operations.

2019-11-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: ostannard, MarkMurrayARM, dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. simon_tatham added a parent revision: D70088: [ARM,MVE] Add intrinsics for contiguous load/stores.. This batch

[PATCH] D67160: [clang, ARM] Default to -fno-lax-vector-conversions in ARM v8.1-M.

2019-11-12 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. (The draft implementations of `vsetq_lane` are now in D70133 .) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67160/new/ https://reviews.llvm.org/D67160

[PATCH] D70319: [ARM,MVE] Add intrinsics for scalar shifts.

2019-11-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: ostannard, MarkMurrayARM, dmgreen. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. This fills in the small family of MVE intrinsics that have nothing to do with

[PATCH] D70297: [ARM,MVE] Add intrinsics for vector comparisons.

2019-11-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 2 inline comments as done. simon_tatham added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:6798 +static llvm::Value *ARMMVEDupVector(CGBuilderTy , llvm::Value *V) { + // Helper function to duplicate a scalar value V into all lanes of an MVE

[PATCH] D69791: [ARM,MVE] Add intrinsics for gather/scatter load/stores.

2019-11-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked 3 inline comments as done. simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve_defs.td:175 +// CopyKind expects t and u to be scalars. It returns a scalar +// whose kind (signed, unsigned or float) matches that of k, and whose

[PATCH] D69790: [ARM,MVE] Integer-type nitpicks in MVE intrinsics.

2019-11-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 227692. simon_tatham added a comment. Removed the `asValue` system, which (as you'd guessed) ought to have been part of D69791 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D70485: [ARM,MVE] Add intrinsics to deal with predicates.

2019-11-21 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: llvm/include/llvm/IR/IntrinsicsARM.td:780 def int_arm_vctp8 : Intrinsic<[llvm_v16i1_ty], [llvm_i32_ty], [IntrNoMem]>; def int_arm_vctp16 : Intrinsic<[llvm_v8i1_ty], [llvm_i32_ty], [IntrNoMem]>; dmgreen wrote:

[PATCH] D70485: [ARM,MVE] Add intrinsics to deal with predicates.

2019-11-21 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 230468. simon_tatham marked an inline comment as done. simon_tatham added a comment. Made all the requested changes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70485/new/

[PATCH] D71066: [ARM][MVE][Intrinsics] Add VMULL[BT]Q_(INT|POLY) intrinsics.

2019-12-09 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve_defs.td:281 +// Scalar. +def DblVector: VecOf>; + This could just be `VecOf>`, after you carefully defined `DoubleSize` above. Comment at:

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-09 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd97b3e3e65cd: [ARM][MVE] Add intrinsics for immediate shifts. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71065/new/

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added subscribers: rdhindsa, hokein, echristo. simon_tatham added a comment. @hokein , @rdhindsa , @echristo : you all pointed out test failures in the previous version. Any problems I haven't spotted with this one? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham reopened this revision. simon_tatham added a comment. This revision is now accepted and ready to land. Reopening to review a revised version of this patch. It was reverted yesterday because of a test failure in release builds, which looks like the result of a warning fix that moved

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 233025. simon_tatham added a comment. Changes from previous version: - minor cleanup: removed check of `hasIntegerConstantValue` in `IRBuilderResult::more_prerequisites`, which was causing the generated codegen to perofrm a pointless call to

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-11 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd0f271c9e55: [ARM][MVE] Add intrinsics for immediate shifts. (reland) (authored by simon_tatham). Changed prior to commit: https://reviews.llvm.org/D71065?vs=233025=233287#toc Repository: rG LLVM

[PATCH] D71421: [ARM][MVE][Intrinsics] Add *_x() variants of my *_m() intrinsics.

2019-12-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham accepted this revision. simon_tatham added a comment. This revision is now accepted and ready to land. LGTM. I must admit that I probably didn't manage to take in every single detail of the revised test collection, but the shape of it looks generally nice, and everything I

[PATCH] D71458: [ARM][MVE] Add intrinsics for more immediate shifts.

2019-12-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. This fills in the remaining shift operations that take a single vector

[PATCH] D71458: [ARM][MVE] Add intrinsics for more immediate shifts.

2019-12-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: llvm/lib/Target/ARM/ARMInstrMVE.td:2399 + foreach pred_int = [int_arm_mve_vshll_imm_predicated] in + foreach imm = [inst_imm.immediateType] in { + MarkMurrayARM

[PATCH] D71458: [ARM][MVE] Add intrinsics for more immediate shifts.

2019-12-13 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: llvm/lib/Target/ARM/ARMInstrMVE.td:2399 + foreach pred_int = [int_arm_mve_vshll_imm_predicated] in + foreach imm = [inst_imm.immediateType] in { + simon_tatham

[PATCH] D71458: [ARM][MVE] Add intrinsics for more immediate shifts.

2019-12-13 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG25305a9311d4: [ARM][MVE] Add intrinsics for more immediate shifts. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71458/new/

[PATCH] D71335: [ARM][MVE] Factor out an IntrinsicMX multiclass.

2019-12-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 233297. simon_tatham added a comment. Refactored further to remove the `PredicatedImmediateVectorShift` multiclass completely: the amount of useful content remaining in it now doesn't seem to justify its existence. Repository: rG LLVM Github Monorepo

[PATCH] D71335: [ARM][MVE] Factor out an IntrinsicMX multiclass.

2019-12-11 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: MarkMurrayARM, miyuki. Herald added subscribers: cfe-commits, dmgreen, kristof.beyls. Herald added a project: clang. The ACLE intrinsics for MVE contain a lot of pairs of functions with `_m` and `_x` in the name, wrapping a

[PATCH] D71335: [ARM][MVE] Factor out an IntrinsicMX multiclass.

2019-12-11 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd290424731ed: [ARM][MVE] Factor out an IntrinsicMX multiclass. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71335/new/

[PATCH] D71065: [ARM][MVE] Add intrinsics for immediate shifts.

2019-12-05 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: dmgreen, miyuki, MarkMurrayARM, ostannard. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. This adds the family of `vshlq_n` and `vshrq_n` ACLE intrinsics, which

[PATCH] D69426: [clang] Switch arm-mve-intrinsics tests to use %clang_cc1.

2019-10-25 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. simon_tatham edited the summary of this revision. It isn't really necessary for them to run the clang driver, and it's more efficient

[PATCH] D69426: [clang] Switch arm-mve-intrinsics tests to use %clang_cc1.

2019-10-25 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. There's no need, as far as I can see. `-fno-discard-value-names` is a driver option only. On the cc1 command line the option is `-discard-value-names`, and it has no negative form: you turn it off by not specifying it in the first place, which indeed these command

[PATCH] D69426: [clang] Switch arm-mve-intrinsics tests to use %clang_cc1.

2019-10-25 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG11ce19d2119e: [clang] Switch arm-mve-intrinsics tests to use %clang_cc1. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-15 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Thanks for the review! (I expect to leave this uncommitted until I have enough other patches approved to make it actually useful, and then commit them all together.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69025: [Driver,ARM] Make -mfloat-abi=soft turn off MVE.

2019-10-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. Since `-mfloat-abi=soft` is taken to mean turning off all uses of the FP registers, it should turn off the MVE vector instructions as

[PATCH] D69025: [Driver,ARM] Make -mfloat-abi=soft turn off MVE.

2019-10-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. Yes: this change is in the driver, and causes those features to be disabled on the command line to cc1, which responds by not defining `__ARM_FEATURE_MVE`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69025/new/

[PATCH] D69025: [Driver,ARM] Make -mfloat-abi=soft turn off MVE.

2019-10-16 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. So, as for adding a test ... the test I //have// added here ensures that this combination of driver options leads to `-target-feature -mve` and `-mve.fp` on the cc1 command line, and the existing test `Preprocessor/arm-target-features.c` checks that that in turn

[PATCH] D69025: [Driver,ARM] Make -mfloat-abi=soft turn off MVE.

2019-10-16 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfdccf28697e5: [Driver,ARM] Make -mfloat-abi=soft turn off MVE. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69025/new/

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-24 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c11da0cfd33: [clang] New __attribute__((__clang_arm_mve_alias)). (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-24 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 226238. simon_tatham added a comment. (Rebased to current master; no change) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/ https://reviews.llvm.org/D67159 Files:

[PATCH] D67161: [clang,ARM] Initial ACLE intrinsics for MVE.

2019-10-25 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/utils/TableGen/CMakeLists.txt:17 NeonEmitter.cpp + MveEmitter.cpp TableGen.cpp thakis wrote: > nit: These files are listed alphabetically. Sorry about

[PATCH] D70485: [ARM,MVE] Add intrinsics to deal with predicates.

2019-11-20 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added reviewers: ostannard, MarkMurrayARM, dmgreen. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. This commit adds the `vpselq` intrinsics which take an MVE predicate word and

[PATCH] D70319: [ARM,MVE] Add intrinsics for scalar shifts.

2019-11-19 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG254b4f250007: [ARM,MVE] Add intrinsics for scalar shifts. (authored by simon_tatham). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70319/new/

[PATCH] D70545: [ARM][MVE][Intrinsics] Add MVE VABD intrinsics.

2019-11-26 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added a comment. This mostly LGTM: only a handful of nits. Comment at: clang/include/clang/Basic/arm_mve.td:45 let params = T.Usual in { +def vabdq: Intrinsic $a, $b)>; +} Can you wrap this line to 80 columns, please? I've been trying to fit the

[PATCH] D70546: [ARM][MVE][Intrinsics] Add MVE VMUL intrinsics.

2019-11-26 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: llvm/test/CodeGen/Thumb2/LowOverheadLoops/wlstp.mir:219 ; CHECK: renamable $r3, dead $cpsr = tSUBi8 killed renamable $r3, 16, 14, $noreg - ; CHECK: renamable $q0 = MVE_VMULt1i8 killed renamable $q1, killed renamable $q0,

[PATCH] D70547: [ARM][MVE][Intrinsics] Add MVE VAND/VORR/VORN/VEOR/VBIC intrinsics.

2019-11-26 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham accepted this revision. simon_tatham added a comment. This revision is now accepted and ready to land. LGTM, though I spotted a couple of even tinier last-minute nits. Comment at: clang/include/clang/Basic/arm_mve.td:68 +// Vector and UVector may be different

[PATCH] D70547: [ARM][MVE][Intrinsics] Add MVE VAND/VORR/VORN/VEOR/VBIC intrinsics.

2019-11-26 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham added inline comments. Comment at: clang/include/clang/Basic/arm_mve.td:68 +def "": Intrinsic +(bitcast $a, UVector), I think it's worth adding a comment here explaining why this bitcasting isn't overcomplicating the IR in the

[PATCH] D70485: [ARM,MVE] Add intrinsics to deal with predicates.

2019-12-02 Thread Simon Tatham via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd173fb5d2854: [ARM,MVE] Add intrinsics to deal with predicates. (authored by simon_tatham). Changed prior to commit: https://reviews.llvm.org/D70485?vs=230627=231718#toc Repository: rG LLVM Github

[PATCH] D70829: [ARM][MVE][Intrinsics] Add VMINQ/VMAXQ/VMINNMQ/VMAXNMQ intrinsics.

2019-12-02 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham accepted this revision. simon_tatham added a comment. I do, but only an indentation quibble. Comment at: clang/include/clang/Basic/arm_mve.td:205 +(select (icmp_ule $a, $b), $a, $b)>, +

[PATCH] D69790: [ARM,MVE] Integer-type nitpicks in MVE intrinsics.

2019-11-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. simon_tatham added a child revision: D69791: [ARM,MVE] Add intrinsics for gather/scatter load/stores.. A few integer types in the ACLE

[PATCH] D69788: [ARM MVE] Remove accidental 64-bit vst2/vld2 intrinsics.

2019-11-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: dmgreen. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. ACLE defines no such intrinsic as vst2q_u64, and the MVE instruction set has no corresponding instruction. But I had accidentally added

[PATCH] D69789: [clang,MveEmitter] Fix sign/zero extension in range limits.

2019-11-04 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham created this revision. simon_tatham added a reviewer: dmgreen. Herald added a project: clang. Herald added a subscriber: cfe-commits. simon_tatham added a child revision: D69791: [ARM,MVE] Add intrinsics for gather/scatter load/stores.. simon_tatham edited the summary of this

[PATCH] D70485: [ARM,MVE] Add intrinsics to deal with predicates.

2019-11-22 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 230627. simon_tatham edited the summary of this revision. simon_tatham added a comment. Revised again to fix test failures. But I've also split off the rework of `int_arm_vctp` into a separate patch D70592 , to make it

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3107 +if (!ArmMveAliasValid(BuiltinID, getIdentifier()->getName())) { + getASTContext().getDiagnostics().Report( +getLocation(),

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 223550. simon_tatham added a comment. Moved the diagnostic into `SemaDeclAttr.cpp` as suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67159/new/ https://reviews.llvm.org/D67159 Files:

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-07 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham marked an inline comment as done. simon_tatham added inline comments. Comment at: clang/lib/AST/Decl.cpp:3107 +if (!ArmMveAliasValid(BuiltinID, getIdentifier()->getName())) { + getASTContext().getDiagnostics().Report( +getLocation(),

[PATCH] D67159: [clang] New __attribute__((__clang_arm_mve_alias)).

2019-10-10 Thread Simon Tatham via Phabricator via cfe-commits
simon_tatham updated this revision to Diff 224288. simon_tatham marked 3 inline comments as done. simon_tatham added a comment. Removed spuriously inserted blank line and redundant `checkAttributeNumArgs`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

  1   2   3   4   >