[llvm] [VP] Refactoring some functions in ExpandVectorPredication.NFC (PR #115840)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 12 01:48:25 PST 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 e855feac41fd89aebf540a155d21f12a3e82f05b 15035370ecde6b272f03e18c57b171d4a90d3f77 --extensions cpp -- llvm/lib/CodeGen/ExpandVectorPredication.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/ExpandVectorPredication.cpp b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
index 4bba64653c..1e2679ad7c 100644
--- a/llvm/lib/CodeGen/ExpandVectorPredication.cpp
+++ b/llvm/lib/CodeGen/ExpandVectorPredication.cpp
@@ -287,8 +287,8 @@ CachingVPExpander::expandPredicationInBinaryOperator(IRBuilder<> &Builder,
   return NewBinOp;
 }
 
-Value *CachingVPExpander::expandPredicationToIntCall(
-    IRBuilder<> &Builder, VPIntrinsic &VPI) {
+Value *CachingVPExpander::expandPredicationToIntCall(IRBuilder<> &Builder,
+                                                     VPIntrinsic &VPI) {
   std::optional<unsigned> FID = VPI.getFunctionalIntrinsicID();
   if (!FID)
     return nullptr;
@@ -296,8 +296,7 @@ Value *CachingVPExpander::expandPredicationToIntCall(
   for (unsigned i = 0; i < VPI.getNumOperands() - 2; i++) {
     Argument.push_back(VPI.getOperand(i));
   }
-  Value *NewOp = Builder.CreateIntrinsic(FID.value(),
-                                         {VPI.getType()}, Argument,
+  Value *NewOp = Builder.CreateIntrinsic(FID.value(), {VPI.getType()}, Argument,
                                          /*FMFSource=*/nullptr, VPI.getName());
   replaceOperation(*NewOp, VPI);
   return NewOp;

``````````

</details>


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


More information about the llvm-commits mailing list