public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/110726] New: [14 Regression] wrong code on llvm-16 around 'a |= a == 0'
@ 2023-07-18 19:09 slyfox at gcc dot gnu.org
  2023-07-18 19:29 ` [Bug middle-end/110726] " pinskia at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-18 19:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110726

            Bug ID: 110726
           Summary: [14 Regression] wrong code on llvm-16 around 'a |= a
                    == 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 = 0x10080ULL;

  freq >>= 2;
  freq |= freq == 0;

  if (freq != 0x4020ULL)
      __builtin_trap();
}

$ gcc-14 bug.cc -o a && ./a
Illegal instruction (core dumped)

$ $ gcc bug.cc -o a && ./a
<ok>

$ gcc -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-14.0.0/bin/gcc
COLLECT_LTO_WRAPPER=/<<NIX>>/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=/<<NIX>>/gcc-14.0.0
--with-gmp-include=/<<NIX>>/gmp-6.2.1-dev/include
--with-gmp-lib=/<<NIX>>/gmp-6.2.1/lib
--with-mpfr-include=/<<NIX>>/mpfr-4.2.0-dev/include
--with-mpfr-lib=/<<NIX>>/mpfr-4.2.0/lib --with-mpc=/<<NIX>>/libmpc-1.3.1
--with-native-system-header-dir=/<<NIX>>/glibc-2.37-8-dev/include
--with-build-sysroot=/ --program-prefix= --enable-lto --disable-libstdcxx-pch
--without-included-gettext --with-system-zlib --enable-checking=release
--enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin
--disable-libcc1 --with-isl=/<<NIX>>/isl-0.20 --disable-bootstrap
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 99999999 (experimental) (GCC)

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-07-19 16:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-18 19:09 [Bug middle-end/110726] New: [14 Regression] wrong code on llvm-16 around 'a |= a == 0' slyfox at gcc dot gnu.org
2023-07-18 19:29 ` [Bug middle-end/110726] " pinskia at gcc dot gnu.org
2023-07-18 19:29 ` pinskia at gcc dot gnu.org
2023-07-18 19:32 ` pinskia at gcc dot gnu.org
2023-07-18 19:36 ` pinskia at gcc dot gnu.org
2023-07-18 19:36 ` pinskia at gcc dot gnu.org
2023-07-18 19:39 ` pinskia at gcc dot gnu.org
2023-07-18 20:04 ` pinskia at gcc dot gnu.org
2023-07-18 20:31 ` pinskia at gcc dot gnu.org
2023-07-18 21:37 ` slyfox at gcc dot gnu.org
2023-07-18 21:42 ` pinskia at gcc dot gnu.org
2023-07-19  2:02 ` pinskia at gcc dot gnu.org
2023-07-19  6:13 ` slyfox at gcc dot gnu.org
2023-07-19 16:16 ` cvs-commit at gcc dot gnu.org
2023-07-19 16:17 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).