1; RUN: opt %loadPolly -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
2;
3; Partial write of an array access.
4;
5; for (int j = 0; j < n; j += 1)
6;   A[0] = 42.0
7;
8
9define void @partial_write_array(i32 %n, double* noalias nonnull %A) {
10entry:
11  br label %for
12
13for:
14  %j = phi i32 [0, %entry], [%j.inc, %inc]
15  %j.cmp = icmp slt i32 %j, %n
16  br i1 %j.cmp, label %body, label %exit
17
18    body:
19      store double 42.0, double* %A
20      br label %inc
21
22inc:
23  %j.inc = add nuw nsw i32 %j, 1
24  br label %for
25
26exit:
27  br label %return
28
29return:
30  ret void
31}
32
33
34; CHECK:      polly.stmt.body:
35; CHECK-NEXT:   %1 = icmp sge i64 %polly.indvar, 5
36; CHECK-NEXT:   %polly.Stmt_body_Write0.cond = icmp ne i1 %1, false
37; CHECK-NEXT:   br i1 %polly.Stmt_body_Write0.cond, label %polly.stmt.body.Stmt_body_Write0.partial, label %polly.stmt.body.cont
38
39; CHECK:      polly.stmt.body.Stmt_body_Write0.partial:
40; CHECK-NEXT:   %polly.access.A = getelementptr double, double* %A, i64 0
41; CHECK-NEXT:   store double 4.200000e+01, double* %polly.access.A, align 8, !alias.scope !0, !noalias !2
42; CHECK-NEXT:   br label %polly.stmt.body.cont
43
44; CHECK:      polly.stmt.body.cont:
45