[llvm] [CGP]: Optimize mul.overflow. (PR #148343)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 9 04:00:56 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,h -- llvm/include/llvm/CodeGen/TargetLowering.h llvm/lib/CodeGen/CodeGenPrepare.cpp llvm/lib/Target/AArch64/AArch64ISelLowering.h
``````````

: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/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index f85976c49..c8bfbf3e7 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -6504,7 +6504,7 @@ bool CodeGenPrepare::optimizeMulWithOverflow(Instruction *I, bool IsSigned,
 
   // BB overflow.no:
   Builder.SetInsertPoint(NoOverflowBB);
-    Value *ExtLoLHS, *ExtLoRHS;
+  Value *ExtLoLHS, *ExtLoRHS;
   if (IsSigned) {
     ExtLoLHS = Builder.CreateSExt(LoLHS, Ty, "lo.lhs.ext");
     ExtLoRHS = Builder.CreateSExt(LoRHS, Ty, "lo.rhs.ext");

``````````

</details>


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


More information about the llvm-commits mailing list