[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

Vyacheslav Levytskyy via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 02:32:08 PST 2025


================
@@ -6757,6 +6757,8 @@ static Value *EmitTargetArchBuiltinExpr(CodeGenFunction *CGF,
   case llvm::Triple::riscv32:
   case llvm::Triple::riscv64:
     return CGF->EmitRISCVBuiltinExpr(BuiltinID, E, ReturnValue);
+  case llvm::Triple::spirv:
+    return CGF->EmitSPIRVBuiltinExpr(BuiltinID, E);
----------------
VyacheslavLevytskyy wrote:

@farzonl @michalpaszkowski I wonder should we extend this new approach to OpenCL as well?

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


More information about the llvm-commits mailing list