Skip to content

Commit 87143ff

Browse files
committed
[VectorCombine] Fix a spot in commit 068357d
My previous commit leads to a crash in "Builders/sanitizer-x86_64-linux-fast" as https://lab.llvm.org/buildbot/#/builders/5/builds/36746. And this patch fixes it.
1 parent 5eabbde commit 87143ff

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1734,15 +1734,14 @@ bool VectorCombine::run() {
17341734

17351735
// This transform works with scalable and fixed vectors
17361736
// TODO: Identify and allow other scalable transforms
1737-
if (isa<VectorType>(I.getType()))
1737+
if (isa<VectorType>(I.getType())) {
17381738
MadeChange |= scalarizeBinopOrCmp(I);
1739+
MadeChange |= scalarizeLoadExtract(I);
1740+
}
17391741

17401742
if (Opcode == Instruction::Store)
17411743
MadeChange |= foldSingleElementStore(I);
17421744

1743-
if (isa<VectorType>(I.getType()) && Opcode == Instruction::Load)
1744-
MadeChange |= scalarizeLoadExtract(I);
1745-
17461745
// If this is an early pipeline invocation of this pass, we are done.
17471746
if (TryEarlyFoldsOnly)
17481747
return;

0 commit comments

Comments
 (0)