public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-9451] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
@ 2024-03-13 10:07 Stefan Schulze Frielinghaus
  0 siblings, 0 replies; only message in thread
From: Stefan Schulze Frielinghaus @ 2024-03-13 10:07 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4d049fadc25585e336c06e6b60b592f40ddbcc12

commit r14-9451-g4d049fadc25585e336c06e6b60b592f40ddbcc12
Author: Stefan Schulze Frielinghaus <stefansf@linux.ibm.com>
Date:   Wed Mar 13 11:07:03 2024 +0100

    s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs
    
    RTX X need 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.

Diff:
---
 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 c857b2028f2..e63965578f1 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -4779,7 +4779,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] only message in thread

only message in thread, other threads:[~2024-03-13 10:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-13 10:07 [gcc r14-9451] s390: Fix TARGET_SECONDARY_RELOAD for non-SYMBOL_REFs Stefan Schulze Frielinghaus

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