@@ -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
+
@@ -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
@@ -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);
+
@@ -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
@@ -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
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
___
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:
@@ -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
@@ -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
@@ -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") ||
-
@@ -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") ||
-
@@ -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
@@ -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
@@ -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
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-
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
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
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
@@ -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
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-
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
@@ -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
@@ -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
@@ -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
+
@@ -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
@@ -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
@@ -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
+
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
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
@@ -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
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
@@ -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
+
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
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
42 matches
Mail list logo