[llvm] [NFC][IR] Add CreateCountTrailingZeroElems helper (PR #106711)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 30 04:09:16 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 3d2fd31c8f362b1054985197a65194fcbbca57bb 092349da1cebf1ebf8ffecc6dbe5b190b45dd0f5 --extensions cpp,h -- llvm/include/llvm/IR/IRBuilder.h llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
index 45c0eae29c..7af7408ed6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
@@ -470,8 +470,7 @@ Value *LoopIdiomVectorize::createMaskedFindMismatch(
VectorFoundIndex->addIncoming(VectorIndexPhi, VectorLoopStartBlock);
Value *PredMatchCmp = Builder.CreateAnd(LastLoopPred, FoundPred);
- Value *Ctz =
- Builder.CreateCountTrailingZeroElems(ResType, PredMatchCmp);
+ Value *Ctz = Builder.CreateCountTrailingZeroElems(ResType, PredMatchCmp);
Ctz = Builder.CreateZExt(Ctz, I64Type);
Value *VectorLoopRes64 = Builder.CreateAdd(VectorFoundIndex, Ctz, "",
/*HasNUW=*/true, /*HasNSW=*/true);
``````````
</details>
https://github.com/llvm/llvm-project/pull/106711
More information about the llvm-commits
mailing list