From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 90101386103B; Thu, 15 Apr 2021 06:59:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 90101386103B From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/100085] Bad code for union transfer from __float128 to vector types Date: Thu, 15 Apr 2021 06:59:11 +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: 10.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: cf_gcctarget cf_reconfirmed_on everconfirmed keywords component bug_status 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, 15 Apr 2021 06:59:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100085 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |powerpc Last reconfirmed| |2021-04-15 Ever confirmed|0 |1 Keywords| |missed-optimization Component|rtl-optimization |target Status|UNCONFIRMED |NEW --- Comment #2 from Richard Biener --- RTL expansion for vui128_t test_xfer_bin128_2_vui128t (__binary128 f128) { vector(1) __int128 unsigned _3; ;; basic block 2, loop depth 0 ;; pred: ENTRY _3 =3D VIEW_CONVERT_EXPR(f128_2(D)); return _3; power9 (-) vs power8 (+) is (note 3 2 6 2 NOTE_INSN_FUNCTION_BEG) -(insn 6 3 7 2 (set (mem/c:KF (reg/f:DI 112 virtual-stack-vars) [1 S16 A12= 8]) - (reg/v:KF 118 [ f128 ])) "vec_f128_ppc.h":143:19 -1 - (nil)) -(insn 7 6 8 2 (set (reg:V1TI 120) - (mem/c:V1TI (reg/f:DI 112 virtual-stack-vars) [1 S16 A128])) "t.c":13:10 -1 +(insn 6 3 7 2 (set (subreg:V1TI (reg:KF 120 [ f128 ]) 0) + (rotate:V1TI (subreg:V1TI (reg/v:KF 118 [ f128 ]) 0) + (const_int 64 [0x40]))) "vec_f128_ppc.h":143:19 -1 + (nil)) +(insn 7 6 8 2 (set (mem/c:V1TI (reg/f:DI 112 virtual-stack-vars) [1 S16 A128]) + (rotate:V1TI (subreg:V1TI (reg:KF 120 [ f128 ]) 0) + (const_int 64 [0x40]))) "vec_f128_ppc.h":143:19 -1 + (nil)) +(insn 8 7 9 2 (set (reg:V2DI 122) + (vec_select:V2DI (mem/c:V2DI (reg/f:DI 112 virtual-stack-vars) [1 = S16 A128]) + (parallel [ + (const_int 1 [0x1]) + (const_int 0 [0]) + ]))) "t.c":13:10 -1 + (nil)) +(insn 9 8 10 2 (set (subreg:V2DI (reg:V1TI 121) 0) + (vec_select:V2DI (reg:V2DI 122) + (parallel [ + (const_int 1 [0x1]) + (const_int 0 [0]) + ]))) "t.c":13:10 -1 (nil)) so power8 avoids the stack but in turn ends up with sth that's not optimized down the road.=