Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / fp-floatcontrol-class.cpp
blob83a27cb206eb82474dabf7e5c5dcb1fece2180f7
1 // RUN: %clang_cc1 -ffp-contract=on -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
2 // Verify that float_control does not pertain to initializer expressions
4 float y();
5 float z();
6 #pragma float_control(except, on)
7 class ON {
8 float w = 2 + y() * z();
9 // CHECK-LABEL: define {{.*}} @_ZN2ONC2Ev{{.*}}
10 // CHECK: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict
12 ON on;
13 #pragma float_control(except, off)
14 class OFF {
15 float w = 2 + y() * z();
16 // CHECK-LABEL: define {{.*}} @_ZN3OFFC2Ev{{.*}}
17 // CHECK-NOT: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict
19 OFF off;