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/105325] power10: Error: operand out of range
Date: Thu, 21 Apr 2022 11:42:56 +0000	[thread overview]
Message-ID: <bug-105325-4-CQ5tl4yuS8@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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'd say the bug is that the various instructions that use ds_form_mem_operand
predicate don't use a corresponding constraint.
So, during combine:
(insn 8 7 9 2 (parallel [
            (set (reg:CC 120)
                (compare:CC (mem/c:SI (plus:DI (reg/f:DI 110 sfp)
                            (const_int -12 [0xfffffffffffffff4])) [1
MEM[(struct Ath__array1D *)&m + 40000B]._current+0 S4 A32])
                    (const_int 0 [0])))
            (clobber (scratch:SI))
        ]) "pr105325.C":11:30 2295 {*lwa_cmpdi_cr0_SI_clobber_CC_none}
     (nil))
is matched, as the offset is signed 16-bit that is a multiple of 4.
But as it uses "m" constraint and LRA only cares about constraints, not
predicates, it is reloaded as
(insn 8 7 9 2 (parallel [
            (set (reg:CC 100 0 [120])
                (compare:CC (mem/c:SI (plus:DI (reg/f:DI 1 1)
                            (const_int 40036 [0x9c64])) [1 MEM[(struct
Ath__array1D *)&m + 40000B]._current+0 S4 A32])
                    (const_int 0 [0])))
            (clobber (reg:SI 9 9 [125]))
        ]) "pr105325.C":11:30 2295 {*lwa_cmpdi_cr0_SI_clobber_CC_none}
     (nil))
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.

  parent reply	other threads:[~2022-04-21 11:42 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 [this message]
2022-04-22  8:17 ` linkw at gcc dot gnu.org
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-CQ5tl4yuS8@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).