1 ; RUN: llc < %s -march=ptx32 | FileCheck %s
3 @A = common global [1536 x [1536 x float]] zeroinitializer, align 4
4 @B = common global [1536 x [1536 x float]] zeroinitializer, align 4
6 define internal ptx_device void @init_array(i32 %x, i32 %y) {
7 %arrayidx103 = getelementptr [1536 x [1536 x float]]* @A, i32 0, i32 %x, i32 %y
8 %arrayidx224 = getelementptr [1536 x [1536 x float]]* @B, i32 0, i32 %x, i32 %y
10 %rem = srem i32 %mul5, 1024
11 %add = add nsw i32 %rem, 1
12 ; CHECK: cvt.rn.f64.s32 %fd{{[0-9]+}}, %r{{[0-9]+}}
13 %conv = sitofp i32 %add to double
14 %div = fmul double %conv, 5.000000e-01
15 %conv7 = fptrunc double %div to float
16 store float %conv7, float* %arrayidx103, align 4
17 %rem14 = srem i32 %mul5, 1024
18 %add15 = add nsw i32 %rem14, 1
19 %conv16 = sitofp i32 %add15 to double
20 %div17 = fmul double %conv16, 5.000000e-01
21 %conv18 = fptrunc double %div17 to float
22 store float %conv18, float* %arrayidx224, align 4