mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-15 05:20:25 +08:00
re PR middle-end/51782 (-ftree-sra: Missing address-space information leads to wrong)
2012-01-17 Richard Guenther <rguenther@suse.de> PR middle-end/51782 * expr.c (expand_assignment): Take address-space information from the address operand of MEM_REF and TARGET_MEM_REF. (expand_expr_real_1): Likewise. From-SVN: r183249
This commit is contained in:
parent
a6d10e8011
commit
e831c1e8a6
@ -1,3 +1,10 @@
|
||||
2012-01-17 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/51782
|
||||
* expr.c (expand_assignment): Take address-space information
|
||||
from the address operand of MEM_REF and TARGET_MEM_REF.
|
||||
(expand_expr_real_1): Likewise.
|
||||
|
||||
2012-01-17 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
|
||||
|
||||
* ira.c (do_reload): Make sure ira_dump_file is re-set if no
|
||||
|
10
gcc/expr.c
10
gcc/expr.c
@ -4590,7 +4590,7 @@ expand_assignment (tree to, tree from, bool nontemporal)
|
||||
if (TREE_CODE (to) == MEM_REF)
|
||||
{
|
||||
addr_space_t as
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (to, 1))));
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (to, 0))));
|
||||
tree base = TREE_OPERAND (to, 0);
|
||||
address_mode = targetm.addr_space.address_mode (as);
|
||||
op0 = expand_expr (base, NULL_RTX, VOIDmode, EXPAND_NORMAL);
|
||||
@ -4608,7 +4608,8 @@ expand_assignment (tree to, tree from, bool nontemporal)
|
||||
}
|
||||
else if (TREE_CODE (to) == TARGET_MEM_REF)
|
||||
{
|
||||
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (to));
|
||||
addr_space_t as
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (to, 0))));
|
||||
struct mem_address addr;
|
||||
|
||||
get_address_description (to, &addr);
|
||||
@ -9253,7 +9254,8 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||
|
||||
case TARGET_MEM_REF:
|
||||
{
|
||||
addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (exp));
|
||||
addr_space_t as
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))));
|
||||
struct mem_address addr;
|
||||
enum insn_code icode;
|
||||
unsigned int align;
|
||||
@ -9288,7 +9290,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||
case MEM_REF:
|
||||
{
|
||||
addr_space_t as
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 1))));
|
||||
= TYPE_ADDR_SPACE (TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0))));
|
||||
enum machine_mode address_mode;
|
||||
tree base = TREE_OPERAND (exp, 0);
|
||||
gimple def_stmt;
|
||||
|
Loading…
x
Reference in New Issue
Block a user