[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)
Finn Plummer via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 7 14:21:53 PST 2024
================
@@ -1762,6 +1765,37 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg,
return Result;
}
+bool SPIRVInstructionSelector::selectWaveActiveCountBits(
+ Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const {
+ assert(I.getNumOperands() == 3);
+ assert(I.getOperand(2).isReg());
+ MachineBasicBlock &BB = *I.getParent();
+
+ Register BallotReg = MRI->createVirtualRegister(&SPIRV::IDRegClass);
----------------
inbelic wrote:
Good catch. Changed to using `GR.getRegClass(BallotType)`.
https://github.com/llvm/llvm-project/pull/113382
More information about the cfe-commits
mailing list