diff options
author | Chad Rosier <mcrosier@apple.com> | 2013-04-24 18:43:57 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2013-04-24 18:43:57 +0000 |
commit | 9f366db42d2fd21cc8cee3ee557172b9f81b64c9 (patch) | |
tree | edad01e5dbc1d9527f6939a53ac94d5f448cd37c | |
parent | 3142279baca34d4c9c9054e6848215740896b1bb (diff) |
[driver] Test that last option wins between -Ofast and -O2.
Part of rdar://13622687
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180207 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Driver/Ofast.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Driver/Ofast.c b/test/Driver/Ofast.c index 05448076ee..1f9fc78ec1 100644 --- a/test/Driver/Ofast.c +++ b/test/Driver/Ofast.c @@ -1,7 +1,9 @@ // RUN: %clang -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s +// RUN: %clang -O2 -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s // RUN: %clang -fno-fast-math -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s // RUN: %clang -fno-strict-aliasing -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s // RUN: %clang -fno-vectorize -Ofast -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST %s +// RUN: %clang -Ofast -O2 -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-O2 %s // RUN: %clang -Ofast -fno-fast-math -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-FAST-MATH %s // RUN: %clang -Ofast -fno-strict-aliasing -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-STRICT-ALIASING %s // RUN: %clang -Ofast -fno-vectorize -### %s 2>&1 | FileCheck -check-prefix=CHECK-OFAST-NO-VECTORIZE %s @@ -12,6 +14,12 @@ // CHECK-OFAST: -Ofast // CHECK-OFAST: -vectorize-loops +// CHECK-OFAST-O2: -cc1 +// CHECK-OFAST-O2-NOT: -relaxed-aliasing +// CHECK-OFAST-O2-NOT: -ffast-math +// CHECK-OFAST-O2-NOT: -Ofast +// CHECK-OFAST-O2: -vectorize-loops + // CHECK-OFAST-NO-FAST-MATH: -cc1 // CHECK-OFAST-NO-FAST-MATH-NOT: -relaxed-aliasing // CHECK-OFAST-NO-FAST-MATH-NOT: -ffast-math |