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
13define ptx_device float @t1_f32(float %x, float %y) {
14; CHECK: mul.rn.f32 %ret{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}
15; CHECK: ret;
16  %z = fmul float %x, %y
17  ret float %z
18}
19
20define ptx_device double @t1_f64(double %x, double %y) {
21; CHECK: mul.rn.f64 %ret{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}
22; CHECK: ret;
23  %z = fmul double %x, %y
24  ret double %z
25}
26
27define ptx_device float @t2_f32(float %x) {
28; CHECK: mul.rn.f32 %ret{{[0-9]+}}, %f{{[0-9]+}}, 0D4014000000000000;
29; CHECK: ret;
30  %z = fmul float %x, 5.0
31  ret float %z
32}
33
34define ptx_device double @t2_f64(double %x) {
35; CHECK: mul.rn.f64 %ret{{[0-9]+}}, %fd{{[0-9]+}}, 0D4014000000000000;
36; CHECK: ret;
37  %z = fmul double %x, 5.0
38  ret double %z
39}
40