From 57d1677d8dc591fd3635fadb06a83753d65f23c1 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Mon, 11 Apr 2005 07:31:21 +0000 Subject: [PATCH] tree-vect-analyze (vect_determine_vectorization_factor): Do not use GET_MODE_NUNITS. 2005-04-11 Paolo Bonzini * tree-vect-analyze (vect_determine_vectorization_factor): Do not use GET_MODE_NUNITS. * tree-vect-transform.c (vect_get_vec_def_for_operand, (vectorizable_load, vect_transform_loop): Likewise. From-SVN: r97965 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-analyze.c | 2 +- gcc/tree-vect-transform.c | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96df0ff4ca4..db960f157f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-11 Paolo Bonzini + + * tree-vect-analyze (vect_determine_vectorization_factor): + Do not use GET_MODE_NUNITS. + * tree-vect-transform.c (vect_get_vec_def_for_operand, + (vectorizable_load, vect_transform_loop): Likewise. + 2005-04-11 Uros Bizjak * builtins.def (BUILT_IN_LCEIL, BUILT_IN_LCEILF, BUILT_IN_LCEILL) diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index 3c55fd4712d..be6d81c7e96 100644 --- a/gcc/tree-vect-analyze.c +++ b/gcc/tree-vect-analyze.c @@ -390,7 +390,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) } STMT_VINFO_VECTYPE (stmt_info) = vectype; - nunits = GET_MODE_NUNITS (TYPE_MODE (vectype)); + nunits = TYPE_VECTOR_SUBPARTS (vectype); if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) fprintf (vect_dump, "nunits = %d", nunits); diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 0d14c13143b..47792284334 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -514,7 +514,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt) stmt_vec_info def_stmt_info = NULL; stmt_vec_info stmt_vinfo = vinfo_for_stmt (stmt); tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo); - int nunits = GET_MODE_NUNITS (TYPE_MODE (vectype)); + int nunits = TYPE_VECTOR_SUBPARTS (vectype); loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_vinfo); struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo); basic_block bb; @@ -1073,7 +1073,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /* <2> Create lsq = *(floor(p2')) in the loop */ offset = build_int_cst (integer_type_node, - GET_MODE_NUNITS (TYPE_MODE (vectype))); + TYPE_VECTOR_SUBPARTS (vectype)); offset = int_const_binop (MINUS_EXPR, offset, integer_one_node, 1); vec_dest = vect_create_destination_var (scalar_dest, vectype); dataref_ptr = vect_create_data_ref_ptr (stmt, bsi, offset, &dummy, false); @@ -1826,7 +1826,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, /* FORNOW: Verify that all stmts operate on the same number of units and no inner unrolling is necessary. */ gcc_assert - (GET_MODE_NUNITS (TYPE_MODE (STMT_VINFO_VECTYPE (stmt_info))) + (TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info)) == vectorization_factor); #endif /* -------- vectorize statement ------------ */