summaryrefslogtreecommitdiff
path: root/polly/test/GPGPU/scalar-parameter-i120.ll
blob: 06fb46dd917ed9108f69b14aeaa23d7f7aba16e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; RUN: opt %loadPolly -polly-codegen-ppcg -polly-acc-dump-code -disable-output %s

; XFAIL: *

; REQUIRES: pollyacc, target=nvptx{{.*}}

; This fails today with "Promotion is not suitable for scalars of size larger than 64-bits"

;    void foo(i120 A[], i120 b) {
;      for (long i = 0; i < 1024; i++)
;        A[i] += b;
;    }
;
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

define void @i120(ptr %A, i120 %b) {
bb:
  br label %bb1

bb1:                                              ; preds = %bb5, %bb
  %i.0 = phi i120 [ 0, %bb ], [ %tmp6, %bb5 ]
  %exitcond = icmp ne i120 %i.0, 1024
  br i1 %exitcond, label %bb2, label %bb7

bb2:                                              ; preds = %bb1
  %tmp = getelementptr inbounds i120, ptr %A, i120 %i.0
  %tmp3 = load i120, ptr %tmp, align 4
  %tmp4 = add i120 %tmp3, %b
  store i120 %tmp4, ptr %tmp, align 4
  br label %bb5

bb5:                                              ; preds = %bb2
  %tmp6 = add nuw nsw i120 %i.0, 1
  br label %bb1

bb7:                                              ; preds = %bb1
  ret void
}