From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 732AC3858C66; Tue, 7 Mar 2023 05:40:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 732AC3858C66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678167611; bh=0rpRPKFzXlbIejDUKbfZcRHQFrCgmQzM0QvZcuXZS/w=; h=From:To:Subject:Date:From; b=UhHKhuxWbpNuNVkOWOfmDfASp45qb5FMw6pqVRRPaPgc0QpymddYKa0tDKB26ILNp if1Cu2S6otb2BSY+asu9P79yCzOf34EFTQfsBWtcwe47nRrKTcx3J2l4VrgIr6jW4q MYwAbaDU7YYV83IYN7pZAMVPTAKTrfROqk6+2YtY= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109046] New: 13 regresion caused by complex lower. Date: Tue, 07 Mar 2023 05:40:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109046 Bug ID: 109046 Summary: 13 regresion caused by complex lower. Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: crazylht at gmail dot com Target Milestone: --- commit f9d4c3b45c5ed5f45c8089c990dbd4e181929c3d Author: liuhongt Date: Tue Jul 19 17:24:52 2022 +0800 Lower complex type move to enable vectorization for complex type load&store. 2022-07-20 Richard Biener Hongtao Liu gcc/ChangeLog: PR tree-optimization/106010 * tree-complex.cc (init_dont_simulate_again): Lower complex type move. (expand_complex_move): Also expand COMPLEX_CST for rhs. My r13-1762-gf9d4c3b45c5ed5 lower complex type for load&store but somehow caused a regression in phoronix benchmark #include extern void push1(void *p, float _Complex x); void foo(void * _q, float _Complex * _x) { push1(_q, *_x); } foo(void*, float _Complex*): vmovss 4(%rsi), %xmm0 vmovss (%rsi), %xmm1 vmovss %xmm0, -12(%rsp) vmovss %xmm1, -16(%rsp) vmovq -16(%rsp), %xmm0 jmp push1(void*, float _Complex) gcc12 generates foo(void*, float _Complex*): vmovq (%rsi), %xmm0 jmp push1(void*, float _Complex) Since complex lower is only for vectorization, maybe it should be gimplified back to a complex load after vectorization if there're things like _6 =3D REALPART_EXPR <*_x_3(D)>; _7 =3D IMAGPART_EXPR <*_x_3(D)>; _1 =3D COMPLEX_EXPR <_6, _7>;=