================
@@ -928,6 +973,19 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned 
BuiltinID,
 
     return handleHlslWaveActiveBallot(*this, E);
   }
+  case Builtin::BI__builtin_hlsl_wave_active_bit_or: {
+    Value *Op = EmitScalarExpr(E->getArg(0));
+    assert(Op->getType()->isIntegerTy() &&
+           "Intrinsic WaveActiveBitOr operand must be an integer type");
+
+    Intrinsic::ID IID = getWaveBitOpIntrinsic(
----------------
farzonl wrote:

I've been looking at this and there really is no reason to add OpKind. it isn't 
a parameter we need to pass on to the intrinsic and it doesn't really reduce 
the amount of code we have to write either. you already have a builtin in 
`BI__builtin_hlsl_wave_active_bit_or` that tells you exactly what intrinsic you 
need to generate. the only toggling should be for target nothing else.

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