public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, rs6000] PR71800, use correct constraint for stxsiwx
@ 2016-07-07 20:43 Pat Haugen
  2016-07-08  5:43 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Pat Haugen @ 2016-07-07 20:43 UTC (permalink / raw)
  To: GCC Patches, Segher Boessenkool, David Edelsohn

The following patch corrects the constraint so that we only generate 'stxsiwx' on Power8 or later hardware. Ok for trunk after successful bootstrap/regtest?

-Pat


2016-07-07  Pat Haugen  <pthaugen@us.ibm.com>

	PR target/71800
	* config/rs6000/rs6000.md (stfiwx): Change constraint to 'wu' to 
	prevent generation of 'stxsiwx' on pre Power8 hardware.


Index: config/rs6000/rs6000.md
===================================================================
--- config/rs6000/rs6000.md     (revision 238117)
+++ config/rs6000/rs6000.md     (working copy)
@@ -5748,7 +5748,7 @@ (define_expand "lround<mode>di2"
 ; An UNSPEC is used so we don't have to support SImode in FP registers.
 (define_insn "stfiwx"
   [(set (match_operand:SI 0 "memory_operand" "=Z,Z")
-	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wv")]
+	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wu")]
		   UNSPEC_STFIWX))]
   "TARGET_PPC_GFXOPT"
   "@

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

* Re: [PATCH, rs6000] PR71800, use correct constraint for stxsiwx
  2016-07-07 20:43 [PATCH, rs6000] PR71800, use correct constraint for stxsiwx Pat Haugen
@ 2016-07-08  5:43 ` Segher Boessenkool
  2016-07-08 14:53   ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2016-07-08  5:43 UTC (permalink / raw)
  To: Pat Haugen; +Cc: GCC Patches, David Edelsohn

Hi Pat,

On Thu, Jul 07, 2016 at 03:42:55PM -0500, Pat Haugen wrote:
> The following patch corrects the constraint so that we only generate 'stxsiwx' on Power8 or later hardware. Ok for trunk after successful bootstrap/regtest?

I don't really understand this.  Before, it required UPPER_REGS_DF (which
seems correct), and now it requires UPPER_REGS_SF, which seems wrong.

Could you explain a bit more please?


Segher


> 2016-07-07  Pat Haugen  <pthaugen@us.ibm.com>
> 
> 	PR target/71800
> 	* config/rs6000/rs6000.md (stfiwx): Change constraint to 'wu' to 
> 	prevent generation of 'stxsiwx' on pre Power8 hardware.
> 
> 
> Index: config/rs6000/rs6000.md
> ===================================================================
> --- config/rs6000/rs6000.md     (revision 238117)
> +++ config/rs6000/rs6000.md     (working copy)
> @@ -5748,7 +5748,7 @@ (define_expand "lround<mode>di2"
>  ; An UNSPEC is used so we don't have to support SImode in FP registers.
>  (define_insn "stfiwx"
>    [(set (match_operand:SI 0 "memory_operand" "=Z,Z")
> -	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wv")]
> +	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wu")]
> 		   UNSPEC_STFIWX))]
>    "TARGET_PPC_GFXOPT"
>    "@

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

* Re: [PATCH, rs6000] PR71800, use correct constraint for stxsiwx
  2016-07-08  5:43 ` Segher Boessenkool
@ 2016-07-08 14:53   ` Segher Boessenkool
  0 siblings, 0 replies; 3+ messages in thread
From: Segher Boessenkool @ 2016-07-08 14:53 UTC (permalink / raw)
  To: Pat Haugen; +Cc: GCC Patches, David Edelsohn

On Fri, Jul 08, 2016 at 12:43:35AM -0500, Segher Boessenkool wrote:
> On Thu, Jul 07, 2016 at 03:42:55PM -0500, Pat Haugen wrote:
> > The following patch corrects the constraint so that we only generate 'stxsiwx' on Power8 or later hardware. Ok for trunk after successful bootstrap/regtest?
> 
> I don't really understand this.  Before, it required UPPER_REGS_DF (which
> seems correct), and now it requires UPPER_REGS_SF, which seems wrong.

After some discussion...  Okay, so it is a bit sub-optimal, but it does
work.  Okay for trunk, with a comment on why it is "wu" ("because "wu"
requires power8").

Thanks,


Segher


> > --- config/rs6000/rs6000.md     (revision 238117)
> > +++ config/rs6000/rs6000.md     (working copy)
> > @@ -5748,7 +5748,7 @@ (define_expand "lround<mode>di2"
> >  ; An UNSPEC is used so we don't have to support SImode in FP registers.
> >  (define_insn "stfiwx"
> >    [(set (match_operand:SI 0 "memory_operand" "=Z,Z")
> > -	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wv")]
> > +	(unspec:SI [(match_operand:DI 1 "gpc_reg_operand" "d,wu")]
> > 		   UNSPEC_STFIWX))]
> >    "TARGET_PPC_GFXOPT"
> >    "@

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

end of thread, other threads:[~2016-07-08 14:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-07 20:43 [PATCH, rs6000] PR71800, use correct constraint for stxsiwx Pat Haugen
2016-07-08  5:43 ` Segher Boessenkool
2016-07-08 14:53   ` Segher Boessenkool

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).