summaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 12:25:20 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-05 12:25:20 +0000
commit86638c2ef3b5ed40e2c8f19e5ce0cdbf86593413 (patch)
tree34ecef9e0e53eb11bb21987eca5fd01634451a32 /gcc/expr.c
parent931b9155bb28bc3e3ddf6fbad58a8fba530e4e7f (diff)
downloadgcc-86638c2ef3b5ed40e2c8f19e5ce0cdbf86593413.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161830 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 23baa63435b..a43d708f273 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -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;