From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 25E0F3838022; Thu, 21 Apr 2022 11:42:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25E0F3838022 From: "jakub at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: assemble-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Apr 2022 11:42:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105325 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |segher at gcc dot gnu.org --- Comment #9 from Jakub Jelinek --- I'd say the bug is that the various instructions that use ds_form_mem_opera= nd 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.=