diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp index 4f95eaba8de7b..04d79b5bdaf87 100644 --- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp +++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp @@ -1734,15 +1734,14 @@ bool VectorCombine::run() { // This transform works with scalable and fixed vectors // TODO: Identify and allow other scalable transforms - if (isa(I.getType())) + if (isa(I.getType())) { MadeChange |= scalarizeBinopOrCmp(I); + MadeChange |= scalarizeLoadExtract(I); + } if (Opcode == Instruction::Store) MadeChange |= foldSingleElementStore(I); - if (isa(I.getType()) && Opcode == Instruction::Load) - MadeChange |= scalarizeLoadExtract(I); - // If this is an early pipeline invocation of this pass, we are done. if (TryEarlyFoldsOnly) return;