1 ; RUN: opt %loadPolly -S -polly-codegen < %s | FileCheck %s
4 ; CHECK-LABEL: polly.stmt.if.then:
5 ; CHECK-NEXT: unreachable
7 ; void f(int *A, int N) {
8 ; for (int i = 0; i < 1024; i++)
17 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19 define void @f(ptr %A, i64 %N) {
23 for.cond: ; preds = %for.inc, %entry
24 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ]
25 %cmp = icmp slt i64 %indvars.iv, 1024
26 br i1 %cmp, label %for.body, label %for.end
28 for.body: ; preds = %for.cond
29 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
30 %tmp = load i32, ptr %arrayidx, align 4
31 %cmp.outer = icmp eq i64 %indvars.iv, %N
32 br i1 %cmp.outer, label %if.then.outer, label %for.inc
35 %tobool = icmp eq i32 %tmp, 0
36 br i1 %tobool, label %if.else, label %if.then
38 if.then: ; preds = %for.body
42 if.else: ; preds = %for.body
43 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv
44 %tmp1 = trunc i64 %indvars.iv to i32
45 store i32 %tmp1, ptr %arrayidx2, align 4
48 if.end: ; preds = %if.else
51 for.inc: ; preds = %if.end
52 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
55 for.end: ; preds = %for.cond