From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3348385841D; Thu, 28 Jul 2022 08:01:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3348385841D From: "yangyujie at loongson dot cn" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106462] LRA on mips64el: unable to reload (subreg:SI (reg:DI)) constrained by "f" Date: Thu, 28 Jul 2022 08:01:31 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: yangyujie at loongson dot cn X-Bugzilla-Status: UNCONFIRMED 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: Thu, 28 Jul 2022 08:01:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106462 --- Comment #1 from Yang Yujie --- The relevant insn template is: (define_insn "floatsisf2" [(set (match_operand:SF 0 "register_operand" "=3Df") (float:SF (match_operand:SI 1 "register_operand" "f")))] "TARGET_HARD_FLOAT" "cvt.s.w\t%0,%1" [(set_attr "type" "fcvt") (set_attr "mode" "SF") (set_attr "cnv_mode" "I2S")]) It seems that (match_operand:SI 1 "register_operand "f") actually matched (during pass_expand): (subreg/s/u:SI (reg/v:DI 209 [orig:197 c ] [197])) and curr_insn_transform decided to spill the (reg/v:DI 209) pseudo-register into FP_REGS, which fails because FP registers are only 32-bit-wide. My question is: should the reload pass handle this by first assigning (reg:= DI) into a (64-bit) general-purpose hard register, and then emit a move instruc= tion to fill the floating-point-register operand?=