[llvm-bugs] [Bug 49773] New: missed optimization for dead code elimination at -O3 (vs. -O2)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 30 10:37:40 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=49773
Bug ID: 49773
Summary: missed optimization for dead code elimination at -O3
(vs. -O2)
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Interprocedural Optimizations
Assignee: unassignedbugs at nondot.org
Reporter: zhendong.su at inf.ethz.ch
CC: llvm-bugs at lists.llvm.org
[637] % clangtk -v
clang version 13.0.0 (https://github.com/llvm/llvm-project.git
9fb0025f7084db14d16fe5cbe1d799f4ee0020af)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
[638] %
[638] % clangtk -O2 -S -o O2.s small.c
[639] % clangtk -O3 -S -o O3.s small.c
[640] %
[640] % wc O2.s O3.s
66 172 1711 O2.s
82 213 2061 O3.s
148 385 3772 total
[641] %
[641] % grep foo O2.s
[642] % grep foo O3.s
callq foo
[643] %
[643] % cat small.c
extern void foo(void);
static int a;
int **b, c, d, e;
int main() {
if (a)
foo();
while (e)
while (a++)
while (c)
*b = &d;
return 0;
}
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210330/632dc18b/attachment.html>
More information about the llvm-bugs
mailing list