public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "luoxhu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/99718] [11 regression] ICE in new test case gcc.target/powerpc/pr98914.c  for 32 bits
Date: Wed, 24 Mar 2021 01:57:18 +0000	[thread overview]
Message-ID: <bug-99718-4-QxOgGQyVAZ@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99718-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from luoxhu at gcc dot gnu.org ---
Thanks, Jakub. It tested pass on both m32/m64, is this a reasonable fix?
@segher, will make it a patch if so.


git diff
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index 859af75..0a5cae2 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -1920,6 +1920,12 @@
   return address_is_prefixed (XEXP (op, 0), mode, NON_PREFIXED_DEFAULT);
 })

+;; Return true if m64 on p8v and above for vec_set with variable index.
+(define_predicate "vec_set_index_operand"
+ (if_then_else (match_test "TARGET_P8_VECTOR && TARGET_DIRECT_MOVE_64BIT")
+  (match_operand 0 "reg_or_cint_operand")
+  (match_operand 0 "const_int_operand")))
+
 ;; Return true if the operand is a valid memory operand with a D-form
 ;; address that could be merged with the load of a PC-relative external
address
 ;; with the PCREL_OPT optimization.  We don't check here whether or not the
diff --git a/gcc/config/rs6000/vector.md b/gcc/config/rs6000/vector.md
index e5191bd..3446b03 100644
--- a/gcc/config/rs6000/vector.md
+++ b/gcc/config/rs6000/vector.md
@@ -1227,7 +1227,7 @@
 (define_expand "vec_set<mode>"
   [(match_operand:VEC_E 0 "vlogical_operand")
    (match_operand:<VEC_base> 1 "register_operand")
-   (match_operand 2 "reg_or_cint_operand")]
+   (match_operand 2 "vec_set_index_operand")]
   "VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)"
 {
   rs6000_expand_vector_set (operands[0], operands[1], operands[2]);

  parent reply	other threads:[~2021-03-24  1:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 16:32 [Bug target/99718] New: " seurer at gcc dot gnu.org
2021-03-23  2:00 ` [Bug target/99718] " luoxhu at gcc dot gnu.org
2021-03-23  7:26 ` rguenth at gcc dot gnu.org
2021-03-23  7:26 ` rguenth at gcc dot gnu.org
2021-03-23 12:44 ` jakub at gcc dot gnu.org
2021-03-24  1:57 ` luoxhu at gcc dot gnu.org [this message]
2021-03-24 20:02 ` segher at gcc dot gnu.org
2021-03-25 15:58 ` jakub at gcc dot gnu.org
2021-03-25 16:31 ` segher at gcc dot gnu.org
2021-03-25 16:37 ` dje at gcc dot gnu.org
2021-03-25 16:38 ` dje at gcc dot gnu.org
2021-03-25 16:55 ` jakub at gcc dot gnu.org
2021-03-26  5:37 ` luoxhu at gcc dot gnu.org
2021-03-26  5:38 ` luoxhu at gcc dot gnu.org
2021-03-26  6:14 ` luoxhu at gcc dot gnu.org
2021-03-26  8:22 ` jakub at gcc dot gnu.org
2021-03-26 12:27 ` luoxhu at gcc dot gnu.org
2021-03-26 13:26 ` jakub at gcc dot gnu.org
2021-03-26 22:39 ` segher at gcc dot gnu.org
2021-03-26 22:51 ` segher at gcc dot gnu.org
2021-03-27  3:42 ` luoxhu at gcc dot gnu.org
2021-03-30 13:57 ` cvs-commit at gcc dot gnu.org
2021-03-31  0:55 ` luoxhu 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-99718-4-QxOgGQyVAZ@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).