[clang] [Clang][SveEmitter] Split up TargetGuard into SVE and SME component. (PR #96482)

2024-06-24 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. This is certainly a step in the right direction. https://github.com/llvm/llvm-project/pull/96482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
@@ -1781,7 +1781,13 @@ void SVEEmitter::createStreamingAttrs(raw_ostream , ACLEKind Kind) { uint64_t VerifyRuntimeMode = getEnumValueForFlag("VerifyRuntimeMode"); uint64_t IsStreamingCompatibleFlag = getEnumValueForFlag("IsStreamingCompatible"); + for (auto :

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
@@ -2264,6 +2278,18 @@ let TargetGuard = "sve2p1" in { defm SVPMOV_TO_VEC_LANE_D : PMOV_TO_VEC<"svpmov", "lUl", "aarch64_sve_pmov_to_vector_lane" ,[], ImmCheck1_7>; } +let TargetGuard = "sve2p1|sme2p1" in { + // DUPQ + def SVDUP_LANEQ_B : SInst<"svdup_laneq[_{d}]",

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm commented: With the change of default it's very hard to check everything but we've already agreed there'll need to be a full audit once all the inflight work has landed. I did spot one thing though: Should the integer svclamp and svrevd builtins be

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
@@ -286,17 +290,20 @@ let TargetGuard = "sve,f64mm,bf16" in { } let TargetGuard = "sve,bf16" in { + def SVBFMMLA : SInst<"svbfmmla[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmmla", [IsOverloadNone]>; +} + +let TargetGuard = "(sve|sme),bf16" in {

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-20 Thread Paul Walker via cfe-commits
@@ -17,7 +25,7 @@ // CPP-CHECK-NEXT:[[TMP1:%.*]] = shl nuw nsw i64 [[TMP0]], 4 // CPP-CHECK-NEXT:ret i64 [[TMP1]] // -uint64_t test_svcntb() +uint64_t test_svcntb(void) MODE_ATTR paulwalker-arm wrote: Is there a problem we need to worry about with

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
@@ -286,10 +290,13 @@ let TargetGuard = "sve,f64mm,bf16" in { } let TargetGuard = "sve,bf16" in { + def SVBFMMLA : SInst<"svbfmmla[_{0}]", "MMdd", "b", MergeNone, "aarch64_sve_bfmmla", [IsOverloadNone]>; +} + +let TargetGuard = "(sve,bf16)|sme" in {

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
@@ -1781,7 +1781,12 @@ void SVEEmitter::createStreamingAttrs(raw_ostream , ACLEKind Kind) { uint64_t VerifyRuntimeMode = getEnumValueForFlag("VerifyRuntimeMode"); uint64_t IsStreamingCompatibleFlag = getEnumValueForFlag("IsStreamingCompatible"); + for (auto :

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/95787 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
@@ -2264,6 +2278,18 @@ let TargetGuard = "sve2p1" in { defm SVPMOV_TO_VEC_LANE_D : PMOV_TO_VEC<"svpmov", "lUl", "aarch64_sve_pmov_to_vector_lane" ,[], ImmCheck1_7>; } +let TargetGuard = "sve2p1|sme2" in { paulwalker-arm wrote: I think this is a sme2p1

[clang] [Clang][AArch64] Expose compatible SVE intrinsics with only +sme (PR #95787)

2024-06-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm commented: Not for this patch but I do wonder if there's value in protecting non-bf16 instruction backed builtins (e.g. loadstone and shuffles) with the bf16 target guard. I figure we'll either error on the use of the `svbfloat` type or the code generation

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-15 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/93802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-14 Thread Paul Walker via cfe-commits
@@ -559,31 +559,76 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema , CallExpr *TheCall, - const FunctionDecl *FD, -

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-06 Thread Paul Walker via cfe-commits
@@ -622,7 +679,8 @@ bool SemaARM::CheckSMEBuiltinFunctionCall(unsigned BuiltinID, } if (BuiltinType) - checkArmStreamingBuiltin(SemaRef, TheCall, FD, *BuiltinType); + HasError |= checkArmStreamingBuiltin(SemaRef, TheCall, FD, *BuiltinType,

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-06 Thread Paul Walker via cfe-commits
@@ -559,31 +559,86 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema , CallExpr *TheCall, - const FunctionDecl *FD, -

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-06 Thread Paul Walker via cfe-commits
@@ -559,31 +559,86 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { return SemaARM::ArmNonStreaming; } -static void checkArmStreamingBuiltin(Sema , CallExpr *TheCall, - const FunctionDecl *FD, -

[clang] [llvm] [AArch64] Fix feature flags dependecies (PR #90612)

2024-06-05 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: @momchil-velikov's commentary applies globally and is not specific to FPMR. Which is to say, Arm switched a while back from "all system register need to be protected by their feature flag" to "only protect system registers where there is a need". The rational is that we

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-04 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/93802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-04 Thread Paul Walker via cfe-commits
@@ -561,16 +561,61 @@ SemaARM::ArmStreamingType getArmStreamingFnType(const FunctionDecl *FD) { static void checkArmStreamingBuiltin(Sema , CallExpr *TheCall, const FunctionDecl *FD, -

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-04 Thread Paul Walker via cfe-commits
@@ -225,7 +225,7 @@ def IsStreamingCompatible : FlagType<0x40>; def IsReadZA: FlagType<0x80>; def IsWriteZA : FlagType<0x100>; def IsReductionQV : FlagType<0x200>; -def

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-04 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/93802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Generalise streaming mode checks for builtins. (PR #93802)

2024-06-04 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm requested changes to this pull request. https://github.com/llvm/llvm-project/pull/93802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Use __clang_arm_builtin_alias for overloaded svreinterpret's (PR #92427)

2024-05-22 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/92427 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/91356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/91356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm commented: After further discussion I know understand the `__arm_streaming_compatible` keyword has no affect on the target features in play and only tells the compiler not to emit any SM state changing instructions as part of the calling convention.

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
@@ -8982,11 +8982,18 @@ void Sema::CheckVariableDeclarationType(VarDecl *NewVD) { const FunctionDecl *FD = cast(CurContext); llvm::StringMap CallerFeatureMap; Context.getFunctionFeatureMap(CallerFeatureMap, FD); -if (!Builtin::evaluateRequiredTargetFeatures( -

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
@@ -9,6 +9,12 @@ #include +#if defined __ARM_FEATURE_SME +#define MODE_ATTR __arm_streaming +#else +#define MODE_ATTR __arm_streaming_compatible paulwalker-arm wrote: Do you need to use `__arm_streaming_compatible` here? Now we've agreed this keyword has

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-16 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/91356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Require SVE or SSVE for scalable types. (PR #91356)

2024-05-08 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm requested changes to this pull request. As discussed offline, I don't think we want to be this strict. As demonstrated by the changes to the ACLE tests, this change makes it impossible to distribute a library in binary form that can work for both SVE and

[clang] [llvm] [mlir] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-26 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SVE] Seperate the int and floating-point variants of addqv. (PR #89762)

2024-04-26 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/89762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][SVE] Seperate the int and floating-point variants of addqv. (PR #89762)

2024-04-23 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/89762 We only use common intrinsics for operations that treat their element type as a container of bits. >From ed27a2d1406dccf70e7189578cd6950b61961c1b Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 23

[clang] [llvm] [LLVM][TypeSize] Remove default constructor. (PR #82810)

2024-02-28 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/82810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][TypeSize] Remove default constructor. (PR #82810)

2024-02-26 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/82810 >From a4c46459564bd8a8e5ca2a56fa643f866b7e869a Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 23 Feb 2024 18:26:10 + Subject: [PATCH] [LLVM][TypeSize] Remove default constructor. ---

[clang] [llvm] [LLVM][TypeSize] Remove default constructor. (PR #82810)

2024-02-23 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/82810 Implements the follow-on work requesting on https://github.com/llvm/llvm-project/pull/75614. >From a75304dffb77be1fb15f268000bfbdd07be774e1 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Fri, 23 Feb

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-19 Thread Paul Walker via cfe-commits
@@ -10570,6 +10570,26 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, HintID)); } + if (BuiltinID == clang::AArch64::BI__builtin_arm_get_sme_state) { +// Create call to

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-19 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/75791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-19 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/75791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-19 Thread Paul Walker via cfe-commits
@@ -1600,6 +1600,25 @@ void SVEEmitter::createSMEHeader(raw_ostream ) { OS << "extern \"C\" {\n"; OS << "#endif\n\n"; + OS << "void __arm_za_disable(void) __arm_streaming_compatible;\n\n"; + + OS << "__ai bool __arm_has_sme(void) __arm_streaming_compatible {\n"; + OS

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-19 Thread Paul Walker via cfe-commits
@@ -10570,6 +10570,26 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, HintID)); } + if (BuiltinID == clang::AArch64::BI__builtin_arm_get_sme_state) { +// Create call to

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-18 Thread Paul Walker via cfe-commits
@@ -10570,6 +10570,26 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID, return Builder.CreateCall(F, llvm::ConstantInt::get(Int32Ty, HintID)); } + if (BuiltinID == clang::AArch64::BI__builtin_arm_get_sme_state) { +// Create call to

[clang] [Clang][AArch64] Add missing SME functions to header file. (PR #75791)

2023-12-18 Thread Paul Walker via cfe-commits
@@ -1600,6 +1600,25 @@ void SVEEmitter::createSMEHeader(raw_ostream ) { OS << "extern \"C\" {\n"; OS << "#endif\n\n"; + OS << "void __arm_za_disable(void) __arm_streaming_compatible;\n\n"; + + OS << "__ai bool __arm_has_sme(void) __arm_streaming_compatible {\n"; + OS

[llvm] [mlir] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/75217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [llvm] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-15 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Turns out there was just a single extra instance, within MLIR. It's an interesting one though and I've noted it as it looks like I'll need to extend `ModuleImport::getConstantAsAttr` as part of the patch that enables direct VectorType support for ConstantInt/FP.

[llvm] [clang] [mlir] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-15 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From d19e9e20432c0dfe50bfba7cd782179653f42b2b Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Just a note to say the PR is not complete because there are uses outside of clang and llvm that I need to port. https://github.com/llvm/llvm-project/pull/75217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From b484b3c60b172fadb6fa600cdc15a865750867a8 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/8] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/7] [LLVM][IR] Replace ConstantInt's specialisation of

[clang] [llvm] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/6] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/5] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/4] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/3] [LLVM][IR] Replace ConstantInt's specialisation of

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-13 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/75217 >From 3f01bab15a8645be06ab30afa3bc42f11f3d4959 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 29 Nov 2023 14:45:06 + Subject: [PATCH 1/2] [LLVM][IR] Replace ConstantInt's specialisation of

[clang] [llvm] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-12 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Most all the recommend changes assume the code paths will work equally well for vector types as they do for scalar types. Can we be so sure this is the case? This is why I opted to keep the casting assertions with the exception of a few places where I could be sure the

[llvm] [clang] [LLVM][IR] Replace ConstantInt's specialisation of getType() with getIntegerType(). (PR #75217)

2023-12-12 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/75217 The specialisation will not be valid when ConstantInt gains native support for vector types. This is largely a mechanical change but with extra attention paid to InstCombineVectorOps.cpp,

[clang] [llvm] [clang-tools-extra] [LoopVectorize] Improve algorithm for hoisting runtime checks (PR #73515)

2023-12-11 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/73515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [LoopVectorize] Improve algorithm for hoisting runtime checks (PR #73515)

2023-12-11 Thread Paul Walker via cfe-commits
@@ -347,7 +347,12 @@ void RuntimePointerChecking::tryToCreateDiffCheck( auto *SinkStartAR = cast(SinkStartInt); const Loop *StartARLoop = SrcStartAR->getLoop(); if (StartARLoop == SinkStartAR->getLoop() && -StartARLoop == InnerLoop->getParentLoop()) { +

[clang] [llvm] [clang-tools-extra] [LoopVectorize] Improve algorithm for hoisting runtime checks (PR #73515)

2023-12-11 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/73515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 94c8373 - [NFC] A few whitespace changes.

2023-12-08 Thread Paul Walker via cfe-commits
Author: Paul Walker Date: 2023-12-08T18:01:12Z New Revision: 94c837345c27e173284a85471d4efda19eded08e URL: https://github.com/llvm/llvm-project/commit/94c837345c27e173284a85471d4efda19eded08e DIFF: https://github.com/llvm/llvm-project/commit/94c837345c27e173284a85471d4efda19eded08e.diff LOG:

[llvm] [clang-tools-extra] [clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-12-08 Thread Paul Walker via cfe-commits
@@ -2355,13 +2357,7 @@ void NeonEmitter::run(raw_ostream ) { OS << "#include \n"; - // Emit NEON-specific scalar typedefs. - OS << "typedef float float32_t;\n"; - OS << "typedef __fp16 float16_t;\n"; - - OS << "#ifdef __aarch64__\n"; - OS << "typedef double

[clang] [llvm] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-07 Thread Paul Walker via cfe-commits
@@ -196,6 +196,9 @@ C Language Changes number of elements in the flexible array member. This information can improve the results of the array bound sanitizer and the ``__builtin_dynamic_object_size`` builtin. +- Enums will now be represented in TBAA metadata using their

[llvm] [clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-07 Thread Paul Walker via cfe-commits
@@ -6376,13 +6376,26 @@ aliases a memory access with an access tag ``(BaseTy2, AccessTy2, Offset2)`` if either ``(BaseTy1, Offset1)`` is reachable from ``(Base2, Offset2)`` via the ``Parent`` relation or vice versa. +In C an enum will be compatible with an underlying integer

[llvm] [clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-07 Thread Paul Walker via cfe-commits
@@ -196,6 +196,9 @@ C Language Changes number of elements in the flexible array member. This information can improve the results of the array bound sanitizer and the ``__builtin_dynamic_object_size`` builtin. +- Enums will now be represented in TBAA metadata using their

[clang] [llvm] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-07 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/73326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-07 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. This looks broadly good to me. I suggest reverting the LangRef change because it doesn't add any new information relevant to LLVM IR. https://github.com/llvm/llvm-project/pull/73326 ___

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-06 Thread Paul Walker via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-06 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Do you think it's worth adding something to the Clang release note? https://github.com/llvm/llvm-project/pull/73326 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[llvm] [clang] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -343,7 +343,7 @@ static bool verifyTripCount(Value *RHS, Loop *L, // If the RHS of the compare is equal to the backedge taken count we need // to add one to get the trip count. if (SCEVRHS == BackedgeTCExt || SCEVRHS == BackedgeTakenCount) { - ConstantInt

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -136,7 +144,11 @@ class ConstantInt final : public ConstantData { inline const APInt () const { return Val; } /// getBitWidth - Return the bitwidth of this constant. - unsigned getBitWidth() const { return Val.getBitWidth(); } + unsigned getBitWidth() const { +

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData { /// value. Otherwise return a ConstantInt for the given value. static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false); + /// WARNING: Incomplete support, do not use. These methods exist for

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: The PR contains a couple of commits that unless there's disagreement I'm tempted to land directly but have held off just in case there's any buyer remorse about extending ConstantInt/ConstantFP to cover vector types. For similar reasons I've not updated the LangRef as I

[clang] [llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)

2023-12-05 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/74502 [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. NOTE: For brevity the following takes about ConstantInt but everything extends to cover ConstantFP as well. Whilst ConstantInt::get()

[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

2023-11-24 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Bike shedding here but shouldn't the header be arm_vector_types.h (i.e. plural)? or even arm_acle_types.h if we think it might grow more uses. https://github.com/llvm/llvm-project/pull/73258 ___ cfe-commits mailing list

[llvm] [clang] [mlir] [llvm][TypeSize] Fix addition/subtraction in TypeSize. (PR #72979)

2023-11-21 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: > The static functions renaming is going to produce a lot of noise but I guess > this is too late already... Shall we revert to keep the change minimal? > @nikic @paulwalker-arm WDYT ? For my money the function's were originally named correctly and then erroneously

[llvm] [clang] [mlir] [llvm][TypeSize] Fix addition/subtraction in TypeSize. (PR #72979)

2023-11-21 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. It looks like there's a code formatter issue with the MLIR change but otherwise this looks good to me. https://github.com/llvm/llvm-project/pull/72979 ___ cfe-commits mailing list

[llvm] [clang] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-03 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-03 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: Rebased after pushing NFC refactoring commit. https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-03 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/70970 >From 4bd5f30bf5f3f55cbca0c49a612cf0fa0122046e Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 1 Nov 2023 17:33:10 + Subject: [PATCH] [LLVM][AArch64] Add ASM constraints for reduced GPR register

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: * Rebased. * Extended coverage to include all typical scalar types. * Updated the LangRef to document the new constraints. * Added an entry to the release note. https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm edited https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-02 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm updated https://github.com/llvm/llvm-project/pull/70970 >From 500e5007a33d4ee3d594ef5ce58f8894c231f3dc Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Wed, 1 Nov 2023 16:27:29 + Subject: [PATCH 1/2] [NFC][LLVM][SVE] Refactor predicate register ASM

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-01 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: The first commit contains refactoring that I'll land separately assuming the reviewers are happy. The new functionality is implemented by the second commit. https://github.com/llvm/llvm-project/pull/70970 ___ cfe-commits

[clang] [llvm] [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. (PR #70970)

2023-11-01 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/70970 [LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. The patch adds the follow ASM constraints: Uci => w8-w11 Ucj => w12-w15 These constraints are required for SME load/store

[clang] [CXXNameMangler] Correct the mangling of SVE ACLE types within function names. (PR #69460)

2023-10-24 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/69460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CXXNameMangler] Correct the mangling of SVE ACLE types within function names. (PR #69460)

2023-10-19 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: I've updated the release note to remove bogus references to a function's return type affecting its name mangling. https://github.com/llvm/llvm-project/pull/69460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CXXNameMangler] Correct the mangling of SVE ACLE types within function names. (PR #69460)

2023-10-18 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: To aid review I've split the patch into several commits mainly so the mechanical update of 200+ ACLE tests is separate from the much smaller code changes. Given this is an ABI break I'd rather land the series as a single commit.

[clang] [SVE ACLE] Allow default zero initialisation for svcount_t. (PR #69321)

2023-10-18 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm closed https://github.com/llvm/llvm-project/pull/69321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SVE ACLE] Allow default zero initialisation for svcount_t. (PR #69321)

2023-10-17 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm created https://github.com/llvm/llvm-project/pull/69321 This matches the behaviour of the other SVE ACLE types. >From d036844f5006adecbd5b0ae4fbc3014d43ef3992 Mon Sep 17 00:00:00 2001 From: Paul Walker Date: Tue, 17 Oct 2023 11:57:28 +0100 Subject: [PATCH]

[clang] [RISCV][AArch64] Don't allow -mvscale-min/max options to be passed to the clang driver. (PR #68065)

2023-10-03 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. https://github.com/llvm/llvm-project/pull/68065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGenPrepare] Transform ldexp into target supported intrinsics (PR #67552)

2023-09-27 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: I agree and custom lowering also gives a straight forward way to support vectors types as well. https://github.com/llvm/llvm-project/pull/67552 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 989879f - [Clang] Allow C++11 style initialisation of SVE types.

2023-06-29 Thread Paul Walker via cfe-commits
Author: Paul Walker Date: 2023-06-29T11:55:36Z New Revision: 989879f8fded41c732db93864461b3a67b9f1501 URL: https://github.com/llvm/llvm-project/commit/989879f8fded41c732db93864461b3a67b9f1501 DIFF: https://github.com/llvm/llvm-project/commit/989879f8fded41c732db93864461b3a67b9f1501.diff LOG:

  1   2   >