brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · f08fabd Raw
42 lines · plain
1; RUN: opt %loadNPMPolly '-passes=polly-custom<import-jscop>' -polly-print-import-jscop -disable-output < %s | FileCheck %s2;3; Check that we allow the new access functions even though they access4; different locations than the original ones (but the alignment is the5; default, thus there is no problem).6;7; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_B[0] }' detected in JSCOP file8; CHECK-DAG: New access function '{ Stmt_for_body[i0] -> MemRef_A[i0] }' detected in JSCOP file9;10;    void simple_stride(int *restrict A, int *restrict B) {11;      for (int i = 0; i < 16; i++)12;        A[i * 2] = B[i * 2];13;    }14;15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"16 17define void @simple_stride(ptr noalias %A, ptr noalias %B) {18entry:19  br label %for.cond20 21for.cond:                                         ; preds = %for.inc, %entry22  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]23  %exitcond = icmp ne i64 %indvars.iv, 1624  br i1 %exitcond, label %for.body, label %for.end25 26for.body:                                         ; preds = %for.cond27  %tmp = shl nsw i64 %indvars.iv, 128  %arrayidx = getelementptr inbounds i32, ptr %B, i64 %tmp29  %tmp4 = load i32, ptr %arrayidx, align 430  %tmp5 = shl nsw i64 %indvars.iv, 131  %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %tmp532  store i32 %tmp4, ptr %arrayidx3, align 433  br label %for.inc34 35for.inc:                                          ; preds = %for.body36  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 137  br label %for.cond38 39for.end:                                          ; preds = %for.cond40  ret void41}42