<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/74242>74242</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            missed optimization for `y / x` when the divisor has [0, 1] range
        </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:
https://godbolt.org/z/aonazK5on
```cpp
unsigned int 
foo(unsigned int x, unsigned int y)
{
  if(x > 1)
    return y;
  return y / x;
}
```

motivated from the following gcc bugzilla and test:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96094
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/pr96094.c
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8Uk1vnDAQ_TXDZbTIjPk8cEi65dJr75UxBtwae2WbbLK_vgI2G6VqKyFg3rPfPD-PCEFPVqkWimcozolY4-x8--skvHfXkPRueGu_qxBRiqCAPwE7A3uaY7yEraIOqJvc0DsTU-cnoO4G1Alnxe1b4eyxHEp2PPJyOZDV7n0H1DbiAY3OAdWfiFegL_gJeQNq7prV8_GDqEeg-hWBf8XswSMiehVXb_EN-GPtO4RAHb4-CKjOf1i9l_t7cVG_iKgGHL1bMM4KR2eMu2o74SQl9ut008YIFHbAqEL8V1JSppNd70m97wLqwuyuP_p1SuWkgXd6AH5uStbkf1XRcV77VLrlkDwt2nvnj2LTNa4H6hYRovpAN1th1VHdfQybheiVOoWwWbj4vWEqk6HlQ8Mbkag2q1hWZhmvi2Ru6yofVd1XxEQtGlJlVRelHGvR5KXgskp0S4x4RoxnPG_yIm2yPOOjpEyIXFQyh5ypRWiTGvOybCkkOoRVtVVOOSVG9MqEfRSJrLriTgLRNpm-3fac-nUKkDOjQwwfKlFHo9pFh6AGdJeoF30TUTuLo_MIJXu_75LhdVZ2v8JBv-jgPM4iIBTPbBu2DIozemEnlazetP_Jfet9_5wu3v1UMgJ1u-MA1O0n-h0AAP__o2EHfw">