[llvm] Reapply [APInt] Enable APInt ctor assertion by default (PR #114539)
Nathan Chancellor via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 2 07:30:21 PDT 2024
nathanchance wrote:
I am seeing an assertion failure while building the Linux kernel after this change. `cvise` spits out as a trivial reproducer:
```c
int am33xx_check_features___trans_tmp_5;
int omap_rev();
void __attribute__((__cold__)) am33xx_check_features() {
am33xx_check_features___trans_tmp_5 = omap_rev() >> 20 == 363;
}
```
```
$ clang --target=arm-linux-gnueabi -O2 -c -o /dev/null id.i
clang: /home/nathan/tmp/cvise.iMmMYHOwp2/src/llvm/include/llvm/ADT/APInt.h:121: llvm::APInt::APInt(unsigned int, uint64_t, bool, bool): Assertion `llvm::isIntN(BitWidth, val) && "Value is not an N-bit signed value"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang --target=arm-linux-gnueabi -O2 -c -o /dev/null id.i
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'id.i'.
4. Running pass 'Constant Hoisting' on function '@am33xx_check_features'
...
```
If a separate issue would be helpful, I am happy to file one.
https://github.com/llvm/llvm-project/pull/114539
More information about the llvm-commits
mailing list