• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -mtriple=i386-apple-darwin10 | FileCheck %s
2; RUN: llc < %s -mtriple=x86_64-apple-darwin10 | FileCheck %s
3
4; CHECK: test_f32
5; CHECK: _fmaf
6
7define float @test_f32(float %a, float %b, float %c) nounwind readnone ssp {
8entry:
9  %call = tail call float @llvm.fma.f32(float %a, float %b, float %c) nounwind readnone
10  ret float %call
11}
12
13; CHECK: test_f64
14; CHECK: _fma
15
16define double @test_f64(double %a, double %b, double %c) nounwind readnone ssp {
17entry:
18  %call = tail call double @llvm.fma.f64(double %a, double %b, double %c) nounwind readnone
19  ret double %call
20}
21
22; CHECK: test_f80
23; CHECK: _fmal
24
25define x86_fp80 @test_f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) nounwind readnone ssp {
26entry:
27  %call = tail call x86_fp80 @llvm.fma.f80(x86_fp80 %a, x86_fp80 %b, x86_fp80 %c) nounwind readnone
28  ret x86_fp80 %call
29}
30
31declare float @llvm.fma.f32(float, float, float) nounwind readnone
32declare double @llvm.fma.f64(double, double, double) nounwind readnone
33declare x86_fp80 @llvm.fma.f80(x86_fp80, x86_fp80, x86_fp80) nounwind readnone
34