blob: c62234986f30feedcdea677d514ee4667504e455 [file] [log] [blame]
Matt Arsenault2d473102018-07-05 17:01:29 +00001; RUN: llc -mtriple=amdgcn-- -verify-machineinstrs -o /dev/null %s
Matthias Braunae81c292016-03-24 21:41:38 +00002; This testcase produces a situation with unused value numbers in subregister
3; liveranges that get distributed by ConnectedVNInfoEqClasses.
Matthias Braunae81c292016-03-24 21:41:38 +00004
Matt Arsenault2d473102018-07-05 17:01:29 +00005define amdgpu_kernel void @hoge() {
Matthias Braunae81c292016-03-24 21:41:38 +00006bb:
Matt Arsenaulta5329272017-05-17 21:38:21 +00007 %tmp = tail call i32 @llvm.amdgcn.workitem.id.x()
Matthias Braunae81c292016-03-24 21:41:38 +00008 br i1 undef, label %bb2, label %bb23
9
10bb2:
11 br i1 undef, label %bb6, label %bb8
12
13bb6:
14 %tmp7 = or i64 undef, undef
15 br label %bb8
16
17bb8:
18 %tmp9 = phi i64 [ %tmp7, %bb6 ], [ undef, %bb2 ]
19 %tmp10 = icmp eq i32 %tmp, 0
20 br i1 %tmp10, label %bb11, label %bb23
21
22bb11:
23 br i1 undef, label %bb20, label %bb17
24
25bb17:
26 br label %bb20
27
28bb20:
29 %tmp21 = phi i64 [ undef, %bb17 ], [ %tmp9, %bb11 ]
30 %tmp22 = trunc i64 %tmp21 to i32
31 br label %bb23
32
33bb23:
34 %tmp24 = phi i32 [ %tmp22, %bb20 ], [ undef, %bb8 ], [ undef, %bb ]
35 br label %bb25
36
37bb25:
38 %tmp26 = phi i32 [ %tmp24, %bb23 ], [ undef, %bb25 ]
39 br i1 undef, label %bb25, label %bb30
40
41bb30:
42 br i1 undef, label %bb32, label %bb34
43
44bb32:
45 %tmp33 = zext i32 %tmp26 to i64
46 br label %bb34
47
48bb34:
49 ret void
50}
51
Matt Arsenaulta5329272017-05-17 21:38:21 +000052declare i32 @llvm.amdgcn.workitem.id.x()