public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
@ 2024-02-29 12:13 Stefan Schulze Frielinghaus
  2024-02-29 12:26 ` Andreas Schwab
  2024-03-11  9:44 ` Andreas Krebbel
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Schulze Frielinghaus @ 2024-02-29 12:13 UTC (permalink / raw)
  To: krebbel, gcc-patches; +Cc: Stefan Schulze Frielinghaus

RTX X must not necessarily be a SYMBOL_REF and may e.g. be an
UNSPEC_GOTENT for which SYMBOL_FLAG_NOTALIGN2_P fails.

gcc/ChangeLog:

	* config/s390/s390.cc (s390_secondary_reload): Guard
	SYMBOL_FLAG_NOTALIGN2_P.
---
 gcc/config/s390/s390.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 943fc9bfd72..12430d77786 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -4778,7 +4778,7 @@ s390_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
       if (in_p
 	  && s390_loadrelative_operand_p (x, &symref, &offset)
 	  && mode == Pmode
-	  && !SYMBOL_FLAG_NOTALIGN2_P (symref)
+	  && (!SYMBOL_REF_P (symref) || !SYMBOL_FLAG_NOTALIGN2_P (symref))
 	  && (offset & 1) == 1)
 	sri->icode = ((mode == DImode) ? CODE_FOR_reloaddi_larl_odd_addend_z10
 		      : CODE_FOR_reloadsi_larl_odd_addend_z10);
-- 
2.43.0


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

* Re: [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
  2024-02-29 12:13 [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs Stefan Schulze Frielinghaus
@ 2024-02-29 12:26 ` Andreas Schwab
  2024-02-29 12:46   ` Stefan Schulze Frielinghaus
  2024-03-11  9:44 ` Andreas Krebbel
  1 sibling, 1 reply; 4+ messages in thread
From: Andreas Schwab @ 2024-02-29 12:26 UTC (permalink / raw)
  To: Stefan Schulze Frielinghaus; +Cc: krebbel, gcc-patches

On Feb 29 2024, Stefan Schulze Frielinghaus wrote:

> RTX X must not necessarily be a SYMBOL_REF and may e.g. be an

False friend: s/must not/need not/

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
  2024-02-29 12:26 ` Andreas Schwab
@ 2024-02-29 12:46   ` Stefan Schulze Frielinghaus
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Schulze Frielinghaus @ 2024-02-29 12:46 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: krebbel, gcc-patches

On Thu, Feb 29, 2024 at 01:26:54PM +0100, Andreas Schwab wrote:
> On Feb 29 2024, Stefan Schulze Frielinghaus wrote:
> 
> > RTX X must not necessarily be a SYMBOL_REF and may e.g. be an
> 
> False friend: s/must not/need not/

Argh I always fall for this ;-) Thanks for pointing this out.  Changed
for the final commit.

Cheers,
Stefan

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

* Re: [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
  2024-02-29 12:13 [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs Stefan Schulze Frielinghaus
  2024-02-29 12:26 ` Andreas Schwab
@ 2024-03-11  9:44 ` Andreas Krebbel
  1 sibling, 0 replies; 4+ messages in thread
From: Andreas Krebbel @ 2024-03-11  9:44 UTC (permalink / raw)
  To: Stefan Schulze Frielinghaus, gcc-patches

On 2/29/24 13:13, Stefan Schulze Frielinghaus wrote:
> RTX X must not necessarily be a SYMBOL_REF and may e.g. be an
> UNSPEC_GOTENT for which SYMBOL_FLAG_NOTALIGN2_P fails.
> 
> gcc/ChangeLog:
> 
> 	* config/s390/s390.cc (s390_secondary_reload): Guard
> 	SYMBOL_FLAG_NOTALIGN2_P.
Ok. Thanks!

Andreas

> ---
>  gcc/config/s390/s390.cc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
> index 943fc9bfd72..12430d77786 100644
> --- a/gcc/config/s390/s390.cc
> +++ b/gcc/config/s390/s390.cc
> @@ -4778,7 +4778,7 @@ s390_secondary_reload (bool in_p, rtx x, reg_class_t rclass_i,
>        if (in_p
>  	  && s390_loadrelative_operand_p (x, &symref, &offset)
>  	  && mode == Pmode
> -	  && !SYMBOL_FLAG_NOTALIGN2_P (symref)
> +	  && (!SYMBOL_REF_P (symref) || !SYMBOL_FLAG_NOTALIGN2_P (symref))
>  	  && (offset & 1) == 1)
>  	sri->icode = ((mode == DImode) ? CODE_FOR_reloaddi_larl_odd_addend_z10
>  		      : CODE_FOR_reloadsi_larl_odd_addend_z10);


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

end of thread, other threads:[~2024-03-11  9:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 12:13 [PATCH] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs Stefan Schulze Frielinghaus
2024-02-29 12:26 ` Andreas Schwab
2024-02-29 12:46   ` Stefan Schulze Frielinghaus
2024-03-11  9:44 ` Andreas Krebbel

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