[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-02-23 Thread Maciej Gabka via cfe-commits
@@ -2405,6 +2421,11 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-22 Thread Maciej Gabka via cfe-commits
@@ -31,3 +31,31 @@ // RUN: %clang -fveclib=Accelerate %s -nodefaultlibs -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NODEFAULTLIBS %s // CHECK-LINK-NODEFAULTLIBS-NOT: "-framework" "Accelerate" + + +/* Verify that the correct vector library is

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-22 Thread Maciej Gabka via cfe-commits
@@ -783,6 +783,28 @@ void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args, "-generate-arange-section")); } + // Pass vector library arguments to LTO. + Arg *ArgVecLib = Args.getLastArg(options::OPT_fveclib); +

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-22 Thread Maciej Gabka via cfe-commits
@@ -31,3 +31,27 @@ // RUN: %clang -fveclib=Accelerate %s -nodefaultlibs -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NODEFAULTLIBS %s // CHECK-LINK-NODEFAULTLIBS-NOT: "-framework" "Accelerate" + + +/* Verify that the correct vector library is

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-23 Thread Maciej Gabka via cfe-commits
@@ -31,3 +31,21 @@ // RUN: %clang -fveclib=Accelerate %s -nodefaultlibs -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NODEFAULTLIBS %s // CHECK-LINK-NODEFAULTLIBS-NOT: "-framework" "Accelerate" + + +/* Verify that the correct vector library is

