Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / ffp-contract-fast-honor-pramga-option.cpp
blobfef4da1edf1fc9421cbec04adffd0ea5901d7d88
1 // RUN: %clang_cc1 -O3 -ffp-contract=fast-honor-pragmas -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
3 float fp_contract_1(float a, float b, float c) {
4 // CHECK-LABEL: fp_contract_1fff(
5 // CHECK: fmul contract float
6 // CHECK: fadd contract float
7 return a * b + c;
10 float fp_contract_2(float a, float b, float c) {
11 // CHECK-LABEL: fp_contract_2fff(
12 // CHECK: fmul contract float
13 // CHECK: fsub contract float
14 return a * b - c;
17 void fp_contract_3(float *a, float b, float c) {
18 // CHECK-LABEL: fp_contract_3Pfff(
19 // CHECK: fmul contract float
20 // CHECK: fadd contract float
21 a[0] += b * c;
24 void fp_contract_4(float *a, float b, float c) {
25 // CHECK-LABEL: fp_contract_4Pfff(
26 // CHECK: fmul contract float
27 // CHECK: fsub contract float
28 a[0] -= b * c;
31 float fp_contract_5(float a, float b, float c) {
32 // CHECK-LABEL: fp_contract_5fff(
33 // CHECK: fmul contract float
34 // CHECK: fadd contract float
35 float t = a * b;
36 return t + c;