This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: lower-subreg and IBM long double
- From: Alan Modra <amodra at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 11 Jun 2013 11:56:19 +0930
- Subject: Re: lower-subreg and IBM long double
- References: <20130611002611 dot GS6878 at bubble dot grove dot modra dot org> <CAGWvnynXOszCd+AfT9hc+Ze_iSyPyxLYhmuvByKpAvPUS66qOw at mail dot gmail dot com> <CA+=Sn1mxeH-Wq+L__r5nSB31k7XK6JJEzB6HH1M9nD2GVtsguQ at mail dot gmail dot com>
On Mon, Jun 10, 2013 at 06:31:55PM -0700, Andrew Pinski wrote:
> On Mon, Jun 10, 2013 at 6:00 PM, David Edelsohn <dje.gcc@gmail.com> wrote:
> > On Mon, Jun 10, 2013 at 8:26 PM, Alan Modra <amodra@gmail.com> wrote:
> >
> >> The following patch disables lower-subreg for double double TFmode,
> >> bootstrap and regression tests are OK, but I'm a little unsure whether
> >> this is the right thing to do.
> >>
> >> * rs6000.c (TARGET_INIT_LOWER_SUBREG): Define.
> >> (rs6000_init_lower_subreg): New function.
> >> * lower-subreg.c (init_lower_subreg): Call targetm.init_lower_subreg.
> >> * target.def (init_lower_subreg): New.
> >> * doc/tm.texi.in (TARGET_INIT_LOWER_SUBREG): Document.
> >> * doc/tm.texi: Regenerate.
> >
> > I agree with the rs6000 bits. You need someone else to approve the
> > common bits. This also needs a testcase.
>
> I thought there was a way already to disable lower subreg already for
> some modes.
There is, via rtx_costs. In fact that was my first approach, with the
following in rs6000_rtx_costs, but this potentially affects other
areas of the compiler.
case SET:
if (GET_MODE (SET_DEST (x)) == TFmode
&& !TARGET_IEEEQUAD
&& TARGET_HARD_FLOAT
&& (TARGET_FPRS || TARGET_E500_DOUBLE)
&& TARGET_LONG_DOUBLE_128)
/* This hack is to persuade lower_subreg to not lower
TFmode regs to DImode. */
*total = COSTS_N_INSNS (2) - 1;
break;
--
Alan Modra
Australia Development Lab, IBM