https://gcc.gnu.org/g:d79826cec1bd900c63421ee7e10fccf58583bba2

commit r13-9991-gd79826cec1bd900c63421ee7e10fccf58583bba2
Author: Avinash Jayakar <[email protected]>
Date:   Mon Dec 1 11:00:21 2025 +0530

    Revert "isel: Check bounds before converting VIEW_CONVERT to VEC_SET."
    
    This reverts commit d02cd309ad2f4b79f74f477bc3f271b884c916b5.

Diff:
---
 gcc/gimple-isel.cc                    | 10 ----------
 gcc/testsuite/gcc.dg/pr122126_vextr.c |  9 ---------
 gcc/testsuite/gcc.dg/pr122126_vset.c  |  9 ---------
 3 files changed, 28 deletions(-)

diff --git a/gcc/gimple-isel.cc b/gcc/gimple-isel.cc
index f0d42110dfbd..760029d27c97 100644
--- a/gcc/gimple-isel.cc
+++ b/gcc/gimple-isel.cc
@@ -76,16 +76,6 @@ gimple_expand_vec_set_expr (struct function *fun, 
gimple_stmt_iterator *gsi)
     {
       tree pos = TREE_OPERAND (lhs, 1);
       tree view_op0 = TREE_OPERAND (op0, 0);
-
-      tree idx = TREE_OPERAND (ref, 1);
-      // if index is a constant, then check the bounds
-      poly_uint64 idx_poly;
-      if (poly_int_tree_p (idx, &idx_poly))
-       {
-         poly_uint64 nelts = TYPE_VECTOR_SUBPARTS (TREE_TYPE (view_op0));
-         if (known_gt (idx_poly, nelts))
-           return false;
-       }
       machine_mode outermode = TYPE_MODE (TREE_TYPE (view_op0));
       if ((auto_var_in_fn_p (view_op0, fun->decl)
           || (VAR_P (view_op0) && DECL_HARD_REGISTER (view_op0)))
diff --git a/gcc/testsuite/gcc.dg/pr122126_vextr.c 
b/gcc/testsuite/gcc.dg/pr122126_vextr.c
deleted file mode 100644
index b598aa01091d..000000000000
--- a/gcc/testsuite/gcc.dg/pr122126_vextr.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-/* { dg-additional-options "-mavx2" { target avx2 } } */
-
-#define vect16 __attribute__((vector_size(16)))
-void ub_set() {
-  volatile vect16 unsigned BS_VAR_0;
-  unsigned a = BS_VAR_0[12];
-}
diff --git a/gcc/testsuite/gcc.dg/pr122126_vset.c 
b/gcc/testsuite/gcc.dg/pr122126_vset.c
deleted file mode 100644
index 85b2c68247b6..000000000000
--- a/gcc/testsuite/gcc.dg/pr122126_vset.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-/* { dg-additional-options "-mavx2" { target avx2 } } */
-
-#define vect16 __attribute__((vector_size(16)))
-void ub_set() {
-  volatile vect16 unsigned BS_VAR_0;
-  BS_VAR_0[12] = 4;
-}

Reply via email to