+2006-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR target/27158
+ * reload.c (find_reloads_toplev): Only return the simplified SUBREG
+ of a reg_equiv_constant if the result is a legitimate constant.
+
2006-05-08 Uros Bizjak <uros@kss-loka.si>
PR target/27277
rtx tem;
if (subreg_lowpart_p (x)
- && regno >= FIRST_PSEUDO_REGISTER && reg_renumber[regno] < 0
+ && regno >= FIRST_PSEUDO_REGISTER
+ && reg_renumber[regno] < 0
&& reg_equiv_constant[regno] != 0
&& (tem = gen_lowpart_common (GET_MODE (x),
- reg_equiv_constant[regno])) != 0)
+ reg_equiv_constant[regno])) != 0
+ && LEGITIMATE_CONSTANT_P (tem))
return tem;
- if (regno >= FIRST_PSEUDO_REGISTER && reg_renumber[regno] < 0
+ if (regno >= FIRST_PSEUDO_REGISTER
+ && reg_renumber[regno] < 0
&& reg_equiv_constant[regno] != 0)
{
tem =
simplify_gen_subreg (GET_MODE (x), reg_equiv_constant[regno],
GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x));
gcc_assert (tem);
- return tem;
+ if (LEGITIMATE_CONSTANT_P (tem))
+ return tem;
}
/* If the subreg contains a reg that will be converted to a mem,
a wider mode if we have a paradoxical SUBREG. find_reloads will
force a reload in that case. So we should not do anything here. */
- else if (regno >= FIRST_PSEUDO_REGISTER
+ if (regno >= FIRST_PSEUDO_REGISTER
#ifdef LOAD_EXTEND_OP
&& (GET_MODE_SIZE (GET_MODE (x))
<= GET_MODE_SIZE (GET_MODE (SUBREG_REG (x))))
+2006-05-08 Roger Sayle <roger@eyesopen.com>
+
+ PR target/27158
+ * gcc.target/powerpc/pr27158.c: New test case.
+
2006-05-08 Laurent GUERBY <laurent@guerby.net>
PR testsuite/27476
--- /dev/null
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-*-eabispe*" "powerpc-ibm-aix*" } { "*" } { "" } } */
+/* { dg-options "-O2 -maltivec" } */
+#define REGLIST \
+ "77", "78", "79", "80", "81", "82", "83", "84", "85", "86",\
+ "87", "88", "89", "90", "91", "92", "93", "94", "95", "96",\
+ "97", "98", "99", "100", "101", "102", "103", "104", "105", "106",\
+ "107", "108"
+
+typedef __attribute__ ((vector_size (16))) float v4sf;
+
+void
+foo (int H)
+{
+ volatile v4sf tmp;
+ while (H-- > 0)
+ {
+ asm ("" : : : REGLIST);
+ tmp = (v4sf) __builtin_altivec_vspltisw (1);
+ }
+}
+