https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/87750
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/87750
>From a56d6eacc7053a0dac38c5b7ba21d2e37a790baa Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Fri, 5 Apr 2024 09:15:30 +0200
Subject: [PATCH 1/2] [AARCH64,RISCV] Add support for scalable vectors in
lawben wrote:
@efriedma-quic @fhahn just a quick ping for this PR. is something still
missing?
https://github.com/llvm/llvm-project/pull/87750
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/87750
>From a56d6eacc7053a0dac38c5b7ba21d2e37a790baa Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Fri, 5 Apr 2024 09:15:30 +0200
Subject: [PATCH 1/2] [AARCH64,RISCV] Add support for scalable vectors in
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/87750
>From a56d6eacc7053a0dac38c5b7ba21d2e37a790baa Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Fri, 5 Apr 2024 09:15:30 +0200
Subject: [PATCH] [AARCH64,RISCV] Add support for scalable vectors in
lawben wrote:
@efriedma-quic While there is no target independent way to create a type, it is
possible to pass this type around. This is the use case I'm thinking of. So if
a user has one `#ifdef` block to get the right `using VecT = ...` for the
platform, they can use that `VecT` all over
https://github.com/lawben created
https://github.com/llvm/llvm-project/pull/87750
Currently, a lot of `__builtin_reduce_*` function do not support scalable
vectors, i.e., ARM SVE and RISCV V. This PR adds support for them. The main
code change is to use a different path to extract the type
@@ -5126,6 +5126,14 @@ void CXXNameMangler::mangleExpression(const Expr *E,
unsigned Arity,
Diags.Report(DiagID);
return;
}
+case UETT_VectorElements: {
lawben wrote:
@philnik777 I'm adding you here because of your recent commit that adds
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/69589
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
lawben wrote:
@nikic Could you please double-check if the syntax here is correct. After the
mistake in #69582, I'm a bit nervous about merging a wrong fix again...
https://github.com/llvm/llvm-project/pull/69589
___
cfe-commits mailing list
https://github.com/lawben created
https://github.com/llvm/llvm-project/pull/69589
In #69582, I accidentally disabled all tests for the changed introduced in
#69010. This change should use the correct `REQUIRES` syntax to en-/disable
target-specific tests.
>From
lawben wrote:
@nikic Sorry for the mess :/
I took the `target=` approach from
[here](https://llvm.org/docs/TestingGuide.html#constraining-test-execution).
Following the current buildbot status, this also does not seem to crash. Does
this mean the rests are still incorrect and are not being
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/69582
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
lawben wrote:
@tbaederr Jupp, I'm on it. I was not aware that I had to add `REQUIRES` to all
the tests for it to find the header files. I assumed they are always available.
See #69582.
https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits
https://github.com/lawben created
https://github.com/llvm/llvm-project/pull/69582
Small fix for failing tests after merge of #69010. The tests need `REQUIRES` to
ensure that the correct headers are available. I've also added a generic x86
build which does not need headers, so there is at
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lawben closed https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
lawben wrote:
As nobody has come forward in the the last two days, I'm gonna merge this now.
I'll have a look a mangling this for Microsoft in a follow-up, as this may
require a few changes. I'm not yet sure what has to be changed for mangling.
https://github.com/llvm/llvm-project/pull/69010
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 01/10] Add __builtin_vectorelements to get the number of
@@ -5126,6 +5126,14 @@ void CXXNameMangler::mangleExpression(const Expr *E,
unsigned Arity,
Diags.Report(DiagID);
return;
}
+case UETT_VectorElements: {
lawben wrote:
I don't know. But none of the other `UETT_*` types are covered in
lawben wrote:
@erichkeane I think I've addressed all of your comments so far. Please check if
there is anything else missing.
https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple aarch64 -fsyntax-only -verify %s
+
+void test_builtin_vectorelements() {
+ __builtin_vectorelements(int); // expected-error
{{'__builtin_vectorelements' argument must be a vector}}
+ __builtin_vectorelements(float); //
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/9] Add __builtin_vectorelements to get the number of
elements
lawben wrote:
> Also, needs a release note.
How do I do this? I cannot seem to find documentation on the process...
https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
lawben wrote:
> Also, needs a release note.
How do I do this? I cannot seem to find documentation on the process...
https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
E->getTypeOfArgument()->getPointeeType()))
.getQuantity();
return llvm::ConstantInt::get(CGF.SizeTy, Alignment);
+ } else if (E->getKind() == UETT_VectorElements) {
+
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
E->getTypeOfArgument()->getPointeeType()))
.getQuantity();
return llvm::ConstantInt::get(CGF.SizeTy, Alignment);
+ } else if (E->getKind() == UETT_VectorElements) {
+
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/7] Add __builtin_vectorelements to get the number of
elements
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/7] Add __builtin_vectorelements to get the number of
elements
@@ -0,0 +1,121 @@
+// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o
- | FileCheck --check-prefixes=CHECK,NEON %s
lawben wrote:
Done.
https://github.com/llvm/llvm-project/pull/69010
___
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error<
def err_vsx_builtin_nonconstant_argument : Error<
"argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
+def err_vectorelements_non_vector : Error<
+ "'__builtin_vectorelements'
@@ -0,0 +1,121 @@
+// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o
- | FileCheck --check-prefixes=CHECK,NEON %s
lawben wrote:
Done.
https://github.com/llvm/llvm-project/pull/69010
___
@@ -0,0 +1,121 @@
+// RUN: %clang_cc1 -O1 -triple aarch64 -target-feature +neon %s -emit-llvm -o
- | FileCheck --check-prefixes=CHECK,NEON %s
lawben wrote:
Done.
https://github.com/llvm/llvm-project/pull/69010
___
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
E->getTypeOfArgument()->getPointeeType()))
.getQuantity();
return llvm::ConstantInt::get(CGF.SizeTy, Alignment);
+ } else if (E->getKind() == UETT_VectorElements) {
+
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error<
def err_vsx_builtin_nonconstant_argument : Error<
"argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
+def err_vectorelements_non_vector : Error<
+ "'__builtin_vectorelements'
@@ -3083,6 +3083,19 @@ ScalarExprEmitter::VisitUnaryExprOrTypeTraitExpr(
E->getTypeOfArgument()->getPointeeType()))
.getQuantity();
return llvm::ConstantInt::get(CGF.SizeTy, Alignment);
+ } else if (E->getKind() == UETT_VectorElements) {
+
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error<
def err_vsx_builtin_nonconstant_argument : Error<
"argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
+def err_vectorelements_non_vector : Error<
+ "'__builtin_vectorelements'
@@ -13595,6 +13595,15 @@ bool IntExprEvaluator::VisitUnaryExprOrTypeTraitExpr(
Info.Ctx.getOpenMPDefaultSimdAlign(E->getArgumentType()))
.getQuantity(),
E);
+ case UETT_VectorElements: {
+QualType Ty = E->getTypeOfArgument();
+
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of
elements
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of
elements
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/6] Add __builtin_vectorelements to get the number of
elements
@@ -10136,6 +10136,9 @@ def err_vec_builtin_incompatible_vector : Error<
def err_vsx_builtin_nonconstant_argument : Error<
"argument %0 to %1 must be a 2-bit unsigned literal (i.e. 0, 1, 2 or 3)">;
+def err_vectorelements_non_vector : Error<
+ "'__builtin_vectorelements'
@@ -5456,9 +5459,8 @@ class DeducedTemplateSpecializationType : public
DeducedType,
/// TemplateArguments, followed by a QualType representing the
/// non-canonical aliased type when the template is a type alias
/// template.
-class alignas(8) TemplateSpecializationType
-
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/5] Add __builtin_vectorelements to get the number of
elements
https://github.com/lawben updated
https://github.com/llvm/llvm-project/pull/69010
>From df8d0a53a31e1351bb6cd3b340e9012b489e9885 Mon Sep 17 00:00:00 2001
From: Lawrence Benson
Date: Wed, 11 Oct 2023 17:26:11 +0200
Subject: [PATCH 1/5] Add __builtin_vectorelements to get the number of
elements
lawben wrote:
@erichkeane This is my first PR to the frontend side of LLVM. Please let me
know if there is something missing for a Clang PR that I should add.
https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
https://github.com/lawben edited https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lawben edited https://github.com/llvm/llvm-project/pull/69010
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/lawben created
https://github.com/llvm/llvm-project/pull/69010
Adds a new `__builtin_vectorelements()` function which returns the number of
elements for a given vector either at compile-time for fixed-sized vectors,
e.g., via `__attribute__((vector_size(N))` or runtime via
52 matches
Mail list logo