<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/74975>74975</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
missed optimization: redundant store is not optimized away
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
k-arrows
</td>
</tr>
</table>
<pre>
Test case from gcc testsuite (See https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-dse-1.c):
```cpp
int x;
void foo(void) {
if (x == 0)
x = 0;
}
void bar(int i) {
if (x == i)
x = i;
}
```
https://godbolt.org/z/r6Eohr7oj
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8kt2OmzAQhZ9muBkRmXES4IKLXaW8QPsC_pkk3gKOPGb_nr5yss1WbbUSEpwz-Due0RiRcFqYB9g9wu5QmTWfYxp-1ial-CKVjf5t-MGS0RlhPKY448k5zCxZ1pAZgbrvzHjO-SKgH4BGoPEU8nm1GxfnIpyr55BSTDcBNNopWqBxNpL5071Db87Gn4qZmGsRAzSKmNrHufbCdbNxQH0JVAdQD7BXt8ddLjcnLBlfQT_e1HMMHo8xAnXlE6hHaD9qiOFY2nhF0AfQB1SF_FFCvNqo7ihoD38wrUlAXQkLX0PDf6DhX-i9kZv8a6zR2zjlTUxlMu9AY9p_i-fUxqfKD9r3ujcVD02rqOl60rvqPJBprdZdY5kdN8ZtmUiZVjndtK01tgoDKdINNUrtSendRne97TvddL3uj_tOw1bxbMK0mabnuWRXQWTlod327a6ajOVJrvtDtPALXotAVNYpDeVMbdeTwFZNQbJ8UnLIEw9zEGGP8ZLDHN5NDnEB_YCJ_bp4s2SUHBNjEFxi_v0bezQv5q1a0zR8sXkl6uNVX1J8YpeBxusFBWi8NvArAAD__x3F5YE">