public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [Bug target/65614] [5 Regression] PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers
       [not found] ` <bug-65614-15150-TdBMEeJ70A@http.gcc.gnu.org/bugzilla/>
@ 2015-04-06 17:10   ` Michael Meissner
  2015-04-06 23:56     ` David Edelsohn
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Meissner @ 2015-04-06 17:10 UTC (permalink / raw)
  To: dje at gcc dot gnu.org; +Cc: gcc-patches, dje.gcc, meissner

On Fri, Apr 03, 2015 at 07:19:24PM +0000, dje at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65614
> 
> --- Comment #4 from David Edelsohn <dje at gcc dot gnu.org> ---
> Comment on attachment 35227
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35227
> Proposed patch to fix the problem
> 
> The FLOAT_EXTEND cost should be based on the processor tuning, not the ISA.

This patch moves the decision to the cost structure based on the processor
tuning.  Is it ok to install?

[gcc]
2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/65614
	* config/rs6000/rs6000.c (struct processor_costs): Add cost field
	for SF->DF conversions to make FLOAT_EXTEND more expensive, so
	that LFD is used to load double constants instead of LFS.  Add
	defaults for all costs structures.  Add comments for missing
	initialization fields.
	(size32_cost): Likewise.
	(size64_cost): Likewise.
	(rs64a_cost): Likewise.
	(mpccore_cost): Likewise.
	(ppc403_cost): Likewise.
	(ppc405_cost): Likewise.
	(ppc440_cost): Likewise.
	(ppc476_cost): Likewise.
	(ppc601_cost): Likewise.
	(ppc603_cost): Likewise.
	(ppc604_cost): Likewise.
	(ppc604e_cost): Likewise.
	(ppc620_cost): Likewise.
	(ppc630_cost): Likewise.
	(ppccell_cost): Likewise.
	(ppc750_cost): Likewise.
	(ppc7450_cost): Likewise.
	(ppc8540_cost): Likewise.
	(ppce300c2c3_cost): Likewise.
	(ppce500mc_cost): Likewise.
	(ppce500mc64_cost): Likewise.
	(ppce5500_cost): Likewise.
	(ppce6500_cost): Likewise.
	(titan_cost): Likewise.
	(power4_cost): Likewise.
	(power6_cost): Likewise.
	(power7_cost): Likewise.
	(power8_cost): Likewise.
	(ppca2_cost): Likewise.
	(rs6000_rtx_costs): Make FLOAT_EXTEND use SFDF_convert field.

	* config/rs6000/rs6000.md (extendsfdf2_fpr): Generate XSCPSGNDP
	instead of XXLOR to copy SFmode to clear out dirty bits created
	when SFmode denormals are generated.
	(mov<mode>_hardfloat, FMOVE32 case): Likewise.
	(truncdfsf2_fpr): Add support for ISA 2.07 XSRSP instruction.

[gcc/testsuite]
2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/65614
	* gcc.target/powerpc/compress-float-ppc-pic.c: Run test on power5
	to get floating point compression.
	* gcc.target/powerpc/compress-foat-ppc.c: Likewise.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug target/65614] [5 Regression] PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers
  2015-04-06 17:10   ` [Bug target/65614] [5 Regression] PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers Michael Meissner
@ 2015-04-06 23:56     ` David Edelsohn
  2015-04-07  3:25       ` Michael Meissner
  0 siblings, 1 reply; 3+ messages in thread
From: David Edelsohn @ 2015-04-06 23:56 UTC (permalink / raw)
  To: Michael Meissner, GCC Patches

