| Issue |
63905
|
| Summary |
Clang hang at -O1 on x86_64-linux_gnu (a recent regression in InstCombinePass)
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
shao-hua-li
|
This looks like a recent regression.
Clang would hang at -O1 on the following test case. `opt-bisect-limit` suggests that the issue might be in `InstCombinePass`.
Compiler explorer: https://godbolt.org/z/YxeGxrWod
```console
% cat a.c
int g_3, g_637;
int foo(unsigned x, unsigned n) { return x << n | x >> (32 - n); }
int func_1() {
int l_26;
g_3 = 5;
for (;; g_3 -= 1) {
int l_4;
for (; l_26; l_26 -= 1) {
long l_2068;
g_637 = 0;
for (; g_637 <= 6;)
for (;;) {
int ij;
if ((char)(foo(g_3, 2) + g_3))
break;
return 0;
}
}
}
}
int main() {}
%
% clang-tk -O1 a.c
Killed
% clang-tk -v
clang version 17.0.0 (https://github.com/llvm/llvm-project.git 46333f71f8e0d6444a9b2c9e063aedb83ebb9735)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /zdata/shaoli/compilers/ccbuilder-compilers
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/9
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/11
Candidate multilib: .;@m64
Selected multilib: .;@m64
%
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs