Skip to content

Commit b77c079

Browse files
committed
Revert "[SLP]Fix PR85082: PHI node has multiple entries."
This reverts commit 59ff907 to fix crash revealed in https://lab.llvm.org/buildbot/#/builders/198/builds/8881
1 parent 3d45d8b commit b77c079

File tree

2 files changed

+5
-80
lines changed

2 files changed

+5
-80
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12592,11 +12592,6 @@ Value *BoUpSLP::vectorizeTree(
1259212592
} else {
1259312593
Ex = Builder.CreateExtractElement(Vec, Lane);
1259412594
}
12595-
// If necessary, sign-extend or zero-extend ScalarRoot
12596-
// to the larger type.
12597-
if (Scalar->getType() != Ex->getType())
12598-
Ex = Builder.CreateIntCast(Ex, Scalar->getType(),
12599-
MinBWs.find(E)->second.second);
1260012595
if (auto *I = dyn_cast<Instruction>(Ex))
1260112596
ScalarToEEs[Scalar].try_emplace(Builder.GetInsertBlock(), I);
1260212597
}
@@ -12606,6 +12601,11 @@ Value *BoUpSLP::vectorizeTree(
1260612601
GatherShuffleExtractSeq.insert(ExI);
1260712602
CSEBlocks.insert(ExI->getParent());
1260812603
}
12604+
// If necessary, sign-extend or zero-extend ScalarRoot
12605+
// to the larger type.
12606+
if (Scalar->getType() != Ex->getType())
12607+
return Builder.CreateIntCast(Ex, Scalar->getType(),
12608+
MinBWs.find(E)->second.second);
1260912609
return Ex;
1261012610
}
1261112611
assert(isa<FixedVectorType>(Scalar->getType()) &&

llvm/test/Transforms/SLPVectorizer/X86/same-scalar-in-same-phi-extract.ll

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)