Revert: tree-scalar-evolution.c: Handle LSHIFT by constant
authoralalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Nov 2015 12:39:31 +0000 (12:39 +0000)
committeralalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Nov 2015 12:39:31 +0000 (12:39 +0000)
gcc/:

tree-scalar-evolution.c (interpret_rhs_expr): Handle some
LSHIFT_EXPRs as equivalent MULT_EXPRs.

gcc/testsuite/:

gcc.dg/vect/vect-strided-shift.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229660 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/vect-strided-shift-1.c [deleted file]
gcc/tree-scalar-evolution.c

index 966a7f9..e293ad2 100644 (file)
@@ -1,3 +1,12 @@
+2015-11-02  Alan Lawrence  <alan.lawrence@arm.com>
+
+       Revert:
+       2015-10-27  Alan Lawrence  <alan.lawrence@arm.com>
+
+       PR tree-optimization/65963
+       * tree-scalar-evolution.c (interpret_rhs_expr): Handle some LSHIFT_EXPRs
+       as equivalent MULT_EXPRs.
+
 2015-11-02  Thomas Schwinge  <thomas@codesourcery.com>
 
        PR middle-end/68166
index 471b02d..a86920a 100644 (file)
@@ -1,3 +1,10 @@
+2015-11-02  Alan Lawrence  <alan.lawrence@arm.com>
+
+       Revert:
+       2015-10-27  Alan Lawrence  <alan.lawrence@arm.com>
+
+       * gcc.dg/vect/vect-strided-shift-1.c: New.
+
 2015-11-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/67929
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-shift-1.c b/gcc/testsuite/gcc.dg/vect/vect-strided-shift-1.c
deleted file mode 100644 (file)
index b1ce2ec..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/* PR tree-optimization/65963.  */
-#include "tree-vect.h"
-
-#define N 512
-
-int in[2*N], out[N];
-
-__attribute__ ((noinline)) void
-loop (void)
-{
-  for (int i = 0; i < N; i++)
-    out[i] = in[i << 1] + 7;
-}
-
-int
-main (int argc, char **argv)
-{
-  check_vect ();
-  for (int i = 0; i < 2*N; i++)
-    {
-      in[i] = i;
-      __asm__ volatile ("" : : : "memory");
-    }
-  loop ();
-  __asm__ volatile ("" : : : "memory");
-  for (int i = 0; i < N; i++)
-    {
-      if (out[i] != i*2 + 7)
-       abort ();
-    }
-  return 0;
-}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops in function" 1 "vect" { target { vect_strided2 } } } } */
index 3045c05..bb27b07 100644 (file)
@@ -1827,20 +1827,6 @@ interpret_rhs_expr (struct loop *loop, gimple *at_stmt,
       res = chrec_fold_multiply (type, chrec1, chrec2);
       break;
 
-    case LSHIFT_EXPR:
-      /* Handle A<<B as A * (1<<B).  */
-      chrec1 = analyze_scalar_evolution (loop, rhs1);
-      chrec2 = analyze_scalar_evolution (loop, rhs2);
-      chrec1 = chrec_convert (type, chrec1, at_stmt);
-      chrec1 = instantiate_parameters (loop, chrec1);
-      chrec2 = instantiate_parameters (loop, chrec2);
-
-      chrec2 = fold_build2 (LSHIFT_EXPR, type,
-                           build_int_cst (TREE_TYPE (rhs1), 1),
-                           chrec2);
-      res = chrec_fold_multiply (type, chrec1, chrec2);
-      break;
-
     CASE_CONVERT:
       /* In case we have a truncation of a widened operation that in
          the truncated type has undefined overflow behavior analyze