1 ; RUN: opt %loadNPMPolly '-passes=print<polly-ast>' -disable-output < %s | FileCheck %s --check-prefix=AST
2 ; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
4 ; TODO: FIXME: Simplify the context.
5 ; AST: if (n >= 1 && 0 == n <= -1)
8 ; CHECK-NEXT: %0 = zext i32 %n to i64
10 ; CHECK: polly.split_new_and_old:
11 ; CHECK-NEXT: %1 = sext i32 %n to i64
12 ; CHECK-NEXT: %2 = icmp sge i64 %1, 1
13 ; CHECK-NEXT: %3 = sext i32 %n to i64
14 ; CHECK-NEXT: %4 = icmp sle i64 %3, -1
15 ; CHECK-NEXT: %5 = sext i1 %4 to i64
16 ; CHECK-NEXT: %6 = icmp eq i64 0, %5
17 ; CHECK-NEXT: %7 = and i1 %2, %6
18 ; CHECK-NEXT: %polly.rtc.result = and i1 %7, true
19 ; CHECK-NEXT: br i1 %polly.rtc.result, label %polly.start, label %for.body4
21 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 define void @init_array(i32 %n, ptr %data) {
25 %0 = zext i32 %n to i64
28 for.body4: ; preds = %for.body4, %entry
29 %indvar1 = phi i64 [ %indvar.next2, %for.body4 ], [ 0, %entry ]
30 %.moved.to.for.body4 = mul i64 %0, %indvar1
31 %1 = add i64 %.moved.to.for.body4, 0
32 %arrayidx7 = getelementptr double, ptr %data, i64 %1
33 store double undef, ptr %arrayidx7, align 8
34 %indvar.next2 = add i64 %indvar1, 1
35 br i1 false, label %for.body4, label %for.end10
37 for.end10: ; preds = %for.body4