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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL][SPIRV] 64bit firstbitlow returns incorrect values
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            HLSL,
            clang:HLSL:SPIRV
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          V-FEXrt
      </td>
    </tr>
</table>

<pre>
    Discovered while running the offload-test-suite. The values returned imply an incorrect lowering for the 64bit overload. This only occurs for the Vulkan target which makes sense as it has the most complex lowering.

```
# | Name: ExpectedOut
# | Format:          UInt32
# | Stride:          16
# | Data: [ 4294967295, 3, 63, 0, 4294967295, 3, 63, 0, 0, 3, 3, 
# | 4294967295 ]
# | OutputProps:
# |   Height:          0
# | Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            Out
# | Format:          UInt32
# | Stride:          16
# | Data:            [ 31, 35, 31, 0, 31, 35, 31, 0, 0, 32, 31, 31 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# | Depth:           0
```

See https://github.com/llvm/offload-test-suite/pull/209 for more context
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VF2PnDYU_TXm5WqQMV_LAw-zITSRoibqttu-GrgDbgxG9vV-_PvKzGiWUdPkpbGsi-xzfY99jI90To0LYs3ye5Y3kfQ0GVs_Htr3f1mKOjO81o1yvXlCiwM8T0ojWL8sahmBJgRzOmkjhwOho4PzijCG3yeEJ6k9OrBI3i44gJpX_QpyAbX0xlrsCbR5RhvqnIzdahVZpwgCVSgZ6igHZtGvYPreW3dNfPT6q1yApB2Rwqb6CWb5FR04XByCdKAIJum27Nk4gt7Mq8aXK2nM-DH0gl86PzKRAivfwa9yRpYe4f3Lij3h8NnTDm2NnSUF_Nr--LhQKnY5D2TVgDc5SbHDG0kyoCy_h0xUWVWUosqZeAdpCMUWeQjfR_l1cgs7hrd1wPJmB3z2tHr6Ys3qWHrcAQAfUI3T7cn2svypBppu0BsYoMH1ewlxHO9Gvxi65T8cDt-4g137edewa-FG0mRT9Kx48qbzt6fPmNhlJP-b5PAj0f9L8v1fzY8PiDARnelFy0Q7Kpp8F_dmZqLV-il8_v2SmWhXrzUTreDV9vhmYxF6sxC-UDTU6VCllYywTsqsSjJeZEk01VVedZz31dCd0rsuxSQ9JWWJvKy6AQdRRaoWXOS84HlSiIwncZ_kVZmI8u6Oi7Ire5ZxnKXScdhabOwYKec81kmWcp5GWnao3WZZQnR-ZCLIz4T48Onh03XQa7mMLD1uk-nx4cvH3x4DmDeRrUPhQ-dHxzKulSP3RkWK9OaH28K8Yfn9eW3eXBzqpKyjTpE2zxeDcztbOztf5K2ufyz6to_Vmr-xJyba7ZiOifZy0qda_BMAAP__CduKQQ">