================
@@ -225,6 +215,25 @@ static Intrinsic::ID
getWaveActiveMaxIntrinsic(llvm::Triple::ArchType Arch,
}
}
+// Return wave active min that corresponds to the QT scalar type
+static Intrinsic::ID getWaveActiveMinIntrinsic(llvm::Triple::ArchType Arch,
+ CGHLSLRuntime &RT, QualType QT)
{
+ switch (Arch) {
+ case llvm::Triple::spirv:
+ if (QT->isUnsignedIntegerType())
+ return Intrinsic::spv_wave_reduce_umin;
----------------
s-perron wrote:
Is there a reason we cannot use a macro like these:
https://github.com/llvm/llvm-project/blob/88d303e6d42a17a5b1789f6f4b3a1b4ee98b5bf7/clang/lib/CodeGen/CGHLSLRuntime.h#L87.
That could simplify the logic there.
https://github.com/llvm/llvm-project/pull/164385
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits