From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1E5B7389850D; Tue, 23 Jun 2020 01:29:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1E5B7389850D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592875754; bh=MgGDp0kpDyEqDZuRHZxUOU5CaX2nos3HRzkqjMThGtY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=atoHr3eXGMspNc3YYyZkbsCYa0cyMDOr9EQfSYFLflJk11efdD2lAVhf+pL/suBj1 3WaUV78Zmpp60ztSPbtcTsAtmrRq2PBdf4nmRDKty9texoDF7Vn+4E1AvAtYdclirZ Owb0BanFghDK5tPSJCGXh/XdeluAJMbZz36pOUR0= From: "luoxhu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/89310] Poor code generation returning float field from a struct Date: Tue, 23 Jun 2020 01:29:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: luoxhu at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: Tue, 23 Jun 2020 01:29:14 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D89310 luoxhu at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |luoxhu at gcc dot gnu.org --- Comment #3 from luoxhu at gcc dot gnu.org --- rs6000.md: (define_insn_and_split "movsf_from_si" ... "&& reload_completed && vsx_reg_sfsubreg_ok (operands[0], SFmode) && int_reg_operand_not_pseudo (operands[1], SImode)" [(const_int 0) ... /* Move SF value to upper 32-bits for xscvspdpn. */ emit_insn (gen_ashldi3 (op2, op1_di, GEN_INT (32))); emit_insn (gen_p8_mtvsrd_sf (op0, op2)); emit_insn (gen_vsx_xscvspdpn_directmove (op0, op0)); DONE The split seems inevitable as reload_completed is true here, can this lshrdi3+ashldi3 be optimized by peephole?=20 r9 is DImode, is there any benefit of using mtvsrw[az] instead of mtvsrd? Or could we replace the 3 instructions with better sequence? Thanks.=