Revision r280064 adds new options -fdenormal-fp-math and passes through option
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 31 Aug 2016 12:31:03 +0000 (12:31 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Wed, 31 Aug 2016 12:31:03 +0000 (12:31 +0000)
-ffast-math to CC1, but it included a wrong llvm regression tests which was
removed in r280065.  Although regression test noexceptionsfpmath.c makes sure
-fno-trapping-math ends up as a function attribute, this adds a test that
explicitly checks the driver output for -fno-trapping-math.

llvm-svn: 280227

clang/test/Driver/fast-math.c

index 1cc63da..a09a2ce 100644 (file)
 // CHECK-NO-UNSAFE-MATH-NOT: "-menable-unsafe-fp-math"
 // CHECK-NO-UNSAFE-MATH: "-o"
 //
+// 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"