r180207 - [driver] Test that last option wins between -Ofast and -O2.

Chad Rosier mcrosier at apple.com
Wed Apr 24 11:43:57 PDT 2013


Author: mcrosier
Date: Wed Apr 24 13:43:57 2013
New Revision: 180207

URL: http://llvm.org/viewvc/llvm-project?rev=180207&view=rev
Log:
[driver] Test that last option wins between -Ofast and -O2.
Part of rdar://13622687

Modified:
    cfe/trunk/test/Driver/Ofast.c

Modified: cfe/trunk/test/Driver/Ofast.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Ofast.c?rev=180207&r1=180206&r2=180207&view=diff
==============================================================================
--- cfe/trunk/test/Driver/Ofast.c (original)
+++ cfe/trunk/test/Driver/Ofast.c Wed Apr 24 13:43:57 2013
@@ -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





More information about the cfe-commits mailing list