Re:[committed] [PATCH] AArch64: Fix operands order in vec_extract expander

2025-04-15 Thread Tejas Belagod
On 4/15/25 1:56 PM, Richard Sandiford wrote: Tejas Belagod writes: The operand order to gen_vcond_mask call in the vec_extract pattern is wrong. Fix the order where predicate is operand 3. Tested and bootstrapped on aarch64-linux-gnu. OK for trunk? gcc/ChangeLog * config/aarch64

Re: [PATCH] AArch64: Fix operands order in vec_extract expander

2025-04-15 Thread Tejas Belagod
On 4/14/25 7:44 PM, Kyrylo Tkachov wrote: Hi Tejas, On 14 Apr 2025, at 16:04, Tejas Belagod wrote: The operand order to gen_vcond_mask call in the vec_extract pattern is wrong. Fix the order where predicate is operand 3. Tested and bootstrapped on aarch64-linux-gnu. OK for trunk? gcc

[PATCH] AArch64: Fix operands order in vec_extract expander

2025-04-14 Thread Tejas Belagod
The operand order to gen_vcond_mask call in the vec_extract pattern is wrong. Fix the order where predicate is operand 3. Tested and bootstrapped on aarch64-linux-gnu. OK for trunk? gcc/ChangeLog * config/aarch64/aarch64-sve.md (vec_extract): Fix operand order to gen_vcond_mask_*

Re: [PATCH] libgomp: Update SVE tests

2025-04-11 Thread Tejas Belagod
On 4/10/25 5:29 PM, Jakub Jelinek wrote: On Thu, Apr 10, 2025 at 05:13:12PM +0530, Tejas Belagod wrote: Thanks for the explanation. I looked into why some of the tests may have failed - my flawed understanding of the reduction clause was why I didn't have the += in the loops - it might

[PATCH] libgomp: Update SVE test

2025-04-11 Thread Tejas Belagod
Fix udr-sve.c target test that to check for the correct results based on the OpenMP clauses used. The test was first written with a misunderstood functionality of the reduction clause. Tested with aarch64-linux-gnu. OK for trunk? libgomp/ChangeLog: * testsuite/libgomp.c-target/aarch64/u

Re: [PATCH] libgomp: Update SVE tests

2025-04-10 Thread Tejas Belagod
On 4/9/25 4:13 PM, Jakub Jelinek wrote: On Wed, Apr 09, 2025 at 04:01:49PM +0530, Tejas Belagod wrote: It also looks like there might be a missing "+" in simd_reduction: #pragma omp simd reduction (+:va, i) for (j = 0; j < 16; j++) va = svld1_s32 (svptrue_b32 (),

Re: [PATCH] libgomp: Update SVE tests

2025-04-10 Thread Tejas Belagod
On 4/10/25 5:56 PM, Richard Sandiford wrote: Tejas Belagod writes: On 4/10/25 5:13 PM, Tejas Belagod wrote: On 4/9/25 4:13 PM, Jakub Jelinek wrote: On Wed, Apr 09, 2025 at 04:01:49PM +0530, Tejas Belagod wrote: It also looks like there might be a missing "+" in simd_reduction:  

Re: [PATCH] libgomp: Update SVE tests

2025-04-10 Thread Tejas Belagod
On 4/10/25 5:13 PM, Tejas Belagod wrote: On 4/9/25 4:13 PM, Jakub Jelinek wrote: On Wed, Apr 09, 2025 at 04:01:49PM +0530, Tejas Belagod wrote: It also looks like there might be a missing "+" in simd_reduction:     #pragma omp simd reduction (+:va, i)     for (j = 0; j < 16;

Re: [PATCH] libgomp: Update SVE tests

2025-04-09 Thread Tejas Belagod
On 4/9/25 2:32 AM, Richard Sandiford wrote: The new SVE tests didn't explicitly force SVE to be enabled, which meant that they wouldn't work on targets that aren't configured for SVE by default. The least invasive way of fixing that is to add a pragma, which works for most tests. However, for ud

Re: [PATCH v5 5/5] libgomp: Add AArch64 SVE target tests to libgomp.

2025-04-07 Thread Tejas Belagod
On 4/7/25 3:33 PM, Jakub Jelinek wrote: On Mon, Apr 07, 2025 at 03:28:29PM +0530, Tejas Belagod wrote: Add AArch64 SVE target exectute tests to test various workshare constructs and clauses with SVE types. libgomp/ChangeLog: * testsuite/libgomp.c-target/aarch64/aarch64.exp: Test

[PATCH v5 4/5] AArch64: Add OpenMP target compile error tests

2025-04-07 Thread Tejas Belagod
Add compile-only OpenMP error tests for target clause used with SVE types. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/gomp/gomp.exp: Test driver. * gcc.target/aarch64/sve/gomp/target-device.c: New test. * gcc.target/aarch64/sve/gomp/target-link.c: Likewise.

[PATCH v5 2/5] Add function to strip pointer type and get down to the actual pointee type.

