[llvm] [InstCombine] Add one-use limitation to box multiply fold (PR #72876)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 23:47:31 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 c4c52d4199e13125fd9560f9f3b2d8a6bf2582f2 76097e23f035d2c3e12fa20ea5edd00f1a43f86f -- llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
index e7e9dfdb7a..fb4e74e5b0 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
@@ -1405,7 +1405,7 @@ static Instruction *foldBoxMultiply(BinaryOperator &I) {
   // ResLo = (CrossSum << HalfBits) + (YLo * XLo)
   Value *XLo, *YLo;
   Value *CrossSum;
-  
+
   // Checking the operands of I is used in no more than one place,
   // which can not be deleted, cause a mul instruction has far more weight than
   // add and shl instruction in IR, thus this method cannot achieve the goal of

``````````

</details>


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


More information about the llvm-commits mailing list