Home | History | Annotate | Download | only in R600
      1 ; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s
      2 
      3 ; CHECK: @fmuladd_f32
      4 ; CHECK: V_MAD_F32 {{v[0-9]+, v[0-9]+, v[0-9]+, v[0-9]+}}
      5 
      6 define void @fmuladd_f32(float addrspace(1)* %out, float addrspace(1)* %in1,
      7                          float addrspace(1)* %in2, float addrspace(1)* %in3) {
      8    %r0 = load float addrspace(1)* %in1
      9    %r1 = load float addrspace(1)* %in2
     10    %r2 = load float addrspace(1)* %in3
     11    %r3 = tail call float @llvm.fmuladd.f32(float %r0, float %r1, float %r2)
     12    store float %r3, float addrspace(1)* %out
     13    ret void
     14 }
     15 
     16 declare float @llvm.fmuladd.f32(float, float, float)
     17 
     18 ; CHECK: @fmuladd_f64
     19 ; CHECK: V_FMA_F64 {{v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\], v\[[0-9]+:[0-9]+\]}}
     20 
     21 define void @fmuladd_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
     22                          double addrspace(1)* %in2, double addrspace(1)* %in3) {
     23    %r0 = load double addrspace(1)* %in1
     24    %r1 = load double addrspace(1)* %in2
     25    %r2 = load double addrspace(1)* %in3
     26    %r3 = tail call double @llvm.fmuladd.f64(double %r0, double %r1, double %r2)
     27    store double %r3, double addrspace(1)* %out
     28    ret void
     29 }
     30 
     31 declare double @llvm.fmuladd.f64(double, double, double)
     32