Home | History | Annotate | Download | only in PTX
      1 ; RUN: llc < %s -march=ptx32 | FileCheck %s
      2 
      3 ;define ptx_device i32 @t1(i32 %x, i32 %y) {
      4 ;	%z = mul i32 %x, %y
      5 ;	ret i32 %z
      6 ;}
      7 
      8 ;define ptx_device i32 @t2(i32 %x) {
      9 ;	%z = mul i32 %x, 1
     10 ;	ret i32 %z
     11 ;}
     12 
     13 define ptx_device float @t1_f32(float %x, float %y) {
     14 ; CHECK: mul.rn.f32 r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}}
     15 ; CHECK-NEXT: ret;
     16   %z = fmul float %x, %y
     17   ret float %z
     18 }
     19 
     20 define ptx_device double @t1_f64(double %x, double %y) {
     21 ; CHECK: mul.rn.f64 rd{{[0-9]+}}, rd{{[0-9]+}}, rd{{[0-9]+}}
     22 ; CHECK-NEXT: ret;
     23   %z = fmul double %x, %y
     24   ret double %z
     25 }
     26 
     27 define ptx_device float @t2_f32(float %x) {
     28 ; CHECK: mul.rn.f32 r{{[0-9]+}}, r{{[0-9]+}}, 0F40A00000;
     29 ; CHECK-NEXT: ret;
     30   %z = fmul float %x, 5.0
     31   ret float %z
     32 }
     33 
     34 define ptx_device double @t2_f64(double %x) {
     35 ; CHECK: mul.rn.f64 rd{{[0-9]+}}, rd{{[0-9]+}}, 0D4014000000000000;
     36 ; CHECK-NEXT: ret;
     37   %z = fmul double %x, 5.0
     38   ret double %z
     39 }
     40