<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/115341>115341</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DSE] Missed optimization
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
omern1
</td>
</tr>
</table>
<pre>
```ll
; Build with opt --passes='dse' -debug
; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_Z9eaot_testv() {
store i32 3267512, ptr inttoptr (i64 68719476864 to ptr), align 4
%1 = load i32, ptr inttoptr (i64 68719476812 to ptr), align 4
store i32 %1, ptr inttoptr (i64 137438953472 to ptr), align 4
store i32 3267516, ptr inttoptr (i64 68719476864 to ptr), align 4
ret void
}
```
The first store and the load `%1` don't actually alias but DSE fails to delete redundant stores (first and last).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykk72O6zYQhZ9m1Axs8FeUChXraN2l2lRpFpRI2wxo0hBHNjZPH9D2Zm9zf4ALCBABzfnmDEfHlhKOyfsB9A702NiVTnkZ8tkviTdTdh8DtOzxxAhsBPYCcoe7NUSHt0AnzBfCzeZiS_EF5AjCuOJBGNw4P63Hp-Z_5X5NM4Wc8IVoKSBf8LwWuiz5uPhSMOU13UJyuN7ITtE_hM4fQvLoSn6PebYRrzk4BMXe_-69zfROvtAVRAeiRzC7hwqxUF48BilQitZoLkD8gRdaMCSiXA8gutAqbDvDe2XarlVIuZaA6GuxjeGYUH0CQWiOIEeM2boK_imQix8CvxxW9PdoXBolu15LZX4V9xi4_d2BF0_3y34u0IzPw-dP8e16_zp5PISl0NOGTQ7p5B93VWvrhC1DlxMIQ2hnWm2MH7WnLTithOPbKx5siKWacj568rh4tyZn0xNb6giPNrVBtIVA9NvGDdL1sreNH7iRrO97zlhzGozViuuunw5zz5jlutWda43Rszayk7YJg2BCcc4MN0zpfiu8mt0klT4cJuNnCYr5sw1xG-P1vM3LsQmlrH7gXEvFm2gnH8s9QUIkf8P7VxCiBmoZqmgzrccCisVQqHxhKFC8R298ewU94p-hFO9qosI5_GtrTJp1icOJ6FKjAmIPYn8MdFqn7ZzPIPaV9XxtLkv-x88EYn93UEDsnxavg_gvAAD__2p7K1M">