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