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

    <tr>
        <th>Summary</th>
        <td>
            Please backport a37df84f99ebe68c3e9cc533ffd3952fb22d1f38 into 16.0.X
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            backend:RISC-V,
            release:backport
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          frasercrmck
      </td>
    </tr>
</table>

<pre>
    I'm seeing the same issue as #61561 in our downstream. This is a regression compared to LLVM 15, as the known bits analysis wasn't enabled for scalable vectors back then.

I believe this should cherry-pick cleanly.

CC @topperc, @asb 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxUkU-L2zoUxT-NvLnEyFe2Ey-8yMsQGJgHj9cydKs_17EaWTK68gz59sVpS-lGQkjnd87R1cz-FolG0f0jupdKb2VOeZyyZso2L_ZemeQe46vA4wJM5OMNykzAeiHwzBuBZhCo-qbrG_AR0pbBpc_IJZNeavg6ewbPoCHTLROzTxFsWladyUFJ8Pb2_i80ncDLjtrh95g-IxhfGHTU4cGe4VNzFHgsQFGbQA6mlIGtDvsJPsiWlBmMtvcdEWshX4Q8_1xfwVDw9EFQ9jA8py04sDPl_Dis3t7BBtIxPP5SXS4gWlnSulK2ezrRSs0GKjcqN6hBVzQ2_Uk12PVHWc1j3xhnW3OkZnLYWmxMo52eaOpaaZojVn5EiUp2UjVt1ypZS41OT71CPbj-iFK0khbtQx3Cx1KnfKueXzz22GFbBW0o8HNUiHtTik6o8_-vXy6Hd4Eo8CIQMwXSTEKd9ydrymW_6l6qPO7Ug9luLFoZPBf-41N8CTT-95TCbyFodXTTqZ2GgQz1J6tosLZTapqcGjqcDKJrJnUCH0uCpq9l_a3achjnUlYW6izwKvB682XeTG3TIvC6W_7aDmtO38kWgddnTxZ4fVb9EQAA__8eRdPD">