From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C64E53858C27; Thu, 17 Aug 2023 11:40:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C64E53858C27 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692272427; bh=2xQ9VX0jiZkC0IStsjQnqeTtxEeThO4htQYLa4rtOFc=; h=From:To:Subject:Date:From; b=sRVY0QtpsDO/2gpu6ANqbeDVzOs/RaZR65HReSwdMf2ei0w21K0GVTH2gyhGMlDxK ZfejkpF+HTSqu7jnwMhGya9sCJ9rDmx/15yNOCvQjDbaqEdc2uoYQOww8b7eiXkEFJ 0lEqq6XQ9G+wdRGkd5psDF41ei0Ady+08hdZdEns= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/111048] New: [14 Regression] Wrong AVX2 code on highway-1.0.6 on -O2 and above Date: Thu, 17 Aug 2023 11:40:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox 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: 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=3D111048 Bug ID: 111048 Summary: [14 Regression] Wrong AVX2 code on highway-1.0.6 on -O2 and above Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Noticed wrong code with r14-3259-g24f7b20bbd87eb when running tests on highway-1.0.6. Extracted example: // $ cat bug.cc.cc typedef unsigned char u8; __attribute__((noipa)) static void check(const u8 * v) { if (*v !=3D 15) __builtin_trap(); } __attribute__((noipa)) static void bug(void) { u8 in_lanes[32]; for (unsigned i =3D 0; i < 32; i +=3D 2) { in_lanes[i + 0] =3D 0; in_lanes[i + 1] =3D ((u8)0xff) >> (i & 7); } check(&in_lanes[13]); } int main() { bug(); } Triggering: $ g++ bug.cc.cc -mavx2 -O2 -o bug2 && ./bug2 Illegal $ g++ bug.cc.cc -mavx2 -O1 -o bug1 && ./bug1 $ g++ -v Using built-in specs. COLLECT_GCC=3D/<>/gcc-14.0.0/bin/g++ COLLECT_LTO_WRAPPER=3D/<>/gcc-14.0.0/libexec/gcc/x86_64-unknown-linux-= gnu/14.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../source/configure --prefix=3D/<>/gcc-14.0.0 --with-gmp-include=3D/<>/gmp-6.3.0-dev/include --with-gmp-lib=3D/<>/gmp-6.3.0/lib --with-mpfr-include=3D/<>/mpfr-4.2.0-12-dev/include --with-mpfr-lib=3D/<>/mpfr-4.2.0-12/lib --with-mpc=3D/<>/libmpc-1= .3.1 --with-native-system-header-dir=3D/<>/glibc-2.38-dev/include --with-build-sysroot=3D/ --program-prefix=3D --enable-lto --disable-libstdc= xx-pch --without-included-gettext --with-system-zlib --enable-checking=3Drelease --enable-static --enable-languages=3Dc,c++ --disable-multilib --enable-plug= in --disable-libcc1 --with-isl=3D/<>/isl-0.20 --disable-bootstrap --build=3Dx86_64-unknown-linux-gnu --host=3Dx86_64-unknown-linux-gnu --target=3Dx86_64-unknown-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 99999999 (experimental) (GCC)=