public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/115494] New: wrong code at -O{2,3} with "-fno-ssa-phiopt" on x86_64-linux-gnu (the generated code hangs)
@ 2024-06-14 16:33 zhendong.su at inf dot ethz.ch
  2024-06-14 16:57 ` [Bug tree-optimization/115494] wrong code at -O{2,3} with "-fno-ssa-phiopt" on x86_64-linux-gnu pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2024-06-14 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115494
           Summary: wrong code at -O{2,3} with "-fno-ssa-phiopt" on
                    x86_64-linux-gnu (the generated code hangs)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

It appears to be a recent regression as it doesn't reproduce with 13.* and
earlier. 

Compiler Explorer: https://godbolt.org/z/889EdEeE9

[627] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240614 (experimental) (GCC) 
[628] % 
[628] % gcctk -O2 small.c; ./a.out; echo $?
0
[629] % gcctk -O2 -fno-ssa-phiopt small.c; ./a.out; echo $?
1
[630] % cat small.c
unsigned char a;
int b = 1, c, d;
int main() {
  char e;
  c = b - c;
  a = ~(c || a);
  e = -(b ^ a);
  d = e && b;
  a = ~(b & a);
  if (a < 2)
    return 1;
  return 0;
}

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

end of thread, other threads:[~2024-06-17  8:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-14 16:33 [Bug tree-optimization/115494] New: wrong code at -O{2,3} with "-fno-ssa-phiopt" on x86_64-linux-gnu (the generated code hangs) zhendong.su at inf dot ethz.ch
2024-06-14 16:57 ` [Bug tree-optimization/115494] wrong code at -O{2,3} with "-fno-ssa-phiopt" on x86_64-linux-gnu pinskia at gcc dot gnu.org
2024-06-14 17:14 ` pinskia at gcc dot gnu.org
2024-06-14 17:14 ` [Bug tree-optimization/115494] [14/15 Regression] wrong code at -O{2,3} " pinskia at gcc dot gnu.org
2024-06-14 17:44 ` pinskia at gcc dot gnu.org
2024-06-14 18:51 ` [Bug tree-optimization/115494] [14/15 Regression] wrong code at -O{2,3} on x86_64-linux-gnu since r14-3485 pinskia at gcc dot gnu.org
2024-06-14 20:04 ` pinskia at gcc dot gnu.org
2024-06-17  5:42 ` rguenth at gcc dot gnu.org
2024-06-17  8:20 ` rguenth 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).