From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 015F53858403; Fri, 9 Feb 2024 05:10:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 015F53858403 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707455416; bh=G1hjR9waV6HlvMlqI0jbiWo6gn0RkcTSTbtP74qjCe0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jmVEpVzzdrBCpnTA9Sf1pPHDJD9ByIJtpgQxqpl+dW+JcKmRB31D5Cz9LpOcNSAj4 cCbET313lYX21Fk8oIKCq7fVtGyIJ2U5DABPHchP78JMzvVYYwd4++VsnFI1FKfGgx nutj6pawUoVghlAz/YrCb8XjO2NQq6jYunS4XtmM= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/113827] MrBayes benchmark redundant load Date: Fri, 09 Feb 2024 05:10:15 +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: 14.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113827 --- Comment #3 from Andrew Pinski --- (In reply to Robin Dapp from comment #0) > A hot block in the MrBayes benchmark (as used in the Phoronix testsuite) = has > a redundant scalar load when vectorized. >=20 > Minimal example, compiled with -march=3Drv64gcv -O3 >=20 > int foo (float **a, float f, int n) > { > for (int i =3D 0; i < n; i++) > { > a[i][0] /=3D f; > a[i][1] /=3D f; > a[i][2] /=3D f; > a[i][3] /=3D f; > a[i] +=3D 4; > } > } LLVM for aarch64 with the above testcase: `` .L3: ldr x2, [x0] mov x1, x2 ldr q31, [x2] fdiv v31.4s, v31.4s, v0.4s str q31, [x1], 16 str x1, [x0], 8 ;;;; HERE cmp x3, x0 bne .L3 ``` There is a store of x1 there. I really think you messed up reducing the testcase.=