[clang] [llvm] [HLSL] Add WaveActiveBitOr HLSL function (PR #178056)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 29 16:01:32 PST 2026
================
@@ -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
More information about the cfe-commits
mailing list