1; RUN: opt %loadPolly -basic-aa -polly-codegen -S < %s | FileCheck %s
2
3target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
4
5define void @run-time-condition(i16* noalias %A, i16* noalias %B) {
6entry:
7  br label %for.cond
8
9for.cond:                                         ; preds = %for.body, %entry
10  %indvar = phi i64 [ 0, %entry ], [ %inc, %for.body ]
11  %cmp = icmp slt i64 %indvar, 1024
12  br i1 %cmp, label %for.body, label %for.end
13
14for.body:                                         ; preds = %for.cond
15  %arrayidx = getelementptr inbounds i16, i16* %B, i64 0
16  %load = load i16, i16* %arrayidx
17  %add10 = add nsw i16 %load, 1
18  %arrayidx13 = getelementptr inbounds i16, i16* %A, i64 %indvar
19  store i16 %add10, i16* %arrayidx13, align 2
20  %inc = add nsw i64 %indvar, 1
21  br label %for.cond
22
23for.end:                                          ; preds = %for.cond
24  ret void
25}
26
27; The trivial case, no run-time checks required.
28;
29; CHECK: polly.split_new_and_old:
30; CHECK:  br i1 true, label %polly.start, label %for.cond
31