1 ; RUN: opt %loadPolly -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-codegen -S < %s | FileCheck %s
3 ; Partial write of a (mapped) scalar.
5 ; for (int j = 0; j < n; j += 1) {
13 define void @partial_write_mapped_scalar(i32 %n, ptr noalias nonnull %A) {
18 %j = phi i32 [0, %entry], [%j.inc, %inc]
19 %j.cmp = icmp slt i32 %j, %n
20 br i1 %j.cmp, label %body, label %exit
23 %val = fadd double 21.0, 21.0
24 %if.cond = icmp sgt i32 %j, 5
25 br i1 %if.cond, label %user, label %inc
28 store double %val, ptr %A
32 %j.inc = add nuw nsw i32 %j, 1
43 ; CHECK: polly.stmt.body:
44 ; CHECK-NEXT: %p_val = fadd double 2.100000e+01, 2.100000e+01
45 ; CHECK-NEXT: %1 = trunc i64 %polly.indvar to i32
46 ; CHECK-NEXT: %p_if.cond = icmp sgt i32 %1, 5
47 ; CHECK-NEXT: %2 = icmp sge i64 %polly.indvar, 5
48 ; CHECK-NEXT: %polly.Stmt_body_Write0.cond = icmp ne i1 %2, false
49 ; CHECK-NEXT: br i1 %polly.Stmt_body_Write0.cond, label %polly.stmt.body.Stmt_body_Write0.partial, label %polly.stmt.body.cont
51 ; CHECK: polly.stmt.body.Stmt_body_Write0.partial:
52 ; CHECK-NEXT: %polly.access.A = getelementptr double, ptr %A, i64 1
53 ; CHECK-NEXT: store double %p_val, ptr %polly.access.A
54 ; CHECK-NEXT: br label %polly.stmt.body.cont
56 ; CHECK: polly.stmt.body.cont:
57 ; CHECK-NEXT: br label %polly.cond