[llvm] [DirectX][DXIL] Distinguish return type for overload type resolution. (PR #85646)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 09:11:26 PDT 2024


================
@@ -398,10 +398,13 @@ static void emitDXILOperationTable(std::vector<DXILOperationDesc> &Ops,
 
   OS << "  static const OpCodeProperty OpCodeProps[] = {\n";
   for (auto &Op : Ops) {
+    // If no overload parameter exists, treat the return type as overload
+    // parameter to emit the appropriate overload kind enum.
+    auto OLParamIdx = (Op.OverloadParamIndex < 0) ? 0 : Op.OverloadParamIndex;
----------------
llvm-beanz wrote:

Is this correct? I think the overload parameter index is always effectively parameter 1. That may match the return type in many cases, but it should always match parameter 1.

https://github.com/llvm/llvm-project/pull/85646


More information about the llvm-commits mailing list