public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1)
@ 2021-04-09 9:51 zhendong.su at inf dot ethz.ch
2021-04-09 10:55 ` [Bug tree-optimization/99986] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-04-09 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99986
Bug ID: 99986
Summary: missed optimization for dead code elimination at -O3
(vs. -O1)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: zhendong.su at inf dot ethz.ch
CC: marxin at gcc dot gnu.org
Target Milestone: ---
[599] % 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/11.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.1 20210409 (experimental) [master revision
96292c3e343:4e14cad25b9:019a922063f26784d5a070d9198a1f937b8a8343] (GCC)
[600] %
[600] % gcctk -O1 -S -o O1.s small.c
[601] % gcctk -O3 -S -o O3.s small.c
[602] %
[602] % wc O1.s O3.s
38 86 669 O1.s
48 107 845 O3.s
86 193 1514 total
[603] %
[603] % grep foo O1.s
[604] % grep foo O3.s
call foo
[605] %
[605] % cat small.c
extern void foo(void);
static int a, *b[8] = {&a}, **c[8];
static void d() {
int e = 0;
for (; e < 8; e++)
c[e] = &b[1];
if (!c[0])
foo();
}
int main() {
if (a)
d();
return 0;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/99986] missed optimization for dead code elimination at -O3 (vs. -O1)
2021-04-09 9:51 [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1) zhendong.su at inf dot ethz.ch
@ 2021-04-09 10:55 ` rguenth at gcc dot gnu.org
2021-04-09 11:20 ` zhendong.su at inf dot ethz.ch
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-09 10:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99986
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
Version|unknown |11.0
Component|ipa |tree-optimization
Depends on| |99776
Last reconfirmed| |2021-04-09
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think this is a duplicate of PR99776 since I can't reproduce with this fix
in.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99776
[Bug 99776] missed optimization for dead code elimination at -O3 (vs. -O1)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/99986] missed optimization for dead code elimination at -O3 (vs. -O1)
2021-04-09 9:51 [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1) zhendong.su at inf dot ethz.ch
2021-04-09 10:55 ` [Bug tree-optimization/99986] " rguenth at gcc dot gnu.org
@ 2021-04-09 11:20 ` zhendong.su at inf dot ethz.ch
2021-04-27 7:17 ` rguenth at gcc dot gnu.org
2021-05-04 12:29 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-04-09 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99986
--- Comment #2 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
(In reply to Richard Biener from comment #1)
> I think this is a duplicate of PR99776 since I can't reproduce with this fix
> in.
Thanks for looking into it, Richard!
Would you mind also checking the few tests for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99862
whenever you get a chance?
I'm happy to file them as separate reports if that would be more convenient.
Thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/99986] missed optimization for dead code elimination at -O3 (vs. -O1)
2021-04-09 9:51 [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1) zhendong.su at inf dot ethz.ch
2021-04-09 10:55 ` [Bug tree-optimization/99986] " rguenth at gcc dot gnu.org
2021-04-09 11:20 ` zhendong.su at inf dot ethz.ch
@ 2021-04-27 7:17 ` rguenth at gcc dot gnu.org
2021-05-04 12:29 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-27 7:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99986
Bug 99986 depends on bug 99776, which changed state.
Bug 99776 Summary: missed optimization for dead code elimination at -O3 (vs. -O1)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99776
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/99986] missed optimization for dead code elimination at -O3 (vs. -O1)
2021-04-09 9:51 [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1) zhendong.su at inf dot ethz.ch
` (2 preceding siblings ...)
2021-04-27 7:17 ` rguenth at gcc dot gnu.org
@ 2021-05-04 12:29 ` rguenth at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99986
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
indeed.
*** This bug has been marked as a duplicate of bug 99776 ***
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-04 12:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 9:51 [Bug ipa/99986] New: missed optimization for dead code elimination at -O3 (vs. -O1) zhendong.su at inf dot ethz.ch
2021-04-09 10:55 ` [Bug tree-optimization/99986] " rguenth at gcc dot gnu.org
2021-04-09 11:20 ` zhendong.su at inf dot ethz.ch
2021-04-27 7:17 ` rguenth at gcc dot gnu.org
2021-05-04 12:29 ` 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).