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

    <tr>
        <th>Summary</th>
        <td>
            Overload resolution should promote 16-bit types
        </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>
    In working on #71098, I've discovered a few cases where C++ overload resolution rules don't quite match HLSL. HLSL allows "promotion" casting 16-bit types to larger types, and will select the first larger type that fits. In the following examples both should resolve successfully to the 32-bit overloads:

```c++
void Fn3(double2 D);
void Fn3(float2 F);

void Call3(half2 H) {
  Fn3(H);
}

void Fn4(int64_t2 L);
void Fn4(int2 I);

void Call4(int16_t H) {
  Fn4(H);
}
```

### Acceptance Criteria

A test case demonstrating the above overload resolution.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8Fu2zAM_Rr5QjSQKTtKDj6kKYwWKLDDPqCQbTrWpliZRCfrvn6Q46xdEYCwYfNR75F6NDHaw0hUifJRIDp3Pj40ZMY_AlGUT5mZePCh-vifNb57r15GuPjw044H8CMIVDqX243APbwI1GeCzsbWnylQBwZ6ukBrIkW4DBQI9gIfBT5CAjhvOggUvZvY-hHC5ChC50eBmuHXZJngaLgd4Pn1--tqfoJxzl8iCMRT8EefCgVi4uAkKV8_NJaB308UgT04Ew4Urt9Joxk7uFjnIJKjloEHgt6GyJ-RwINh6C3HFbyMV4xPvImBfpvjKQltPA8QBz-5pYszQZzalmLsJ-feE30qVThLunUchdoJOcdaXqO9DkXI3dnbDupRCdx0fmocITwJ3Ar1Jdk7bxih_pe7pffGuQQYjOsRngVuQegEgKXy-aNEP30qrMdC4MaOvC7eGOH1K-uSxXTLdziXdL5-46-sxT3WW-vLJFBdA3ZtSyc2Y0uwD5YpWHOF7IAp8uwl6Ojox8jBzFeeZmwaf6Z7plplXaW6rdqajKpcS62KUqHKhirX1JjWlGXRa6VpW27zvmhKKfuuLCS2ma1QYiFRakRVolqVjVZ5XxT9et1pKbUoJB2Ndau0IisfDpmNcaJqk8tCZ8405OKyXMm6y1rdNmo6RFFIZyPHjwPYsqPq253lWIx2NT395_NsCq4amE-ztbAWWB8sD1Ozav1RYJ1OX14Pp-B_UMsC61lrFFjPcv8GAAD__3cfRFU">