public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Jeff Law <jeffreyalaw@gmail.com>,
	Andreas Schwab <schwab@linux-m68k.org>,
	Max Filippov <jcmvbkbc@gmail.com>
Subject: [PATCH] gcc: m68k: fix PR target/107645
Date: Fri, 11 Nov 2022 11:43:56 -0800	[thread overview]
Message-ID: <20221111194356.3922768-1-jcmvbkbc@gmail.com> (raw)

gcc/
	PR target/107645
	* config/m68k/predicates.md (symbolic_operand): Return false
	when UNSPEC is under the CONST node.
---
Regtested with --enable-checking=all for target=m68k-linux-uclibc, no
new regressions compared to the compiler built without checking.
Ok for master?

 gcc/config/m68k/predicates.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/m68k/predicates.md b/gcc/config/m68k/predicates.md
index f8dedd9f8375..094a18955534 100644
--- a/gcc/config/m68k/predicates.md
+++ b/gcc/config/m68k/predicates.md
@@ -141,6 +141,8 @@
 
     case CONST:
       op = XEXP (op, 0);
+      if (GET_CODE (op) == UNSPEC)
+        return false;
       return ((GET_CODE (XEXP (op, 0)) == SYMBOL_REF
 	       || GET_CODE (XEXP (op, 0)) == LABEL_REF)
 	      && GET_CODE (XEXP (op, 1)) == CONST_INT);
-- 
2.30.2


             reply	other threads:[~2022-11-11 19:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 19:43 Max Filippov [this message]
2022-11-12 19:42 ` Jeff Law
2022-11-13  3:47   ` Max Filippov
2022-11-16  3:33     ` Jeff Law
2022-11-16 12:37       ` Max Filippov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111194356.3922768-1-jcmvbkbc@gmail.com \
    --to=jcmvbkbc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).