diff options
author | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2012-12-02 13:20:44 +0000 |
commit | 056abd2059c65a3e908193aeae16fad98017437c (patch) | |
tree | 2732d02d7d51218d6eed98ac7fcfc5b8794896b5 /test/Driver/fast-math.c | |
parent | cc73504950eb7b5dff2dded9bedd67bc36d64641 (diff) | |
download | FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.zip FreeBSD-src-056abd2059c65a3e908193aeae16fad98017437c.tar.gz |
Vendor import of clang release_32 branch r168974 (effectively, 3.2 RC2):
http://llvm.org/svn/llvm-project/cfe/branches/release_32@168974
Diffstat (limited to 'test/Driver/fast-math.c')
-rw-r--r-- | test/Driver/fast-math.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/test/Driver/fast-math.c b/test/Driver/fast-math.c index 8426f09..17bf6ed 100644 --- a/test/Driver/fast-math.c +++ b/test/Driver/fast-math.c @@ -12,16 +12,46 @@ // CHECK-NO-INFS: "-cc1" // CHECK-NO-INFS: "-menable-no-infs" // +// RUN: %clang -### -fno-fast-math -fno-honor-infinities -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-INFS %s +// CHECK-NO-FAST-MATH-NO-INFS: "-cc1" +// CHECK-NO-FAST-MATH-NO-INFS: "-menable-no-infs" +// +// RUN: %clang -### -fno-honor-infinities -fno-fast-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-INFS-NO-FAST-MATH %s +// CHECK-NO-INFS-NO-FAST-MATH: "-cc1" +// CHECK-NO-INFS-NO-FAST-MATH-NOT: "-menable-no-infs" +// // RUN: %clang -### -fno-honor-nans -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-NANS %s // CHECK-NO-NANS: "-cc1" // CHECK-NO-NANS: "-menable-no-nans" // +// RUN: %clang -### -fno-fast-math -fno-honor-nans -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-NO-NANS %s +// CHECK-NO-FAST-MATH-NO-NANS: "-cc1" +// CHECK-NO-FAST-MATH-NO-NANS: "-menable-no-nans" +// +// RUN: %clang -### -fno-honor-nans -fno-fast-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-NANS-NO-FAST-MATH %s +// CHECK-NO-NANS-NO-FAST-MATH: "-cc1" +// CHECK-NO-NANS-NO-FAST-MATH-NOT: "-menable-no-nans" +// // RUN: %clang -### -fmath-errno -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO %s // CHECK-MATH-ERRNO: "-cc1" // CHECK-MATH-ERRNO: "-fmath-errno" // +// RUN: %clang -### -fno-fast-math -fmath-errno -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-MATH-ERRNO %s +// CHECK-NO-FAST-MATH-MATH-ERRNO: "-cc1" +// CHECK-NO-FAST-MATH-MATH-ERRNO: "-fmath-errno" +// +// RUN: %clang -### -fmath-errno -fno-fast-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-MATH-ERRNO-NO-FAST-MATH %s +// CHECK-MATH-ERRNO-NO-FAST-MATH: "-cc1" +// CHECK-MATH-ERRNO-NO-FAST-MATH-NOT: "-fmath-errno" +// // RUN: %clang -### -fmath-errno -fno-math-errno -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-MATH-ERRNO %s // RUN: %clang -### -target i686-apple-darwin -c %s 2>&1 \ @@ -43,6 +73,18 @@ // CHECK-UNSAFE-MATH: "-cc1" // CHECK-UNSAFE-MATH: "-menable-unsafe-fp-math" // +// RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \ +// RUN: -fno-signed-zeros -fno-trapping-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH-UNSAFE-MATH %s +// CHECK-NO-FAST-MATH-UNSAFE-MATH: "-cc1" +// CHECK-NO-FAST-MATH-UNSAFE-MATH: "-menable-unsafe-fp-math" +// +// RUN: %clang -### -fno-fast-math -fno-math-errno -fassociative-math -freciprocal-math \ +// RUN: -fno-fast-math -fno-signed-zeros -fno-trapping-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-UNSAFE-MATH-NO-FAST-MATH %s +// CHECK-UNSAFE-MATH-NO-FAST-MATH: "-cc1" +// CHECK-UNSAFE-MATH-NO-FAST-MATH-NOT: "-menable-unsafe-fp-math" +// // Check that various umbrella flags also enable these frontend options. // RUN: %clang -### -ffast-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s @@ -63,12 +105,19 @@ // impact remains even if every optimization is disabled. // RUN: %clang -### -ffast-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s +// RUN: %clang -### -fno-fast-math -ffast-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s // RUN: %clang -### -ffast-math -fno-finite-math-only \ // RUN: -fno-unsafe-math-optimizations -fmath-errno -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-FAST-MATH %s // CHECK-FAST-MATH: "-cc1" // CHECK-FAST-MATH: "-ffast-math" // +// RUN: %clang -### -ffast-math -fno-fast-math -c %s 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-FAST-MATH %s +// CHECK-NO-FAST-MATH: "-cc1" +// CHECK-NO-FAST-MATH-NOT: "-ffast-math" +// // Check various means of disabling these flags, including disabling them after // they've been enabled via an umbrella flag. // RUN: %clang -### -fno-honor-infinities -fhonor-infinities -c %s 2>&1 \ |