-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reland "[Vectorize] Fix warnings"" #105772
Reland "[Vectorize] Fix warnings"" #105772
Conversation
This reverts commit 1519451.
@llvm/pr-subscribers-llvm-transforms Author: Vitaly Buka (vitalybuka) ChangesReverts llvm/llvm-project#105771 Full diff: https://github.com/llvm/llvm-project/pull/105772.diff 1 Files Affected:
diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index afaef6f9da9872..e8ab6839d9fa87 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -9297,7 +9297,7 @@ class BoUpSLP::ShuffleCostEstimator : public BaseShuffleAnalysis {
for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
if (CommonMask[Idx] != PoisonMaskElem)
CommonMask[Idx] = Idx;
- for (const auto [E, Idx] : SubVectors) {
+ for (const auto &[E, Idx] : SubVectors) {
Cost += ::getShuffleCost(
TTI, TTI::SK_InsertSubvector,
FixedVectorType::get(ScalarTy, CommonMask.size()), std::nullopt,
@@ -12455,7 +12455,7 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
for (unsigned Idx = 0, Sz = CommonMask.size(); Idx < Sz; ++Idx)
if (CommonMask[Idx] != PoisonMaskElem)
CommonMask[Idx] = Idx;
- for (const auto [E, Idx] : SubVectors) {
+ for (const auto &[E, Idx] : SubVectors) {
Vec = Builder.CreateInsertVector(
Vec->getType(), Vec, E->VectorizedValue, Builder.getInt64(Idx));
if (!CommonMask.empty()) {
@@ -12636,7 +12636,7 @@ ResTy BoUpSLP::processBuildVector(const TreeEntry *E, Type *ScalarTy,
E->ReuseShuffleIndices.end());
SmallVector<Value *> GatheredScalars(E->Scalars.begin(), E->Scalars.end());
// Clear values, to be replaced by insertvector instructions.
- for (const auto [EIdx, Idx] : E->CombinedEntriesWithIndices)
+ for (const auto &[EIdx, Idx] : E->CombinedEntriesWithIndices)
for_each(MutableArrayRef(GatheredScalars)
.slice(Idx, VectorizableTree[EIdx]->getVectorFactor()),
[&](Value *&V) { V = PoisonValue::get(V->getType()); });
@@ -13073,7 +13073,7 @@ ResTy BoUpSLP::processBuildVector(const TreeEntry *E, Type *ScalarTy,
}
Value *BoUpSLP::createBuildVector(const TreeEntry *E, Type *ScalarTy) {
- for (const auto [EIdx, _] : E->CombinedEntriesWithIndices)
+ for (const auto &[EIdx, _] : E->CombinedEntriesWithIndices)
(void)vectorizeTree(VectorizableTree[EIdx].get(), /*PostponedPHIs=*/false);
return processBuildVector<ShuffleInstructionBuilder, Value *>(E, ScalarTy,
Builder, *this);
|
@kazutakahirata Sorry for the noise, there was a verbal claim that this patch crashes compiler, and I didn't verified the the claim. |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/4484 Here is the relevant piece of the build log for the reference:
|
Revert was wrong, The bot is still broken https://lab.llvm.org/buildbot/#/builders/51/builds/2838 Reverts llvm#105771
Revert was wrong, The bot is still broken https://lab.llvm.org/buildbot/#/builders/51/builds/2838 Reverts llvm#105771
Revert was wrong,
The bot is still broken https://lab.llvm.org/buildbot/#/builders/51/builds/2838
Reverts #105771