brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · f35a07c Raw
63 lines · plain
1; RUN: opt %loadNPMPolly -polly-stmt-granularity=store -polly-print-instructions '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2 3;      void func(int *A, int *B){4;        for (int i = 0; i < 1024; i+=1) {5;      Stmt:6;          A[i] = i;7;          B[i] = i;8;        }9;      }10;11; CHECK:    Statements {12; CHECK-NEXT: 	Stmt_Stmt13; CHECK-NEXT:       Domain :=14; CHECK-NEXT:           { Stmt_Stmt[i0] : 0 <= i0 <= 1023 };15; CHECK-NEXT:       Schedule :=16; CHECK-NEXT:           { Stmt_Stmt[i0] -> [i0, 0] };17; CHECK-NEXT:       MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]18; CHECK-NEXT:           { Stmt_Stmt[i0] -> MemRef_A[i0] };19; CHECK-NEXT:       Instructions {20; CHECK-NEXT:             store i32 %i.0, ptr %arrayidx, align 421; CHECK-NEXT:       }22; CHECK-NEXT:  	Stmt_Stmt_b23; CHECK-NEXT:       Domain :=24; CHECK-NEXT:           { Stmt_Stmt_b[i0] : 0 <= i0 <= 1023 };25; CHECK-NEXT:       Schedule :=26; CHECK-NEXT:           { Stmt_Stmt_b[i0] -> [i0, 1] };27; CHECK-NEXT:       MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]28; CHECK-NEXT:           { Stmt_Stmt_b[i0] -> MemRef_B[i0] };29; CHECK-NEXT:       Instructions {30; CHECK-NEXT:             store i32 %i.0, ptr %arrayidx2, align 431; CHECK-NEXT:       }32; CHECK-NEXT:    }33;34; Function Attrs: noinline nounwind uwtable35define void @func(ptr %A, ptr %B) #0 {36entry:37  br label %for.cond38 39for.cond:                                         ; preds = %for.inc, %entry40  %i.0 = phi i32 [ 0, %entry ], [ %add, %for.inc ]41  %cmp = icmp slt i32 %i.0, 102442  br i1 %cmp, label %for.body, label %for.end43 44for.body:                                         ; preds = %for.cond45  br label %Stmt46 47Stmt:                                             ; preds = %for.body48  %idxprom = sext i32 %i.0 to i6449  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom50  store i32 %i.0, ptr %arrayidx, align 451  %idxprom1 = sext i32 %i.0 to i6452  %arrayidx2 = getelementptr inbounds i32, ptr %B, i64 %idxprom153  store i32 %i.0, ptr %arrayidx2, align 454  br label %for.inc55 56for.inc:                                          ; preds = %Stmt57  %add = add nsw i32 %i.0, 158  br label %for.cond59 60for.end:                                          ; preds = %for.cond61  ret void62}63