[clang] [llvm] [HLSL][DXIL][SPIRV] WavePrefixSum intrinsic support (PR #167946)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 05:55:48 PST 2025
================
@@ -276,6 +276,29 @@ llvm::Triple::ArchType CGHLSLRuntime::getArch() {
return CGM.getTarget().getTriple().getArch();
}
+llvm::Intrinsic::ID
+CGHLSLRuntime::getUnsignedIntrinsicVariant(llvm::Intrinsic::ID IID) {
----------------
kcloudy0717 wrote:
My reasoning for this approach was that certain DXIL intrinsics doesn't have 1:1 mapping to SPIRV intrinsics. `WaveActiveSum` and `WavePrefixSum` (this PR) have both `usum` and `sum` DXIL intrinsics but in SPIRV is just `sum`. I was trying to come up with a proper solution that could fix all the static functions to get the intrinsics in `CGHLSLBuiltins.cpp`
https://github.com/llvm/llvm-project/pull/167946
More information about the llvm-commits
mailing list