brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 70d5bdf Raw
73 lines · plain
1; RUN: opt %loadNPMPolly -aa-pipeline=basic-aa -polly-stmt-granularity=bb '-passes=polly-custom<deps>' -polly-print-deps -disable-output < %s | FileCheck %s2;3; CHECK:      RAW dependences:4; CHECK-NEXT:     {  }5; CHECK-NEXT: WAR dependences:6; CHECK-NEXT:     {  }7; CHECK-NEXT: WAW dependences:8; CHECK-NEXT:     {  }9; CHECK-NEXT: Reduction dependences:10; CHECK-NEXT:     { Stmt_for_body3[i0, i1] -> Stmt_for_body3[o0, 1 + i0 + i1 - o0] : i0 >= 0 and i1 >= 0 and o0 >= -1022 + i0 + i1 and i0 <= o0 <= 1023 and o0 <= 1 + i0 }11;12; void f(int *restrict A, int *restrict B, int *restrict Values) {13;   for (int i = 0; i < 1024; i++) {14;     for (int j = 0; j < 1024; j++) {15;       A[i] += Values[i + j - 1];16;       B[j] += Values[i + j + 42];17;     }18;   }19; }20;21target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"22 23define void @f(ptr noalias %A, ptr noalias %B, ptr noalias %Values)  {24entry:25  br label %for.cond26 27for.cond:                                         ; preds = %for.inc11, %entry28  %i.0 = phi i32 [ 0, %entry ], [ %inc12, %for.inc11 ]29  %exitcond1 = icmp ne i32 %i.0, 102430  br i1 %exitcond1, label %for.body, label %for.end1331 32for.body:                                         ; preds = %for.cond33  br label %for.cond134 35for.cond1:                                        ; preds = %for.inc, %for.body36  %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]37  %exitcond = icmp ne i32 %j.0, 102438  br i1 %exitcond, label %for.body3, label %for.end39 40for.body3:                                        ; preds = %for.cond141  %add = add nsw i32 %i.0, %j.042  %sub = add nsw i32 %add, -143  %arrayidx = getelementptr inbounds i32, ptr %Values, i32 %sub44  %tmp = load i32, ptr %arrayidx, align 445  %arrayidx4 = getelementptr inbounds i32, ptr %A, i32 %i.046  %tmp2 = load i32, ptr %arrayidx4, align 447  %add5 = add nsw i32 %tmp2, %tmp48  store i32 %add5, ptr %arrayidx4, align 449  %add6 = add nsw i32 %i.0, %j.050  %add7 = add nsw i32 %add6, 4251  %arrayidx8 = getelementptr inbounds i32, ptr %Values, i32 %add752  %tmp3 = load i32, ptr %arrayidx8, align 453  %arrayidx9 = getelementptr inbounds i32, ptr %B, i32 %j.054  %tmp4 = load i32, ptr %arrayidx9, align 455  %add10 = add nsw i32 %tmp4, %tmp356  store i32 %add10, ptr %arrayidx9, align 457  br label %for.inc58 59for.inc:                                          ; preds = %for.body360  %inc = add nsw i32 %j.0, 161  br label %for.cond162 63for.end:                                          ; preds = %for.cond164  br label %for.inc1165 66for.inc11:                                        ; preds = %for.end67  %inc12 = add nsw i32 %i.0, 168  br label %for.cond69 70for.end13:                                        ; preds = %for.cond71  ret void72}73