• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code -disable-output %s
2
3; REQUIRES: pollyacc,nvptx
4
5; This fails today with "unexpected type" in the LLVM PTX backend.
6
7;    void foo(half A[], half b) {
8;      for (long i = 0; i < 1024; i++)
9;        A[i] += b;
10;    }
11;
12target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
13
14define void @half(half* %A, half %b) {
15bb:
16  br label %bb1
17
18bb1:                                              ; preds = %bb5, %bb
19  %i.0 = phi i64 [ 0, %bb ], [ %tmp6, %bb5 ]
20  %exitcond = icmp ne i64 %i.0, 1024
21  br i1 %exitcond, label %bb2, label %bb7
22
23bb2:                                              ; preds = %bb1
24  %tmp = getelementptr inbounds half, half* %A, i64 %i.0
25  %tmp3 = load half, half* %tmp, align 4
26  %tmp4 = fadd half %tmp3, %b
27  store half %tmp4, half* %tmp, align 4
28  br label %bb5
29
30bb5:                                              ; preds = %bb2
31  %tmp6 = add nuw nsw i64 %i.0, 1
32  br label %bb1
33
34bb7:                                              ; preds = %bb1
35  ret void
36}
37
38