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