[llvm] [NFC][SPIRV] Rename `selectSelectDefaultArgs` to `selectExtendBool` (PR #184120)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 4 04:04:38 PST 2026
================
@@ -266,8 +266,8 @@ class SPIRVInstructionSelector : public InstructionSelector {
bool selectSelect(Register ResVReg, SPIRVTypeInst ResType,
MachineInstr &I) const;
- bool selectSelectDefaultArgs(Register ResVReg, SPIRVTypeInst ResType,
- MachineInstr &I, bool IsSigned) const;
+ bool selectExtendBool(Register ResVReg, SPIRVTypeInst ResType,
----------------
jmmartinez wrote:
I don't agree. This code is not generating code for a generic "int select" pattern.
As far as I understand, this function is used to generate the code that casts a `bool` or `<bool x N>` into a `int/unsigned` or `<int/unsigned x N>`. It is implemented using `OpSelectSISCond/OpSelectVIVCond`, but that is an implementation detail that could change.
What do you think about this name (and adding the boolean register as a parameter):
```cpp
bool generateCastBoolToInt(Register ResVReg, SPIRVTypeInst ResType, bool IsSigned, Register BooleanSrcVReg, MachineInstr &InsertAt) const;
```
https://github.com/llvm/llvm-project/pull/184120
More information about the llvm-commits
mailing list