[llvm] revive the optimiation of and/or with immediate value (PR #136169)

via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 17 10:41:53 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
index 7e1d8a01d..a012b15b6 100644
--- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -568,7 +568,7 @@ bool SIShrinkInstructions::shrinkScalarLogicOp(MachineInstr &MI) const {
 
   if (NewImm != 0) {
     if (Dest->getReg().isVirtual() && SrcReg->isReg()) {
-      if(SrcReg->getSubReg() == 0) { // get worse result with subreg. FIXME
+      if (SrcReg->getSubReg() == 0) { // get worse result with subreg. FIXME
         MRI->setSimpleHint(Dest->getReg(), AMDGPU::FLAT_SCR);
         MRI->setSimpleHint(SrcReg->getReg(), AMDGPU::FLAT_SCR);
       }

``````````

</details>


https://github.com/llvm/llvm-project/pull/136169


More information about the llvm-commits mailing list