Taints upcoming store and adds bogus conditional branches else where. Now as a separa...
[oota-llvm.git] / test / CodeGen / ARM / pr25838.ll
1 ; RUN: llc < %s
2 ; PR25838
3
4 target triple = "armv7--linux-android"
5
6 %0 = type { i32, i32 }
7
8 define 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
34 declare i32 @bar(i32)