forked from OSchip/llvm-project
[NPM][opt] Run -O# after other passes in legacy PM compatibility mode
Generally tests run -O# before other passes, not after.
This commit is contained in:
parent
340181f29a
commit
65e5006962
|
@ -8,6 +8,7 @@
|
|||
; RUN: opt < %s -mcpu=corei7 -O1 -loop-vectorize -S -unroll-allow-partial=0 | FileCheck %s --check-prefix=O1VEC2
|
||||
; RUN: opt < %s -mcpu=corei7 -Oz -loop-vectorize -S -unroll-allow-partial=0 | FileCheck %s --check-prefix=OzVEC2
|
||||
; RUN: opt < %s -mcpu=corei7 -O3 -unroll-threshold=150 -vectorize-loops=false -S -unroll-allow-partial=0 | FileCheck %s --check-prefix=O3DIS
|
||||
; RUN: opt < %s -mcpu=corei7 -O1 -loop-vectorize -S -unroll-allow-partial=0 -enable-new-pm=1 | FileCheck %s --check-prefix=O1VEC2
|
||||
|
||||
; This file tests the llvm.loop.vectorize.enable metadata forcing
|
||||
; vectorization even when optimization levels are too low, or when
|
||||
|
|
|
@ -759,9 +759,6 @@ int main(int argc, char **argv) {
|
|||
return 1;
|
||||
}
|
||||
SmallVector<StringRef, 4> Passes;
|
||||
for (const auto &P : PassList) {
|
||||
Passes.push_back(P->getPassArgument());
|
||||
}
|
||||
if (OptLevelO0)
|
||||
Passes.push_back("default<O0>");
|
||||
if (OptLevelO1)
|
||||
|
@ -774,6 +771,8 @@ int main(int argc, char **argv) {
|
|||
Passes.push_back("default<Os>");
|
||||
if (OptLevelOz)
|
||||
Passes.push_back("default<Oz>");
|
||||
for (const auto &P : PassList)
|
||||
Passes.push_back(P->getPassArgument());
|
||||
OutputKind OK = OK_NoOutput;
|
||||
if (!NoOutput)
|
||||
OK = OutputAssembly
|
||||
|
|
Loading…
Reference in New Issue