1; RUN: opt %loadPolly -polly-import-jscop -polly-codegen-ppcg -polly-stmt-granularity=bb -S < %s \
2; RUN: | FileCheck %s
3
4; REQUIRES: pollyacc
5
6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7target triple = "x86_64-unknown-linux-gnu"
8
9; CHECK: polly_launchKernel
10
11; Function Attrs: nounwind uwtable
12define void @partial_writes() {
13bb:
14  %tmp = tail call i8* @wibble() #2
15  %tmp1 = bitcast i8* %tmp to [1200 x double]*
16  br label %bb2
17
18bb2:                                              ; preds = %bb11, %bb
19  %tmp3 = phi i64 [ 0, %bb ], [ %tmp12, %bb11 ]
20  %tmp4 = getelementptr inbounds [1200 x double], [1200 x double]* %tmp1, i64 0, i64 %tmp3
21  %tmp5 = load double, double* %tmp4, align 8, !tbaa !1
22  br label %bb6
23
24bb6:                                              ; preds = %bb6, %bb2
25  %tmp7 = phi double [ undef, %bb2 ], [ undef, %bb6 ]
26  %tmp8 = phi i64 [ 0, %bb2 ], [ %tmp9, %bb6 ]
27  store double undef, double* %tmp4, align 8, !tbaa !1
28  %tmp9 = add nuw nsw i64 %tmp8, 1
29  %tmp10 = icmp eq i64 %tmp9, 900
30  br i1 %tmp10, label %bb11, label %bb6
31
32bb11:                                             ; preds = %bb6
33  %tmp12 = add nuw nsw i64 %tmp3, 1
34  %tmp13 = icmp eq i64 %tmp12, 1200
35  br i1 %tmp13, label %bb14, label %bb2
36
37bb14:                                             ; preds = %bb11
38  ret void
39}
40
41declare i8* @wibble()
42
43
44!llvm.ident = !{!0}
45
46!0 = !{!"clang version 6.0.0 (trunk 309912) (llvm/trunk 309933)"}
47!1 = !{!2, !2, i64 0}
48!2 = !{!"double", !3, i64 0}
49!3 = !{!"omnipotent char", !4, i64 0}
50!4 = !{!"Simple C/C++ TBAA"}
51