On Mon, Apr 6, 2015 at 1:10 PM, Michael Meissner
<meissner@linux.vnet.ibm.com> wrote:
> On Fri, Apr 03, 2015 at 07:19:24PM +0000, dje at gcc dot gnu.org wrote:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65614
>>
>> --- Comment #4 from David Edelsohn <dje at gcc dot gnu.org> ---
>> Comment on attachment 35227
>>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35227
>> Proposed patch to fix the problem
>>
>> The FLOAT_EXTEND cost should be based on the processor tuning, not the ISA.
>
> This patch moves the decision to the cost structure based on the processor
> tuning.  Is it ok to install?
>
> [gcc]
> 2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         PR target/65614
>         * config/rs6000/rs6000.c (struct processor_costs): Add cost field
>         for SF->DF conversions to make FLOAT_EXTEND more expensive, so
>         that LFD is used to load double constants instead of LFS.  Add
>         defaults for all costs structures.  Add comments for missing
>         initialization fields.
>         (size32_cost): Likewise.
>         (size64_cost): Likewise.
>         (rs64a_cost): Likewise.
>         (mpccore_cost): Likewise.
>         (ppc403_cost): Likewise.
>         (ppc405_cost): Likewise.
>         (ppc440_cost): Likewise.
>         (ppc476_cost): Likewise.
>         (ppc601_cost): Likewise.
>         (ppc603_cost): Likewise.
>         (ppc604_cost): Likewise.
>         (ppc604e_cost): Likewise.
>         (ppc620_cost): Likewise.
>         (ppc630_cost): Likewise.
>         (ppccell_cost): Likewise.
>         (ppc750_cost): Likewise.
>         (ppc7450_cost): Likewise.
>         (ppc8540_cost): Likewise.
>         (ppce300c2c3_cost): Likewise.
>         (ppce500mc_cost): Likewise.
>         (ppce500mc64_cost): Likewise.
>         (ppce5500_cost): Likewise.
>         (ppce6500_cost): Likewise.
>         (titan_cost): Likewise.
>         (power4_cost): Likewise.
>         (power6_cost): Likewise.
>         (power7_cost): Likewise.
>         (power8_cost): Likewise.
>         (ppca2_cost): Likewise.
>         (rs6000_rtx_costs): Make FLOAT_EXTEND use SFDF_convert field.
>
>         * config/rs6000/rs6000.md (extendsfdf2_fpr): Generate XSCPSGNDP
>         instead of XXLOR to copy SFmode to clear out dirty bits created
>         when SFmode denormals are generated.
>         (mov<mode>_hardfloat, FMOVE32 case): Likewise.
>         (truncdfsf2_fpr): Add support for ISA 2.07 XSRSP instruction.
>
> [gcc/testsuite]
> 2015-04-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
>
>         PR target/65614
>         * gcc.target/powerpc/compress-float-ppc-pic.c: Run test on power5
>         to get floating point compression.
>         * gcc.target/powerpc/compress-foat-ppc.c: Likewise.

Okay.

What's the source of COSTS_N_INSNS(3) value?

Thanks, David

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bug target/65614] [5 Regression] PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers
  2015-04-06 23:56     ` David Edelsohn
@ 2015-04-07  3:25       ` Michael Meissner
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Meissner @ 2015-04-07  3:25 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Michael Meissner, GCC Patches

On Mon, Apr 06, 2015 at 07:56:53PM -0400, David Edelsohn wrote:
> Okay.
> 
> What's the source of COSTS_N_INSNS(3) value?

It is the basic cost of a FP insn (i.e. it duplicates what rs6000_cost->fp
would be -- all of the simple FP ops are this value, XSADDDP, XSMULDP,
etc. including the two move insns XSCPSGNDP and FMR).  On the power7 and
power8, each basic FP op is 6 cycles, and all of the costs use the fact that
COSTS_N_INSNS multiplies by 2.

Obviously in the grand scheme of things, we need to rewrite the cost
infrastructure, and bring it up to date, but for now, I used the values for the
other insns.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.vnet.ibm.com, phone: +1 (978) 899-4797

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-07  3:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-65614-15150@http.gcc.gnu.org/bugzilla/>
     [not found] ` <bug-65614-15150-TdBMEeJ70A@http.gcc.gnu.org/bugzilla/>
2015-04-06 17:10   ` [Bug target/65614] [5 Regression] PowerPC VSX systems should use XSCPSGNDP to copy scalar fp data to/from Altivec registers Michael Meissner
2015-04-06 23:56     ` David Edelsohn
2015-04-07  3:25       ` Michael Meissner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).