From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A02F3858C2C; Fri, 22 Apr 2022 08:17:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A02F3858C2C From: "linkw at gcc dot 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 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: linkw 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: 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: Fri, 22 Apr 2022 08:17:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105325 --- Comment #10 from Kewen Lin --- (In reply to Jakub Jelinek from comment #9) > where it no longer satisfies the predicate but does satisfy the constrain= t. > 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), SIm= ode, NON_PREFIXED_DS)).=20 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 w= ill only return INSN_FORM_DS as predicate guards. The below snippet makes the split work and the failure gone. =3D=3D=3D=3D 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 =3D XEXP (op, 0); - return address_to_insn_form (addr, mode, NON_PREFIXED_DS) =3D=3D INSN_FO= RM_DS; + enum insn_form form =3D address_to_insn_form (addr, mode, NON_PREFIXED_D= S); + + return form =3D=3D INSN_FORM_DS + || (reload_completed && form =3D=3D INSN_FORM_PREFIXED_NUMERIC); + }) ;; Return 1 if the operand, used inside a MEM, is a SYMBOL_REF. =3D=3D=3D=3D But as Jakub noted, I'm not sure reload can ensure to make the address sati= sfy this updated predicate under the unmatched constraint "m".=