[llvm] AMDGPU][True16][CodeGen] fold clamp update for true16 (PR #128919)

via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 8 18:43:28 PST 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 85d60a441ab810e25605fb4555971b1d0a996e5c 0789fcf6150c5af82f6c1b0a0616f1be9220f65e --extensions cpp -- llvm/lib/Target/AMDGPU/SIFoldOperands.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 db9305cdea..d915f5c518 100644
--- a/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
+++ b/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
@@ -1823,9 +1823,9 @@ bool SIFoldOperandsImpl::tryFoldClamp(MachineInstr &MI) {
   MachineOperand *DefSrc = lookUpCopyChain(*TII, *MRI, ClampSrc->getReg());
   MachineInstr *Def = nullptr;
   if (DefSrc && DefSrc->isReg() && !DefSrc->isImm())
-	  Def = MRI->getVRegDef(DefSrc->getReg());
+    Def = MRI->getVRegDef(DefSrc->getReg());
   else
-	  Def = MRI->getVRegDef(ClampSrc->getReg());
+    Def = MRI->getVRegDef(ClampSrc->getReg());
 
   // The type of clamp must be compatible.
   if (TII->getClampMask(*Def) != TII->getClampMask(MI))

``````````

</details>


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


More information about the llvm-commits mailing list