[llvm] UMULH example (PR #161224)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 09:27:20 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/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp llvm/lib/Transforms/Vectorize/VPlanTransforms.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/Transforms/Vectorize/VPlanRecipes.cpp b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
index 53f97f232..739258313 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
@@ -896,7 +896,8 @@ Value *VPInstruction::generate(VPTransformState &State) {
   case VPInstruction::UMulh: {
     Value *A = State.get(getOperand(0));
     Value *B = State.get(getOperand(1));
-    Type *DblTy = A->getType()->getWithNewBitWidth(A->getType()->getScalarSizeInBits()*2);
+    Type *DblTy = A->getType()->getWithNewBitWidth(
+        A->getType()->getScalarSizeInBits() * 2);
     return Builder.CreateTrunc(
         Builder.CreateLShr(
             Builder.CreateMul(Builder.CreateZExt(A, DblTy),

``````````

</details>


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


More information about the llvm-commits mailing list