1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
3 target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
4 target triple = "nvptx64-unknown-unknown"
6 ; Compiled from the following CUDA code:
9 ; for (int i = 0; i < 2; ++i)
10 ; output[i] = input[i];
11 define void @nounroll(float* %input, float* %output) {
12 ; CHECK-LABEL: .visible .func nounroll(
17 ; CHECK: .pragma "nounroll"
18 %i.06 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
19 %idxprom = sext i32 %i.06 to i64
20 %arrayidx = getelementptr inbounds float, float* %input, i64 %idxprom
21 %0 = load float, float* %arrayidx, align 4
23 %arrayidx2 = getelementptr inbounds float, float* %output, i64 %idxprom
24 store float %0, float* %arrayidx2, align 4
26 %inc = add nuw nsw i32 %i.06, 1
27 %exitcond = icmp eq i32 %inc, 2
28 br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !0
36 !0 = distinct !{!0, !1}
37 !1 = !{!"llvm.loop.unroll.disable"}