[llvm] [VectorCombine] foldShuffleToIdentity - handle bitcasts with equal element counts (PR #97731)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 07:00:17 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 d43ec97de081755990264049eba09cb7c83cb321 e776e81a98b469a1f786f9ef7e6c9309028d57db -- llvm/lib/Transforms/Vectorize/VectorCombine.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index fa475d945c..a748e7c4ef 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -1929,7 +1929,8 @@ bool VectorCombine::foldShuffleToIdentity(Instruction &I) {
// TODO: Handle vector widening/narrowing bitcasts.
auto *DstTy = dyn_cast<FixedVectorType>(BitCast->getDestTy());
auto *SrcTy = dyn_cast<FixedVectorType>(BitCast->getSrcTy());
- if (DstTy && SrcTy && SrcTy->getNumElements() == DstTy->getNumElements()) {
+ if (DstTy && SrcTy &&
+ SrcTy->getNumElements() == DstTy->getNumElements()) {
Worklist.push_back(generateInstLaneVectorFromOperand(Item, 0));
continue;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/97731
More information about the llvm-commits
mailing list