[llvm] [SPIRV] Add bitreverse emulation (PR #186412)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 09:47:54 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
index 544e99c80..1d875ba16 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
@@ -193,7 +193,7 @@ private:
MachineInstr &I, Register Op) const;
bool selectBitreverseNative(Register ResVReg, SPIRVTypeInst ResType,
- MachineInstr &I, Register Op) const;
+ MachineInstr &I, Register Op) const;
bool selectBuildVector(Register ResVReg, SPIRVTypeInst ResType,
MachineInstr &I) const;
@@ -3240,9 +3240,9 @@ bool SPIRVInstructionSelector::selectBitreverse16(Register ResVReg,
}
bool SPIRVInstructionSelector::selectBitreverseNative(Register ResVReg,
- SPIRVTypeInst ResType,
- MachineInstr &I,
- Register Op) const {
+ SPIRVTypeInst ResType,
+ MachineInstr &I,
+ Register Op) const {
MachineBasicBlock &BB = *I.getParent();
BuildMI(BB, I, I.getDebugLoc(), TII.get(SPIRV::OpBitReverse))
.addDef(ResVReg)
``````````
</details>
https://github.com/llvm/llvm-project/pull/186412
More information about the llvm-commits
mailing list