blob: 0aa95fd2d720bac679d8ba5734665cd65577061f [file] [log] [blame]
Cong Houb9e8d482015-12-17 01:29:08 +00001; RUN: llc < %s
2; PR25838
3
4target triple = "armv7--linux-android"
5
6%0 = type { i32, i32 }
7
8define i32 @foo(%0* readonly) {
9 br i1 undef, label %12, label %2
10
11; <label>:2
12 %3 = trunc i64 undef to i32
13 %4 = icmp eq i32 undef, 0
14 br i1 %4, label %5, label %9
15
16; <label>:5
17 %6 = icmp slt i32 %3, 0
18 %7 = sub nsw i32 0, %3
19 %8 = select i1 %6, i32 %7, i32 %3
20 br label %12
21
22; <label>:9
23 br i1 undef, label %12, label %10
24
25; <label>:10
26 %11 = tail call i32 @bar(i32 undef)
27 unreachable
28
29; <label>:12
30 %13 = phi i32 [ %8, %5 ], [ 0, %1 ], [ undef, %9 ]
31 ret i32 %13
32}
33
34declare i32 @bar(i32)