* [PATCH] vect: Remove several useless VMAT_INVARIANT checks
@ 2023-08-14 8:52 Kewen.Lin
2023-08-14 12:03 ` Richard Biener
0 siblings, 1 reply; 2+ messages in thread
From: Kewen.Lin @ 2023-08-14 8:52 UTC (permalink / raw)
To: GCC Patches; +Cc: Richard Biener, Richard Sandiford
Hi,
In function vectorizable_load, there is one hunk which is
dedicated for the handlings on VMAT_INVARIANT and return
early, it means we shouldn't encounter any cases with
memory_access_type VMAT_INVARIANT in the following code
after that. This patch is to clean up several useless
checks on VMAT_INVARIANT. There should be no functional
changes.
Bootstrapped and regtested on x86_64-redhat-linux,
aarch64-linux-gnu and powerpc64{,le}-linux-gnu.
gcc/ChangeLog:
* tree-vect-stmts.cc (vectorizable_load): Remove some useless checks
on VMAT_INVARIANT.
---
gcc/tree-vect-stmts.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index 89607a98f99..d4e781531fd 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -10499,7 +10499,7 @@ vectorizable_load (vec_info *vinfo,
tree bias = NULL_TREE;
if (!costing_p)
{
- if (loop_masks && memory_access_type != VMAT_INVARIANT)
+ if (loop_masks)
final_mask
= vect_get_loop_mask (loop_vinfo, gsi, loop_masks,
vec_num * ncopies, vectype,
@@ -10729,7 +10729,7 @@ vectorizable_load (vec_info *vinfo,
bias = build_int_cst (intQI_type_node, biasval);
}
- if (final_len && memory_access_type != VMAT_INVARIANT)
+ if (final_len)
{
tree ptr
= build_int_cst (ref_type, align * BITS_PER_UNIT);
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] vect: Remove several useless VMAT_INVARIANT checks
2023-08-14 8:52 [PATCH] vect: Remove several useless VMAT_INVARIANT checks Kewen.Lin
@ 2023-08-14 12:03 ` Richard Biener
0 siblings, 0 replies; 2+ messages in thread
From: Richard Biener @ 2023-08-14 12:03 UTC (permalink / raw)
To: Kewen.Lin; +Cc: GCC Patches, Richard Sandiford
On Mon, Aug 14, 2023 at 10:52 AM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> In function vectorizable_load, there is one hunk which is
> dedicated for the handlings on VMAT_INVARIANT and return
> early, it means we shouldn't encounter any cases with
> memory_access_type VMAT_INVARIANT in the following code
> after that. This patch is to clean up several useless
> checks on VMAT_INVARIANT. There should be no functional
> changes.
>
> Bootstrapped and regtested on x86_64-redhat-linux,
> aarch64-linux-gnu and powerpc64{,le}-linux-gnu.
OK.
> gcc/ChangeLog:
>
> * tree-vect-stmts.cc (vectorizable_load): Remove some useless checks
> on VMAT_INVARIANT.
> ---
> gcc/tree-vect-stmts.cc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
> index 89607a98f99..d4e781531fd 100644
> --- a/gcc/tree-vect-stmts.cc
> +++ b/gcc/tree-vect-stmts.cc
> @@ -10499,7 +10499,7 @@ vectorizable_load (vec_info *vinfo,
> tree bias = NULL_TREE;
> if (!costing_p)
> {
> - if (loop_masks && memory_access_type != VMAT_INVARIANT)
> + if (loop_masks)
> final_mask
> = vect_get_loop_mask (loop_vinfo, gsi, loop_masks,
> vec_num * ncopies, vectype,
> @@ -10729,7 +10729,7 @@ vectorizable_load (vec_info *vinfo,
> bias = build_int_cst (intQI_type_node, biasval);
> }
>
> - if (final_len && memory_access_type != VMAT_INVARIANT)
> + if (final_len)
> {
> tree ptr
> = build_int_cst (ref_type, align * BITS_PER_UNIT);
> --
> 2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-14 12:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-14 8:52 [PATCH] vect: Remove several useless VMAT_INVARIANT checks Kewen.Lin
2023-08-14 12:03 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).