diff options
author | Richard Biener <rguenther@suse.de> | 2021-07-16 13:26:20 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-07-16 14:29:06 +0200 |
commit | 650c70a9fe7198394d3bbe4c0b1a7a73dc0bdd4a (patch) | |
tree | 2309cf7bc3c35d8aed0853a76bfa6fa506edaf3f /gcc/tree-vect-generic.c | |
parent | 8da8ed435e9f01b37bf4ee57fa62509d44121c7d (diff) | |
download | gcc-650c70a9fe7198394d3bbe4c0b1a7a73dc0bdd4a.zip gcc-650c70a9fe7198394d3bbe4c0b1a7a73dc0bdd4a.tar.gz gcc-650c70a9fe7198394d3bbe4c0b1a7a73dc0bdd4a.tar.bz2 |
Remove more gimple_expr_type uses
This removes a few more uses.
2021-07-16 Richard Biener <rguenther@suse.de>
* gimple-ssa-store-merging.c (verify_symbolic_number_p): Use
the type of the LHS.
(find_bswap_or_nop_1): Likewise.
(find_bswap_or_nop): Likewise.
* tree-vectorizer.h (vect_get_smallest_scalar_type): Adjust
prototype.
* tree-vect-data-refs.c (vect_get_smallest_scalar_type):
Remove unused parameters, pass in the scalar type. Fix
internal store function handling.
* tree-vect-stmts.c (vect_analyze_stmt): Remove assert.
(vect_get_vector_types_for_stmt): Move down check for
existing vector stmt after we've determined a scalar type.
Pass down the used scalar type to vect_get_smallest_scalar_type.
* tree-vect-generic.c (expand_vector_condition): Use
the type of the LHS.
(expand_vector_scalar_condition): Likewise.
(expand_vector_operations_1): Likewise.
* tree-vect-patterns.c (vect_widened_op_tree): Likewise.
(vect_recog_dot_prod_pattern): Likewise.
(vect_recog_sad_pattern): Likewise.
(vect_recog_widen_op_pattern): Likewise.
(vect_recog_widen_sum_pattern): Likewise.
(vect_recog_mixed_size_cond_pattern): Likewise.
Diffstat (limited to 'gcc/tree-vect-generic.c')
-rw-r--r-- | gcc/tree-vect-generic.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c index 5f3f9fa..a1257db 100644 --- a/gcc/tree-vect-generic.c +++ b/gcc/tree-vect-generic.c @@ -1017,7 +1017,7 @@ static bool expand_vector_condition (gimple_stmt_iterator *gsi, bitmap dce_ssa_names) { gassign *stmt = as_a <gassign *> (gsi_stmt (*gsi)); - tree type = gimple_expr_type (stmt); + tree type = TREE_TYPE (gimple_assign_lhs (stmt)); tree a = gimple_assign_rhs1 (stmt); tree a1 = a; tree a2 = NULL_TREE; @@ -1745,11 +1745,11 @@ static void expand_vector_scalar_condition (gimple_stmt_iterator *gsi) { gassign *stmt = as_a <gassign *> (gsi_stmt (*gsi)); - tree type = gimple_expr_type (stmt); + tree lhs = gimple_assign_lhs (stmt); + tree type = TREE_TYPE (lhs); tree compute_type = get_compute_type (COND_EXPR, mov_optab, type); machine_mode compute_mode = TYPE_MODE (compute_type); gcc_assert (compute_mode != BLKmode); - tree lhs = gimple_assign_lhs (stmt); tree rhs2 = gimple_assign_rhs2 (stmt); tree rhs3 = gimple_assign_rhs3 (stmt); tree new_rhs; @@ -2129,10 +2129,10 @@ expand_vector_operations_1 (gimple_stmt_iterator *gsi, return; rhs1 = gimple_assign_rhs1 (stmt); - type = gimple_expr_type (stmt); if (rhs_class == GIMPLE_BINARY_RHS) rhs2 = gimple_assign_rhs2 (stmt); + type = TREE_TYPE (lhs); if (!VECTOR_TYPE_P (type) || !VECTOR_TYPE_P (TREE_TYPE (rhs1))) return; |