Issue 81047
Summary Overload resolution should promote 16-bit types
Labels HLSL
Assignees llvm-beanz
Reporter llvm-beanz
    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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to