[llvm] update madmixpat mod (PR #159648)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 18 13:39: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 origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
``````````

: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/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
index dd31778e0..a6ca086e3 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -4046,7 +4046,7 @@ bool AMDGPUDAGToDAGISel::SelectVOP3PMadMixModsImpl(SDValue In, SDValue &Src,
   if (Src.getOpcode() == ISD::FP_EXTEND) {
     Src = Src.getOperand(0);
   } else if (Src.getOpcode() == ISD::TRUNCATE &&
-      Src.getOperand(0).getValueType() == MVT::i32) {
+             Src.getOperand(0).getValueType() == MVT::i32) {
     // Prevent unnecessary subreg COPY to VGPR_16
     Src = Src.getOperand(0);
   } else if (SDValue FP16 = match16FPExtendLike(Src, IsExtractHigh)) {
@@ -4080,16 +4080,16 @@ bool AMDGPUDAGToDAGISel::SelectVOP3PMadMixModsImpl(SDValue In, SDValue &Src,
 
   Mods |= SISrcMods::OP_SEL_1;
   if (Src.getValueSizeInBits() == 16) {
-	  if (Subtarget->useRealTrue16Insts())
-		  // In true16 mode, create a Src32 with 16bit src
-		  Src = createVOP3PSrc32From16Lo(Src, In, CurDAG, Subtarget);
-	  else if (isExtractHiElt(Src, Src)) {
-		Mods |= SISrcMods::OP_SEL_0;
-
-		// TODO: Should we try to look for neg/abs here?
-	  }
+    if (Subtarget->useRealTrue16Insts())
+      // In true16 mode, create a Src32 with 16bit src
+      Src = createVOP3PSrc32From16Lo(Src, In, CurDAG, Subtarget);
+    else if (isExtractHiElt(Src, Src)) {
+      Mods |= SISrcMods::OP_SEL_0;
+
+      // TODO: Should we try to look for neg/abs here?
+    }
   } else if (Src.getValueSizeInBits() == 32 && IsExtractHigh)
-	  Mods |= SISrcMods::OP_SEL_0;
+    Mods |= SISrcMods::OP_SEL_0;
 
   return true;
 }

``````````

</details>


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


More information about the llvm-commits mailing list