From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 16D8F3857351; Tue, 18 Jul 2023 19:09:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 16D8F3857351 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689707360; bh=uK00F+pn8nWIO1A4dsmwUaSGa5YeJG+tVOWb3E4kwgk=; h=From:To:Subject:Date:From; b=rs4GjjKk+a8BBsuntSI1EEf8og4MgQNZptjYIZ1spdlPehiGM9sS+UT/zL8LrjFqf cCLer0Iv1xGYwOSqY29/bHcjekIB50rsE2mH6D8iolXwLL5+vWZ5GnW2u8O8RHHq4Z hlYRNvUHMghyYtu5DPgAOY1PNxD82lgu6dpo55N4= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/110726] New: [14 Regression] wrong code on llvm-16 around 'a |= a == 0' Date: Tue, 18 Jul 2023 19:09:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end 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=3D110726 Bug ID: 110726 Summary: [14 Regression] wrong code on llvm-16 around 'a |=3D a =3D=3D 0' Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- This week's gcc r14-2600-g3a407070b610a8 fails llvm-16 test suite as: Failed Tests (1): LLVM-Unit :: Support/./SupportTests/BlockFrequencyTest.SaturatingRightShift It looks like the reproducer is trivial and happens even on -O0: // $ cat bug.cc int main(void) { unsigned long long freq =3D 0x10080ULL; freq >>=3D 2; freq |=3D freq =3D=3D 0; if (freq !=3D 0x4020ULL) __builtin_trap(); } $ gcc-14 bug.cc -o a && ./a Illegal instruction (core dumped) $ $ gcc bug.cc -o a && ./a $ gcc -v Using built-in specs. COLLECT_GCC=3D/<>/gcc-14.0.0/bin/gcc 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.2.1-dev/include --with-gmp-lib=3D/<>/gmp-6.2.1/lib --with-mpfr-include=3D/<>/mpfr-4.2.0-dev/include --with-mpfr-lib=3D/<>/mpfr-4.2.0/lib --with-mpc=3D/<>/libmpc-1.3.1 --with-native-system-header-dir=3D/<>/glibc-2.37-8-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)=