From 677ef4dd37b714f10e0147bff70afe47f2dea30b Mon Sep 17 00:00:00 2001 From: Yuri Rumyantsev Date: Fri, 1 Jul 2016 09:42:01 +0000 Subject: [PATCH] re PR tree-optimization/70729 (Loop marked with omp simd pragma is not vectorized) 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 | 6 ++++++ gcc/tree-vectorizer.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 153c10e2501..685847bf043 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-07-01 Yuri Rumyantsev + + 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 * config/arm/arm.c (thumb_reload_in_hi): Delete. diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 26698135f54..9fbd1836ecb 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -204,6 +204,10 @@ adjust_simduid_builtins (hash_table *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); -- 2.30.2