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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Scalar to vector implicit conversion
        </td>
    </tr>

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

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

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

<pre>
    While HLSL doesn't allow vector extension as an implicit conversion it does allow scalar to vector conversion as an implicit conversion.

```hlsl
void fn(int i) {}

void fn(vector<int64_t, 2> v) {}

export void call(int i, int64_t l, vector<int,2> vi, vector<int64_t, 2> vl) {
  fn(i);  // calls fn(int)
  fn(l);  // calls fn(vector<int64_t,2>)
  fn(vi); // calls fn(vector<int64_t,2>)
  fn(vl); // calls fn(vector<int64_t,2>)
}
```
[Compiler Explorer](https://godbolt.org/z/jqK1T8Kxr)

We need to update the language specification and implement the scalar->vector implicit conversion.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycU09vuzgQ_TTDZdTIGaDAgUP-FK3U3rpSjytjhuDKsVlsstl--p8gpH-i9lLJEqCZ996MeU96rw-WuYR0C-k-kmPo3FAaczre1SztW1S75v_ypdOG8a-n5ydsHHsLlAWUxrj_8MQquAH5HNh67SxKj9KiPvZGKx1QOXviYa7oMKMXoFfSyAGDu1J86vyRYwViM517cTmd8QbE5uR0g60FyrUNqIEKhGwL2f7S_lG-SEG80zbcJ_8EoB0SxA94usXwuXdDwBmqpDEf3DtcwGimj8-UQLsLm76tfBUzVzWxwWVuoALiLSJQBVTNkv59pan43mp-bv1GcRL8Aj9dpX4JN7-DLxd7_XHTe7rduWOvDQ_4cO6NG3iAdA-UdyH0HuLNReLgmtqZsHLDAah6A6pe_31c_50_noeFWmxeGC1zM7lp7BsZGEPHaKQ9jPLA6HtWutVKhtldtpm9xUe2YW68ePEO4ofFi99ZL2rKuCniQkZcrrN1ci_WKeVRVxZ1XreJpKTN8yyL6yLO11yIVmaqJcVppEsSlIhUrInWJPKVSuM8p6StE8mqUQUkgo9Sm9UUvGnRSHs_clmILM8jI2s2fo4o0RRCIJrCes3pePCQCKN98B8EQQczx3oGpHt8vs3bNztG42DKm9vXoRvrlXJHoGpiXx53_eBeWQWgap7VA1XzuH8CAAD__4C_VuY">