From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 447873858406; Wed, 2 Mar 2022 08:11:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 447873858406 From: "lili.cui at intel dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104723] [12 regression] Redundant usage of stack Date: Wed, 02 Mar 2022 08:11:56 +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: 12.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: lili.cui at intel dot com 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: 12.0 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: Wed, 02 Mar 2022 08:11:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104723 --- Comment #9 from cuilili --- (In reply to cuilili from comment #3) > (In reply to Hongtao.liu from comment #1) > > STF issue here? >=20 correct comment #3 I used perf to collect the "ld_blocks.store_forward" event for those two te= st cases, stlf_64_55_64.S has STLF issue due to the two stores overlapping, not related to crossing cache line. In this case it has STLF issue. ---------------------------------------------------------------- $cat stlf_64_55_64.S ... .LFB0: .cfi_startproc vmovdqu %ymm0, -64(%rsp) vmovdqu %ymm1, -55(%rsp) vmovdqu -64(%rsp), %ymm0 ret .cfi_endproc ... $ perf stat -e ld_blocks.store_forward ./stlf_64_55_64.out runtime=3D : 128883744 Performance counter stats for './stlf_64_55_64.out': 10,000,507 ld_blocks.store_forward:u ---------------------------------------------------------------- In this case it can do STLF. ---------------------------------------------------------------- $ cat stlf_64_128_64.S ... .LFB0: .cfi_startproc vmovdqu %ymm0, -64(%rsp) vmovdqu %ymm1, -128(%rsp) vmovdqu -64(%rsp), %ymm0 ret .cfi_endproc ... $ perf stat -e ld_blocks.store_forward ./stlf_64_128_64.out runtime=3D : 56477424 Performance counter stats for './stlf_64_128_64.out': 2 ld_blocks.store_forward:u 0.022103902 seconds time elapsed -------------------------------------------------------------=