2025-04-07 Thread Tejas Belagod
Add a function to traverse down the pointer layers to the pointee type. gcc/ChangeLog: * tree.h (strip_pointer_types): New. --- gcc/tree.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a/gcc/tree.h b/gcc/tree.h index 55f97f9f999..99f26177628 100644 --- a/gcc/tree.h +++ b/

[PATCH v5 0/5] [AArch64, OpenMP] Support SVE types with various OpenMP clauses and constructs

2025-04-07 Thread Tejas Belagod
r the reviews. Patches 1-4 have been OKed with the suggested changes. Patch 5 is yet to get an OK - so will wait until it is Oked before applying. Thanks, Tejas. Richard Sandiford (1): gomp: Various fixes for SVE types [PR101018] Tejas Belagod (4): Add function to strip pointer type and get

[PATCH v5 5/5] libgomp: Add AArch64 SVE target tests to libgomp.

2025-04-07 Thread Tejas Belagod
Add AArch64 SVE target exectute tests to test various workshare constructs and clauses with SVE types. libgomp/ChangeLog: * testsuite/libgomp.c-target/aarch64/aarch64.exp: Test driver. * testsuite/libgomp.c-target/aarch64/firstprivate.c: New test. * testsuite/libgomp.c-tar

[PATCH v5 1/5] gomp: Various fixes for SVE types [PR101018]

2025-04-07 Thread Tejas Belagod
be hard to test. Co-authored-by: Tejas Belagod gcc/ PR middle-end/101018 * poly-int.h (can_and_p): New function. * fold-const.cc (poly_int_binop): Use it to optimize BIT_AND_EXPRs involving POLY_INT_CSTs. * gimplify.cc (omp_notice_variable): Use poly_int_tree

[PATCH v5 3/5] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-04-07 Thread Tejas Belagod
The target clause in OpenMP is used to offload loop kernels to accelarator peripeherals. target's 'map' clause is used to move data from and to the accelarator. When the data is SVE type, it may not be suitable because of various reasons i.e. the two SVE targets may not agree on vector size or so

[PATCH 2/2] libgomp: Add AArch64 SVE target tests to libgomp.

2025-04-05 Thread Tejas Belagod
Add AArch64 SVE target exectute tests to test various workshare constructs and clauses with SVE types. libgomp/ChangeLog: * testsuite/libgomp.c-target/aarch64/aarch64.exp: Test driver. * testsuite/libgomp.c-target/aarch64/firstprivate.c: New test. * testsuite/libgomp.c-tar

[PATCH 1/2] AArch64: Add OpenMP target compile error tests

2025-04-02 Thread Tejas Belagod
Add compile-only OpenMP error tests for target clause used with SVE types. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/gomp/gomp.exp: Test driver. * gcc.target/aarch64/sve/gomp/target-device.c: New test. * gcc.target/aarch64/sve/gomp/target-link.c: Likewise.

[PATCH 0/2] AArch64: Add OpenMP SVE tests

2025-04-02 Thread Tejas Belagod
. It incorporates review comments from an earlier version of the series https://gcc.gnu.org/pipermail/gcc-patches/2025-January/674283.html OK for trunk? Thanks, Tejas Tejas Belagod (2): AArch64: Add OpenMP target compile error tests libgomp: Add AArch64 SVE target tests to libgomp

Re: [PATCH v4 0/3] [AArch64, OpenMP] Support SVE types with various OpenMP clauses and constructs

2025-04-01 Thread Tejas Belagod
Ping. Thanks, Tejas. On 3/18/25 11:27 AM, Tejas Belagod wrote: This series is based on a previous thread and review comments from RichardS and Jakub upstream: https://gcc.gnu.org/pipermail/gcc-patches/2025-March/677072.html The changes suggested are cosmetic in nature. As suggested in the

[PATCH v4 0/3] [AArch64, OpenMP] Support SVE types with various OpenMP clauses and constructs

2025-03-24 Thread Tejas Belagod
7;re going to be part of a separate patch series. Patches have been rebased, retested and bootstrapped on aarch64-linux-gcc. OK for trunk? Richard Sandiford (1): gomp: Various fixes for SVE types [PR101018] Tejas Belagod (2): Add function to strip pointer type and get down to the actu

[PATCH v4 1/3] gomp: Various fixes for SVE types [PR101018]

2025-03-17 Thread Tejas Belagod
be hard to test. Co-authored-by: Tejas Belagod gcc/ PR middle-end/101018 * poly-int.h (can_and_p): New function. * fold-const.cc (poly_int_binop): Use it to optimize BIT_AND_EXPRs involving POLY_INT_CSTs. * gimplify.cc (omp_notice_variable): Use poly_int_tree

