1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs -run-pass machinelicm -o - %s | FileCheck -check-prefix=GCN %s
4 # MachineLICM shall limit hoisting of V_CVT instructions out of the loop keeping
5 # register pressure within the budget. VGPR budget at occupancy 10 is 24 vgprs.
9 tracksRegLiveness: true
11 ; GCN-LABEL: name: test
13 ; GCN: successors: %bb.1(0x80000000)
14 ; GCN: liveins: $vcc, $vgpr0
15 ; GCN: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr0
16 ; GCN: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr0
17 ; GCN: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr0
18 ; GCN: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr0
19 ; GCN: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr0
20 ; GCN: [[COPY5:%[0-9]+]]:vgpr_32 = COPY $vgpr0
21 ; GCN: [[COPY6:%[0-9]+]]:vgpr_32 = COPY $vgpr0
22 ; GCN: [[COPY7:%[0-9]+]]:vgpr_32 = COPY $vgpr0
23 ; GCN: [[COPY8:%[0-9]+]]:vgpr_32 = COPY $vgpr0
24 ; GCN: [[COPY9:%[0-9]+]]:vgpr_32 = COPY $vgpr0
25 ; GCN: [[COPY10:%[0-9]+]]:vgpr_32 = COPY $vgpr0
26 ; GCN: [[COPY11:%[0-9]+]]:vgpr_32 = COPY $vgpr0
27 ; GCN: [[COPY12:%[0-9]+]]:vgpr_32 = COPY $vgpr0
28 ; GCN: [[COPY13:%[0-9]+]]:vgpr_32 = COPY $vgpr0
29 ; GCN: [[COPY14:%[0-9]+]]:vgpr_32 = COPY $vgpr0
30 ; GCN: [[COPY15:%[0-9]+]]:vgpr_32 = COPY $vgpr0
31 ; GCN: [[COPY16:%[0-9]+]]:vgpr_32 = COPY $vgpr0
32 ; GCN: [[COPY17:%[0-9]+]]:vgpr_32 = COPY $vgpr0
33 ; GCN: %18:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY]], implicit $mode, implicit $exec
34 ; GCN: %19:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY1]], implicit $mode, implicit $exec
35 ; GCN: %20:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY2]], implicit $mode, implicit $exec
36 ; GCN: %21:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY3]], implicit $mode, implicit $exec
37 ; GCN: %22:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY4]], implicit $mode, implicit $exec
39 ; GCN: successors: %bb.2(0x04000000), %bb.1(0x7c000000)
41 ; GCN: $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
42 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, %18, implicit $exec
43 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, %19, implicit $exec
44 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, %20, implicit $exec
45 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, %21, implicit $exec
46 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, %22, implicit $exec
47 ; GCN: %23:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY5]], implicit $mode, implicit $exec
48 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %23, implicit $exec
49 ; GCN: %24:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY6]], implicit $mode, implicit $exec
50 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %24, implicit $exec
51 ; GCN: %25:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY7]], implicit $mode, implicit $exec
52 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %25, implicit $exec
53 ; GCN: %26:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY8]], implicit $mode, implicit $exec
54 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %26, implicit $exec
55 ; GCN: %27:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY9]], implicit $mode, implicit $exec
56 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %27, implicit $exec
57 ; GCN: %28:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY10]], implicit $mode, implicit $exec
58 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %28, implicit $exec
59 ; GCN: %29:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY11]], implicit $mode, implicit $exec
60 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %29, implicit $exec
61 ; GCN: %30:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY12]], implicit $mode, implicit $exec
62 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %30, implicit $exec
63 ; GCN: %31:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY13]], implicit $mode, implicit $exec
64 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %31, implicit $exec
65 ; GCN: %32:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY14]], implicit $mode, implicit $exec
66 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %32, implicit $exec
67 ; GCN: %33:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY15]], implicit $mode, implicit $exec
68 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %33, implicit $exec
69 ; GCN: %34:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY16]], implicit $mode, implicit $exec
70 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %34, implicit $exec
71 ; GCN: %35:vreg_64 = nofpexcept V_CVT_F64_I32_e32 [[COPY17]], implicit $mode, implicit $exec
72 ; GCN: $vcc = V_CMP_EQ_U64_e64 $vcc, killed %35, implicit $exec
73 ; GCN: S_CBRANCH_VCCNZ %bb.1, implicit $vcc
78 successors: %bb.1(0x80000000)
81 %0:vgpr_32 = COPY $vgpr0
82 %1:vgpr_32 = COPY $vgpr0
83 %2:vgpr_32 = COPY $vgpr0
84 %3:vgpr_32 = COPY $vgpr0
85 %4:vgpr_32 = COPY $vgpr0
86 %5:vgpr_32 = COPY $vgpr0
87 %6:vgpr_32 = COPY $vgpr0
88 %7:vgpr_32 = COPY $vgpr0
89 %8:vgpr_32 = COPY $vgpr0
90 %9:vgpr_32 = COPY $vgpr0
91 %10:vgpr_32 = COPY $vgpr0
92 %11:vgpr_32 = COPY $vgpr0
93 %12:vgpr_32 = COPY $vgpr0
94 %13:vgpr_32 = COPY $vgpr0
95 %14:vgpr_32 = COPY $vgpr0
96 %15:vgpr_32 = COPY $vgpr0
97 %16:vgpr_32 = COPY $vgpr0
98 %17:vgpr_32 = COPY $vgpr0
101 successors: %bb.2(0x04000000), %bb.1(0x7c000000)
104 $vcc = S_AND_B64 $exec, $vcc, implicit-def $scc
105 %18:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %0, implicit $mode, implicit $exec
106 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %18, implicit $exec
107 %19:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %1, implicit $mode, implicit $exec
108 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %19, implicit $exec
109 %20:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %2, implicit $mode, implicit $exec
110 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %20, implicit $exec
111 %21:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %3, implicit $mode, implicit $exec
112 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %21, implicit $exec
113 %22:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %4, implicit $mode, implicit $exec
114 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %22, implicit $exec
115 %23:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %5, implicit $mode, implicit $exec
116 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %23, implicit $exec
117 %24:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %6, implicit $mode, implicit $exec
118 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %24, implicit $exec
119 %25:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %7, implicit $mode, implicit $exec
120 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %25, implicit $exec
121 %26:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %8, implicit $mode, implicit $exec
122 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %26, implicit $exec
123 %27:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %9, implicit $mode, implicit $exec
124 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %27, implicit $exec
125 %28:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %10, implicit $mode, implicit $exec
126 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %28, implicit $exec
127 %29:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %11, implicit $mode, implicit $exec
128 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %29, implicit $exec
129 %30:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %12, implicit $mode, implicit $exec
130 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %30, implicit $exec
131 %31:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %13, implicit $mode, implicit $exec
132 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %31, implicit $exec
133 %32:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %14, implicit $mode, implicit $exec
134 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %32, implicit $exec
135 %33:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %15, implicit $mode, implicit $exec
136 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %33, implicit $exec
137 %34:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %16, implicit $mode, implicit $exec
138 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %34, implicit $exec
139 %35:vreg_64 = nofpexcept V_CVT_F64_I32_e32 %17, implicit $mode, implicit $exec
140 $vcc = V_CMP_EQ_U64_e64 $vcc, killed %35, implicit $exec
141 S_CBRANCH_VCCNZ %bb.1, implicit $vcc