SjoerdMeijer created this revision. SjoerdMeijer added reviewers: rengolin, jmolloy, olista01. SjoerdMeijer added a subscriber: cfe-commits.
For clarity, this moves checks for -fdenormal-fp-math values from fast-math.c to a new separate file. https://reviews.llvm.org/D24907 Files: test/Driver/denormalfpmode.c test/Driver/fast-math.c Index: test/Driver/fast-math.c =================================================================== --- test/Driver/fast-math.c +++ test/Driver/fast-math.c @@ -234,13 +234,4 @@ // // RUN: %clang -### -ftrapping-math -fno-trapping-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-TRAPPING-MATH %s -// RUN: %clang -### -fdenormal-fp-math=ieee -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-IEEE %s -// RUN: %clang -### -fdenormal-fp-math=preserve-sign -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-PS %s -// RUN: %clang -### -fdenormal-fp-math=positive-zero -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-PZ %s // CHECK-NO-TRAPPING-MATH: "-fno-trapping-math" -// CHECK-FP-DENORMAL-IEEE: "-fdenormal-fp-math=ieee" -// CHECK-FP-DENORMAL-PS: "-fdenormal-fp-math=preserve-sign" -// CHECK-FP-DENORMAL-PZ: "-fdenormal-fp-math=positive-zero" Index: test/Driver/denormalfpmode.c =================================================================== --- /dev/null +++ test/Driver/denormalfpmode.c @@ -0,0 +1,9 @@ +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=ieee -v 2>&1 | FileCheck -check-prefix=CHECK-IEEE %s +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=preserve-sign -v 2>&1 | FileCheck -check-prefix=CHECK-PS %s +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=positive-zero -v 2>&1 | FileCheck -check-prefix=CHECK-PZ %s +// RUN: not %clang -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=foo -v 2>&1 | FileCheck -check-prefix=CHECK-INVALID %s + +// CHECK-IEEE: "-fdenormal-fp-math=ieee" +// CHECK-PS: "-fdenormal-fp-math=preserve-sign" +// CHECK-PZ: "-fdenormal-fp-math=positive-zero" +// CHECK-INVALID: error: invalid value 'foo' in '-fdenormal-fp-math=foo'
Index: test/Driver/fast-math.c =================================================================== --- test/Driver/fast-math.c +++ test/Driver/fast-math.c @@ -234,13 +234,4 @@ // // RUN: %clang -### -ftrapping-math -fno-trapping-math -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-TRAPPING-MATH %s -// RUN: %clang -### -fdenormal-fp-math=ieee -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-IEEE %s -// RUN: %clang -### -fdenormal-fp-math=preserve-sign -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-PS %s -// RUN: %clang -### -fdenormal-fp-math=positive-zero -c %s 2>&1 \ -// RUN: | FileCheck --check-prefix=CHECK-FP-DENORMAL-PZ %s // CHECK-NO-TRAPPING-MATH: "-fno-trapping-math" -// CHECK-FP-DENORMAL-IEEE: "-fdenormal-fp-math=ieee" -// CHECK-FP-DENORMAL-PS: "-fdenormal-fp-math=preserve-sign" -// CHECK-FP-DENORMAL-PZ: "-fdenormal-fp-math=positive-zero" Index: test/Driver/denormalfpmode.c =================================================================== --- /dev/null +++ test/Driver/denormalfpmode.c @@ -0,0 +1,9 @@ +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=ieee -v 2>&1 | FileCheck -check-prefix=CHECK-IEEE %s +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=preserve-sign -v 2>&1 | FileCheck -check-prefix=CHECK-PS %s +// RUN: %clang -### -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=positive-zero -v 2>&1 | FileCheck -check-prefix=CHECK-PZ %s +// RUN: not %clang -target arm-unknown-linux-gnu -c %s -fdenormal-fp-math=foo -v 2>&1 | FileCheck -check-prefix=CHECK-INVALID %s + +// CHECK-IEEE: "-fdenormal-fp-math=ieee" +// CHECK-PS: "-fdenormal-fp-math=preserve-sign" +// CHECK-PZ: "-fdenormal-fp-math=positive-zero" +// CHECK-INVALID: error: invalid value 'foo' in '-fdenormal-fp-math=foo'
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits