<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 - [DSE] merge memset into earlier store constant"
href="https://bugs.llvm.org/show_bug.cgi?id=36211">36211</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[DSE] merge memset into earlier store constant
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>spatel+llvm@rotateright.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>If I've understood correctly, this is an example of the optimization request
made in <a class="bz_bug_link
bz_status_NEW "
title="NEW - Misoptimization involving memset and store"
href="show_bug.cgi?id=36129">bug 36129</a>:
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1)
define void @merge_memset_into_earlier_constant_store(i8* %p) {
%p8 = bitcast i8* %p to i64*
store i64 0, i64* %p8, align 1
%p5 = getelementptr i8, i8* %p, i64 5
tail call void @llvm.memset.p0i8.i64(i8* align 1 %p5, i8 42, i64 3, i1 false)
ret void
}
----------------------------------------------------------------------------
DSE knows how to merge constant stores when they are actual store instructions,
but it doesn't know how to handle this case where we overwrite the last 3 bytes
of p[8] using a memset().</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>