Skip to content

Commit 92cc299

Browse files
authored
Fix 7f17639
This should hopefully fix issues with 7f17639, at the very least Julia tests pass.
1 parent af93c5a commit 92cc299

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13895,7 +13895,7 @@ Value *BoUpSLP::vectorizeTree(
1389513895
if (const TreeEntry *ETE = getTreeEntry(V))
1389613896
V = ETE->VectorizedValue;
1389713897
if (auto *IV = dyn_cast<Instruction>(V);
13898-
!IV || IV == Vec || IV->comesBefore(cast<Instruction>(Vec)))
13898+
!IV || IV == Vec || (IV->getParent() == cast<Instruction>(Vec)->getParent() && IV->comesBefore(cast<Instruction>(Vec))))
1389913899
Ex = Builder.CreateExtractElement(V, ES->getIndexOperand());
1390013900
else
1390113901
Ex = Builder.CreateExtractElement(Vec, Lane);

0 commit comments

Comments
 (0)