brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.5 KiB · 95f587a Raw
69 lines · c
1// Test this without pch.2// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -include %s -verify -fsyntax-only -DSET3// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -include %s -verify -fsyntax-only -DPUSH4// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -include %s -verify -fsyntax-only -DPUSH_POP5 6// Test with pch.7// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -emit-pch -o %t8// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s9// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -ffp-contract=on -DSET -emit-pch -o %t10// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s11// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -menable-no-nans -DSET -emit-pch -o %t12// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s13// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -frounding-math -DSET -emit-pch -o %t14// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s15// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -ffp-exception-behavior=maytrap -DSET -emit-pch -o %t16// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s17// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -ffp-contract=fast -DSET -emit-pch -o %t18// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-EBSTRICT %s19// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DSET -emit-pch -o %t20// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -ffp-contract=on -DSET -include-pch %t -emit-llvm -o - | FileCheck --check-prefix=CHECK-CONTRACT %s21// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DPUSH -emit-pch -o %t22// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DPUSH -verify -include-pch %t23// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DPUSH_POP -emit-pch -o %t24// RUN: %clang_cc1 -fexperimental-strict-floating-point  %s -DPUSH_POP -verify -include-pch %t25 26#ifndef HEADER27#define HEADER28 29#ifdef SET30#pragma float_control(except, on)31#endif32 33#ifdef PUSH34#pragma float_control(precise, on)35#pragma float_control(push)36#pragma float_control(precise, off)37#endif38 39#ifdef PUSH_POP40#pragma float_control(precise, on, push)41#pragma float_control(push)42#pragma float_control(pop)43#endif44#else45 46#ifdef SET47float fun(float a, float b) {48  // CHECK-LABEL: define float @fun{{.*}}49  //CHECK-EBSTRICT: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict50  //CHECK-EBSTRICT: llvm.experimental.constrained.fadd{{.*}}tonearest{{.*}}strict51  //CHECK-CONTRACT: llvm.experimental.constrained.fmuladd{{.*}}tonearest{{.*}}strict52  return a * b + 2;53}54#pragma float_control(pop) // expected-warning {{#pragma float_control(pop, ...) failed: stack empty}}55#pragma float_control(pop) // expected-warning {{#pragma float_control(pop, ...) failed: stack empty}}56#endif57 58#ifdef PUSH59#pragma float_control(pop)60#pragma float_control(pop) // expected-warning {{#pragma float_control(pop, ...) failed: stack empty}}61#endif62 63#ifdef PUSH_POP64#pragma float_control(pop)65#pragma float_control(pop) // expected-warning {{#pragma float_control(pop, ...) failed: stack empty}}66#endif67 68#endif //ifndef HEADER69