Re: [PATCH v3 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-03-17 Thread Tejas Belagod
On 3/7/25 5:33 PM, Jakub Jelinek wrote: On Fri, Mar 07, 2025 at 11:49:37AM +, Richard Sandiford wrote: +case TCTX_OMP_DEVICE_ADDR: + if (!silent_p) + error_at (loc, "SVE type %qT not allowed in target device clauses", type); Is the final error message accurate? This TCTX v

[PATCH v4 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-03-17 Thread Tejas Belagod
The target clause in OpenMP is used to offload loop kernels to accelarator peripeherals. target's 'map' clause is used to move data from and to the accelarator. When the data is SVE type, it may not be suitable because of various reasons i.e. the two SVE targets may not agree on vector size or so

[PATCH v4 2/3] Add function to strip pointer type and get down to the actual pointee type.

2025-03-17 Thread Tejas Belagod
Add a function to traverse down the pointer layers to the pointee type. gcc/ChangeLog: * tree.h (strip_pointer_types): New. --- gcc/tree.h | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/tree.h b/gcc/tree.h index 6f45359f103..77eddc4515c 100644 --- a/gcc/tree.h +++ b/gcc/

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-13 Thread Tejas Belagod
On 3/13/25 2:04 PM, Richard Biener wrote: I think this is done by convert_vector_to_array_for_subscript in c-common/, note that this handles lvalue conversion as well which means it will not work in lvalue context where you'd possibly want sth like a TARGET_EXPR but then the caller needs t

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-13 Thread Tejas Belagod
On 3/13/25 1:28 PM, Richard Biener wrote: On Thu, 13 Mar 2025, Tejas Belagod wrote: On 3/12/25 4:45 PM, Richard Biener wrote: On Wed, 12 Mar 2025, Tejas Belagod wrote: On 3/10/25 7:21 PM, Richard Biener wrote: On Sat, 8 Mar 2025, Tejas Belagod wrote: On 3/8/25 12:55 AM, Tejas Belagod

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-13 Thread Tejas Belagod
On 3/12/25 4:45 PM, Richard Biener wrote: On Wed, 12 Mar 2025, Tejas Belagod wrote: On 3/10/25 7:21 PM, Richard Biener wrote: On Sat, 8 Mar 2025, Tejas Belagod wrote: On 3/8/25 12:55 AM, Tejas Belagod wrote: On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-12 Thread Tejas Belagod
On 3/10/25 7:21 PM, Richard Biener wrote: On Sat, 8 Mar 2025, Tejas Belagod wrote: On 3/8/25 12:55 AM, Tejas Belagod wrote: On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/8/25 12:55 AM, Tejas Belagod wrote: On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/7/25 5:34 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of

[PATCH 0/6] [RFC] GNU vector operations on svbool_t.

2025-03-07 Thread Tejas Belagod
l_t != 0 Address-of: & on svbool_t[i] is not allowed. sizeof(): sizeof (svbool_t[i]) is precision / 8 + 1 [] operator: svbool_t[i] indexes bit i from the LSBit of svbool_t. For eg. svbool[4] indexes the 5th bit from LSBit of svbool_t. The type of svbool_t[i] is boolean. Tejas Belagod (6):

Re: [PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
On 3/7/25 4:38 PM, Richard Biener wrote: On Fri, 7 Mar 2025, Tejas Belagod wrote: Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of the vector mode and element type of that of the element mode. For eg. on AArch64

[PATCH 2/6] [RFC] AArch64: Support C/C++ operations on svbool_t

2025-03-07 Thread Tejas Belagod
Support a subset of C/C++ operations (bitwise, conditional etc.) on svbool_t. gcc/ChangeLog: * c-family/c-common.cc (c_build_vec_convert): Support vector boolean types for __builtin_convertvector (). (c_common_bool_type): New. Given precision and signedness, return the

[PATCH 6/6] [RFC] AArch64: Update existing test with svbool_t operations

2025-03-07 Thread Tejas Belagod
Update existing compile test with tests to cover C/C++ operations on svbool_t type objects. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Add new tests. * g++.dg/ext/sve-sizeless-2.C: Add new tests. * g++.target/aarch64/sve/acle/general-c++/gnu_vectors_1.C: Add n

[PATCH 3/6] [RFC] GIMPLE: Support TARGET_MEM_REF when walking ADDR_EXPR trees.

2025-03-07 Thread Tejas Belagod
Support TARGET_MEM_REFs when walking subtress searching for ADDR_EXPR. This scenario presents itself when walking MEM_REF subtrees looking for addr-taken entities during the execute_update_addresses_taken () pass where address-taken bitmaps are updated. gcc/ChangeLog: * gimple-walk.cc (w

[PATCH 5/6] [RFC] AArch64: Update test to reflect new message

2025-03-07 Thread Tejas Belagod
Update test error message as svbool_t is not treated as a GNU vector. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/general-c/svcount_1.c: Update message. --- gcc/testsuite/gcc.target/aarch64/sve/acle/general-c/svcount_1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH 1/6] [RFC] c: Add front-end hook for related vector type.

2025-03-07 Thread Tejas Belagod
Given a vector mode and its corresponding element mode, this new new language hook returns a vector type that has properties of the vector mode and element type of that of the element mode. For eg. on AArch64, given VNx16BI and QImode it returns VNx16QI i.e. the wider mode to BImode that is an SVE

[PATCH 4/6] [RFC] c/cp/GIMPLE: Add support for index ops on svbool_t.

2025-03-07 Thread Tejas Belagod
Support subscript operation on svbool_t. This considers svbool_t as a packed bit-vector of 1-bit boolean data. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Prepare the first stage of the subscript subtree for a later gimplification step.

[PATCH v3 1/3] gomp: Various fixes for SVE types [PR101018]

2025-02-24 Thread Tejas Belagod
be hard to test. Co-authored-by: Tejas Belagod gcc/ PR middle-end/101018 * poly-int.h (can_and_p): New function. * fold-const.cc (poly_int_binop): Use it to optimize BIT_AND_EXPRs involving POLY_INT_CSTs. * gimplify.cc (gimplify_bind_expr): Use poly_int_tree

[PATCH v3 3/3] AArch64: Diagnose OpenMP offloading when SVE types involved.

2025-02-24 Thread Tejas Belagod
The target clause in OpenMP is used to offload loop kernels to accelarator peripeherals. target's 'map' clause is used to move data from and to the accelarator. When the data is SVE type, it may not be suitable because of various reasons i.e. the two SVE targets may not agree on vector size or so

[PATCH v3 2/3] Add function to strip pointer type and get down to the actual pointee type.

2025-02-24 Thread Tejas Belagod
Add a function to traverse down the pointer layers to the pointee type. gcc/ChangeLog: * tree.h (strip_pointer_types): New. --- gcc/tree.h | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/tree.h b/gcc/tree.h index 21f3cd5525c..580997b4e5d 100644 --- a/gcc/tree.h +++ b/gcc/

[PATCH v3 0/3] [AArch64, OpenMP] Support SVE types with various OpenMP clauses and constructs

2025-02-24 Thread Tejas Belagod
patch also includes Richard's patch that the rest of the series is based on https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606741.html Patches have been rebased, retested and bootstrapped on trunk. OK for trunk? Richard Sandiford (1): gomp: Various fixes for SVE types [PR101018] Tej

Re: [PATCH v2 01/12] OpenMP/PolyInt: Pass poly-int structures by address to OMP libs.

2025-01-23 Thread Tejas Belagod
On 1/23/25 4:06 PM, Tejas Belagod wrote: On 1/22/25 4:37 PM, Jakub Jelinek wrote: On Wed, Jan 22, 2025 at 04:19:37PM +0530, Tejas Belagod wrote: On 1/21/25 10:16 PM, Jakub Jelinek wrote: On Fri, Oct 18, 2024 at 11:52:22AM +0530, Tejas Belagod wrote: Currently poly-int type structures are

Re: [PATCH v2 01/12] OpenMP/PolyInt: Pass poly-int structures by address to OMP libs.

2025-01-23 Thread Tejas Belagod
On 1/22/25 4:37 PM, Jakub Jelinek wrote: On Wed, Jan 22, 2025 at 04:19:37PM +0530, Tejas Belagod wrote: On 1/21/25 10:16 PM, Jakub Jelinek wrote: On Fri, Oct 18, 2024 at 11:52:22AM +0530, Tejas Belagod wrote: Currently poly-int type structures are passed by value to OpenMP runtime functions

Re: [PATCH v2 01/12] OpenMP/PolyInt: Pass poly-int structures by address to OMP libs.

2025-01-22 Thread Tejas Belagod
On 1/21/25 10:16 PM, Jakub Jelinek wrote: On Fri, Oct 18, 2024 at 11:52:22AM +0530, Tejas Belagod wrote: Currently poly-int type structures are passed by value to OpenMP runtime functions for shared clauses etc. This patch improves on this by passing around poly-int structures by address to

Re: [Ping^2][PATCH v2 00/12] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-12-12 Thread Tejas Belagod
Ping^2 Thanks, Tejas. On 11/4/24 10:06 AM, Tejas Belagod wrote: Ping. Thanks, Tejas. On 10/18/24 11:59 AM, Tejas Belagod wrote: Hi Jakub, Just wanted to add that I'm sorry for the delay in respinning the patchset - I was caught up with another piece of work. Thanks for the reviews s

Re: [PATCH v3 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-12-02 Thread Tejas Belagod
On 12/2/24 3:20 PM, Andrew Pinski wrote: On Mon, Dec 2, 2024 at 1:47 AM Tejas Belagod wrote: On 11/30/24 3:30 AM, Christophe Lyon wrote: Hi! On Fri, 29 Nov 2024 at 05:00, Tejas Belagod wrote: This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU

Re: [PATCH v3 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-12-02 Thread Tejas Belagod
On 11/30/24 3:30 AM, Christophe Lyon wrote: Hi! On Fri, 29 Nov 2024 at 05:00, Tejas Belagod wrote: This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc

Re: [PATCH v2 0/8] aarch64: Enable C/C++ operations on SVE ACLE types.

2024-11-29 Thread Tejas Belagod
On 11/18/24 7:09 PM, Richard Sandiford wrote: Tejas Belagod writes: Hi, This is v2 of the series https://gcc.gnu.org/pipermail/gcc-patches/2024-November/667743.html based on review comments. Changes in this version include: 1. Canonicalised all index ranges for VLAs to BIT_FIELD_REF. 2

[PATCH v3 5/8] c: Fix constructor bounds checking for VLA and construct VLA vector constants

2024-11-28 Thread Tejas Belagod
This patch adds support for checking bounds of SVE ACLE vector initialization constructors. It also adds support to construct vector constant from init constructors. gcc/ChangeLog: * c-typeck.cc (process_init_element): Add check to restrict constructor length to the minimum vecto

[PATCH v3 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF

2024-11-28 Thread Tejas Belagod
Handle variable-sized vectors for BIT_FIELD_REF canonicalization. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable sized vector types in BIT_FIELD_REF canonicalization. * tree-cfg.cc (verify_types_in_gimple_reference): Change object-size-

[PATCH v3 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-11-28 Thread Tejas Belagod
This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Flip TYPE_INDIVISBL

[PATCH v3 6/8] aarch64: Add testcase for C/C++ ops on SVE ACLE types.

2024-11-28 Thread Tejas Belagod
This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 579 ++

[PATCH v3 8/8] cp: Fix another assumption in the FE about constant vector indices.

2024-11-28 Thread Tejas Belagod
This patch adds a change to handle VLA's poly indices. gcc/ChangeLog: * cp/decl.cc (reshape_init_array_1): Handle poly indices. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Update test to test initialize error. * g++.dg/ext/sve-sizeless-2.C: Likewise. --- gcc

[PATCH v3 0/8] aarch64: Enable C/C++ operations on SVE ACLE types.

2024-11-28 Thread Tejas Belagod
ding fail as is - the test where an address is taken of an SVE vector element. I'm not sure what the behaviour should be here. Otherwise regression tested and bootstrapped on aarch64-linux-gnu. Bootstrapped on x86-linux-gnu. OK for trunk? Thanks, Tejas. Tejas Belagod (8): aarch64: Fix A

[PATCH v3 3/8] c: Range-check indexing of SVE ACLE vectors

2024-11-28 Thread Tejas Belagod
This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-f

[PATCH v3 1/8] aarch64: Fix ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS

2024-11-28 Thread Tejas Belagod
This patch enables ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS to indicate that C/C++ language operations are available natively on SVE ACLE types. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_SVE_VECTOR_OPERATORS. --- gcc/con

Re: [PATCH v2 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF

2024-11-18 Thread Tejas Belagod
On 11/18/24 6:58 PM, Richard Sandiford wrote: Tejas Belagod writes: Handle variable-sized vectors for BIT_FIELD_REF canonicalization. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable sized vector types in BIT_FIELD_REF canonicalization

[PATCH v2 5/8] c: Fix constructor bounds checking for VLA and construct VLA vector constants

2024-11-18 Thread Tejas Belagod
This patch adds support for checking bounds of SVE ACLE vector initialization constructors. It also adds support to construct vector constant from init constructors. gcc/ChangeLog: * c/c-typeck.cc (process_init_element): Add check to restrict constructor length to the minimum vec

[PATCH v2 2/8] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-11-18 Thread Tejas Belagod
This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Flip TYPE_INDIVISBL

[PATCH v2 1/8] aarch64: Fix ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS

2024-11-18 Thread Tejas Belagod
This patch enables ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS to indicate that C/C++ language operations are available natively on SVE ACLE types. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_SVE_VECTOR_OPERATORS. --- gcc/con

[PATCH v2 6/8] aarch64: Add testcase for C/C++ ops on SVE ACLE types.

2024-11-18 Thread Tejas Belagod
This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 579 ++

[PATCH v2 3/8] c: Range-check indexing of SVE ACLE vectors

2024-11-18 Thread Tejas Belagod
This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-f

[PATCH v2 8/8] cp: Fix another assumption in the FE about constant vector indices.

2024-11-18 Thread Tejas Belagod
This patch adds a change to handle VLA's poly indices. gcc/ChangeLog: * cp/decl.cc (reshape_init_array_1): Handle poly indices. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Update test to test initialize error. * g++.dg/ext/sve-sizeless-2.C: Likewise. --- gcc

[PATCH v2 4/8] gimple: Handle variable-sized vectors in BIT_FIELD_REF

2024-11-18 Thread Tejas Belagod
Handle variable-sized vectors for BIT_FIELD_REF canonicalization. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Handle variable sized vector types in BIT_FIELD_REF canonicalization. * tree-cfg.cc (verify_types_in_gimple_reference): Change object-size-

[PATCH v2 0/8] aarch64: Enable C/C++ operations on SVE ACLE types.

2024-11-18 Thread Tejas Belagod
gt;FAIL: g++.dg/ext/sve-sizeless-1.C -std=gnu++11 (test for errors, line 163) I've left another outstanding fail as is - the test where an address is taken of an SVE vector element. I'm not sure what the behaviour should be here. Otherwise regression tested and boots

Re: [PATCH 07/10] aarch64: Add testcase for C/C++ ops on SVE ACLE types.

2024-11-11 Thread Tejas Belagod
On 11/7/24 4:52 PM, Richard Sandiford wrote: Tejas Belagod writes: This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test

Re: [PATCH 04/10] gimple: Disallow sizeless types in BIT_FIELD_REFs.

2024-11-08 Thread Tejas Belagod
On 11/8/24 1:19 PM, Richard Biener wrote: On Fri, Nov 8, 2024 at 7:30 AM Tejas Belagod wrote: On 11/7/24 5:52 PM, Richard Biener wrote: On Thu, Nov 7, 2024 at 11:13 AM Tejas Belagod wrote: On 11/7/24 2:36 PM, Richard Biener wrote: On Thu, Nov 7, 2024 at 8:25 AM Tejas Belagod wrote: On

Re: [PATCH 04/10] gimple: Disallow sizeless types in BIT_FIELD_REFs.

2024-11-07 Thread Tejas Belagod
On 11/7/24 5:52 PM, Richard Biener wrote: On Thu, Nov 7, 2024 at 11:13 AM Tejas Belagod wrote: On 11/7/24 2:36 PM, Richard Biener wrote: On Thu, Nov 7, 2024 at 8:25 AM Tejas Belagod wrote: On 11/6/24 6:02 PM, Richard Biener wrote: On Wed, Nov 6, 2024 at 12:49 PM Tejas Belagod wrote

Re: [PATCH 04/10] gimple: Disallow sizeless types in BIT_FIELD_REFs.

2024-11-07 Thread Tejas Belagod
On 11/7/24 2:36 PM, Richard Biener wrote: On Thu, Nov 7, 2024 at 8:25 AM Tejas Belagod wrote: On 11/6/24 6:02 PM, Richard Biener wrote: On Wed, Nov 6, 2024 at 12:49 PM Tejas Belagod wrote: Ensure sizeless types don't end up trying to be canonicalised to BIT_FIELD_REFs. You mean var

Re: [PATCH 04/10] gimple: Disallow sizeless types in BIT_FIELD_REFs.

2024-11-06 Thread Tejas Belagod
On 11/6/24 6:02 PM, Richard Biener wrote: On Wed, Nov 6, 2024 at 12:49 PM Tejas Belagod wrote: Ensure sizeless types don't end up trying to be canonicalised to BIT_FIELD_REFs. You mean variable-sized? But don't we know, when there's a constant array index, that the size is a

[PATCH 10/10] cp: Fix another assumption in the FE about constant vector indices.

2024-11-06 Thread Tejas Belagod
This patch adds a change to handle VLA's poly indices. gcc/ChangeLog: * cp/decl.cc (reshape_init_array_1): Handle poly indices. gcc/testsuite/ChangeLog: * g++.dg/ext/sve-sizeless-1.C: Update test to test initialize error. * g++.dg/ext/sve-sizeless-2.C: Likewise. --- gcc

[PATCH 01/10] aarch64: Fix ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS

2024-11-06 Thread Tejas Belagod
This patch enables ACLE macro __ARM_FEATURE_SVE_VECTOR_OPERATORS to indicate that C/C++ language operations are available natively on SVE ACLE types. gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Define __ARM_FEATURE_SVE_VECTOR_OPERATORS. --- gcc/con

[PATCH 09/10] c: Fix bounds checking for VLA and construct VLA vector constants

2024-11-06 Thread Tejas Belagod
This patch adds support for checking bounds of SVE ACLE vector initialization constructors. It also adds support to construct vector constant from init constructors. gcc/ChangeLog: * c/c-typeck.cc (process_init_element): Add check to restrict constructor length to the minimum vec

[PATCH 00/10] aarch64: Enable C/C++ operations on SVE ACLE types.

2024-11-06 Thread Tejas Belagod
outstanding fail as is - the test where an address is taken of an SVE vector element. I'm not sure what the behaviour should be here. Otherwise regression tested and bootstrapped on aarch64-linux-gnu. Bootstrapped on x86-linux-gnu. OK for trunk? Thanks, Tejas. Tejas Belagod (10): aarch64: F

[PATCH 02/10] aarch64: Make C/C++ operations possible on SVE ACLE types.

2024-11-06 Thread Tejas Belagod
This patch changes the TYPE_INDIVISBLE flag to 0 to enable SVE ACLE types to be treated as GNU vectors and have the same semantics with operations that are defined on GNU vectors. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins.cc (register_builtin_types): Flip TYPE_INDIVISBL

[PATCH 05/10] c: Fix an assumption that vectors sizes are known at compile-time.

2024-11-06 Thread Tejas Belagod
There is an assumption in many places in c-typeck.cc that GNU vectors sizes are always known at compile time. SVE vectors now piggy-back on GNU vector code so this patch changes one of the places where there is an assumption of vectors being fixed-length to being variable width. gcc/ChangeLog:

[PATCH 06/10] rtl: Validate subreg info when optimizing vec_select.

2024-11-06 Thread Tejas Belagod
When optimizing for NOPs in case of overlapping regs in VEC_SELECT expressions, validate subreg data before using simplify_subreg_regno. There is no real SUBREG rtx here, but a pseudo subreg call to check if subregs are possible. gcc/ChangeLog: * rtlanal.cc (set_noop_p): Validate subreg

[PATCH 07/10] aarch64: Add testcase for C/C++ ops on SVE ACLE types.

2024-11-06 Thread Tejas Belagod
This patch adds a test case to cover C/C++ operators on SVE ACLE types. This does not cover all types, but covers most representative types. gcc/testsuite: * gcc.target/aarch64/sve/acle/general/cops.c: New test. --- .../aarch64/sve/acle/general/cops.c | 570 ++

[PATCH 03/10] c: Range-check indexing of SVE ACLE vectors

2024-11-06 Thread Tejas Belagod
This patch adds a check for non-GNU vectors to warn that the index is outside the range of a fixed vector size. For VLA vectors, we don't diagnose. gcc/ChangeLog: * c-family/c-common.cc (convert_vector_to_array_for_subscript): Add range-check for target vector types. --- gcc/c-f

[PATCH 08/10] aarch64: Update SVE ACLE tests

2024-11-06 Thread Tejas Belagod
This patch updates existing SVE ACLE tests to expect new behaviour wrt SVE ACLE types, GNU vectors and C/C++ operations. testsuite/ChangeLog: * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_1.c: Update test. * gcc.target/aarch64/sve/acle/general-c/gnu_vectors_2.c: Likewise.

[PATCH 04/10] gimple: Disallow sizeless types in BIT_FIELD_REFs.

2024-11-06 Thread Tejas Belagod
Ensure sizeless types don't end up trying to be canonicalised to BIT_FIELD_REFs. gcc/ChangeLog: * gimple-fold.cc (maybe_canonicalize_mem_ref_addr): Disallow sizeless types in BIT_FIELD_REFs. --- gcc/gimple-fold.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

Re: [Ping][PATCH v2 00/12] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-11-03 Thread Tejas Belagod
Ping. Thanks, Tejas. On 10/18/24 11:59 AM, Tejas Belagod wrote: Hi Jakub, Just wanted to add that I'm sorry for the delay in respinning the patchset - I was caught up with another piece of work. Thanks for the reviews so far and thank you for your patience. Thanks, Tejas. On 10/18/

Re: [PATCH v2 00/12] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-10-17 Thread Tejas Belagod
Hi Jakub, Just wanted to add that I'm sorry for the delay in respinning the patchset - I was caught up with another piece of work. Thanks for the reviews so far and thank you for your patience. Thanks, Tejas. On 10/18/24 11:52 AM, Tejas Belagod wrote: The following patch series is rew

[PATCH v2 08/12] libgomp, AArch64: Test OpenMP uniform clause on SVE types.

2024-10-17 Thread Tejas Belagod
This patch tests if simd uniform clause works with SVE types in simd regions. libgomp/ChangeLog: * testsuite/libgomp.target/aarch64/simd-uniform.c: New. --- .../libgomp.target/aarch64/simd-uniform.c | 83 +++ 1 file changed, 83 insertions(+) create mode 100644 libgomp

[PATCH v2 04/12] AArch64: Diagnose OpenMP offloading when SVE types involved.

2024-10-17 Thread Tejas Belagod
The target clause in OpenMP is used to offload loop kernels to accelarator peripeherals. target's 'map' clause is used to move data from and to the accelarator. When the data is SVE type, it may not be suitable because of various reasons i.e. the two SVE targets may not agree on vector size or so

[PATCH v2 02/12] libgomp, AArch64: Add test cases for SVE types in OpenMP shared clause.

2024-10-17 Thread Tejas Belagod
This patch adds a test scaffold for OpenMP compile tests in under the gcc.target testsuite. It also adds a target tests directory libgomp.target along with an SVE execution test gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/omp/gomp.exp: New scaffold. libgomp/ChangeLog: * t

[PATCH v2 05/12] libgomp, AArch64: Test OpenMP lastprivate clause for various constructs.

2024-10-17 Thread Tejas Belagod
This patch tests various OpenMP lastprivate clause with SVE object types in various construct contexts. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/omp/lastprivate.c: New test. libgomp/ChangeLog: * testsuite/libgomp.target/aarch64/lastprivate.c: New test. --- .../gcc.targ

[PATCH v2 12/12] AArch64: Diagnose SVE type objects when applied to OpenMP doacross clause.

2024-10-17 Thread Tejas Belagod
This patch tests if SVE type objects when applied to doacross clause are correctly diagnosed. gcc/testsuite/ChangeLog * gcc.target/aarch64/sve/omp/doacross.c: New test. --- .../gcc.target/aarch64/sve/omp/doacross.c | 22 +++ 1 file changed, 22 insertions(+) create mo

[PATCH v2 11/12] libgomp, AArch64: Test OpenMP depend clause and its variations on SVE types

2024-10-17 Thread Tejas Belagod
This patch adds a test to test depend clause and its various dependency variations with SVE type objects. libgomp/ChangeLog: * testsuite/libgomp.target/aarch64/depend-1.c: New. --- .../libgomp.target/aarch64/depend-1.c | 223 ++ 1 file changed, 223 insertions(+)

[PATCH v2 00/12] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-10-17 Thread Tejas Belagod
ross is mainly supported for scalars and loop iteration variables. We diagnose cases where SVE ACLE objects are used in doacross list items. Tejas Belagod (12): OpenMP/PolyInt: Pass poly-int structures by address to OMP libs. libgomp, AArch64: Add test cases for SVE types in OpenMP shared c

[PATCH v2 07/12] libgomp, AArch64: Test OpenMP user-defined reductions with SVE types.

2024-10-17 Thread Tejas Belagod
This patch tests user-defined reductions on various constructs with objects of SVE type. libgomp/ChangeLog: * testsuite/libgomp.target/aarch64/udr-sve.c: New. --- .../libgomp.target/aarch64/udr-sve.c | 108 ++ 1 file changed, 108 insertions(+) create mode 100644

[PATCH v2 10/12] AArch64: Diagnose OpenMP linear clause for SVE type objects.

2024-10-17 Thread Tejas Belagod
This patch tests if SVE object types if applied to linear clause is diagnosed as expected. gcc/testsuite/ChangeLog * gcc.target/aarch64/sve/omp/linear.c: New test. --- .../gcc.target/aarch64/sve/omp/linear.c | 85 +++ 1 file changed, 85 insertions(+) create mode 10

[PATCH v2 06/12] libgomp, AArch64: Test OpenMP threadprivate clause on SVE type.

2024-10-17 Thread Tejas Belagod
This patch adds a test for ensuring threadprivate clause works for SVE type objects. libgomp/ChangeLog: * testsuite/libgomp.target/aarch64/threadprivate.c: New test. --- .../libgomp.target/aarch64/threadprivate.c| 48 +++ 1 file changed, 48 insertions(+) create mode

[PATCH v2 03/12] [tree] Add function to strip pointer type and get down to the actual pointee type.

2024-10-17 Thread Tejas Belagod
Add a function to traverse down the pointer layers to the pointee type. gcc/ChangeLog: * tree.h (strip_pointer_types): New. --- gcc/tree.h | 9 + 1 file changed, 9 insertions(+) diff --git a/gcc/tree.h b/gcc/tree.h index 75efc760a16..e2b4dd36444 100644 --- a/gcc/tree.h +++ b/gcc/

[PATCH v2 01/12] OpenMP/PolyInt: Pass poly-int structures by address to OMP libs.

2024-10-17 Thread Tejas Belagod
Currently poly-int type structures are passed by value to OpenMP runtime functions for shared clauses etc. This patch improves on this by passing around poly-int structures by address to avoid copy-overhead. gcc/ChangeLog * omp-low.c (use_pointer_for_field): Use pointer if the OMP data

Re: [PATCH 04/11] AArch64: Test OpenMP lastprivate clause for various constructs.

2024-09-13 Thread Tejas Belagod
On 8/6/24 4:59 PM, Jakub Jelinek wrote: On Mon, May 27, 2024 at 10:36:19AM +0530, Tejas Belagod wrote: This patch tests various OpenMP lastprivate clause with SVE object types in various construct contexts. gcc/testsuite/ChangeLog: * gcc.target/aarch64/sve/omp/lastprivate.c: New test

Re: [PATCH 03/11] AArch64: Diagnose OpenMP offloading when SVE types involved.

2024-07-18 Thread Tejas Belagod
On 5/30/24 6:20 PM, Richard Sandiford wrote: Tejas Belagod writes: The target clause in OpenMP is used to offload loop kernels to accelarator peripeherals. target's 'map' clause is used to move data from and to the accelarator. When the data is SVE type, it may not be suit

Re: [PING^3] [PATCH 00/11] AArch64/OpenMP: Test SVE ACLE types with various OpenMP constructs.

2024-07-18 Thread Tejas Belagod
PING^3 on the series please. Thanks, Tejas. On 7/8/24 4:25 PM, Tejas Belagod wrote: Ping^2 on the series please. Thanks, Tejas. On 5/27/24 10:36 AM, Tejas Belagod wrote: Note: This patch series is based on Richard's initial patch    https://gcc.gnu.org/pipermail/gcc-patches/2022-Nov

  1   2   3   4   >