1; RUN: opt %loadPolly -polly-parallel -polly-opt-isl -polly-ast -disable-output -debug-only=polly-ast < %s 2>&1 | FileCheck --check-prefix=AST %s
2; RUN: opt %loadPolly -polly-parallel -polly-opt-isl -polly-codegen -S < %s | FileCheck --check-prefix=CODEGEN %s
3; REQUIRES: asserts
4
5; Parallelization of detected matrix-multiplication.
6; Currently, this is not supported. Due to Packed_A/Packed_B not private
7; per-thread the outer loops cannot be parallelized and a
8; '#pragma omp parallel for' on an inner loop may impose too much overhead.
9
10target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
11target triple = "x86_64-pc-windows-msvc19.16.27034"
12
13define i32 @foo([1536 x float]* nocapture readonly %A, [1536 x float]* nocapture readonly %B, [1536 x float]* nocapture %C) {
14entry:
15  br label %entry.split
16
17entry.split:
18  br label %for.cond1.preheader
19
20for.cond1.preheader:
21  %indvars.iv50 = phi i64 [ 0, %entry.split ], [ %indvars.iv.next51, %for.cond.cleanup3 ]
22  br label %for.cond5.preheader
23
24for.cond.cleanup:
25  ret i32 0
26
27for.cond5.preheader:
28  %indvars.iv47 = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next48, %for.cond.cleanup7 ]
29  %arrayidx10 = getelementptr inbounds [1536 x float], [1536 x float]* %C, i64 %indvars.iv50, i64 %indvars.iv47
30  br label %for.body8
31
32for.cond.cleanup3:
33  %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1
34  %exitcond52 = icmp eq i64 %indvars.iv.next51, 1536
35  br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
36
37for.cond.cleanup7:
38  %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1
39  %exitcond49 = icmp eq i64 %indvars.iv.next48, 1536
40  br i1 %exitcond49, label %for.cond.cleanup3, label %for.cond5.preheader
41
42for.body8:
43  %indvars.iv = phi i64 [ 0, %for.cond5.preheader ], [ %indvars.iv.next, %for.body8 ]
44  %0 = load float, float* %arrayidx10, align 4
45  %arrayidx14 = getelementptr inbounds [1536 x float], [1536 x float]* %A, i64 %indvars.iv50, i64 %indvars.iv
46  %1 = load float, float* %arrayidx14, align 4
47  %arrayidx18 = getelementptr inbounds [1536 x float], [1536 x float]* %B, i64 %indvars.iv, i64 %indvars.iv47
48  %2 = load float, float* %arrayidx18, align 4
49  %mul = fmul float %1, %2
50  %add = fadd float %0, %mul
51  store float %add, float* %arrayidx10, align 4
52  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
53  %exitcond = icmp eq i64 %indvars.iv.next, 1536
54  br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
55}
56
57
58; AST-NOT: parallel
59
60; CODEGEN-NOT: subfunc
61