================
@@ -299,9 +299,20 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned 
BuiltinID,
     // (llvm/llvm-project#135452)
     Value *NonUniform =
         llvm::ConstantInt::get(llvm::Type::getInt1Ty(getLLVMContext()), false);
-    return Builder.CreateIntrinsic(
-        HandleTy, CGM.getHLSLRuntime().getCreateHandleFromBindingIntrinsic(),
-        ArrayRef<Value *>{SpaceOp, RegisterOp, RangeOp, IndexOp, NonUniform});
+
+    Intrinsic::ID IID =
+        CGM.getHLSLRuntime().getCreateHandleFromBindingIntrinsic();
+    // SPIR-V intrinsic does not have include the resource name
+    if (IID == Intrinsic::spv_resource_handlefrombinding)
----------------
bogner wrote:

Can we do this more generically? Either by checking the argument list of the 
intrinsic function or by specializing getCreateHandleFromBindingIntrinsic to 
report if it has a name in the signature?

https://github.com/llvm/llvm-project/pull/139991
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to