[PATCH] D24907: NFC: separate file for fp denormal regression tests

Sjoerd Meijer via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 26 04:05:28 PDT 2016


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'


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24907.72457.patch
Type: text/x-patch
Size: 1832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160926/72945341/attachment.bin>


More information about the cfe-commits mailing list