[llvm] [LV] Add initial support for vectorizing literal struct return values (PR #109833)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 24 10:23:33 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 7773243d9916f98ba0ffce0c3a960e4aa9f03e81 59b3fa9c65610bb1bf6d599e44aef93e80027069 --extensions cpp,h -- llvm/include/llvm/IR/VectorUtils.h llvm/lib/IR/VectorUtils.cpp llvm/include/llvm/Analysis/VectorUtils.h llvm/include/llvm/CodeGen/BasicTTIImpl.h llvm/include/llvm/IR/DerivedTypes.h llvm/lib/Analysis/VectorUtils.cpp llvm/lib/IR/Type.cpp llvm/lib/IR/VFABIDemangler.cpp llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp llvm/lib/Transforms/Vectorize/LoopVectorize.cpp llvm/lib/Transforms/Vectorize/VPlan.cpp llvm/lib/Transforms/Vectorize/VPlan.h llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
index 00ebd7d3c9..a0df39a875 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -945,7 +945,7 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
// Check that the instruction return type is vectorizable.
// We can't vectorize casts from vector type to scalar type.
// Also, we can't vectorize extractelement instructions.
- Type* InstTy = I.getType();
+ Type *InstTy = I.getType();
if (!(InstTy->isVoidTy() || canWidenType(InstTy)) ||
(isa<CastInst>(I) &&
!VectorType::isValidElementType(I.getOperand(0)->getType())) ||
``````````
</details>
https://github.com/llvm/llvm-project/pull/109833
More information about the llvm-commits
mailing list