brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 7eaec7b Raw
68 lines · plain
1; RUN: opt %loadNPMPolly -polly-allow-differing-element-types '-passes=polly-custom<scops>' -polly-print-scops -disable-output < %s 2>&1 | FileCheck %s2; RUN: opt %loadNPMPolly -S -polly-allow-differing-element-types '-passes=polly<no-default-opts>' < %s 2>&1 | FileCheck --check-prefix=IR %s3;4; CHECK:         Arrays {5; CHECK-NEXT:        i8 MemRef_A[*]; // Element size 16; CHECK-NEXT:    }7; CHECK:         Statements {8; CHECK-NEXT:       Stmt_for_body39; CHECK-NEXT:            Domain :=10; CHECK-NEXT:                { Stmt_for_body3[i0, i1] : 0 <= i0 <= 1023 and 0 <= i1 <= 1023 };11; CHECK-NEXT:            Schedule :=12; CHECK-NEXT:                { Stmt_for_body3[i0, i1] -> [i0, i1] };13; CHECK-NEXT:            MustWriteAccess :=	[Reduction Type: NONE] [Scalar: 0]14; CHECK-NEXT:                { Stmt_for_body3[i0, i1] -> MemRef_A[o0] : 0 <= o0 <= 186 };15;16;17; IR: polly.stmt.for.body3:18; IR:   call void @llvm.memset.p0.i64(ptr align 4 %A, i8 36, i64 187, i1 false)19;20;    #include <string.h>21;22;    void jd(int *A) {23;      for (int i = 0; i < 1024; i++)24;        for (int j = 0; j < 1024; j++)25;          memset(A, '$', 187);26;    }27;28target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"29 30define void @jd(ptr noalias %A) {31entry:32  br label %for.cond33 34for.cond:                                         ; preds = %for.inc4, %entry35  %i.0 = phi i32 [ 0, %entry ], [ %inc5, %for.inc4 ]36  %exitcond1 = icmp ne i32 %i.0, 102437  br i1 %exitcond1, label %for.body, label %for.end638 39for.body:                                         ; preds = %for.cond40  br label %for.cond141 42for.cond1:                                        ; preds = %for.inc, %for.body43  %j.0 = phi i32 [ 0, %for.body ], [ %inc, %for.inc ]44  %exitcond = icmp ne i32 %j.0, 102445  br i1 %exitcond, label %for.body3, label %for.end46 47for.body3:                                        ; preds = %for.cond148  call void @llvm.memset.p0.i64(ptr %A, i8 36, i64 187, i32 4, i1 false)49  br label %for.inc50 51for.inc:                                          ; preds = %for.body352  %inc = add nsw i32 %j.0, 153  br label %for.cond154 55for.end:                                          ; preds = %for.cond156  br label %for.inc457 58for.inc4:                                         ; preds = %for.end59  %inc5 = add nsw i32 %i.0, 160  br label %for.cond61 62for.end6:                                         ; preds = %for.cond63  ret void64}65 66declare void @llvm.memset.p0.i64(ptr nocapture, i8, i64, i32, i1) #167 68