1 ; RUN: llc -mtriple=amdgcn-- -verify-machineinstrs -o /dev/null %s
2 ; This testcase produces a situation with unused value numbers in subregister
3 ; liveranges that get distributed by ConnectedVNInfoEqClasses.
5 define amdgpu_kernel void @hoge() {
7 %tmp = tail call i32 @llvm.amdgcn.workitem.id.x()
8 br i1 undef, label %bb2, label %bb23
11 br i1 undef, label %bb6, label %bb8
14 %tmp7 = or i64 undef, undef
18 %tmp9 = phi i64 [ %tmp7, %bb6 ], [ undef, %bb2 ]
19 %tmp10 = icmp eq i32 %tmp, 0
20 br i1 %tmp10, label %bb11, label %bb23
23 br i1 undef, label %bb20, label %bb17
29 %tmp21 = phi i64 [ undef, %bb17 ], [ %tmp9, %bb11 ]
30 %tmp22 = trunc i64 %tmp21 to i32
34 %tmp24 = phi i32 [ %tmp22, %bb20 ], [ undef, %bb8 ], [ undef, %bb ]
38 %tmp26 = phi i32 [ %tmp24, %bb23 ], [ undef, %bb25 ]
39 br i1 undef, label %bb25, label %bb30
42 br i1 undef, label %bb32, label %bb34
45 %tmp33 = zext i32 %tmp26 to i64
52 declare i32 @llvm.amdgcn.workitem.id.x()