2015-01-24 00:40:50 +08:00
|
|
|
// RUN: %clang_cc1 -ffinite-math-only -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=FINITE
|
|
|
|
// RUN: %clang_cc1 -fno-signed-zeros -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=NSZ
|
2015-04-09 23:03:23 +08:00
|
|
|
// RUN: %clang_cc1 -freciprocal-math -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK -check-prefix=RECIP
|
2015-01-24 00:40:50 +08:00
|
|
|
|
2012-12-11 02:48:08 +08:00
|
|
|
float f0, f1, f2;
|
2012-12-04 08:36:06 +08:00
|
|
|
|
|
|
|
void foo(void) {
|
2013-08-15 14:47:53 +08:00
|
|
|
// CHECK-LABEL: define void @foo()
|
2012-12-04 08:36:06 +08:00
|
|
|
|
2015-01-24 00:40:50 +08:00
|
|
|
// FINITE: fadd nnan ninf
|
|
|
|
// NSZ: fadd nsz
|
2015-04-09 23:03:23 +08:00
|
|
|
// RECIP: fadd arcp
|
2012-12-04 08:36:06 +08:00
|
|
|
f0 = f1 + f2;
|
|
|
|
|
|
|
|
// CHECK: ret
|
|
|
|
}
|
2015-01-24 00:40:50 +08:00
|
|
|
|