1 ; RUN: opt %loadNPMPolly '-passes=polly-import-jscop,polly-opt-isl,polly-codegen' \
2 ; RUN: -polly-target-throughput-vector-fma=1 \
3 ; RUN: -polly-target-latency-vector-fma=8 \
4 ; RUN: -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 \
9 ; RUN: -polly-import-jscop-postfix=transformed -S < %s \
12 ; Check that we disable the Loop Vectorizer.
14 ; CHECK: !{!"llvm.loop.vectorize.enable", i1 false}
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "x86_64-unknown-unknown"
19 define void @kernel_gemm(i32 %ni, i32 %nj, i32 %nk, ptr %A, ptr %B, ptr %C, ptr %C1) {
23 entry.split: ; preds = %entry
26 for.body: ; preds = %for.inc22, %entry.split
27 %indvars.iv43 = phi i64 [ 0, %entry.split ], [ %indvars.iv.next44, %for.inc22 ]
30 for.body3: ; preds = %for.inc19, %for.body
31 %indvars.iv40 = phi i64 [ 0, %for.body ], [ %indvars.iv.next41, %for.inc19 ]
34 for.body6: ; preds = %for.body6, %for.body3
35 %indvars.iv = phi i64 [ 0, %for.body3 ], [ %indvars.iv.next, %for.body6 ]
36 %tmp = load double, ptr %C1, align 8
37 %arrayidx9 = getelementptr inbounds [1024 x double], ptr %A, i64 %indvars.iv43, i64 %indvars.iv
38 %tmp1 = load double, ptr %arrayidx9, align 8
39 %arrayidx13 = getelementptr inbounds [1024 x double], ptr %B, i64 %indvars.iv, i64 %indvars.iv40
40 %tmp2 = load double, ptr %arrayidx13, align 8
41 %mul = fmul double %tmp1, %tmp2
42 %add = fadd double %tmp, %mul
43 %arrayidx17 = getelementptr inbounds [1024 x double], ptr %C, i64 %indvars.iv43, i64 %indvars.iv40
44 %tmp3 = load double, ptr %arrayidx17, align 8
45 %add18 = fadd double %tmp3, %add
46 store double %add18, ptr %arrayidx17, align 8
47 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
48 %exitcond = icmp ne i64 %indvars.iv.next, 1024
49 br i1 %exitcond, label %for.body6, label %for.inc19
51 for.inc19: ; preds = %for.body6
52 %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1
53 %exitcond42 = icmp ne i64 %indvars.iv.next41, 1024
54 br i1 %exitcond42, label %for.body3, label %for.inc22
56 for.inc22: ; preds = %for.inc19
57 %indvars.iv.next44 = add nuw nsw i64 %indvars.iv43, 1
58 %exitcond45 = icmp ne i64 %indvars.iv.next44, 1024
59 br i1 %exitcond45, label %for.body, label %for.end24
61 for.end24: ; preds = %for.inc22