[Polly] Add handling of Top Level Regions
[polly-mirror.git] / test / GPGPU / scalar-parameter-i80.ll
blobb2f8f2c01e6c9e66b94840158c675982073fc615
1 ; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code -disable-output %s
3 ; XFAIL: *
5 ; REQUIRES: pollyacc,nvptx
7 ; This fails today with "LowerFormalArguments didn't emit the correct number of
8 ;                        values!"
10 ;    void foo(i80 A[], i80 b) {
11 ;      for (long i = 0; i < 1024; i++)
12 ;        A[i] += b;
13 ;    }
15 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 define void @i80(i80* %A, i80 %b) {
18 bb:
19   br label %bb1
21 bb1:                                              ; preds = %bb5, %bb
22   %i.0 = phi i80 [ 0, %bb ], [ %tmp6, %bb5 ]
23   %exitcond = icmp ne i80 %i.0, 1024
24   br i1 %exitcond, label %bb2, label %bb7
26 bb2:                                              ; preds = %bb1
27   %tmp = getelementptr inbounds i80, i80* %A, i80 %i.0
28   %tmp3 = load i80, i80* %tmp, align 4
29   %tmp4 = add i80 %tmp3, %b
30   store i80 %tmp4, i80* %tmp, align 4
31   br label %bb5
33 bb5:                                              ; preds = %bb2
34   %tmp6 = add nuw nsw i80 %i.0, 1
35   br label %bb1
37 bb7:                                              ; preds = %bb1
38   ret void