[llvm-bugs] [Bug 48615] New: Assertion `NumBits <= MAX_INT_BITS && "bitwidth too large"' on large store
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 28 04:58:18 PST 2020
https://bugs.llvm.org/show_bug.cgi?id=48615
Bug ID: 48615
Summary: Assertion `NumBits <= MAX_INT_BITS && "bitwidth too
large"' on large store
Product: new-bugs
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: arnetheduck at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
`splitMergedValStore` tries to create an integer with the number of bits that
the size of the type has - for example, a 5 mb type will try to create an
integer with 5*1024*1024*8 bits which fails the MAX_INT_BITS check.
https://github.com/llvm/llvm-project/blob/a485a59d2172daaee1d5e734da54fbb243f7d54c/llvm/lib/CodeGen/CodeGenPrepare.cpp#L7271
```
%large = type { [42000000 x i8] }
define void @set(%large, %large*) {
store %large %0, %large* %1
ret void
}
```
```
$ llc test.ll
llc: ../lib/IR/Type.cpp:256: static llvm::IntegerType*
llvm::IntegerType::get(llvm::LLVMContext&, unsigned int): Assertion `NumBits <=
MAX_INT_BITS && "bitwidth too large"' failed.
...
#9 0x00007fc02ab9c4f7 llvm::IntegerType::get(llvm::LLVMContext&, unsigned int)
../lib/IR/Type.cpp:255:3
#10 0x00007fc02ac4a02a llvm::DataLayout::getTypeStoreSize(llvm::Type*) const
../include/llvm/IR/DataLayout.h:459:45
#11 0x00007fc02ac4a02a llvm::DataLayout::getTypeStoreSizeInBits(llvm::Type*)
../include/llvm/IR/DataLayout.h:471:35
#12 0x00007fc02ac4a02a llvm::DataLayout::typeSizeEqualsStoreSize(llvm::Type*)
../include/llvm/IR/DataLayout.h:479:62
#13 0x00007fc02ac4a02a splitMergedValStore
../lib/CodeGen/CodeGenPrepare.cpp:7191:34
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201228/7e1b6050/attachment-0001.html>
More information about the llvm-bugs
mailing list