This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: bergner at vnet dot ibm dot com (Peter Bergner)
- Cc: matz at suse dot de (Michael Matz), ulrich dot weigand at de dot ibm dot com (Ulrich Weigand), pinskia at gmail dot com (Andrew Pinski), gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Dec 2006 20:35:30 +0100 (CET)
- Subject: Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
Peter Bergner wrote:
> On Mon, Dec 11, 2006 at 06:40:59PM +0100, Michael Matz wrote:
> > Okay, that makes sense I guess (the preferred class is all used already so
> > it has to defer to the alternate class). ALL_REGS isn't shown in the
> > dumps, and I confused it with NO_REGS (which actually is shown as "or
> > none"), hence assumed wrongly that it got NO_REGS as alternate class.
> > With ALL_REGS the choice of 65 makes sense and is expected and the
> > predicate needs to be augmented by a check for reload_in_progress. The
> > choice of ALL_REGS seems also to be correct to me.
> Something like this?
> Index: predicates.md
> --- predicates.md (revision 119613)
> +++ predicates.md (working copy)
> @@ -84,7 +84,8 @@
> ;; Return 1 if op is a register that is not special.
> (define_predicate "gpc_reg_operand"
> (and (match_operand 0 "register_operand")
> - (match_test "(GET_CODE (op) != REG
> + (match_test "(reload_in_progress
> + || GET_CODE (op) != REG
> || (REGNO (op) >= ARG_POINTER_REGNUM
> && !XER_REGNO_P (REGNO (op)))
> || REGNO (op) < MQ_REGNO)
Given this discussion, this looks fine to me. (You'll have to get
a rs6000 maintainer to approve it, of course.)
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE