Fix Polly
[polly-mirror.git] / test / ScheduleOptimizer / prevectorization-without-tiling.ll
blob4c752c0bb09aaf786cbafe47e0cdfe3f2ff245a9
1 ; RUN: opt -S %loadPolly -basicaa -polly-opt-isl -polly-tiling=false \
2 ; RUN: -polly-pattern-matching-based-opts=false -polly-vectorizer=polly \
3 ; RUN: -polly-ast -analyze < %s | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
6 @C = common global [1536 x [1536 x float]] zeroinitializer, align 16
7 @A = common global [1536 x [1536 x float]] zeroinitializer, align 16
8 @B = common global [1536 x [1536 x float]] zeroinitializer, align 16
10 ; Function Attrs: nounwind uwtable
11 define void @foo() #0 {
12 entry:
13   br label %entry.split
15 entry.split:                                      ; preds = %entry
16   br label %for.cond1.preheader
18 for.cond1.preheader:                              ; preds = %entry.split, %for.inc28
19   %indvar4 = phi i64 [ 0, %entry.split ], [ %indvar.next5, %for.inc28 ]
20   br label %for.body3
22 for.body3:                                        ; preds = %for.cond1.preheader, %for.inc25
23   %indvar6 = phi i64 [ 0, %for.cond1.preheader ], [ %indvar.next7, %for.inc25 ]
24   %arrayidx24 = getelementptr [1536 x [1536 x float]], [1536 x [1536 x float]]* @C, i64 0, i64 %indvar4, i64 %indvar6
25   store float 0.000000e+00, float* %arrayidx24, align 4
26   br label %for.body8
28 for.body8:                                        ; preds = %for.body3, %for.body8
29   %indvar = phi i64 [ 0, %for.body3 ], [ %indvar.next, %for.body8 ]
30   %arrayidx16 = getelementptr [1536 x [1536 x float]], [1536 x [1536 x float]]* @A, i64 0, i64 %indvar4, i64 %indvar
31   %arrayidx20 = getelementptr [1536 x [1536 x float]], [1536 x [1536 x float]]* @B, i64 0, i64 %indvar, i64 %indvar6
32   %0 = load float, float* %arrayidx24, align 4
33   %1 = load float, float* %arrayidx16, align 4
34   %2 = load float, float* %arrayidx20, align 4
35   %mul = fmul float %1, %2
36   %add = fadd float %0, %mul
37   store float %add, float* %arrayidx24, align 4
38   %indvar.next = add i64 %indvar, 1
39   %exitcond = icmp ne i64 %indvar.next, 1536
40   br i1 %exitcond, label %for.body8, label %for.inc25
42 for.inc25:                                        ; preds = %for.body8
43   %indvar.next7 = add i64 %indvar6, 1
44   %exitcond8 = icmp ne i64 %indvar.next7, 1536
45   br i1 %exitcond8, label %for.body3, label %for.inc28
47 for.inc28:                                        ; preds = %for.inc25
48   %indvar.next5 = add i64 %indvar4, 1
49   %exitcond9 = icmp ne i64 %indvar.next5, 1536
50   br i1 %exitcond9, label %for.cond1.preheader, label %for.end30
52 for.end30:                                        ; preds = %for.inc28
53   ret void
56 attributes #0 = { nounwind uwtable "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
58 ; CHECK: #pragma known-parallel
59 ; CHECK: for (int c0 = 0; c0 <= 1535; c0 += 1)
60 ; CHECK:   for (int c1 = 0; c1 <= 383; c1 += 1)
61 ; CHECK:       // SIMD
62 ; CHECK:     for (int c2 = 0; c2 <= 3; c2 += 1)
63 ; CHECK:       Stmt_for_body3(c0, 4 * c1 + c2);
64 ; CHECK: #pragma known-parallel
65 ; CHECK: for (int c0 = 0; c0 <= 1535; c0 += 1)
66 ; CHECK:   for (int c1 = 0; c1 <= 383; c1 += 1)
67 ; CHECK:     for (int c2 = 0; c2 <= 1535; c2 += 1)
68 ; CHECK:       // SIMD
69 ; CHECK:       for (int c3 = 0; c3 <= 3; c3 += 1)
70 ; CHECK:         Stmt_for_body8(c0, 4 * c1 + c3, c2);
72 !llvm.ident = !{!0}
74 !0 = !{!"clang version 3.5.0 "}