[llvm] [LegalizeTypes] Reuse Op1 and Op2 variables to hold promoted values in PromoteIntRes_ADDSUBSHLSAT. NFC (PR #102840)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 11 18:08:42 PDT 2024


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 e2f9c1853349a5dc86ccd0e85e09af245c418aa8 17a0407a190fb1e5f30810d4d91370088234f538 --extensions cpp -- llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
index 27c8d7460d..0806de4efb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
@@ -1075,8 +1075,7 @@ SDValue DAGTypeLegalizer::PromoteIntRes_ADDSUBSHLSAT(SDNode *N) {
   if (Opcode == ISD::UADDSAT) {
     APInt MaxVal = APInt::getLowBitsSet(NewBits, OldBits);
     SDValue SatMax = DAG.getConstant(MaxVal, dl, PromotedType);
-    SDValue Add =
-        matcher.getNode(ISD::ADD, dl, PromotedType, Op1, Op2);
+    SDValue Add = matcher.getNode(ISD::ADD, dl, PromotedType, Op1, Op2);
     return matcher.getNode(ISD::UMIN, dl, PromotedType, Add, SatMax);
   }
 

``````````

</details>


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


More information about the llvm-commits mailing list