public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105325] power10: Error: operand out of range
Date: Fri, 22 Apr 2022 08:17:33 +0000	[thread overview]
Message-ID: <bug-105325-4-aJtrZlJcDA@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105325-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #10 from Kewen Lin <linkw at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> where it no longer satisfies the predicate but does satisfy the constraint.
> It is unclear if there is any matching constraint for ds_form_mem_operand,
> maybe wY?  But not really sure about it.

As the comments above wY, it's mainly for those VSX instructions and also
checks no update, seems not perfect to be used here?

The current ds_form_mem_operand predicate looks also contradicted with the
below split condition address_is_non_pfx_d_or_x (XEXP (operands[1], 0), SImode,
NON_PREFIXED_DS)). 

ds_form_mem_operand requires address_to_insn_form should always return
INSN_FORM_DS, while address_is_non_pfx_d_or_x calls address_to_insn_form, it
will never have the chance to return false since the address_to_insn_form will
only return INSN_FORM_DS as predicate guards.

The below snippet makes the split work and the failure gone.

====
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index b1fcc69bb60..a1b58dfa0c9 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -1099,7 +1099,11 @@ (define_predicate "ds_form_mem_operand"

   rtx addr = XEXP (op, 0);

-  return address_to_insn_form (addr, mode, NON_PREFIXED_DS) == INSN_FORM_DS;
+  enum insn_form form = address_to_insn_form (addr, mode, NON_PREFIXED_DS);
+
+  return form == INSN_FORM_DS
+         || (reload_completed && form == INSN_FORM_PREFIXED_NUMERIC);
+
 })

 ;; Return 1 if the operand, used inside a MEM, is a SYMBOL_REF.

====

But as Jakub noted, I'm not sure reload can ensure to make the address satisfy
this updated predicate under the unmatched constraint "m".

  parent reply	other threads:[~2022-04-22  8:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21  5:14 [Bug c++/105325] New: " joel at jms dot id.au
2022-04-21  5:15 ` [Bug c++/105325] " joel at jms dot id.au
2022-04-21  9:21 ` [Bug target/105325] " marxin at gcc dot gnu.org
2022-04-21  9:38 ` joel at jms dot id.au
2022-04-21  9:48 ` marxin at gcc dot gnu.org
2022-04-21 10:08 ` linkw at gcc dot gnu.org
2022-04-21 10:26 ` marxin at gcc dot gnu.org
2022-04-21 10:53 ` marxin at gcc dot gnu.org
2022-04-21 11:03 ` marxin at gcc dot gnu.org
2022-04-21 11:42 ` jakub at gcc dot gnu.org
2022-04-22  8:17 ` linkw at gcc dot gnu.org [this message]
2022-04-26 13:40 ` segher at gcc dot gnu.org
2022-04-28 23:05 ` segher at gcc dot gnu.org
2023-01-26 22:54 ` acsawdey at gcc dot gnu.org
2023-03-21  4:01 ` meissner at gcc dot gnu.org
2023-04-18 13:47 ` bergner at gcc dot gnu.org
2023-04-26  6:55 ` rguenth at gcc dot gnu.org
2023-04-27 16:00 ` bergner at gcc dot gnu.org
2023-04-27 16:05 ` bergner at gcc dot gnu.org
2023-06-23 15:37 ` cvs-commit at gcc dot gnu.org
2023-07-05 16:46 ` cvs-commit at gcc dot gnu.org
2023-07-05 18:09 ` cvs-commit at gcc dot gnu.org
2023-07-05 19:50 ` cvs-commit at gcc dot gnu.org
2023-07-05 19:53 ` meissner 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-105325-4-aJtrZlJcDA@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).