re PR tree-optimization/70729 (Loop marked with omp simd pragma is not vectorized)
authorYuri Rumyantsev <ysrumyan@gmail.com>
Fri, 1 Jul 2016 09:42:01 +0000 (09:42 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Fri, 1 Jul 2016 09:42:01 +0000 (09:42 +0000)
PR tree-optimization/70729

gcc/
* tree-vectorizer.c (adjust_simduid_builtins): Nullify safelen field
of loop since it can be not valid after transformation.

From-SVN: r237907

gcc/ChangeLog
gcc/tree-vectorizer.c

index 153c10e2501daca5d020cd328fae0ed5772a4431..685847bf043910f053e1708a039fa8984100d119 100644 (file)
@@ -1,3 +1,9 @@
+2016-07-01  Yuri Rumyantsev  <ysrumyan@gmail.com>
+
+       PR tree-optimization/70729
+       * tree-vectorizer.c (adjust_simduid_builtins): Nullify safelen field
+       of loop since it can be not valid after transformation.
+
 2016-07-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/arm/arm.c (thumb_reload_in_hi): Delete.
index 26698135f541575f0bbf75ba06ae652dfbd9f55c..9fbd1836ecb905e228147d8ea3eab61a51ad737a 100644 (file)
@@ -204,6 +204,10 @@ adjust_simduid_builtins (hash_table<simduid_to_vf> *htab)
          gcc_assert (TREE_CODE (arg) == SSA_NAME);
          simduid_to_vf *p = NULL, data;
          data.simduid = DECL_UID (SSA_NAME_VAR (arg));
+         /* Need to nullify loop safelen field since it's value is not
+            valid after transformation.  */
+         if (bb->loop_father && bb->loop_father->safelen > 0)
+           bb->loop_father->safelen = 0;
          if (htab)
            {
              p = htab->find (&data);