FreeBSD Bugzilla – Attachment 205872 Details for
Bug 239266
clang poisons namespace on powerpc by defining vec_step without any trigger (GCC fails to build: tree-vect-loop.c:4979:12: error: expected unqualified-id)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gcc8 vec_step fix
patch-ppc64-vec-step (text/plain), 5.31 KB, created by
Leandro Lupori
on 2019-07-18 16:12:14 UTC
(
hide
)
Description:
gcc8 vec_step fix
Filename:
MIME Type:
Creator:
Leandro Lupori
Created:
2019-07-18 16:12:14 UTC
Size:
5.31 KB
patch
obsolete
>--- gcc/tree-vect-loop.c.ori 2019-07-18 08:54:06.014575000 -0300 >+++ gcc/tree-vect-loop.c 2019-07-18 08:55:39.378215000 -0300 >@@ -4339,7 +4339,7 @@ > inside_cost = add_stmt_cost (target_cost_data, ncopies, vector_stmt, > stmt_info, 0, vect_body); > >- /* prologue cost for vec_init and vec_step. */ >+ /* prologue cost for vec_init and gcc_vec_step. */ > prologue_cost = add_stmt_cost (target_cost_data, 2, scalar_to_vec, > stmt_info, 0, vect_prologue); > >@@ -4976,13 +4976,13 @@ > > /* Create a vector of the step value. */ > tree step = build_int_cst (cr_index_scalar_type, nunits_out); >- tree vec_step = build_vector_from_val (cr_index_vector_type, step); >+ tree gcc_vec_step = build_vector_from_val (cr_index_vector_type, step); > > /* Create an induction variable. */ > gimple_stmt_iterator incr_gsi; > bool insert_after; > standard_iv_increment_position (loop, &incr_gsi, &insert_after); >- create_iv (series_vect, vec_step, NULL_TREE, loop, &incr_gsi, >+ create_iv (series_vect, gcc_vec_step, NULL_TREE, loop, &incr_gsi, > insert_after, &indx_before_incr, &indx_after_incr); > > /* Next create a new phi node vector (NEW_PHI_TREE) which starts >@@ -7650,7 +7650,7 @@ > tree vec_def; > edge pe = loop_preheader_edge (loop); > basic_block new_bb; >- tree new_vec, vec_init, vec_step, t; >+ tree new_vec, vec_init, gcc_vec_step, t; > tree new_name; > gimple *new_stmt; > gphi *induction_phi; >@@ -7843,7 +7843,7 @@ > new_name = vect_init_vector (phi, new_name, > TREE_TYPE (step_expr), NULL); > new_vec = build_vector_from_val (vectype, new_name); >- vec_step = vect_init_vector (phi, new_vec, vectype, NULL); >+ gcc_vec_step = vect_init_vector (phi, new_vec, vectype, NULL); > > /* Now generate the IVs. */ > unsigned group_size = SLP_TREE_SCALAR_STMTS (slp_node).length (); >@@ -7882,7 +7882,7 @@ > > /* Create the iv update inside the loop */ > vec_def = make_ssa_name (vec_dest); >- new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step); >+ new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, gcc_vec_step); > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, loop_vinfo)); > >@@ -7913,7 +7913,7 @@ > new_name = vect_init_vector (phi, new_name, > TREE_TYPE (step_expr), NULL); > new_vec = build_vector_from_val (vectype, new_name); >- vec_step = vect_init_vector (phi, new_vec, vectype, NULL); >+ gcc_vec_step = vect_init_vector (phi, new_vec, vectype, NULL); > for (; ivn < nvects; ++ivn) > { > gimple *iv = SLP_TREE_VEC_STMTS (slp_node)[ivn - nivs]; >@@ -7924,7 +7924,7 @@ > def = gimple_assign_lhs (iv); > new_stmt = gimple_build_assign (make_ssa_name (vectype), > PLUS_EXPR, >- def, vec_step); >+ def, gcc_vec_step); > if (gimple_code (iv) == GIMPLE_PHI) > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > else >@@ -8023,12 +8023,12 @@ > /* Create the vector that holds the step of the induction. */ > if (nested_in_vect_loop) > /* iv_loop is nested in the loop to be vectorized. Generate: >- vec_step = [S, S, S, S] */ >+ gcc_vec_step = [S, S, S, S] */ > new_name = step_expr; > else > { > /* iv_loop is the loop to be vectorized. Generate: >- vec_step = [VF*S, VF*S, VF*S, VF*S] */ >+ gcc_vec_step = [VF*S, VF*S, VF*S, VF*S] */ > gimple_seq seq = NULL; > if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (step_expr))) > { >@@ -8050,19 +8050,19 @@ > gcc_assert (CONSTANT_CLASS_P (new_name) > || TREE_CODE (new_name) == SSA_NAME); > new_vec = build_vector_from_val (vectype, t); >- vec_step = vect_init_vector (phi, new_vec, vectype, NULL); >+ gcc_vec_step = vect_init_vector (phi, new_vec, vectype, NULL); > > > /* Create the following def-use cycle: > loop prolog: > vec_init = ... >- vec_step = ... >+ gcc_vec_step = ... > loop: > vec_iv = PHI <vec_init, vec_loop> > ... > STMT > ... >- vec_loop = vec_iv + vec_step; */ >+ vec_loop = vec_iv + gcc_vec_step; */ > > /* Create the induction-phi that defines the induction-operand. */ > vec_dest = vect_get_new_vect_var (vectype, vect_simple_var, "vec_iv_"); >@@ -8073,7 +8073,7 @@ > > /* Create the iv update inside the loop */ > vec_def = make_ssa_name (vec_dest); >- new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, vec_step); >+ new_stmt = gimple_build_assign (vec_def, PLUS_EXPR, induc_def, gcc_vec_step); > gsi_insert_before (&si, new_stmt, GSI_SAME_STMT); > set_vinfo_for_stmt (new_stmt, new_stmt_vec_info (new_stmt, loop_vinfo)); > >@@ -8117,15 +8117,15 @@ > gcc_assert (CONSTANT_CLASS_P (new_name) > || TREE_CODE (new_name) == SSA_NAME); > new_vec = build_vector_from_val (vectype, t); >- vec_step = vect_init_vector (phi, new_vec, vectype, NULL); >+ gcc_vec_step = vect_init_vector (phi, new_vec, vectype, NULL); > > vec_def = induc_def; > prev_stmt_vinfo = vinfo_for_stmt (induction_phi); > for (i = 1; i < ncopies; i++) > { >- /* vec_i = vec_prev + vec_step */ >+ /* vec_i = vec_prev + gcc_vec_step */ > new_stmt = gimple_build_assign (vec_dest, PLUS_EXPR, >- vec_def, vec_step); >+ vec_def, gcc_vec_step); > vec_def = make_ssa_name (vec_dest, new_stmt); > gimple_assign_set_lhs (new_stmt, vec_def); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239266
:
205872
|
206115
|
206116