<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Assertion `NumBits <= MAX_INT_BITS && "bitwidth too large"' on large store"
href="https://bugs.llvm.org/show_bug.cgi?id=48615">48615</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assertion `NumBits <= MAX_INT_BITS && "bitwidth too large"' on large store
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arnetheduck@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>`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.
<a href="https://github.com/llvm/llvm-project/blob/a485a59d2172daaee1d5e734da54fbb243f7d54c/llvm/lib/CodeGen/CodeGenPrepare.cpp#L7271">https://github.com/llvm/llvm-project/blob/a485a59d2172daaee1d5e734da54fbb243f7d54c/llvm/lib/CodeGen/CodeGenPrepare.cpp#L7271</a>
```
%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
```</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>