public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/109566] [13/14 Regression] powerpc: unrecognizable insn for -mcpu=e6500, -mcpu=power3, ..., -mcpu=power10
Date: Mon, 24 Apr 2023 10:37:41 +0000	[thread overview]
Message-ID: <bug-109566-4-hbeFrEeryk@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109566-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109566

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/config/rs6000/rs6000.cc.jj      2023-04-04 10:33:47.433201866 +0200
+++ gcc/config/rs6000/rs6000.cc 2023-04-24 12:31:07.237031550 +0200
@@ -11409,7 +11409,16 @@ bool
 rs6000_is_valid_rotate_dot_mask (rtx mask, machine_mode mode)
 {
   int nb, ne;
-  return rs6000_is_valid_mask (mask, &nb, &ne, mode) && nb >= ne && ne > 0;
+  if (rs6000_is_valid_mask (mask, &nb, &ne, mode) && nb >= ne && ne > 0)
+    {
+      if (TARGET_64BIT)
+       return true;
+      /* *rotldi3_mask_dot requires for -m32 -mpowerpc64 that the mask is
+        <= 0x7ffffff.  */
+      return (UINTVAL (mask) << (63 - nb)) <= 0x7fffffff;
+    }
+  else
+    return false;
 }

 /* Return whether MASK (a CONST_INT) is a valid mask for any rlwinm, rldicl,
seems to fix this.

  parent reply	other threads:[~2023-04-24 10:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20  8:34 [Bug target/109566] New: powerpc: unrecognizable insn for -mcpu=e6500 sebastian.huber@embedded-brains.de
2023-04-21  8:34 ` [Bug target/109566] " sebastian.huber@embedded-brains.de
2023-04-21  8:54 ` sebastian.huber@embedded-brains.de
2023-04-24  6:31 ` [Bug target/109566] powerpc: unrecognizable insn for -mcpu=e6500, -mcpu=power3, ..., -mcpu=power10 sebastian.huber@embedded-brains.de
2023-04-24  6:33 ` sebastian.huber@embedded-brains.de
2023-04-24  8:27 ` [Bug target/109566] [13/14 Regression] " rguenth at gcc dot gnu.org
2023-04-24  8:51 ` jakub at gcc dot gnu.org
2023-04-24  9:09 ` sebastian.huber@embedded-brains.de
2023-04-24  9:32 ` jakub at gcc dot gnu.org
2023-04-24  9:50 ` jakub at gcc dot gnu.org
2023-04-24 10:09 ` jakub at gcc dot gnu.org
2023-04-24 10:33 ` jakub at gcc dot gnu.org
2023-04-24 10:37 ` jakub at gcc dot gnu.org [this message]
2023-04-24 10:54 ` [Bug target/109566] [12/13/14 " jakub at gcc dot gnu.org
2023-04-24 10:57 ` jakub at gcc dot gnu.org
2023-04-24 11:03 ` sebastian.huber@embedded-brains.de
2023-04-25 12:21 ` cvs-commit at gcc dot gnu.org
2023-04-25 12:24 ` segher at gcc dot gnu.org
2023-04-25 12:37 ` cvs-commit at gcc dot gnu.org
2023-04-25 14:12 ` [Bug target/109566] [12 " jakub at gcc dot gnu.org
2023-04-25 14:12 ` jakub at gcc dot gnu.org
2023-04-26 10:59 ` cvs-commit at gcc dot gnu.org
2023-04-26 11:00 ` jakub at gcc dot gnu.org

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=bug-109566-4-hbeFrEeryk@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).