| 1 |
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -frounding-math -ffp-exception-behavior=strict -O2 -emit-llvm -o - %s | FileCheck %s |
| 2 |
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -ffp-exception-behavior=strict -O2 -emit-llvm -o - %s | FileCheck %s |
| 3 |
// RUN: %clang_cc1 -triple mips64-linux-gnu -fexperimental-strict-floating-point -frounding-math -O2 -emit-llvm -o - %s | FileCheck %s |
| 4 |
// |
| 5 |
// Verify that constrained intrinsics are used due to the experimental flag. |
| 6 |
// As more targets gain support for constrained intrinsics the triple |
| 7 |
// in this test will need to change. |
| 8 |
|
| 9 |
float fp_precise_1(float a, float b, float c) { |
| 10 |
// CHECK-LABEL: define{{.*}} float @_Z12fp_precise_1fff |
| 11 |
// CHECK: %[[M:.+]] = tail call float @llvm.experimental.constrained.fmul.f32(float {{.*}}, float {{.*}}, metadata {{.*}}) |
| 12 |
// CHECK: tail call float @llvm.experimental.constrained.fadd.f32(float %[[M]], float %c, metadata {{.*}}) |
| 13 |
return a * b + c; |
| 14 |
} |