brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · be1c649 Raw
37 lines · plain
1; RUN: not --crash opt %loadNPMPolly '-passes=polly-custom<import-jscop>' -disable-output 2>&1 < %s | FileCheck %s2;3; Check that we do not allow to access elements not accessed before because the4; alignment information would become invalid.5;6; CHECK: JScop file changes the accessed memory7;8;    void bad_alignment(int *A) {9;      for (int i = 0; i < 1024; i += 2)10;        A[i] = i;11;    }12;13target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"14 15define void @bad_alignment(ptr %A) {16entry:17  br label %for.cond18 19for.cond:                                         ; preds = %for.inc, %entry20  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]21  %cmp = icmp slt i64 %indvars.iv, 102422  br i1 %cmp, label %for.body, label %for.end23 24for.body:                                         ; preds = %for.cond25  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv26  %tmp = trunc i64 %indvars.iv to i3227  store i32 %tmp, ptr %arrayidx, align 828  br label %for.inc29 30for.inc:                                          ; preds = %for.body31  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 232  br label %for.cond33 34for.end:                                          ; preds = %for.cond35  ret void36}37