[llvm] [DirectX][DXIL] Distinguish return type for overload type resolution. (PR #85646)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 18 10:58:46 PDT 2024
================
@@ -44,7 +44,12 @@ static void lowerIntrinsic(dxil::OpCode DXILOp, Function &F, Module &M) {
Args.emplace_back(DXILOpArg);
Args.append(CI->arg_begin(), CI->arg_end());
B.SetInsertPoint(CI);
- CallInst *DXILCI = DXILB.createDXILOpCall(DXILOp, OverloadTy, CI->args());
+ // Return type of F may be different from that of its arguments.
+ // It may not correspond to any overload type (if one exists) of the
+ // parameters. Pass the return type and overload type separately to handle
+ // such situations.
----------------
bogner wrote:
I'm not convinced this comment really adds anything here - it describes why the API is the way it is, but why describe that at some random caller? *If* this is worth keeping it's probably better as API doc on the `createDXILOpCall` method, but I personally think it's pretty clear why it's there and this is just commentary that belongs in the commit message.
https://github.com/llvm/llvm-project/pull/85646
More information about the llvm-commits
mailing list