Issue 241920
Summary [AArch64] Compiler hang with SVE at -O2 with BitInt
Labels generated by fuzzer
Assignees
Reporter hazohelet
    Live Reproducer: https://godbolt.org/z/xnnsdbxs3

Compiling the following C code for `aarch64` with `clang -O2 -march=armv9-a` hangs and does not finish compilation.

```c
int f(_BitInt(9) s, int n) {
  int x = 0;
  for (int i = 0; i < n; i++) {
    x = s;
    s = i;
  }
  return x;
}
```

clang command:

```sh
clang --target=aarch64-linux-gnu -march=armv9-a -O2 -c repro.c
```

The compiler does not terminate.

Notes:

* Also hangs at -O3 and -Os, and with `-march=armv8-a+sve` or `-msve-vector-bits=256`
* Compiles at -O1, with `-fno-vectorize`, and without SVE
* Also hangs with `_BitInt(10)`, `_BitInt(12)` and `_BitInt(15)`; compiles with `_BitInt(8)` and `_BitInt(16)`

clang version:

```text
clang version 24.0.0git (https://github.com/llvm/llvm-project 7d25e4f9cd72686727beaf0b661ce3e910ee1349)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to