llvm-project
43 строки · 1.6 Кб
1; RUN: opt < %s -passes=loop-simplify -S
2; PR8702
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"
4target triple = "x86_64-unknown-freebsd9.0"
5
6declare void @foo(i32 %x)
7
8define fastcc void @inm_merge() nounwind {
9entry:
10br label %for.cond
11
12for.cond: ; preds = %while.cond36.i, %entry
13br i1 undef, label %do.body, label %for.body
14
15for.body: ; preds = %for.cond
16br i1 undef, label %while.cond36.i, label %if.end44
17
18if.end44: ; preds = %for.body
19%call49 = call fastcc i32 @inm_get_source()
20br i1 undef, label %if.end54, label %for.cond64
21
22if.end54: ; preds = %if.end44
23br label %while.cond36.i
24
25while.cond36.i: ; preds = %if.end54, %for.body
26br label %for.cond
27
28for.cond64: ; preds = %if.end88, %for.cond64, %if.end44
29%error.161 = phi i32 [ %error.161, %for.cond64 ], [ %error.161, %if.end88 ], [ %call49, %if.end44 ]
30call void @foo(i32 %error.161)
31br i1 undef, label %for.cond64, label %if.end88
32
33if.end88: ; preds = %for.cond64
34br i1 undef, label %for.cond64, label %if.end98
35
36if.end98: ; preds = %if.end88
37unreachable
38
39do.body: ; preds = %for.cond
40unreachable
41}
42
43declare fastcc i32 @inm_get_source() nounwind
44