1; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-kernel-ir \
2; RUN: -disable-output < %s | \
3; RUN: FileCheck -check-prefix=KERNEL-IR %s
4
5; REQUIRES: pollyacc
6
7;    void kernel_params_scop_parameter(float A[], long n) {
8;      for (long i = 0; i < n; i++)
9;        A[i] += 42;
10;    }
11
12; KERNEL-IR: define ptx_kernel void @FUNC_kernel_params_scop_parameter_SCOP_0_KERNEL_0(i8 addrspace(1)* %MemRef_A, i64 %n)
13
14target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15
16define void @kernel_params_scop_parameter(float* %A, i64 %n) {
17bb:
18  br label %bb1
19
20bb1:                                              ; preds = %bb6, %bb
21  %i.0 = phi i64 [ 0, %bb ], [ %tmp7, %bb6 ]
22  %tmp = icmp slt i64 %i.0, %n
23  br i1 %tmp, label %bb2, label %bb8
24
25bb2:                                              ; preds = %bb1
26  %tmp3 = getelementptr inbounds float, float* %A, i64 %i.0
27  %tmp4 = load float, float* %tmp3, align 4
28  %tmp5 = fadd float %tmp4, 4.200000e+01
29  store float %tmp5, float* %tmp3, align 4
30  br label %bb6
31
32bb6:                                              ; preds = %bb2
33  %tmp7 = add nuw nsw i64 %i.0, 1
34  br label %bb1
35
36bb8:                                              ; preds = %bb1
37  ret void
38}
39