<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/86261>86261</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Miscompilation of `store undef, %ptr` (or an Alive2 bug?)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
XChy
</td>
</tr>
</table>
<pre>
Alive2 link: https://alive2.llvm.org/ce/z/-6JYLW
InstCombine folds:
```llvm
define void @src(ptr %p) {
store i8 undef, ptr %p
ret void
}
```
to
```llvm
define void @src(ptr %p) {
ret void
}
```
But Alive2 told me that it's not a correct transform. AFAIK, the semantics of `undef` is like uninitialized value in memory. I'm not that sure whether it's a LLVM problem or an Alive2 problem, so post an upstream issue first.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysU81upEwMfBpzsYLAzPBz4DBJhJTvS677c2zADL1pulG3mVXy9CtgMqvsaQ8rISPswlUU1SoEfbbMNRzv4fgYqUVG5-tvD-Nb1Lr-rT4ZfWFCo-0rZCccReYA2QmoAWrUNoyNuUyx82egpmOg5h2oucv_-_78FZJHSE57fbJBHtzUass4ONNva_Z5nuzXumhv9TysuIvTPcIhCb4DKmfxCHScgSqE4n5HIgZxnlGXuNieB6AHvAGvCM-yrbrSFY9_8O6P4v6JnL8j2-v9Inh1WJzpcWKUUQlqASoCWieosHPecycoXtkwOD_FeGpOT_-vXyojY-BJWdFdQDcg5MluQ56gDmj0K-NitdWildHv3ONFmYVRW5x4cv4txiegYtq4Nu6weMafI8vI_kOIwufnLy84e9cantB5VPZD-LW5qgkOZxdkHS5zEM9qQh3CwjhoHySO-jrrq6xSEddpkaZJVVFZRWN9zCkv22N5zNoqz6nrDqoqur4fqMpaVbSRrimhQ5IRJRWlVMWpStuSKCPVUcp9AYeEJ6XNLYzRRlyXOeVpZFTLJnyE3Ncr6K5dzgEOidFBwu_XRIvh-kWHzk2zNkq0s1dj96DdUrb-e_Gr0UDlJ0va5QxZA1RFizf15zNz1jIubdy5CajZErbf7mbvfnAnQM2mPAA1m_hfAQAA__8FhBvO">