From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8EA6B386102F; Tue, 2 Apr 2024 20:22:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8EA6B386102F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712089375; bh=WA0LnpoAcVkv6qxh93vWWPZUZO8lLds2kD/BJo/TRAs=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ESwgPio6yQhKiQoHsHUEq1q3Qo9b+zKTmREzbEBgrCJWvOFnZeXyaHrbVlPq1gEJG 0z3NoSemAPL7l0QdQr6PIJIBciXkKJLSWIDVgzIQp+N7PXm4Lk4dd7PxtqMTgOnU0d Chly+OKvbUfoDSSHohh6e9eL/8trsg8EaVuYgxaw= From: "yshuiv7 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114566] Misaligned vmovaps when compiling libvorbis for znver4 Date: Tue, 02 Apr 2024 20:22:54 +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: 13.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: yshuiv7 at gmail dot com 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=3D114566 --- Comment #4 from Yuxuan Shui --- Reduced a bit further: void setup_tone_curves(float binHz, float center_decay_rate) { float workc[8][56]; memset(workc, 0, sizeof(workc)); for (int j =3D 0; j < 8; j++) { for (int k =3D 0; k < 56; k++) { float adj =3D k * center_decay_rate; if (adj < 0.) adj =3D 0.; if (adj > 0.) adj =3D 0.; workc[j][k] +=3D adj; } } int lo_curve =3D log(binHz); } Some observations: 1. lo_curve, although dead code, triggers the bug. 2. the 2 if's in the loop are also required for this bug. 3. workc has to be initialized with memset, aggregate initializer doesn't trigger the bug.=