[clang] [llvm] [HLSL] Implement elementwise firstbitlow builtin (PR #116858)
Sarah Spall via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 14:41:14 PST 2024
================
@@ -96,15 +96,20 @@ class SPIRVInstructionSelector : public InstructionSelector {
bool selectFirstBitHigh(Register ResVReg, const SPIRVType *ResType,
MachineInstr &I, bool IsSigned) const;
- bool selectFirstBitHigh16(Register ResVReg, const SPIRVType *ResType,
- MachineInstr &I, bool IsSigned) const;
+ bool selectFirstBitLow(Register ResVReg, const SPIRVType *ResType,
+ MachineInstr &I) const;
+
+ bool selectFirstBitSet16(Register ResVReg, const SPIRVType *ResType,
+ MachineInstr &I, unsigned ExtendOpcode,
+ unsigned BitSetOpcode) const;
- bool selectFirstBitHigh32(Register ResVReg, const SPIRVType *ResType,
- MachineInstr &I, Register SrcReg,
- bool IsSigned) const;
+ bool selectFirstBitSet32(Register ResVReg, const SPIRVType *ResType,
+ MachineInstr &I, Register SrcReg,
+ unsigned Opcode) const;
----------------
spall wrote:
Nit: rename this to be BitSetOpcode to match the other functions?
https://github.com/llvm/llvm-project/pull/116858
More information about the llvm-commits
mailing list