+2005-08-26 Andreas Krebbel <krebbel1@de.ibm.com>
+
+ * config/s390/predicates.md ("shift_count_operand", "setmem_operand"):
+ Reject operands containing eliminable registers.
+ * testsuite/gcc.dg/20050825-1.c: New testcase.
+
2005-08-24 Paolo Bonzini <bonzini@gnu.org>
Jan Hubicka <jh@suse.cz>
if (op && GET_CODE (op) != REG)
return false;
+ if (op && REGNO (op) < FIRST_PSEUDO_REGISTER
+ && !GENERAL_REGNO_P (REGNO (op)))
+ return false;
+
/* Unfortunately we have to reject constants that are invalid
for an address, or else reload will get confused. */
if (!DISP_IN_RANGE (offset))
if (op && GET_CODE (op) != REG)
return false;
+ if (op && REGNO (op) < FIRST_PSEUDO_REGISTER
+ && !GENERAL_REGNO_P (REGNO (op)))
+ return false;
+
/* Unfortunately we have to reject constants that are invalid
for an address, or else reload will get confused. */
if (!DISP_IN_RANGE (offset))
--- /dev/null
+/* Make sure that the S/390 specific shift_count_operand
+ predicate work properly. */
+
+/* { dg-do compile { target s390*-*-* } } */
+/* { dg-options "-O3" } */
+
+unsigned long long
+f (unsigned long long a, unsigned long b)
+{
+ asm ("" : : : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11", "r12", "r13", "r14");
+
+ return a << ((b + 3) & 63);
+}
+
+unsigned long long
+g (unsigned long long a, char **b , int c, int d, int e, int f)
+{
+ char buffer [4096];
+
+ *b = &buffer[0];
+
+ return a << ((unsigned long)&f & 63);
+}
+
+unsigned long long
+h (unsigned long long a, int b, int c, int d, int e, int f)
+{
+ return a << (((unsigned long)&f + 3));
+}