blob: 7ca2612598c8493f2ed874b4107b1822e93eb2d6 [file] [log] [blame]
Matthias Braunae81c292016-03-24 21:41:38 +00001; RUN: llc -o /dev/null %s
2; This testcase produces a situation with unused value numbers in subregister
3; liveranges that get distributed by ConnectedVNInfoEqClasses.
4target triple = "amdgcn--"
5
6define spir_kernel void @hoge() {
7bb:
8 %tmp = tail call i32 @llvm.r600.read.tidig.x()
9 br i1 undef, label %bb2, label %bb23
10
11bb2:
12 br i1 undef, label %bb6, label %bb8
13
14bb6:
15 %tmp7 = or i64 undef, undef
16 br label %bb8
17
18bb8:
19 %tmp9 = phi i64 [ %tmp7, %bb6 ], [ undef, %bb2 ]
20 %tmp10 = icmp eq i32 %tmp, 0
21 br i1 %tmp10, label %bb11, label %bb23
22
23bb11:
24 br i1 undef, label %bb20, label %bb17
25
26bb17:
27 br label %bb20
28
29bb20:
30 %tmp21 = phi i64 [ undef, %bb17 ], [ %tmp9, %bb11 ]
31 %tmp22 = trunc i64 %tmp21 to i32
32 br label %bb23
33
34bb23:
35 %tmp24 = phi i32 [ %tmp22, %bb20 ], [ undef, %bb8 ], [ undef, %bb ]
36 br label %bb25
37
38bb25:
39 %tmp26 = phi i32 [ %tmp24, %bb23 ], [ undef, %bb25 ]
40 br i1 undef, label %bb25, label %bb30
41
42bb30:
43 br i1 undef, label %bb32, label %bb34
44
45bb32:
46 %tmp33 = zext i32 %tmp26 to i64
47 br label %bb34
48
49bb34:
50 ret void
51}
52
53declare i32 @llvm.r600.read.tidig.x()