aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorAndrew Pinski <andrew_pinski@playstation.sony.com>2006-12-12 22:33:06 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-12-12 14:33:06 -0800
commit0890b981c9051f9b94d9a481dcf5bfd0d80d2313 (patch)
treeeb4332185c9fbb34cb4009b24a4353d1811f0e0e /gcc/tree-inline.c
parent4fbd315165988f3c75ed7734a4920aa95992d23d (diff)
downloadgcc-0890b981c9051f9b94d9a481dcf5bfd0d80d2313.zip
gcc-0890b981c9051f9b94d9a481dcf5bfd0d80d2313.tar.gz
gcc-0890b981c9051f9b94d9a481dcf5bfd0d80d2313.tar.bz2
re PR middle-end/28436 (accessing an element via a "pointer" on a vector does not cause vec_extract to be used)
2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com> PR tree-opt/28436 * tree.h (DECL_COMPLEX_GIMPLE_REG_P): Rename to ... (DECL_GIMPLE_REG_P): This. * fold-const.c (fold_indirect_ref_1): Fold *(foo *)&vectorfoo into using BIT_FIELD_REF. * omp-low.c (omp_copy_decl_2): Use the renamed DECL_GIMPLE_REG_P. * tree-gimple.c (is_gimple_reg): Use the renamed DECL_GIMPLE_REG_P and check for VECTOR_TYPE. * expr.c (get_inner_reference): Set the mode for BIT_FIELD_REF with vector types. * tree-flow-inline.h (var_can_have_subvars): Use the renamed DECL_GIMPLE_REG_P. * gimplify.c (internal_get_tmp_var): Use the renamed DECL_GIMPLE_REG_P and check for VECTOR_TYPE. (gimplify_bind_expr): Likewise. (gimplify_function_tree): Likewise. * expmed.c: Include target.h. (extract_bit_field): For vector mode, try find a better mode first. If that fails use gen_lowpart (for vectors only). * tree-dfa.c (make_rename_temp): Use the renamed DECL_GIMPLE_REG_P and check for VECTOR_TYPE. * tree-ssa-pre.c (create_expressions_by_pieces): Likewise. (insert_into_preds_of_block): Likewise. (insert_fake_stores): Create gimple register store_tmps for vector types. * tree-sra.c (sra_elt): New field, is_vector_lhs. (sra_walk_expr <case BIT_FIELD_REF>): For vector types that are the left hand side, set the element's is_vector_lhs to true. (instantiate_element): For vector types which were on the left hand size, set DECL_GIMPLE_REG_P to false. * tree-nested.c (create_tmp_var_for): Use the renamed DECL_GIMPLE_REG_P. * tree-inline.c (declare_return_variable): Use the renamed DECL_GIMPLE_REG_P and check for VECTOR_TYPE. (copy_decl_to_var): Use the renamed DECL_GIMPLE_REG_P. (copy_result_decl_to_var): Likewise. * tree-vect-transform.c (vect_get_new_vect_var): For vector types, create a gimple register variable. (vect_permute_store_chain): Set DECL_GIMPLE_REG_P to true for the vect_inter_* temp variables. * Makefile.in (expmed.o): Update dependencies. 2006-12-12 Andrew Pinski <andrew_pinski@playstation.sony.com> PR tree-opt/28436 * gcc.c-torture/compile/vector-1.c: New test. * gcc.c-torture/compile/vector-2.c: New test. * gcc.c-torture/compile/vector-3.c: New test. From-SVN: r119801
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 429cc2c..86485e5 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1204,10 +1204,11 @@ declare_return_variable (copy_body_data *id, tree return_slot_addr,
var = return_slot_addr;
else
var = build_fold_indirect_ref (return_slot_addr);
- if (TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE
- && !DECL_COMPLEX_GIMPLE_REG_P (result)
+ if ((TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE
+ || TREE_CODE (TREE_TYPE (result)) == VECTOR_TYPE)
+ && !DECL_GIMPLE_REG_P (result)
&& DECL_P (var))
- DECL_COMPLEX_GIMPLE_REG_P (var) = 0;
+ DECL_GIMPLE_REG_P (var) = 0;
use = NULL;
goto done;
}
@@ -1245,9 +1246,10 @@ declare_return_variable (copy_body_data *id, tree return_slot_addr,
use_it = false;
else if (is_global_var (base_m))
use_it = false;
- else if (TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE
- && !DECL_COMPLEX_GIMPLE_REG_P (result)
- && DECL_COMPLEX_GIMPLE_REG_P (base_m))
+ else if ((TREE_CODE (TREE_TYPE (result)) == COMPLEX_TYPE
+ || TREE_CODE (TREE_TYPE (result)) == VECTOR_TYPE)
+ && !DECL_GIMPLE_REG_P (result)
+ && DECL_GIMPLE_REG_P (base_m))
use_it = false;
else if (!TREE_ADDRESSABLE (base_m))
use_it = true;
@@ -2648,7 +2650,7 @@ copy_decl_to_var (tree decl, copy_body_data *id)
TREE_ADDRESSABLE (copy) = TREE_ADDRESSABLE (decl);
TREE_READONLY (copy) = TREE_READONLY (decl);
TREE_THIS_VOLATILE (copy) = TREE_THIS_VOLATILE (decl);
- DECL_COMPLEX_GIMPLE_REG_P (copy) = DECL_COMPLEX_GIMPLE_REG_P (decl);
+ DECL_GIMPLE_REG_P (copy) = DECL_GIMPLE_REG_P (decl);
return copy_decl_for_dup_finish (id, decl, copy);
}
@@ -2674,7 +2676,7 @@ copy_result_decl_to_var (tree decl, copy_body_data *id)
if (!DECL_BY_REFERENCE (decl))
{
TREE_ADDRESSABLE (copy) = TREE_ADDRESSABLE (decl);
- DECL_COMPLEX_GIMPLE_REG_P (copy) = DECL_COMPLEX_GIMPLE_REG_P (decl);
+ DECL_GIMPLE_REG_P (copy) = DECL_GIMPLE_REG_P (decl);
}
return copy_decl_for_dup_finish (id, decl, copy);