summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-30 19:55:16 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-30 19:55:16 +0000
commit50bdfec86489266b2fad3eb5e9a7b5c8c13b4bad (patch)
tree3c0df87ef6fdf3860a9beacb71a59a811d649b15
parentf1a51f6b58520c5aba102ede6e78ca87a8548a9a (diff)
downloadgcc-50bdfec86489266b2fad3eb5e9a7b5c8c13b4bad.tar.gz
PR middle-end/44569
* lower-suberg.c (simplify_subreg_concatn): For VOIDmode elements, determine the mode of a subreg by GET_MODE_INNER of CONCATN RTX. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166092 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog31
-rw-r--r--gcc/lower-subreg.c12
-rw-r--r--gcc/testsuite/ChangeLog3
3 files changed, 27 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 00bb74fa233..7c8a08fbe84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/44569
+ * lower-suberg.c (simplify_subreg_concatn): For VOIDmode elements,
+ determine the mode of a subreg by GET_MODE_INNER of CONCATN RTX.
+
2010-10-30 H.J. Lu <hongjiu.lu@intel.com>
PR target/46195
@@ -92,8 +98,7 @@
pdp11_preferred_output_reload_class, pdp11_secondary_reload,
pdp11_secondary_memory_needed): New function.
(pdp11_return_in_memory): Add other float types.
- * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Add other float
- types.
+ * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Add other float types.
(SECONDARY_MEMORY_NEEDED, CANNOT_CHANGE_MODE_CLASS): Define.
(PREFERRED_RELOAD_CLASS, SECONDARY_RELOAD_CLASS,
REGISTER_MOVE_COST): Delete.
@@ -105,8 +110,7 @@
* config/mn10300/mn10300.c (mn10300_tune_string): New variable.
(mn10300_tune_cpu): New variable.
(mn10300_handle_option): Handle -mam34 and -mtune options.
- (mn10300_option_override): Convert tune string into tune cpu
- variable.
+ (mn10300_option_override): Convert tune string into tune cpu variable.
(mn10300_legitimate_constant_p): Delete unused local variable.
(is_load_insn): New function.
(is_store_insn): New function.
@@ -114,14 +118,13 @@
(TARGET_SCHED_ADJUST_COST): Define.
* config/mn10300/mn10300.opt (mam34): New option.
(mtune): New option.
- * config/mn10300/mn10300.h (TARGET_CPU_CPP_BUILTINS): Add AM34
- support.
+ * config/mn10300/mn10300.h (TARGET_CPU_CPP_BUILTINS): Add AM34 support.
(enum processor_type): Add AM34.
(TARGET_AM34): Define.
* config/mn10300/mn10300.md (attr cpu): Add am34.
Add pipeline description.
- (movqi, movhi, movsi, movsf, movdf, movdi): Fix predicates. Remove unneeded
- alternatives. Add timing attribute.
+ (movqi, movhi, movsi, movsf, movdf, movdi): Fix predicates.
+ Remove unneeded alternatives. Add timing attribute.
(pop_pic_reg, am33_addsi3, mn10300_addsi3, am33_subsi3,
mn10300_subsi3, mulsidi3, umulsidi3, am33_mulsi3,
mn10300_mulsi3, udivmodsi4_am33, divmodsi4, am33_andsi3,
@@ -167,8 +170,7 @@
(FUNCTION_ARG_ADVANCE): Delete.
* config/cris/cris.c (cris_function_arg_1, cris_function_arg): New
functions.
- (cris_function_incoming_arg, cris_function_arg_advance): New
- functions.
+ (cris_function_incoming_arg, cris_function_arg_advance): New functions.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
(TARGET_FUNCTION_ARG_ADVANCE): Define.
@@ -215,8 +217,7 @@
* config/crx/crx.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/crx/crx.c (crx_function_arg): Make static. Take a
const_tree and a bool.
- (crx_function_arg_advance): Make static. Take a const_tree and
- a bool.
+ (crx_function_arg_advance): Make static. Take a const_tree and a bool.
(enough_regs_for_param): Take a const_tree.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_ARG_ADVANCE): Define.
@@ -296,11 +297,9 @@
(frv_function_arg_advance): Delete.
* config/frv/frv.h (FUNCTION_ARG, FUNCTION_ARG_ADVANCE): Delete.
* config/frv/frv.c (frv_function_arg): Rename to...
- (frv_function_arg_1): Make static. Take const_tree and bool
- arguments.
+ (frv_function_arg_1): Make static. Take const_tree and bool arguments.
(frv_function_arg, frv_function_incoming_arg): New functions.
- (frv_function_arg_advance): Make static. Take a const_tree and
- a bool.
+ (frv_function_arg_advance): Make static. Take a const_tree and a bool.
(TARGET_FUNCTION_ARG, TARGET_FUNCTION_INCOMING_ARG): Define.
(TARGET_FUNCTION_ARG_ADVANCE): Define.
diff --git a/gcc/lower-subreg.c b/gcc/lower-subreg.c
index 71729af1fe0..1c4e9adb004 100644
--- a/gcc/lower-subreg.c
+++ b/gcc/lower-subreg.c
@@ -396,7 +396,7 @@ simplify_subreg_concatn (enum machine_mode outermode, rtx op,
unsigned int byte)
{
unsigned int inner_size;
- enum machine_mode innermode;
+ enum machine_mode innermode, partmode;
rtx part;
unsigned int final_offset;
@@ -409,11 +409,19 @@ simplify_subreg_concatn (enum machine_mode outermode, rtx op,
inner_size = GET_MODE_SIZE (innermode) / XVECLEN (op, 0);
part = XVECEXP (op, 0, byte / inner_size);
+ partmode = GET_MODE (part);
+
+ if (partmode == VOIDmode)
+ {
+ gcc_assert (VECTOR_MODE_P (innermode));
+ partmode = GET_MODE_INNER (innermode);
+ }
+
final_offset = byte % inner_size;
if (final_offset + GET_MODE_SIZE (outermode) > inner_size)
return NULL_RTX;
- return simplify_gen_subreg (outermode, part, GET_MODE (part), final_offset);
+ return simplify_gen_subreg (outermode, part, partmode, final_offset);
}
/* Wrapper around simplify_gen_subreg which handles CONCATN. */
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7fcf5380d20..3ae57c75d24 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -67,7 +67,7 @@
* obj-c++.dg/property/dynamic-2.mm: New.
2010-10-29 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
- Andrew Pinski <pinskia@gmail.com>
+ Andrew Pinski <pinskia@gmail.com>
* gcc.c-torture/execute/vector-shift.c: New testcase.
* gcc.c-torture/execute/vector-shift1.c: Likewise.
@@ -83,6 +83,7 @@
* gcc.c-torture/execute/20101011-1.c: Skip on SH.
2010-10-29 Pat Haugen <pthaugen@us.ibm.com>
+
* gcc.c-torture/execute/20101011-1.c: Fix #ifdef.
2010-10-28 Uros Bizjak <ubizjak@gmail.com>