| Issue |
115411
|
| Summary |
clang-20 crashed with optnone attribute at -O1 and above. error in backend: Cannot select: intrinsic %llvm.expect.with.probability.
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
iamanonymouscs
|
clang-20 crashed with ```optnone``` attribute at ```-O1``` and above.
Compiler explorer: https://godbolt.org/z/4dP5xGxnx
```
$cat mutant.c
int a;
void __attribute__((optnone)) b() {
int c = __builtin_expect_with_probability(a, 0, 0.8);
}
Also crashed on clang-19.
$clang-19 -O1 mutant.c
fatal error: error in backend: Cannot select: intrinsic %llvm.expect.with.probability
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Ubuntu clang version 19.0.0 (++20240722031324+65825cd5431c-1~exp1~20240722151445.1819)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm-19/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/mutant-b18d19.c
clang: note: diagnostic msg: /tmp/mutant-b18d19.sh
clang: note: diagnostic msg:
********************
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs