llvm-project
31 строка · 1.1 Кб
1; RUN: opt %loadNPMPolly -passes=polly-codegen -S < %s | FileCheck %s
2
3; Verify that we generate the runtime check code after the conditional branch
4; in the SCoP region entering block (here %entry).
5;
6; CHECK: entry:
7; CHECK-NEXT: %0 = zext i32 %n to i64
8; CHECK-NEXT: br i1 false
9;
10; CHECK: %[[T0:[._a-zA-Z0-9]]] = sext i32 %n to i64
11; CHECK: %[[T1:[._a-zA-Z0-9]]] = icmp sge i64 %[[T0]], 1
12
13target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
14
15define void @init_array(i32 %n, ptr %data) {
16entry:
17%0 = zext i32 %n to i64
18br i1 false, label %for.end10, label %for.body4
19
20for.body4: ; preds = %for.body4, %entry
21%indvar1 = phi i64 [ %indvar.next2, %for.body4 ], [ 0, %entry ]
22%.moved.to.for.body4 = mul i64 %0, %indvar1
23%1 = add i64 %.moved.to.for.body4, 0
24%arrayidx7 = getelementptr double, ptr %data, i64 %1
25store double undef, ptr %arrayidx7, align 8
26%indvar.next2 = add i64 %indvar1, 1
27br i1 false, label %for.body4, label %for.end10
28
29for.end10: ; preds = %for.body4
30ret void
31}
32