From 7459ff4be22e92efdd89884a7c2a0ca63904998d Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Mon, 17 Jun 2013 17:22:40 +0000 Subject: [PATCH] Disable vectorization for -Oz. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184089 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/PassManagerBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/IPO/PassManagerBuilder.cpp b/lib/Transforms/IPO/PassManagerBuilder.cpp index 0ad45ec1bf2..20aad6fa73a 100644 --- a/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -192,7 +192,7 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) { MPM.add(createLoopIdiomPass()); // Recognize idioms like memset. MPM.add(createLoopDeletionPass()); // Delete dead loops - if (LoopVectorize && (OptLevel > 1)) + if (LoopVectorize && OptLevel > 1 && SizeLevel < 2) MPM.add(createLoopVectorizePass()); if (!DisableUnrollLoops)