Issue |
139883
|
Summary |
Large compilation time with -O2 for a small file on x86_64-linux-gnu
|
Labels |
new issue
|
Assignees |
|
Reporter |
KavyaChopra04
|
```
kchopra@ast-epyc4:~$ clang -v
clang version 21.0.0git (https://github.com/llvm/llvm-project.git 165d47ef704ae6e93b0b31991efe8feed1f68a09)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/home/kchopra/compilers/bin
Build config: +assertions
Found candidate GCC installation: /local/home/kchopra/compilers/bin/../lib/gcc/x86_64-pc-linux-gnu/15.0.1
Selected GCC installation: /local/home/kchopra/compilers/bin/../lib/gcc/x86_64-pc-linux-gnu/15.0.1
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
kchopra@ast-epyc4:~$ time clang -O2 clang_bug/clang_long.c
clang_bug/clang_long.c:97:1: warning: label at end of compound statement is a C23 extension [-Wc23-extensions]
97 | }
| ^
1 warning generated.
real 0m5.079s
user 0m5.056s
sys 0m0.014s
kchopra@ast-epyc4:~$ cat clang_bug/clang_long.c
int a, b = 4, c, d, e, f, g, i, j, k, l, m, n, o;
static int h;
int main() {
h = a;
if (d * o * b >= 0)
goto p;
q:
if (j >= 0)
goto r;
goto s;
p:
if (j >= 0)
goto r;
t:
f = j;
goto u;
v:
if (d >= 0)
goto w;
r:
if (b)
goto x;
y:
if (b * e >= 0)
goto z;
goto aa;
ab:
b = (i << 6) + 0532;
if (o >= 0)
goto ac;
goto ad;
u:
a = 6;
if (m)
goto ae;
af:
if (o >= 0)
goto ag;
s:
if (b >= 0)
goto ah;
ai:
if (l)
goto af;
goto v;
ac:
aa:
if (g)
goto aj;
ag:
if (h >= 0)
goto ai;
goto q;
ak:
d = c;
if (j)
goto ah;
z:
m = h;
if (o)
goto al;
am:
m = a * o;
if (d)
goto an;
ah:
h = (d << 6) - 1;
if (h * b >= 0)
goto an;
goto ab;
aj:
if (a * h * j)
goto an;
goto ai;
ao:
c = n + 5;
if (e)
goto ak;
an:
goto q;
ad:
if (a)
goto ao;
ae:
if (o)
o = 6;
if (k)
goto am;
if (b)
w:
if (b * j)
goto t;
al:
k = b;
goto y;
x:
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs