From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A5E30385E836; Thu, 9 May 2024 21:05:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5E30385E836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1715288749; bh=ZK/kqnag6C6r6Ciuzk9miuYOklX02ATezS/UwpOsW3c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=OfSbVLyJcwgvKy0DSHMZAwA9BR2pm3TgdOAPg2GcFhxlnrq3U1Jyt7hMekpxygZ/s C19qVnbeaZqT+K9hiI/tc7HR35LKA8etIMOXbC5hKZvm9EnZtAZIxScEvhVw4pgzcu n2P19dWZoqMt9sJEJuLOlfWrffgmezhQfmfUWF6s= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115018] Incorrect data read/written at -O3 on aarch64 with 256-bit SVE SIMD width specified Date: Thu, 09 May 2024 21:05:49 +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: pinskia at gcc dot gnu.org 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: 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=3D115018 --- Comment #1 from Andrew Pinski --- First I can't reproduce it with the official releases GCC 13.2.0. Second with the trunk, I am not sure if this is a bug or not. With the trunk with `-O3 -Wall -Wextra -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations -march=3Darmv8.2-a+sve -msve-vector-bits= =3D256 ` Running under qemu like this: [apinski@xeond2 upstream-cross-aarch64]$ ./install-qemu/bin/qemu-aarch64 -c= pu max,sve128=3Don,sve256=3Don a.out x[ 0]: 0 0 0 x[ 1]: 0 0 0 x[ 2]: 0 0 0 x[ 3]: 0 0 0 x[ 4]: 0 0 0 x[ 5]: 0 0 0 x[ 6]: 0 0 0 x[ 7]: 0 0 0 x[ 8]: 0 0 0 x[ 9]: 0 0 0 x[ 0]: 0 10 0 x[ 1]: 0 10 0 x[ 2]: 0 10 0 x[ 3]: 0 10 0 x[ 4]: 0 10 0 x[ 5]: 0 10 0 x[ 6]: 0 10 0 x[ 7]: 0 10 0 x[ 8]: 0 10 0 x[ 9]: 0 10 0 Works. But if I enable SVE512, it fails like you are describing: [apinski@xeond2 upstream-cross-aarch64]$ ./install-qemu/bin/qemu-aarch64 -c= pu max,sve128=3Don,sve256=3Don,sve512=3Don a.out x[ 0]: 0 0 0 x[ 1]: 0 0 0 x[ 2]: 0 0 0 x[ 3]: 0 0 0 x[ 4]: 0 0 0 x[ 5]: 0 0 0 x[ 6]: 0 0 0 x[ 7]: 0 0 0 x[ 8]: 0 0 0 x[ 9]: 0 0 0 x[ 0]: 0 10 0 x[ 1]: 0 10 0 x[ 2]: 0 10 0 x[ 3]: 0 0 0 x[ 4]: 0 0 0 x[ 5]: 0 10 0 x[ 6]: 0 10 0 x[ 7]: 0 10 0 x[ 8]: 0 0 0 x[ 9]: 0 0 0=