[llvm] [AMDGPU] Swap V_CNDMASK operands to shrink it into VOP2 (PR #135162)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 15 09:02:07 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 e5672f8d5..a466424cb 100644
--- a/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
+++ b/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp
@@ -973,8 +973,9 @@ bool SIShrinkInstructions::shouldSwapCndOperands(
if (!Src1Imm && Src0Imm)
InstsToSwap--;
- else if (Src1Imm && !Src0Imm &&
- UseInst->getOperand(1).getImm() == SISrcMods::NONE && TRI->isVGPR(*MRI, Src0.getReg()))
+ else if (Src1Imm && !Src0Imm &&
+ UseInst->getOperand(1).getImm() == SISrcMods::NONE &&
+ TRI->isVGPR(*MRI, Src0.getReg()))
InstsToSwap++;
}
return (InstsToSwap > 0);
``````````
</details>
https://github.com/llvm/llvm-project/pull/135162
More information about the llvm-commits
mailing list