236
|
1 ; RUN: opt %loadPolly -basic-aa -polly-stmt-granularity=bb -polly-import-jscop -polly-import-jscop-postfix=transformed -polly-vectorizer=polly -polly-opt-isl -polly-ast -polly-codegen -S < %s | FileCheck %s
|
|
2 ;
|
|
3 ; Polly's vectorizer does not support partial accesses.
|
|
4 ;
|
|
5 ; for (int j = 0; j < 4; j += 1) {
|
|
6 ;body:
|
|
7 ; val = 21.0 + 21.0;
|
|
8 ; if (j > 1)
|
|
9 ;user:
|
|
10 ; A[0] = val;
|
|
11 ; }
|
|
12
|
|
13 define void @partial_write_mapped_vector(double* noalias nonnull %A) {
|
|
14 entry:
|
|
15 br label %for
|
|
16
|
|
17 for:
|
|
18 %j = phi i32 [0, %entry], [%j.inc, %inc]
|
|
19 %j.cmp = icmp slt i32 %j, 4
|
|
20 br i1 %j.cmp, label %body, label %exit
|
|
21
|
|
22 body:
|
|
23 %val = fadd double 21.0, 21.0
|
|
24 %if.cond = icmp sgt i32 %j, 1
|
|
25 br i1 %if.cond, label %user, label %inc
|
|
26
|
|
27 user:
|
|
28 %elt= getelementptr inbounds double, double* %A, i32 %j
|
|
29 store double %val, double* %elt
|
|
30 br label %inc
|
|
31
|
|
32 inc:
|
|
33 %j.inc = add nuw nsw i32 %j, 1
|
|
34 br label %for
|
|
35
|
|
36 exit:
|
|
37 br label %return
|
|
38
|
|
39 return:
|
|
40 ret void
|
|
41 }
|
|
42
|
|
43
|
|
44 ; CHECK-LABEL: polly.stmt.body:
|
|
45 ; CHECK-NEXT: %p_val = fadd double 2.100000e+01, 2.100000e+01
|
|
46 ; CHECK-NEXT: %0 = trunc i64 %polly.indvar to i32
|
|
47 ; CHECK-NEXT: %p_if.cond = icmp sgt i32 %0, 1
|
|
48 ; CHECK-NEXT: %1 = icmp sge i64 %polly.indvar, 2
|
|
49 ; CHECK-NEXT: %polly.Stmt_body_Write0.cond = icmp ne i1 %1, false
|
|
50 ; CHECK-NEXT: br i1 %polly.Stmt_body_Write0.cond, label %polly.stmt.body.Stmt_body_Write0.partial, label %polly.stmt.body.cont
|
|
51
|
|
52 ; CHECK-LABEL: polly.stmt.body.Stmt_body_Write0.partial:
|
|
53 ; CHECK-NEXT: %polly.access.A = getelementptr double, double* %A, i64 1
|
|
54 ; CHECK-NEXT: store double %p_val, double* %polly.access.A
|
|
55 ; CHECK-NEXT: br label %polly.stmt.body.cont
|
|
56
|
|
57 ; CHECK-LABEL: polly.stmt.body.cont:
|