blob: 194aa5d632dcd9178c61c0d946632f49c286a844 [file] [log] [blame]
Kevin P. Neal20694032020-11-06 10:44:13 -05001// 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
11void eMaisUma() {
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