| 1 |
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -emit-llvm -o - | FileCheck %s |
| 2 |
// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -ffp-exception-behavior=maytrap -emit-llvm -o - | FileCheck %s |
| 3 |
|
| 4 |
// Test codegen of constrained floating point to bool conversion |
| 5 |
// |
| 6 |
// Test that the constrained intrinsics are picking up the exception |
| 7 |
// metadata from the AST instead of the global default from the command line. |
| 8 |
|
| 9 |
#pragma float_control(except, on) |
| 10 |
|
| 11 |
void eMaisUma(void) { |
| 12 |
double t[1]; |
| 13 |
if (*t) |
| 14 |
return; |
| 15 |
// CHECK: call i1 @llvm.experimental.constrained.fcmp.f64(double %{{.*}}, double 0.000000e+00, metadata !"une", metadata !"fpexcept.strict") |
| 16 |
} |
| 17 |
|