[llvm] [AMDGPU] Simplify commuted operand handling. NFCI. (PR #71965)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 10 09:57:16 PST 2023
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 2bac7201018dcab549895c30c0eb26bee45d842f cd283f02bb24415b849b0cbf3bdbf1f9cf71711b -- llvm/lib/Target/AMDGPU/SIFoldOperands.cpp llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
index 3f7126c156c7..3ee4b99e69cd 100644
--- a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -448,8 +448,7 @@ bool SIFoldOperands::tryAddToFoldList(SmallVectorImpl<FoldCandidate> &FoldList,
int Op32 = -1;
if (!TII->isOperandLegal(*MI, CommuteOpNo, OpToFold)) {
- if ((Opc != AMDGPU::V_ADD_CO_U32_e64 &&
- Opc != AMDGPU::V_SUB_CO_U32_e64 &&
+ if ((Opc != AMDGPU::V_ADD_CO_U32_e64 && Opc != AMDGPU::V_SUB_CO_U32_e64 &&
Opc != AMDGPU::V_SUBREV_CO_U32_e64) || // FIXME
(!OpToFold->isImm() && !OpToFold->isFI() && !OpToFold->isGlobal())) {
TII->commuteInstruction(*MI, false, OpNo, CommuteOpNo);
``````````
</details>
https://github.com/llvm/llvm-project/pull/71965
More information about the llvm-commits
mailing list