From: Jakub Jelinek Date: Thu, 19 Sep 2013 16:56:40 +0000 (+0200) Subject: re PR tree-optimization/58472 (gomp4: ICE in in vectorizable_store, at tree-vect... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8928eff3b22eb391c3123714e3a15ec856c24f9c;p=gcc.git re PR tree-optimization/58472 (gomp4: ICE in in vectorizable_store, at tree-vect-stmts.c:4192) PR tree-optimization/58472 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): For simd_lane_access set inv_p = false. * omp-low.c (lower_rec_input_clauses): Set TREE_NO_WARNING on the simduid magic VAR_DECL. * c-c++-common/gomp/pr58472.c: New test. From-SVN: r202748 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acf941874b9..1a12eda9188 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2013-09-19 Jakub Jelinek + + PR tree-optimization/58472 + * tree-vect-stmts.c (vectorizable_store, vectorizable_load): For + simd_lane_access set inv_p = false. + * omp-low.c (lower_rec_input_clauses): Set TREE_NO_WARNING on + the simduid magic VAR_DECL. + 2013-09-19 Jan Hubicka * i386.c (generic_memcpy, generic_memset): Fix 32bit template. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 304ea363600..fa9aca49a3a 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -2775,6 +2775,9 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, if (lane) { tree uid = create_tmp_var (ptr_type_node, "simduid"); + /* Don't want uninit warnings on simduid, it is always uninitialized, + but we use it not for the value, but for the DECL_UID only. */ + TREE_NO_WARNING (uid) = 1; gimple g = gimple_build_call_internal (IFN_GOMP_SIMD_LANE, 1, uid); gimple_call_set_lhs (g, lane); diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 135eb300ef1..fcea4d0654b 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -4182,6 +4182,7 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, dataref_ptr = unshare_expr (DR_BASE_ADDRESS (first_dr)); dataref_offset = build_int_cst (reference_alias_ptr_type (DR_REF (first_dr)), 0); + inv_p = false; } else dataref_ptr @@ -5077,6 +5078,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, dataref_ptr = unshare_expr (DR_BASE_ADDRESS (first_dr)); dataref_offset = build_int_cst (reference_alias_ptr_type (DR_REF (first_dr)), 0); + inv_p = false; } else dataref_ptr