This is the mail archive of the
mailing list for the GCC project.
PR middle-end/30191 (was: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: pinskia at gmail dot com (Andrew Pinski)
- Cc: bergner at vnet dot ibm dot com (Peter Bergner), dje at watson dot ibm dot com (David Edelsohn), ulrich dot weigand at de dot ibm dot com (Ulrich Weigand), gcc-patches at gcc dot gnu dot org, matz at suse dot de (Michael Matz)
- Date: Wed, 13 Dec 2006 19:11:12 +0100 (CET)
- Subject: PR middle-end/30191 (was: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug)
Andrew Pinski wrote:
> On Tue, 2006-12-12 at 21:16 +0100, Ulrich Weigand wrote:
> > Peter Bergner wrote:
> > > * reload1.c (eliminate_regs_in_insn): Merge the plus_src "else" and
> > > the offset == 0 "then" clauses.
> > This part is OK.
> This patch causes a build failure on spu-elf while compiling libstdc++.
> I will provide a reduced testcase tomorrow and some more information
> about the problem also.
> It also causes a hppa bootstrap failure with Ada, see PR 30191.
Hmmm. This is caused by strict checking of allowed immediate ranges
on various platforms. On spu the failure can be circumvented by:
--- gcc/config/spu/predicates.md (revision 119825)
+++ gcc/config/spu/predicates.md (working copy)
@@ -57,6 +57,10 @@
if (spu_reg_operand (op, mode))
+ /* Accept any CONST_INT during reload, it will be fixed up later
+ to match constraints. */
+ if (reload_in_progress && GET_CODE (op) == CONST_INT)
+ return 1;
if (GET_CODE (op) == CONST_INT || GET_CODE (op) == CONST_VECTOR)
return arith_immediate_p (op, mode, -0x200, 0x1ff);
On hppa, the strict check is here:
return (register_operand (op, mode)
|| (GET_CODE (op) == CONST_INT && INT_14_BITS (op)));
On ia64, it's likely to be this one:
(ior (match_operand 0 "gr_register_operand")
(and (match_code "const_int")
(match_test "CONST_OK_FOR_J (INTVAL (op))"))))
On x86-64, it appears to be this test:
return immediate_operand (op, mode);
switch (GET_CODE (op))
/* CONST_DOUBLES never match, since HOST_BITS_PER_WIDE_INT is known
to be at least 32 and this all acceptable constants are
represented as CONST_INT. */
if (HOST_BITS_PER_WIDE_INT == 32)
HOST_WIDE_INT val = trunc_int_for_mode (INTVAL (op), DImode);
return trunc_int_for_mode (val, SImode) == val;
While we could add reload_in_progress workarounds to all these, it does
look a bit unfortunate. I hadn't thought so many platforms use these
types of checks in predicates ...
Peter, please revert your check-in for now so that the tree doesn't
stay in its broken state. I'll try to come up with a less invasive
way to fix the powerpc problem.
Sorry for the breakage ...
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE