<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/71659>71659</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
fraction `(a / b)` can be optimized under the condition that other fraction `(a / c)` implies
</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>
Consider the following function.
https://godbolt.org/z/TcT461xq4
```cpp
int test(int a) {
if (a / 5)
return 0;
else
return (a / 6);
}
```
In this example, the fraction `(a / 6)` in else branch can be optimized (to zero) under the condition `(a / 5) == 0`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsUsFu4zoM_Br6QjSQaFuJDj60DQy8e39AlplYbxXJK8nbbr9-YafpYtsAhm2RQ2pmSJOzOwfmDtonaI-VWcoUU_fjwaQUX3M1xPF39xxDdiMnLBPjKXofX10442kJtrgYdiCOIB6nUuYM9SNQD9Sf4zhEX3YxnYH6d6D-xb40Sr79bK5wUOL62Hm-RlwoWDgXoMP6a4A0wv7pmkR0JwQ6GATqsQXStzhi4rKkgALqTzD7zN8An-VqLb-BYX_8wujjuL3_C1gml5HfzGX2DPR8dSGZTTuu8H_aKoEubPfjkEywE1oTcGCMc3EX987jyqNEfOcUV4lLuFlrYxjdt67t5kN9hPqIK7sdVmNXj7rWpuJOKq2bhnSrqqljaQTVxiilbWtY0qgbqxo77A-jPUlRuY4E1VKKg5SkpdqZk2ilYStJt_YkFDSCL8b5nfe_LuvwKpfzwt1eqlZX3gzs87YrRIFfcUsC0bo6qVtrHoblnKER3uWS_3Yprnju7ro2fLj2zaZ7xpTJFIxl4nR_BPY2gsvsHedqSb77spiuTMuws_EC1K_8Pj4Pc4r_sy1A_aYqA_Wb6j8BAAD__x7j7kw">