================
@@ -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;
----------------
KungFuDonkey wrote:

That is because of the conditional for unsigned integers (min vs umin). We'd 
need to add a macro that can do that, but this would for instance not handle 
the Sum, which would need its own macro...

I'd rather not try to figure that out here

https://github.com/llvm/llvm-project/pull/164385
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to