blob: 324c3cc14f6fef52f76030ddebc6b9d0634a4d76 [file] [log] [blame]
Melanie Blowerf5360d42020-05-01 10:32:06 -07001// RUN: %clang_cc1 -ffp-contract=on -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
2// RUN: %clang_cc1 -ffp-contract=on -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
Melanie Blowerf5360d42020-05-01 10:32:06 -07003// Verify that float_control does not pertain to initializer expressions
4
5float y();
6float z();
7#pragma float_control(except, on)
8class ON {
9 float w = 2 + y() * z();
Melanie Blower7cbb4952020-05-04 07:25:23 -070010 // CHECK-LABEL: define {{.*}} @_ZN2ONC2Ev{{.*}}
Melanie Blowerf5360d42020-05-01 10:32:06 -070011 //CHECK: call contract float {{.*}}llvm.fmuladd
12};
13ON on;
14#pragma float_control(except, off)
15class OFF {
16 float w = 2 + y() * z();
Melanie Blower7cbb4952020-05-04 07:25:23 -070017 // CHECK-LABEL: define {{.*}} @_ZN3OFFC2Ev{{.*}}
Melanie Blowerf5360d42020-05-01 10:32:06 -070018 //CHECK: call contract float {{.*}}llvm.fmuladd
19};
20OFF off;