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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Enable truncation to scalar
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            llvm-beanz
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          llvm-beanz
      </td>
    </tr>
</table>

<pre>
    Based on spec updates in https://github.com/microsoft/hlsl-specs/pull/301, we should extend the HLSL truncation conversion to support truncating down to a scalar. The updated language spec text is:

![Image](https://github.com/user-attachments/assets/f8604d12-4b1b-4ea6-98bf-f375cc31f139)

This should be fairly minimal, we just need to allow the output of a truncation conversion to be a scalar if the to-type is a scalar.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ks1upDoQhZ_GbEq0jIFuWLC4ubmtO1J2kxco7DI4MjbC5fzM048gnWQ2EwmJErjK55z6MCU3BaJBtHdCKe-fl3IkDL-EUqK9LzDzHLfh63sxRvM23GEiAzFAWklDXg0yJXABZuY1ifofoa5CXSfHcx5POi5CXRent5iiZaGus0--3HuTUNc1ey_UtZaVUP_CC0GaY_YG6JUpGOCZ4P-Hnw_AWw4a2cUAOoZn2tJecoSU1zVu_HkgTGDiy_ELIWn0uJ3gcaabUAMew5Rxonf5TK8M7lAtj0dVor37seBEor0XqvvGVE60lciMel4o8G4HU6KjsN1ZNqZSZTNWY9kQnsu-G21p60urdV3Zqu6F6t8vfZxd-jA-Elh0m3-DxQW3oL_l8pQTQyAyhzPv48sRTsy8ZoZoAf-e0UifWYCzRx_Hkt9WApe-YirMUJu-7rGgobqouukr2bXFPKBuelVLtMqOdK4l1n2LplHdpblYKc-FG5RUjewqVfV1pdpT3xljWm1Nj3bU-iIaSQs6f9phOsVtKlxKmYZKqv7cFB5H8unG4b7vG4Ef8OUpiUZ6lzh9TWDH_mD3aGjv4b-Ao6c_Y9j5OLwVefPDN6vch95e5brFJ9I7qYfGfZs3mc-D-h0AAP__lMINnw">