public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110599] New: wrong code at -Os and above with "-fno-tree-forwprop -fno-tree-fre" on x86_64-linux-gnu
@ 2023-07-08 17:08 zhendong.su at inf dot ethz.ch
2023-07-08 17:16 ` [Bug tree-optimization/110599] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2023-07-08 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110599
Bug ID: 110599
Summary: wrong code at -Os and above with "-fno-tree-forwprop
-fno-tree-fre" on x86_64-linux-gnu
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: ---
This appears to be a recent regression.
Compiler Explorer: https://godbolt.org/z/jdrTeEser
[501] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/home/suz/suz-local/software/local/gcc-trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.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
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20230708 (experimental) (GCC)
[502] %
[502] % gcctk -O2 small.c; ./a.out
1
[503] % gcctk -O2 -fno-tree-forwprop -fno-tree-fre small.c; ./a.out
-1
[504] % cat small.c
int printf(const char *, ...);
int a, b;
int main() {
b = ~b;
a = b ^ (a && 1) || b;
printf("%d\n", a);
return 0;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug tree-optimization/110599] wrong code at -Os and above with "-fno-tree-forwprop -fno-tree-fre" on x86_64-linux-gnu
2023-07-08 17:08 [Bug tree-optimization/110599] New: wrong code at -Os and above with "-fno-tree-forwprop -fno-tree-fre" on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
@ 2023-07-08 17:16 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-08 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110599
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Same problem as PR 110252 so dup.
phiopt match-simplify trying:
_2 != _5 ? 1 : _15
Matching expression match.pd:1991, gimple-match-5.cc:23
Matching expression match.pd:1991, gimple-match-5.cc:23
Matching expression match.pd:2480, gimple-match-4.cc:35
Matching expression match.pd:2483, gimple-match-3.cc:66
Applying pattern match.pd:4763, gimple-match-7.cc:16232
Folded into the sequence:
_14 = _2 != _5;
_8 = (int) _14;
_7 = _8 | _15;
statement un-sinked:
_15 = _2;
Removing basic block 3
;; basic block 3, loop depth 0
;; pred: 2
;; succ: 4
# RANGE [irange] int [0, 1] MASK 0x1 VALUE 0x0
_15 = _2;
*** This bug has been marked as a duplicate of bug 110252 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-08 17:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-08 17:08 [Bug tree-optimization/110599] New: wrong code at -Os and above with "-fno-tree-forwprop -fno-tree-fre" on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2023-07-08 17:16 ` [Bug tree-optimization/110599] " 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).