1; RUN: opt %loadPolly -polly-opt-isl -polly-pattern-matching-based-opts=true \
2; RUN: -polly-target-throughput-vector-fma=1 \
3; RUN: -polly-target-latency-vector-fma=8 \
4; RUN: -analyze -polly-ast -polly-target-1st-cache-level-associativity=8 \
5; RUN: -polly-target-2nd-cache-level-associativity=8 \
6; RUN: -polly-target-1st-cache-level-size=32768 \
7; RUN: -polly-target-vector-register-bitwidth=256 \
8; RUN: -polly-target-2nd-cache-level-size=262144 < %s \
9; RUN: | FileCheck %s
10;
11; RUN: opt %loadPolly -analyze -polly-dependences < %s | FileCheck %s \
12; RUN: --check-prefix=DEPENDENCES
13;
14;    /* C := A * B + C */
15;    /* Elements of the matrices A, B, C have the char type. */
16;    /* The type size of elements of the matrix multiplication operands is used
17;       to determine the parameters of the code produced by the optimization
18;       of the matrix multiplication (e.g. bounds of the loops of the loop
19;       nest, the innermost loop body). This test checks the form of
20;       the generated loop nest. See getMicroKernelParams and
21;       getMacroKernelParams from lib/Transform/ScheduleOptimizer.cpp
22;       for details.
23;
24;       This patch also checks that we can detect matrix multiplication
25;       in case there are reduction dependencies and there are not RAW
26;       dependencies. */
27;    for (i = 0; i < _PB_NI; i++)
28;      for (j = 0; j < _PB_NJ; j++)
29;   for (k = 0; k < _PB_NK; ++k)
30;     C[i][j] += A[i][k] * B[k][j];
31;
32; CHECK:    // 1st level tiling - Tiles
33; CHECK-NEXT:    for (int c1 = 0; c1 <= 1; c1 += 1) {
34; CHECK-NEXT:      for (int c3 = 0; c3 <= 1023; c3 += 1)
35; CHECK-NEXT:        for (int c4 = 512 * c1; c4 <= 512 * c1 + 511; c4 += 1)
36; CHECK-NEXT:          CopyStmt_0(0, c3, c4);
37; CHECK-NEXT:      for (int c2 = 0; c2 <= 2; c2 += 1) {
38; CHECK-NEXT:        for (int c3 = 384 * c2; c3 <= min(1023, 384 * c2 + 383); c3 += 1)
39; CHECK-NEXT:          for (int c5 = 512 * c1; c5 <= 512 * c1 + 511; c5 += 1)
40; CHECK-NEXT:            CopyStmt_1(c3, 0, c5);
41; CHECK-NEXT:        // 1st level tiling - Points
42; CHECK-NEXT:        // Register tiling - Tiles
43; CHECK-NEXT:        for (int c3 = 0; c3 <= 31; c3 += 1)
44; CHECK-NEXT:          for (int c4 = 0; c4 <= min(47, -48 * c2 + 127); c4 += 1)
45; CHECK-NEXT:            for (int c5 = 0; c5 <= 511; c5 += 1) {
46; CHECK-NEXT:              // Loop Vectorizer Disabled
47; CHECK-NEXT:              // Register tiling - Points
48; CHECK-NEXT:              {
49; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3, 512 * c1 + c5);
50; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 1, 512 * c1 + c5);
51; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 2, 512 * c1 + c5);
52; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 3, 512 * c1 + c5);
53; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 4, 512 * c1 + c5);
54; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 5, 512 * c1 + c5);
55; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 6, 512 * c1 + c5);
56; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 7, 512 * c1 + c5);
57; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 8, 512 * c1 + c5);
58; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 9, 512 * c1 + c5);
59; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 10, 512 * c1 + c5);
60; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 11, 512 * c1 + c5);
61; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 12, 512 * c1 + c5);
62; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 13, 512 * c1 + c5);
63; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 14, 512 * c1 + c5);
64; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 15, 512 * c1 + c5);
65; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 16, 512 * c1 + c5);
66; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 17, 512 * c1 + c5);
67; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 18, 512 * c1 + c5);
68; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 19, 512 * c1 + c5);
69; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 20, 512 * c1 + c5);
70; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 21, 512 * c1 + c5);
71; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 22, 512 * c1 + c5);
72; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 23, 512 * c1 + c5);
73; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 24, 512 * c1 + c5);
74; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 25, 512 * c1 + c5);
75; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 26, 512 * c1 + c5);
76; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 27, 512 * c1 + c5);
77; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 28, 512 * c1 + c5);
78; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 29, 512 * c1 + c5);
79; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 30, 512 * c1 + c5);
80; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4, 32 * c3 + 31, 512 * c1 + c5);
81; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3, 512 * c1 + c5);
82; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 1, 512 * c1 + c5);
83; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 2, 512 * c1 + c5);
84; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 3, 512 * c1 + c5);
85; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 4, 512 * c1 + c5);
86; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 5, 512 * c1 + c5);
87; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 6, 512 * c1 + c5);
88; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 7, 512 * c1 + c5);
89; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 8, 512 * c1 + c5);
90; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 9, 512 * c1 + c5);
91; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 10, 512 * c1 + c5);
92; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 11, 512 * c1 + c5);
93; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 12, 512 * c1 + c5);
94; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 13, 512 * c1 + c5);
95; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 14, 512 * c1 + c5);
96; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 15, 512 * c1 + c5);
97; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 16, 512 * c1 + c5);
98; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 17, 512 * c1 + c5);
99; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 18, 512 * c1 + c5);
100; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 19, 512 * c1 + c5);
101; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 20, 512 * c1 + c5);
102; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 21, 512 * c1 + c5);
103; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 22, 512 * c1 + c5);
104; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 23, 512 * c1 + c5);
105; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 24, 512 * c1 + c5);
106; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 25, 512 * c1 + c5);
107; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 26, 512 * c1 + c5);
108; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 27, 512 * c1 + c5);
109; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 28, 512 * c1 + c5);
110; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 29, 512 * c1 + c5);
111; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 30, 512 * c1 + c5);
112; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 1, 32 * c3 + 31, 512 * c1 + c5);
113; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3, 512 * c1 + c5);
114; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 1, 512 * c1 + c5);
115; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 2, 512 * c1 + c5);
116; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 3, 512 * c1 + c5);
117; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 4, 512 * c1 + c5);
118; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 5, 512 * c1 + c5);
119; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 6, 512 * c1 + c5);
120; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 7, 512 * c1 + c5);
121; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 8, 512 * c1 + c5);
122; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 9, 512 * c1 + c5);
123; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 10, 512 * c1 + c5);
124; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 11, 512 * c1 + c5);
125; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 12, 512 * c1 + c5);
126; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 13, 512 * c1 + c5);
127; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 14, 512 * c1 + c5);
128; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 15, 512 * c1 + c5);
129; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 16, 512 * c1 + c5);
130; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 17, 512 * c1 + c5);
131; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 18, 512 * c1 + c5);
132; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 19, 512 * c1 + c5);
133; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 20, 512 * c1 + c5);
134; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 21, 512 * c1 + c5);
135; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 22, 512 * c1 + c5);
136; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 23, 512 * c1 + c5);
137; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 24, 512 * c1 + c5);
138; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 25, 512 * c1 + c5);
139; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 26, 512 * c1 + c5);
140; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 27, 512 * c1 + c5);
141; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 28, 512 * c1 + c5);
142; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 29, 512 * c1 + c5);
143; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 30, 512 * c1 + c5);
144; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 2, 32 * c3 + 31, 512 * c1 + c5);
145; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3, 512 * c1 + c5);
146; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 1, 512 * c1 + c5);
147; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 2, 512 * c1 + c5);
148; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 3, 512 * c1 + c5);
149; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 4, 512 * c1 + c5);
150; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 5, 512 * c1 + c5);
151; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 6, 512 * c1 + c5);
152; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 7, 512 * c1 + c5);
153; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 8, 512 * c1 + c5);
154; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 9, 512 * c1 + c5);
155; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 10, 512 * c1 + c5);
156; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 11, 512 * c1 + c5);
157; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 12, 512 * c1 + c5);
158; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 13, 512 * c1 + c5);
159; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 14, 512 * c1 + c5);
160; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 15, 512 * c1 + c5);
161; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 16, 512 * c1 + c5);
162; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 17, 512 * c1 + c5);
163; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 18, 512 * c1 + c5);
164; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 19, 512 * c1 + c5);
165; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 20, 512 * c1 + c5);
166; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 21, 512 * c1 + c5);
167; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 22, 512 * c1 + c5);
168; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 23, 512 * c1 + c5);
169; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 24, 512 * c1 + c5);
170; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 25, 512 * c1 + c5);
171; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 26, 512 * c1 + c5);
172; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 27, 512 * c1 + c5);
173; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 28, 512 * c1 + c5);
174; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 29, 512 * c1 + c5);
175; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 30, 512 * c1 + c5);
176; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 3, 32 * c3 + 31, 512 * c1 + c5);
177; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3, 512 * c1 + c5);
178; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 1, 512 * c1 + c5);
179; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 2, 512 * c1 + c5);
180; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 3, 512 * c1 + c5);
181; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 4, 512 * c1 + c5);
182; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 5, 512 * c1 + c5);
183; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 6, 512 * c1 + c5);
184; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 7, 512 * c1 + c5);
185; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 8, 512 * c1 + c5);
186; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 9, 512 * c1 + c5);
187; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 10, 512 * c1 + c5);
188; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 11, 512 * c1 + c5);
189; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 12, 512 * c1 + c5);
190; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 13, 512 * c1 + c5);
191; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 14, 512 * c1 + c5);
192; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 15, 512 * c1 + c5);
193; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 16, 512 * c1 + c5);
194; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 17, 512 * c1 + c5);
195; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 18, 512 * c1 + c5);
196; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 19, 512 * c1 + c5);
197; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 20, 512 * c1 + c5);
198; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 21, 512 * c1 + c5);
199; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 22, 512 * c1 + c5);
200; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 23, 512 * c1 + c5);
201; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 24, 512 * c1 + c5);
202; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 25, 512 * c1 + c5);
203; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 26, 512 * c1 + c5);
204; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 27, 512 * c1 + c5);
205; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 28, 512 * c1 + c5);
206; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 29, 512 * c1 + c5);
207; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 30, 512 * c1 + c5);
208; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 4, 32 * c3 + 31, 512 * c1 + c5);
209; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3, 512 * c1 + c5);
210; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 1, 512 * c1 + c5);
211; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 2, 512 * c1 + c5);
212; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 3, 512 * c1 + c5);
213; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 4, 512 * c1 + c5);
214; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 5, 512 * c1 + c5);
215; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 6, 512 * c1 + c5);
216; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 7, 512 * c1 + c5);
217; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 8, 512 * c1 + c5);
218; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 9, 512 * c1 + c5);
219; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 10, 512 * c1 + c5);
220; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 11, 512 * c1 + c5);
221; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 12, 512 * c1 + c5);
222; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 13, 512 * c1 + c5);
223; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 14, 512 * c1 + c5);
224; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 15, 512 * c1 + c5);
225; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 16, 512 * c1 + c5);
226; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 17, 512 * c1 + c5);
227; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 18, 512 * c1 + c5);
228; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 19, 512 * c1 + c5);
229; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 20, 512 * c1 + c5);
230; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 21, 512 * c1 + c5);
231; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 22, 512 * c1 + c5);
232; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 23, 512 * c1 + c5);
233; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 24, 512 * c1 + c5);
234; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 25, 512 * c1 + c5);
235; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 26, 512 * c1 + c5);
236; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 27, 512 * c1 + c5);
237; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 28, 512 * c1 + c5);
238; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 29, 512 * c1 + c5);
239; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 30, 512 * c1 + c5);
240; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 5, 32 * c3 + 31, 512 * c1 + c5);
241; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3, 512 * c1 + c5);
242; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 1, 512 * c1 + c5);
243; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 2, 512 * c1 + c5);
244; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 3, 512 * c1 + c5);
245; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 4, 512 * c1 + c5);
246; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 5, 512 * c1 + c5);
247; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 6, 512 * c1 + c5);
248; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 7, 512 * c1 + c5);
249; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 8, 512 * c1 + c5);
250; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 9, 512 * c1 + c5);
251; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 10, 512 * c1 + c5);
252; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 11, 512 * c1 + c5);
253; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 12, 512 * c1 + c5);
254; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 13, 512 * c1 + c5);
255; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 14, 512 * c1 + c5);
256; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 15, 512 * c1 + c5);
257; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 16, 512 * c1 + c5);
258; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 17, 512 * c1 + c5);
259; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 18, 512 * c1 + c5);
260; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 19, 512 * c1 + c5);
261; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 20, 512 * c1 + c5);
262; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 21, 512 * c1 + c5);
263; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 22, 512 * c1 + c5);
264; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 23, 512 * c1 + c5);
265; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 24, 512 * c1 + c5);
266; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 25, 512 * c1 + c5);
267; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 26, 512 * c1 + c5);
268; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 27, 512 * c1 + c5);
269; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 28, 512 * c1 + c5);
270; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 29, 512 * c1 + c5);
271; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 30, 512 * c1 + c5);
272; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 6, 32 * c3 + 31, 512 * c1 + c5);
273; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3, 512 * c1 + c5);
274; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 1, 512 * c1 + c5);
275; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 2, 512 * c1 + c5);
276; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 3, 512 * c1 + c5);
277; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 4, 512 * c1 + c5);
278; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 5, 512 * c1 + c5);
279; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 6, 512 * c1 + c5);
280; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 7, 512 * c1 + c5);
281; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 8, 512 * c1 + c5);
282; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 9, 512 * c1 + c5);
283; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 10, 512 * c1 + c5);
284; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 11, 512 * c1 + c5);
285; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 12, 512 * c1 + c5);
286; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 13, 512 * c1 + c5);
287; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 14, 512 * c1 + c5);
288; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 15, 512 * c1 + c5);
289; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 16, 512 * c1 + c5);
290; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 17, 512 * c1 + c5);
291; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 18, 512 * c1 + c5);
292; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 19, 512 * c1 + c5);
293; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 20, 512 * c1 + c5);
294; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 21, 512 * c1 + c5);
295; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 22, 512 * c1 + c5);
296; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 23, 512 * c1 + c5);
297; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 24, 512 * c1 + c5);
298; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 25, 512 * c1 + c5);
299; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 26, 512 * c1 + c5);
300; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 27, 512 * c1 + c5);
301; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 28, 512 * c1 + c5);
302; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 29, 512 * c1 + c5);
303; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 30, 512 * c1 + c5);
304; CHECK-NEXT:                Stmt_for_body6(384 * c2 + 8 * c4 + 7, 32 * c3 + 31, 512 * c1 + c5);
305; CHECK-NEXT:              }
306; CHECK-NEXT:            }
307; CHECK-NEXT:      }
308; CHECK-NEXT:    }
309;
310; DEPENDENCES:  RAW dependences:
311; DEPENDENCES-NEXT:    {  }
312; DEPENDENCES-NEXT:  WAR dependences:
313; DEPENDENCES-NEXT:    {  }
314; DEPENDENCES-NEXT:  WAW dependences:
315; DEPENDENCES-NEXT:    {  }
316; DEPENDENCES-NEXT:  Reduction dependences:
317; DEPENDENCES-NEXT:    { Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, 1 + i2] : 0 <= i0 <= 1023 and 0 <= i1 <= 1023 and 0 <= i2 <= 1022 }
318; DEPENDENCES-NEXT:  Transitive closure of reduction dependences:
319; DEPENDENCES-NEXT:    { Stmt_for_body6[i0, i1, i2] -> Stmt_for_body6[i0, i1, o2] : 0 <= i0 <= 1023 and 0 <= i1 <= 1023 and ((i2 >= 0 and i2 < o2 <= 1023) or (i2 <= 1023 and 0 <= o2 < i2)) }
320;
321target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
322target triple = "x86_64-unknown-unknown"
323
324define internal void @kernel_gemm(i32 %ni, i32 %nj, i32 %nk, i8 signext %alpha, i8 signext %beta, [1024 x i8]* %C, [1024 x i8]* %A, [1024 x i8]* %B) {
325entry:
326  br label %entry.split
327
328entry.split:                                      ; preds = %entry
329  br label %for.cond1.preheader
330
331for.cond1.preheader:                              ; preds = %for.inc23, %entry.split
332  %indvars.iv45 = phi i64 [ 0, %entry.split ], [ %indvars.iv.next46, %for.inc23 ]
333  br label %for.cond4.preheader
334
335for.cond4.preheader:                              ; preds = %for.inc20, %for.cond1.preheader
336  %indvars.iv42 = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next43, %for.inc20 ]
337  br label %for.body6
338
339for.body6:                                        ; preds = %for.body6, %for.cond4.preheader
340  %indvars.iv = phi i64 [ 0, %for.cond4.preheader ], [ %indvars.iv.next, %for.body6 ]
341  %arrayidx8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %A, i64 %indvars.iv45, i64 %indvars.iv
342  %tmp = load i8, i8* %arrayidx8, align 1
343  %arrayidx12 = getelementptr inbounds [1024 x i8], [1024 x i8]* %B, i64 %indvars.iv, i64 %indvars.iv42
344  %tmp1 = load i8, i8* %arrayidx12, align 1
345  %mul = mul i8 %tmp1, %tmp
346  %arrayidx17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %C, i64 %indvars.iv45, i64 %indvars.iv42
347  %tmp2 = load i8, i8* %arrayidx17, align 1
348  %add = add i8 %mul, %tmp2
349  store i8 %add, i8* %arrayidx17, align 1
350  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
351  %exitcond = icmp ne i64 %indvars.iv.next, 1024
352  br i1 %exitcond, label %for.body6, label %for.inc20
353
354for.inc20:                                        ; preds = %for.body6
355  %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1
356  %exitcond44 = icmp ne i64 %indvars.iv.next43, 1024
357  br i1 %exitcond44, label %for.cond4.preheader, label %for.inc23
358
359for.inc23:                                        ; preds = %for.inc20
360  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
361  %exitcond47 = icmp ne i64 %indvars.iv.next46, 1024
362  br i1 %exitcond47, label %for.cond1.preheader, label %for.end25
363
364for.end25:                                        ; preds = %for.inc23
365  ret void
366}
367