brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · c5c11c8 Raw
60 lines · plain
1; RUN: opt %loadNPMPolly -S '-passes=polly<no-default-opts>' < %s | FileCheck %s2; XFAIL: *3;4; CHECK-LABEL: polly.stmt.if.then:5; CHECK-NEXT:   unreachable6;7;    void f(int *A, int N) {8;      for (int i = 0; i < 1024; i++)9;        if (i == N) {10;          if (A[i])11;            abort();12;          else13;            A[i] = i;14;        }15;    }16;17target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"18 19define void @f(ptr %A, i64 %N) {20entry:21  br label %for.cond22 23for.cond:                                         ; preds = %for.inc, %entry24  %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]25  %cmp = icmp slt i64 %indvars.iv, 102426  br i1 %cmp, label %for.body, label %for.end27 28for.body:                                         ; preds = %for.cond29  %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv30  %tmp = load i32, ptr %arrayidx, align 431  %cmp.outer = icmp eq i64 %indvars.iv, %N32  br i1 %cmp.outer, label %if.then.outer, label %for.inc33 34if.then.outer:35  %tobool = icmp eq i32 %tmp, 036  br i1 %tobool, label %if.else, label %if.then37 38if.then:                                          ; preds = %for.body39  call void @abort()40  unreachable41 42if.else:                                          ; preds = %for.body43  %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv44  %tmp1 = trunc i64 %indvars.iv to i3245  store i32 %tmp1, ptr %arrayidx2, align 446  br label %if.end47 48if.end:                                           ; preds = %if.else49  br label %for.inc50 51for.inc:                                          ; preds = %if.end52  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 153  br label %for.cond54 55for.end:                                          ; preds = %for.cond56  ret void57}58 59declare void @abort()60