Clang Project

clang_source_code/test/CodeGen/fp-contract-on-asm.c
1// RUN: %clang_cc1 -O3 -triple=aarch64-apple-ios -S -o - %s | FileCheck %s
2// REQUIRES: aarch64-registered-target
3
4float fma_test1(float a, float b, float c) {
5#pragma STDC FP_CONTRACT ON
6// CHECK-LABEL: fma_test1:
7// CHECK: fmadd
8  float x = a * b + c;
9  return x;
10}
11
12float fma_test2(float a, float b, float c) {
13// CHECK-LABEL: fma_test2:
14// CHECK: fmul
15// CHECK: fadd
16  float x = a * b + c;
17  return x;
18}
19