From ec410bf1f9ce28ba2fd567b4306c13dd5b6c8765 Mon Sep 17 00:00:00 2001 From: hainque Date: Fri, 27 Aug 2010 10:48:32 +0000 Subject: * dse.c (group_info.base_mem, get_group_info): Use BLKmode to cover all the possible offsets from this base. (scan_reads_nospill): Pass base_mem's mode to canon_true_dependence. testsuite/ * gnat.dg/dse_step.ads, dse_step.adb, test_dse_step.adb: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163582 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gcc/dse.c') diff --git a/gcc/dse.c b/gcc/dse.c index 5dd7bd68bb6..1debafc385a 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -473,8 +473,9 @@ struct group_info hard_frame_pointer. */ bool frame_related; - /* A mem wrapped around the base pointer for the group in order to - do read dependency. */ + /* A mem wrapped around the base pointer for the group in order to do + read dependency. It must be given BLKmode in order to encompass all + the possible offsets from the base. */ rtx base_mem; /* Canonized version of base_mem's address. */ @@ -705,7 +706,7 @@ get_group_info (rtx base) *slot = gi = (group_info_t) pool_alloc (rtx_group_info_pool); gi->rtx_base = base; gi->id = rtx_group_next_id++; - gi->base_mem = gen_rtx_MEM (QImode, base); + gi->base_mem = gen_rtx_MEM (BLKmode, base); gi->canon_base_addr = canon_rtx (base); gi->store1_n = BITMAP_ALLOC (NULL); gi->store1_p = BITMAP_ALLOC (NULL); @@ -3118,7 +3119,7 @@ scan_reads_nospill (insn_info_t insn_info, bitmap gen, bitmap kill) base. */ if ((read_info->group_id < 0) && canon_true_dependence (group->base_mem, - QImode, + GET_MODE (group->base_mem), group->canon_base_addr, read_info->mem, NULL_RTX, rtx_varies_p)) -- cgit v1.2.1