From: Jakub Jelinek Date: Wed, 9 Mar 2011 20:49:00 +0000 (+0100) Subject: re PR rtl-optimization/47866 (gcc.dg/torture/vector-2.c fails on IA64) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=db7ec03597533caa93e7eb3688de61c0d6e2bc77;p=gcc.git re PR rtl-optimization/47866 (gcc.dg/torture/vector-2.c fails on IA64) PR rtl-optimization/47866 * expr.c (store_field): If MEM_SCALAR_P (target), don't use MEM_SET_IN_STRUCT_P (to_rtx, 1), just set MEM_IN_STRUCT_P (to_rtx) if target wasn't scalar. * function.c (assign_stack_temp_for_type): Assert that neither MEM_SCALAR_P nor MEM_IN_STRUCT_P is set previously, set either MEM_IN_STRUCT_P or MEM_SCALAR_P instead of using MEM_SET_IN_STRUCT_P macro. * rtl.h (MEM_SET_IN_STRUCT_P): Removed. From-SVN: r170834 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 147e7ef856c..ca24623dfd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,15 @@ +2011-03-09 Jakub Jelinek + + PR rtl-optimization/47866 + * expr.c (store_field): If MEM_SCALAR_P (target), don't use + MEM_SET_IN_STRUCT_P (to_rtx, 1), just set MEM_IN_STRUCT_P (to_rtx) + if target wasn't scalar. + * function.c (assign_stack_temp_for_type): Assert that neither + MEM_SCALAR_P nor MEM_IN_STRUCT_P is set previously, set either + MEM_IN_STRUCT_P or MEM_SCALAR_P instead of using MEM_SET_IN_STRUCT_P + macro. + * rtl.h (MEM_SET_IN_STRUCT_P): Removed. + 2011-03-09 Andreas Krebbel * config/s390/s390-protos.h (s390_label_align): New prototype. diff --git a/gcc/expr.c b/gcc/expr.c index b09b1ac07c2..6a5f74b4210 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -5924,7 +5924,8 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos, if (to_rtx == target) to_rtx = copy_rtx (to_rtx); - MEM_SET_IN_STRUCT_P (to_rtx, 1); + if (!MEM_SCALAR_P (to_rtx)) + MEM_IN_STRUCT_P (to_rtx) = 1; if (!MEM_KEEP_ALIAS_SET_P (to_rtx) && MEM_ALIAS_SET (to_rtx) != 0) set_mem_alias_set (to_rtx, alias_set); diff --git a/gcc/function.c b/gcc/function.c index 19b480d20ba..1f7722c62a2 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -942,8 +942,11 @@ assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, if (type != 0) { MEM_VOLATILE_P (slot) = TYPE_VOLATILE (type); - MEM_SET_IN_STRUCT_P (slot, (AGGREGATE_TYPE_P (type) - || TREE_CODE (type) == COMPLEX_TYPE)); + gcc_checking_assert (!MEM_SCALAR_P (slot) && !MEM_IN_STRUCT_P (slot)); + if (AGGREGATE_TYPE_P (type) || TREE_CODE (type) == COMPLEX_TYPE) + MEM_IN_STRUCT_P (slot) = 1; + else + MEM_SCALAR_P (slot) = 1; } MEM_NOTRAP_P (slot) = 1; diff --git a/gcc/rtl.h b/gcc/rtl.h index 0552156d648..66f275570fa 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1279,24 +1279,6 @@ do { \ #define MEM_NOTRAP_P(RTX) \ (RTL_FLAG_CHECK1("MEM_NOTRAP_P", (RTX), MEM)->call) -/* If VAL is nonzero, set MEM_IN_STRUCT_P and clear MEM_SCALAR_P in - RTX. Otherwise, vice versa. Use this macro only when you are - *sure* that you know that the MEM is in a structure, or is a - scalar. VAL is evaluated only once. */ -#define MEM_SET_IN_STRUCT_P(RTX, VAL) \ -do { \ - if (VAL) \ - { \ - MEM_IN_STRUCT_P (RTX) = 1; \ - MEM_SCALAR_P (RTX) = 0; \ - } \ - else \ - { \ - MEM_IN_STRUCT_P (RTX) = 0; \ - MEM_SCALAR_P (RTX) = 1; \ - } \ -} while (0) - /* The memory attribute block. We provide access macros for each value in the block and provide defaults if none specified. */ #define MEM_ATTRS(RTX) X0MEMATTR (RTX, 1)