[clang] [LTO] Fix Veclib flags correctly pass to LTO flags (PR #78749)

2024-01-23 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. It LGTM, but probably worth to give some extra time in case anybody else thinks differently, it would be really good to have it on LLVM18 as well https://github.com/llvm/llvm-project/pull/78749 ___

[clang] 9272aa9 - [Driver] Do not generate error about unsupported target specific options when there is no compiler jobs

2023-09-11 Thread Maciej Gabka via cfe-commits
Author: Maciej Gabka Date: 2023-09-11T14:58:36Z New Revision: 9272aa9d08cbbf5b8612c264d5d547fdefae26c7 URL: https://github.com/llvm/llvm-project/commit/9272aa9d08cbbf5b8612c264d5d547fdefae26c7 DIFF: https://github.com/llvm/llvm-project/commit/9272aa9d08cbbf5b8612c264d5d547fdefae26c7.diff LOG:

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-12 Thread Maciej Gabka via cfe-commits
@@ -1,7 +1,8 @@ -// RUN: %clang_cc1 %s -triple armv7 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -target-feature -fp-armv8 -target-abi aapcs-soft -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple arm

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-14 Thread Maciej Gabka via cfe-commits
@@ -1,7 +1,8 @@ -// RUN: %clang_cc1 %s -triple armv7 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -fsyntax-only -verify -// RUN: %clang_cc1 %s -triple aarch64 -target-feature -fp-armv8 -target-abi aapcs-soft -fsyntax-only -verify +// RUN: %clang_cc1 %s -triple arm

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-20 Thread Maciej Gabka via cfe-commits
@@ -8086,23 +8086,21 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, // Target must have NEON (or MVE, whose vectors are similar enough // not to need a separate attribute) - if (!(S.Context.getTargetInfo().hasFeature("neon") || -

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-20 Thread Maciej Gabka via cfe-commits
@@ -8086,23 +8086,21 @@ static void HandleNeonVectorTypeAttr(QualType &CurType, const ParsedAttr &Attr, // Target must have NEON (or MVE, whose vectors are similar enough // not to need a separate attribute) - if (!(S.Context.getTargetInfo().hasFeature("neon") || -

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

2024-04-17 Thread Maciej Gabka via cfe-commits
@@ -1099,6 +1099,25 @@ static bool upgradeIntrinsicFunction1(Function *F, Function *&NewFn, return true; } + ID = StringSwitch(Name) + .StartsWith("splice.", Intrinsic::vector_splice) + .StartsWith("reverse.", Intrinsic::vector_r

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

2024-04-17 Thread Maciej Gabka via cfe-commits
@@ -18779,13 +18779,13 @@ This is an overloaded intrinsic. :: - declare <2 x i8> @llvm.experimental.vector.reverse.v2i8(<2 x i8> %a) - declare @llvm.experimental.vector.reverse.nxv4i32( %a) + declare <2 x i8> @llvm.vector.reverse.v2i8(<2 x i8> %a) + decl

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

2024-04-17 Thread Maciej Gabka via cfe-commits
@@ -18914,13 +18914,13 @@ This is an overloaded intrinsic. :: - declare <2 x double> @llvm.experimental.vector.splice.v2f64(<2 x double> %vec1, <2 x double> %vec2, i32 %imm) - declare @llvm.experimental.vector.splice.nxv4i32( %vec1, %vec2, i32 %imm) + decla

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

2024-04-17 Thread Maciej Gabka via cfe-commits
mgabka wrote: > > vector.revert > > I think should be vector.reverse? Will fix the commit message when merging the PR. https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-04-17 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka edited 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] Move several vector intrinsics out of experimental namespace (PR #88748)

2024-04-17 Thread Maciej Gabka via cfe-commits
mgabka wrote: I was actually following this patch https://reviews.llvm.org/D127976 which promoted vector.insert/extract and there was no RFC for it. My understanding is that these intrinsics are so heavily used in LLVM now so there is no need to call them experimental, moreover the auto upgrade

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

2024-04-17 Thread Maciej Gabka via cfe-commits
mgabka wrote: Added a message here: https://discourse.llvm.org/t/rfc-promoting-experimental-interleave2-deinterleave2-reverse-splice-and-stepvector-intrinsics-to-first-class-intrinsics/78414 https://github.com/llvm/llvm-project/pull/88748 ___ cfe-comm

[clang] [Clang][NEON] Add neon target guard to intrinsics (PR #98624)

2024-07-17 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +dotprod -target-feature +fullfp16 -target-feature +fp16fml -target-feature +i8mm -target-feature +bf16 -verify -emit-llvm -o - %s + +// This test is testing the diagnostics that Clang emits whe

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

2024-04-24 Thread Maciej Gabka via cfe-commits
mgabka wrote: Rebased on newer LLVM + forcing to re-run the testing which previously failed on some not related issues. https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

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

2024-04-26 Thread Maciej Gabka via cfe-commits
mgabka wrote: @c-rhodes the remaining failure is MLIR :: Conversion/TosaToTensor/tosa-to-tensor.mlir but it also fails without my changes. https://github.com/llvm/llvm-project/pull/88748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

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

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,46 @@ +; RUN: opt -S < %s | FileCheck %s mgabka wrote: I would prefer to keep it, as this is checking it the auto upgrade triggers when we have IR->IR transformation, while the other RUN line is about IR->bitcode->IR flow, and they could use same fun

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,132 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --filter "call.*(frexp|modf)" --version 4 +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -force-vector-interleave=1 -prefer-pred

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -2422,6 +2438,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,117 @@ +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s + +; REQUIRES: asserts + +target triple = "aarch64-unknown-linux-gnu" + +; TODO: add mappings for frexp/f

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,117 @@ +; RUN: opt < %s -mattr=+sve -vector-library=ArmPL -passes=inject-tli-mappings,loop-vectorize -debug-only=loop-accesses -disable-output 2>&1 | FileCheck %s mgabka wrote: I think you should only be calling here : "-passes='print' -debug-only=l

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-04-26 Thread Maciej Gabka via cfe-commits
@@ -2422,6 +2438,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

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

2024-04-29 Thread Maciej Gabka via cfe-commits
mgabka wrote: I needed to adjust one more test after another rebase: llvm/test/Transforms/LoopVectorize/AArch64/reduction-recurrence-costs-sve.ll I am merging it know without waiting for the pre commit validation, otrherwise will most likely need to update another tests etc. https://github.c

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

2024-04-29 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka closed 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] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-02 Thread Maciej Gabka via cfe-commits
@@ -0,0 +1,134 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --filter "call.*(frexp|modf)" --version 4 mgabka wrote: sincos (which also takes linear pointers) has tests inside veclib-function-calls.ll, so I would sugges

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-14 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. https://github.com/llvm/llvm-project/pull/78432 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-15 Thread Maciej Gabka via cfe-commits
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-24 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. https://github.com/llvm/llvm-project/pull/95224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-18 Thread Maciej Gabka via cfe-commits
@@ -36,16 +36,23 @@ /* Verify that the correct vector library is passed to LTO flags. */ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s +// CHECK-LTO-LIBMVEC: "-fmath-errno" // CHECK-LTO-LI

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-17 Thread Maciej Gabka via cfe-commits
@@ -36,16 +36,23 @@ /* Verify that the correct vector library is passed to LTO flags. */ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -fveclib=LIBMVEC -flto %s 2>&1 | FileCheck --check-prefix=CHECK-LTO-LIBMVEC %s +// CHECK-LTO-LIBMVEC: "-fmath-errno" // CHECK-LTO-LI

[clang] [clang] Make -fveclib={ArmPL, SLEEF} imply -fno-math-errno (PR #112580)

2024-10-16 Thread Maciej Gabka via cfe-commits
@@ -3125,6 +3129,10 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, TrappingMathPresent = true; FPExceptionBehavior = "strict"; break; +case options::OPT_fveclib: + if (llvm::is_contained(VecLibImpliesNoMathErrno, A->g

[clang] [llvm] [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (PR #114293)

2024-11-05 Thread Maciej Gabka via cfe-commits
@@ -369,9 +369,12 @@ def FeatureSVE2 : ExtensionWithMArch<"sve2", "SVE2", "FEAT_SVE2", "Enable Scalable Vector Extension 2 (SVE2) instructions", [FeatureSVE, FeatureUseScalarIncVL]>; -def FeatureSVE2AES : ExtensionWithMArch<"sve2-aes", "SVE2AES", +def FeatureSVEAES : Exte

[clang] [llvm] [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (PR #114293)

2024-11-05 Thread Maciej Gabka via cfe-commits
@@ -369,9 +369,12 @@ def FeatureSVE2 : ExtensionWithMArch<"sve2", "SVE2", "FEAT_SVE2", "Enable Scalable Vector Extension 2 (SVE2) instructions", [FeatureSVE, FeatureUseScalarIncVL]>; -def FeatureSVE2AES : ExtensionWithMArch<"sve2-aes", "SVE2AES", +def FeatureSVEAES : Exte

[clang] [clang][doc] Add release note for changes to `-fveclib={ArmPL,SLEEF}` (PR #113673)

2024-10-25 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. https://github.com/llvm/llvm-project/pull/113673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [llvm] [AArch64] Reduce +sve2-aes to an alias of +sve-aes+sve2 (PR #114293)

2024-11-06 Thread Maciej Gabka via cfe-commits
@@ -369,9 +369,12 @@ def FeatureSVE2 : ExtensionWithMArch<"sve2", "SVE2", "FEAT_SVE2", "Enable Scalable Vector Extension 2 (SVE2) instructions", [FeatureSVE, FeatureUseScalarIncVL]>; -def FeatureSVE2AES : ExtensionWithMArch<"sve2-aes", "SVE2AES", +def FeatureSVEAES : Exte

[clang] [Clang] Add AArch64 SME changes to the release notes (PR #122899)

2025-01-14 Thread Maciej Gabka via cfe-commits
@@ -1076,6 +1076,15 @@ Arm and AArch64 Support in leaf functions after enabling ``-fno-omit-frame-pointer``, you can do so by adding the ``-momit-leaf-frame-pointer`` option. +- SME keyword attributes which apply to function types are now represented in the + mangling o

[clang] [Clang] Add AArch64 SME changes to the release notes (PR #122899)

2025-01-14 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. https://github.com/llvm/llvm-project/pull/122899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits