cc28e3fa1cd354b9f450282be3616fb10cdd41ac
[oota-llvm.git] / test / CodeGen / PTX / mad.ll
1 ; RUN: llc < %s -march=ptx32 -mattr=+sm13 | FileCheck %s
2
3 define ptx_device float @t1_f32(float %x, float %y, float %z) {
4 ; CHECK: mad.rn.f32 %ret{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}};
5 ; CHECK: ret;
6         %a = fmul float %x, %y
7   %b = fadd float %a, %z
8         ret float %b
9 }
10
11 define ptx_device double @t1_f64(double %x, double %y, double %z) {
12 ; CHECK: mad.rn.f64 %ret{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}};
13 ; CHECK: ret;
14         %a = fmul double %x, %y
15   %b = fadd double %a, %z
16         ret double %b
17 }