llvm-project
36 строк · 1.2 Кб
1; RUN: opt %loadNPMPolly '-passes=print<polly-detect>' -disable-output < %s
2
3; Verify that the scop detection does not crash on inputs with unreachable
4; blocks. Earlier we crashed when detecting error blocks.
5
6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
7target triple = "x86_64-unknown-linux-gnu"
8
9; Function Attrs: nounwind uwtable
10define void @foo() {
11entry:
12br label %while.cond
13
14while.cond: ; preds = %for.end, %entry
15br i1 false, label %for.end, label %while.end8
16
17while.cond1: ; preds = %while.cond4
18br i1 undef, label %while.body3, label %for.inc
19
20while.body3: ; preds = %while.cond1
21br label %while.cond4
22
23while.cond4: ; preds = %while.cond4, %while.body3
24br i1 undef, label %while.cond4, label %while.cond1
25
26for.inc: ; preds = %while.cond1
27%conv = zext i16 undef to i32
28br label %for.end
29
30for.end: ; preds = %for.inc, %while.cond
31%conv.sink = phi i32 [ %conv, %for.inc ], [ 0, %while.cond ]
32br label %while.cond
33
34while.end8: ; preds = %while.cond
35ret void
36}
37