[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87171)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 30 16:24:44 PDT 2024
================
@@ -18176,12 +18177,30 @@ Intrinsic::ID getDotProductIntrinsic(QualType QT, int elementCount) {
return Intrinsic::dx_udot;
}
+Intrinsic::ID getAllIntrinsic(const llvm::Triple::ArchType Arch) {
----------------
farzonl wrote:
this is a simple memchanism since we are only doing one intrinsic.
Long term EmitHLSLBuiltinExpr may need to invoke a map using `llvm::Triple::ArchType Arch` ie a arch map of intrinsic maps. righting the same switch statement over and over again to pick the right intrinsics could become tedious.
```
spv_intrinsic = archMap[llvm::Triple::spirv][Builtin::BI__builtin_hlsl_elementwise_all] --> Intrinsic::spv_all;
dx_intrinsic = archMap[llvm::Triple::dxil][Builtin::BI__builtin_hlsl_elementwise_all] --> Intrinsic::dx_all;
```
https://github.com/llvm/llvm-project/pull/87171
More information about the cfe-commits
mailing list