================
@@ -329,6 +329,51 @@ static Intrinsic::ID 
getFirstBitHighIntrinsic(CGHLSLRuntime &RT, QualType QT) {
   return RT.getFirstBitUHighIntrinsic();
 }
 
+// select and return a specific wave bit op intrinsic,
+// based on the provided op kind.
+// OpKinds:
+// And = 0, bitwise and of values
+// Or = 1,  bitwise or of values
+// Xor = 2, bitwise xor of values
+static Intrinsic::ID getWaveBitOpIntrinsic(int OpKind,
+                                           llvm::Triple::ArchType Arch,
+                                           CGHLSLRuntime &RT, QualType QT) {
+  switch (Arch) {
+  case llvm::Triple::spirv:
+    switch (OpKind) {
+
+    case 0:
+    case 2: {
+      llvm_unreachable("Not implemented yet!");
+    }
+    case 1: {
+      return Intrinsic::spv_wave_bit_or;
+    }
+    default: {
----------------
tex3d wrote:

Why the extra scope `{}` around single statement `llvm_unreachable` or `return`?

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

Reply via email to