diff options
-rw-r--r-- | gcc/ChangeLog | 35 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 18 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 1 | ||||
-rw-r--r-- | gcc/dwarf2out.c | 1 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 9 | ||||
-rw-r--r-- | gcc/expr.c | 24 | ||||
-rw-r--r-- | gcc/fold-const.c | 4 | ||||
-rw-r--r-- | gcc/gimplify.c | 1 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 4 | ||||
-rw-r--r-- | gcc/tree-dump.c | 1 | ||||
-rw-r--r-- | gcc/tree-eh.c | 1 | ||||
-rw-r--r-- | gcc/tree-pretty-print.c | 5 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 2 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 4 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-operands.c | 3 | ||||
-rw-r--r-- | gcc/tree-ssa-pre.c | 1 | ||||
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 9 | ||||
-rw-r--r-- | gcc/tree-vect-data-refs.c | 10 | ||||
-rw-r--r-- | gcc/tree-vect-stmts.c | 30 | ||||
-rw-r--r-- | gcc/tree.c | 2 | ||||
-rw-r--r-- | gcc/tree.def | 6 | ||||
-rw-r--r-- | gcc/tree.h | 3 |
23 files changed, 88 insertions, 89 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a5d97fc..1a1cce5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,40 @@ 2010-07-05 Richard Guenther <rguenther@suse.de> + * tree-ssa-loop-im.c (for_each_index): Do not handle + ALIGN_INDIRECT_REF. + (gen_lsm_tmp_name): Likewise. + * tree-dump.c (dequeue_and_dump): Likewise. + * tree-pretty-print.c (dump_generic_node): Likewise. + (op_code_prio): Likewise. + (op_symbol_code): Likewise. + * tree.c (staticp): Likewise. + (build1_stat): Likewise. + * tree.h (INDIRECT_REF_P): Likewise. + * fold-const.c (maybe_lvalue_p): Likewise. + (operand_equal_p): Likewise. + * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise. + (ao_ref_init_from_vn_reference): Likewise. + * tree-ssa-loop-ivopts.c (idx_find_step): Likewise. + (find_interesting_uses_address): Likewise. + * dwarf2out.c (loc_list_from_tree): Likewise. + * gimplify.c (gimplify_expr): Likewise. + * tree-eh.c (tree_could_trap_p): Likewise. + * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise. + * cfgexpand.c (expand_debug_expr): Likewise. + * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise. + * tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise. + * tree-cfg.c (verify_types_in_gimple_min_lval): Likewise. + * config/rs6000/rs6000 (rs6000_check_sdmode): Likewise. + * tree-ssa-operands.c (get_expr_operands): Likewise. + * expr.c (safe_from_p): Likewise. + (expand_expr_real_1): Likewise. TER BIT_AND_EXPRs into MEM_REFs. + * tree-vect-data-refs.c (vect_setup_realignment): Build + BIT_AND_EXPR and MEM_REF instead of ALIGN_INDIRECT_REF. + * tree-vect-stmts.c (vectorizable_load): Likewise. + * tree.def (ALIGN_INDIRECT_REF): Remove. + +2010-07-05 Richard Guenther <rguenther@suse.de> + PR tree-optimization/44784 * tree-ssa-pre.c (bitmap_find_leader): Fix dominance check for inserted stmts. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 771ed47..3e9ecbf 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2239,7 +2239,6 @@ expand_debug_expr (tree exp) enum machine_mode mode = TYPE_MODE (TREE_TYPE (exp)); int unsignedp = TYPE_UNSIGNED (TREE_TYPE (exp)); addr_space_t as; - enum machine_mode address_mode; switch (TREE_CODE_CLASS (TREE_CODE (exp))) { @@ -2444,28 +2443,15 @@ expand_debug_expr (tree exp) return NULL; /* Fallthru. */ case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: op0 = expand_debug_expr (TREE_OPERAND (exp, 0)); if (!op0) return NULL; if (POINTER_TYPE_P (TREE_TYPE (exp))) - { - as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp))); - address_mode = targetm.addr_space.address_mode (as); - } + as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp))); else - { - as = ADDR_SPACE_GENERIC; - address_mode = Pmode; - } - - if (TREE_CODE (exp) == ALIGN_INDIRECT_REF) - { - int align = TYPE_ALIGN_UNIT (TREE_TYPE (exp)); - op0 = gen_rtx_AND (address_mode, op0, GEN_INT (-align)); - } + as = ADDR_SPACE_GENERIC; op0 = gen_rtx_MEM (mode, op0); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 8854468..88f8576 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -13805,7 +13805,6 @@ rs6000_check_sdmode (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) case SSA_NAME: case REAL_CST: case MEM_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case VIEW_CONVERT_EXPR: if (TYPE_MODE (TREE_TYPE (*tp)) == SDmode) diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 6decc6f..8e35545 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -15186,7 +15186,6 @@ loc_list_from_tree (tree loc, int want_address) return 0; /* Fallthru. */ case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: list_ret = loc_list_from_tree (TREE_OPERAND (loc, 0), 0); have_address = 1; diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 6dae996..35ca9d4 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1611,7 +1611,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, /* We can set the alignment from the type if we are making an object, this is an INDIRECT_REF, or if TYPE_ALIGN_OK. */ if (objectp || TREE_CODE (t) == INDIRECT_REF - || TREE_CODE (t) == ALIGN_INDIRECT_REF || TYPE_ALIGN_OK (type)) align = MAX (align, TYPE_ALIGN (type)); else if (TREE_CODE (t) == MEM_REF) @@ -1842,14 +1841,6 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, size = plus_constant (size, apply_bitpos / BITS_PER_UNIT); } - if (TREE_CODE (t) == ALIGN_INDIRECT_REF) - { - /* Force EXPR and OFFSET to NULL, since we don't know exactly what - we're overlapping. */ - offset = NULL; - expr = NULL; - } - /* Now set the attributes we computed above. */ MEM_ATTRS (ref) = get_mem_attrs (alias, expr, offset, size, align, @@ -6670,7 +6670,6 @@ safe_from_p (const_rtx x, tree exp, int top_p) break; case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case INDIRECT_REF: if (MEM_P (x) && alias_sets_conflict_p (MEM_ALIAS_SET (x), @@ -8646,12 +8645,10 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return expand_constructor (exp, target, modifier, false); case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case INDIRECT_REF: { tree exp1 = treeop0; addr_space_t as = ADDR_SPACE_GENERIC; - enum machine_mode address_mode = Pmode; if (modifier != EXPAND_WRITE) { @@ -8663,21 +8660,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, } if (POINTER_TYPE_P (TREE_TYPE (exp1))) - { - as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp1))); - address_mode = targetm.addr_space.address_mode (as); - } + as = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (exp1))); op0 = expand_expr (exp1, NULL_RTX, VOIDmode, EXPAND_SUM); op0 = memory_address_addr_space (mode, op0, as); - if (code == ALIGN_INDIRECT_REF) - { - int align = TYPE_ALIGN_UNIT (type); - op0 = gen_rtx_AND (address_mode, op0, GEN_INT (-align)); - op0 = memory_address_addr_space (mode, op0, as); - } - temp = gen_rtx_MEM (mode, op0); set_mem_attributes (temp, exp, 0); @@ -8742,6 +8729,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, = TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1)))); enum machine_mode address_mode; tree base = TREE_OPERAND (exp, 0); + gimple def_stmt; /* Handle expansion of non-aliased memory with non-BLKmode. That might end up in a register. */ if (TREE_CODE (base) == ADDR_EXPR) @@ -8784,8 +8772,12 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, } } address_mode = targetm.addr_space.address_mode (as); - op0 = expand_expr (TREE_OPERAND (exp, 0), NULL_RTX, address_mode, - EXPAND_NORMAL); + base = TREE_OPERAND (exp, 0); + if ((def_stmt = get_def_for_expr (base, BIT_AND_EXPR))) + base = build2 (BIT_AND_EXPR, TREE_TYPE (base), + gimple_assign_rhs1 (def_stmt), + gimple_assign_rhs2 (def_stmt)); + op0 = expand_expr (base, NULL_RTX, address_mode, EXPAND_NORMAL); if (!integer_zerop (TREE_OPERAND (exp, 1))) { rtx off; diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1e3bae6..8be8f3ee 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2041,8 +2041,8 @@ maybe_lvalue_p (const_tree x) case SSA_NAME: case COMPONENT_REF: + case MEM_REF: case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case ARRAY_REF: case ARRAY_RANGE_REF: @@ -2586,7 +2586,6 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) switch (TREE_CODE (arg0)) { case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case REALPART_EXPR: case IMAGPART_EXPR: @@ -7596,7 +7595,6 @@ build_fold_addr_expr_with_type_loc (location_t loc, tree t, tree ptrtype) if (TREE_CODE (t) == WITH_SIZE_EXPR) t = TREE_OPERAND (t, 0); - /* Note: doesn't apply to ALIGN_INDIRECT_REF */ if (TREE_CODE (t) == INDIRECT_REF || TREE_CODE (t) == MISALIGNED_INDIRECT_REF) { diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 02d0bb0..5559f0e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6769,7 +6769,6 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, recalculate_side_effects (*expr_p); break; - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: /* We can only reach this through re-gimplification from tree optimizers. */ diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 448e275..ccafa4d 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2850,8 +2850,7 @@ verify_types_in_gimple_min_lval (tree expr) if (is_gimple_id (expr)) return false; - if (TREE_CODE (expr) != ALIGN_INDIRECT_REF - && TREE_CODE (expr) != MISALIGNED_INDIRECT_REF + if (TREE_CODE (expr) != MISALIGNED_INDIRECT_REF && TREE_CODE (expr) != TARGET_MEM_REF && TREE_CODE (expr) != MEM_REF) { @@ -3702,7 +3701,6 @@ verify_gimple_assign_single (gimple stmt) case COMPONENT_REF: case BIT_FIELD_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case ARRAY_REF: case ARRAY_RANGE_REF: diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c index 539a11d..defa558 100644 --- a/gcc/tree-dump.c +++ b/gcc/tree-dump.c @@ -571,7 +571,6 @@ dequeue_and_dump (dump_info_p di) case TRUTH_NOT_EXPR: case ADDR_EXPR: case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case CLEANUP_POINT_EXPR: case SAVE_EXPR: diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index c117013..853aa55 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -2442,7 +2442,6 @@ tree_could_trap_p (tree expr) return false; /* Fallthru. */ case INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: return !TREE_THIS_NOTRAP (expr); diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 03cc102..a51fbe7 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1586,7 +1586,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, case ADDR_EXPR: case PREDECREMENT_EXPR: case PREINCREMENT_EXPR: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case INDIRECT_REF: if (TREE_CODE (node) == ADDR_EXPR @@ -2549,7 +2548,6 @@ op_code_prio (enum tree_code code) case PREINCREMENT_EXPR: case PREDECREMENT_EXPR: case NEGATE_EXPR: - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: case INDIRECT_REF: case ADDR_EXPR: @@ -2720,9 +2718,6 @@ op_symbol_code (enum tree_code code) case INDIRECT_REF: return "*"; - case ALIGN_INDIRECT_REF: - return "A*"; - case MISALIGNED_INDIRECT_REF: return "M*"; diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 6aaeaa0..2e65d10 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -273,7 +273,6 @@ for_each_index (tree *addr_p, bool (*cbck) (tree, tree *, void *), void *data) return cbck (*addr_p, addr_p, data); case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MEM_REF: nxt = &TREE_OPERAND (*addr_p, 0); return cbck (*addr_p, nxt, data); @@ -1984,7 +1983,6 @@ gen_lsm_tmp_name (tree ref) switch (TREE_CODE (ref)) { case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case MEM_REF: gen_lsm_tmp_name (TREE_OPERAND (ref, 0)); lsm_tmp_name_add ("_"); diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index b7b26a3..740db68 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -1360,8 +1360,7 @@ idx_find_step (tree base, tree *idx, void *data) tree step, iv_base, iv_step, lbound, off; struct loop *loop = dta->ivopts_data->current_loop; - if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF - || TREE_CODE (base) == ALIGN_INDIRECT_REF) + if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF) return false; /* If base is a component ref, require that the offset of the reference @@ -1673,7 +1672,6 @@ find_interesting_uses_address (struct ivopts_data *data, gimple stmt, tree *op_p goto fail; step = ifs_ivopts_data.step; - gcc_assert (TREE_CODE (base) != ALIGN_INDIRECT_REF); gcc_assert (TREE_CODE (base) != MISALIGNED_INDIRECT_REF); /* Check that the base expression is addressable. This needs diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 96a8e92..0282cbc 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -404,8 +404,7 @@ idx_analyze_ref (tree base, tree *index, void *data) HOST_WIDE_INT idelta = 0, imult = 1; affine_iv iv; - if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF - || TREE_CODE (base) == ALIGN_INDIRECT_REF) + if (TREE_CODE (base) == MISALIGNED_INDIRECT_REF) return false; if (!simple_iv (ar_data->loop, loop_containing_stmt (ar_data->stmt), diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index fdc906a..5b17ce2 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -712,7 +712,7 @@ mark_address_taken (tree ref) /* A subroutine of get_expr_operands to handle MEM_REF, - ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. + MISALIGNED_INDIRECT_REF. STMT is the statement being processed, EXPR is the MEM_REF that got us here. @@ -914,7 +914,6 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags) get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags); /* fall through */ - case ALIGN_INDIRECT_REF: case MEM_REF: get_indirect_ref_operands (stmt, expr, flags, true); return; diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index c864eac..8293e978 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -2823,7 +2823,6 @@ create_component_ref_by_pieces_1 (basic_block block, vn_reference_t ref, return folded; } break; - case ALIGN_INDIRECT_REF: case MISALIGNED_INDIRECT_REF: { tree folded; diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index b121309..192d70f 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -600,10 +600,6 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result) switch (temp.opcode) { - case ALIGN_INDIRECT_REF: - /* The only operand is the address, which gets its own - vn_reference_op_s structure. */ - break; case MISALIGNED_INDIRECT_REF: temp.op0 = TREE_OPERAND (ref, 1); break; @@ -789,11 +785,6 @@ ao_ref_init_from_vn_reference (ao_ref *ref, return false; /* Record the base objects. */ - case ALIGN_INDIRECT_REF: - *op0_p = build1 (op->opcode, op->type, NULL_TREE); - op0_p = &TREE_OPERAND (*op0_p, 0); - break; - case MISALIGNED_INDIRECT_REF: *op0_p = build2 (MISALIGNED_INDIRECT_REF, op->type, NULL_TREE, op->op0); diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index 801f37c..7755426 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -3565,7 +3565,15 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi, vec_dest = vect_create_destination_var (scalar_dest, vectype); ptr = vect_create_data_ref_ptr (stmt, loop_for_initial_load, NULL_TREE, &init_addr, &inc, true, &inv_p); - data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr); + new_stmt = gimple_build_assign_with_ops + (BIT_AND_EXPR, NULL_TREE, ptr, + build_int_cst (TREE_TYPE (ptr), + -(HOST_WIDE_INT)TYPE_ALIGN_UNIT (vectype))); + new_temp = make_ssa_name (SSA_NAME_VAR (ptr), new_stmt); + gimple_assign_set_lhs (new_stmt, new_temp); + new_bb = gsi_insert_on_edge_immediate (pe, new_stmt); + gcc_assert (!new_bb); + data_ref = build_simple_mem_ref (new_temp); new_stmt = gimple_build_assign (vec_dest, data_ref); new_temp = make_ssa_name (vec_dest, new_stmt); gimple_assign_set_lhs (new_stmt, new_temp); diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 8e921c6..ee3c2dd 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -3760,7 +3760,15 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, dr_explicit_realign, dataref_ptr, NULL); - data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr); + new_stmt = gimple_build_assign_with_ops + (BIT_AND_EXPR, NULL_TREE, dataref_ptr, + build_int_cst + (TREE_TYPE (dataref_ptr), + -(HOST_WIDE_INT)TYPE_ALIGN_UNIT (vectype))); + ptr = make_ssa_name (SSA_NAME_VAR (dataref_ptr), new_stmt); + gimple_assign_set_lhs (new_stmt, ptr); + vect_finish_stmt_generation (stmt, new_stmt, gsi); + data_ref = build_simple_mem_ref (ptr); vec_dest = vect_create_destination_var (scalar_dest, vectype); new_stmt = gimple_build_assign (vec_dest, data_ref); new_temp = make_ssa_name (vec_dest, new_stmt); @@ -3773,11 +3781,27 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt, bump = size_binop (MULT_EXPR, vs_minus_1, TYPE_SIZE_UNIT (scalar_type)); ptr = bump_vector_ptr (dataref_ptr, NULL, gsi, stmt, bump); - data_ref = build1 (ALIGN_INDIRECT_REF, vectype, ptr); + new_stmt = gimple_build_assign_with_ops + (BIT_AND_EXPR, NULL_TREE, ptr, + build_int_cst + (TREE_TYPE (ptr), + -(HOST_WIDE_INT)TYPE_ALIGN_UNIT (vectype))); + ptr = make_ssa_name (SSA_NAME_VAR (dataref_ptr), new_stmt); + gimple_assign_set_lhs (new_stmt, ptr); + vect_finish_stmt_generation (stmt, new_stmt, gsi); + data_ref = build_simple_mem_ref (ptr); break; } case dr_explicit_realign_optimized: - data_ref = build1 (ALIGN_INDIRECT_REF, vectype, dataref_ptr); + new_stmt = gimple_build_assign_with_ops + (BIT_AND_EXPR, NULL_TREE, dataref_ptr, + build_int_cst + (TREE_TYPE (dataref_ptr), + -(HOST_WIDE_INT)TYPE_ALIGN_UNIT (vectype))); + new_temp = make_ssa_name (SSA_NAME_VAR (dataref_ptr), new_stmt); + gimple_assign_set_lhs (new_stmt, new_temp); + vect_finish_stmt_generation (stmt, new_stmt, gsi); + data_ref = build_simple_mem_ref (new_temp); break; default: gcc_unreachable (); @@ -2432,7 +2432,6 @@ staticp (tree arg) return NULL; case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case INDIRECT_REF: return TREE_CONSTANT (TREE_OPERAND (arg, 0)) ? arg : NULL; @@ -3660,7 +3659,6 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL) break; case MISALIGNED_INDIRECT_REF: - case ALIGN_INDIRECT_REF: case INDIRECT_REF: /* Whether a dereference is readonly has nothing to do with whether its operand is readonly. */ diff --git a/gcc/tree.def b/gcc/tree.def index 9a7b1ec..493c75e 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -416,15 +416,11 @@ DEFTREECODE (ARRAY_RANGE_REF, "array_range_ref", tcc_reference, 4) /* The ordering of the following codes is optimized for the checking macros in tree.h. Changing the order will degrade the speed of the - compiler. INDIRECT_REF, ALIGN_INDIRECT_REF, MISALIGNED_INDIRECT_REF. */ + compiler. INDIRECT_REF, MISALIGNED_INDIRECT_REF. */ /* C unary `*' or Pascal `^'. One operand, an expression for a pointer. */ DEFTREECODE (INDIRECT_REF, "indirect_ref", tcc_reference, 1) -/* Like above, but aligns the referenced address (i.e, if the address - in P is not aligned on TYPE_ALIGN boundary, then &(*P) != P). */ -DEFTREECODE (ALIGN_INDIRECT_REF, "align_indirect_ref", tcc_reference, 1) - /* Same as INDIRECT_REF, but also specifies the alignment of the referenced address: Operand 0 is the referenced address (a pointer); @@ -118,7 +118,6 @@ extern const enum tree_code_class tree_code_type[]; #define INDIRECT_REF_P(CODE)\ (TREE_CODE (CODE) == INDIRECT_REF \ - || TREE_CODE (CODE) == ALIGN_INDIRECT_REF \ || TREE_CODE (CODE) == MISALIGNED_INDIRECT_REF) /* Nonzero if CODE represents a reference. */ @@ -1251,7 +1250,7 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int, accessing the memory pointed to won't generate a trap. However, this only applies to an object when used appropriately: it doesn't mean that writing a READONLY mem won't trap. Similarly for - ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. + MISALIGNED_INDIRECT_REF. In ARRAY_REF and ARRAY_RANGE_REF means that we know that the index (or slice of the array) always belongs to the range of the array. |