1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-fast | FileCheck -check-prefix=FAST %s
3 # RUN: llc -march=amdgcn -mcpu=fiji -run-pass=regbankselect %s -verify-machineinstrs -o - -regbankselect-greedy | FileCheck -check-prefix=GREEDY %s
11 liveins: $sgpr0, $sgpr1, $sgpr2
12 ; FAST-LABEL: name: usube_s32_sss
13 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
14 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
15 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
16 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
17 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
18 ; FAST: [[USUBE:%[0-9]+]]:sgpr(s32), [[USUBE1:%[0-9]+]]:scc(s1) = G_USUBE [[COPY]], [[COPY1]], [[ICMP]]
19 ; GREEDY-LABEL: name: usube_s32_sss
20 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
21 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
22 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
23 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
24 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
25 ; GREEDY: [[USUBE:%[0-9]+]]:sgpr(s32), [[USUBE1:%[0-9]+]]:scc(s1) = G_USUBE [[COPY]], [[COPY1]], [[ICMP]]
26 %0:_(s32) = COPY $sgpr0
27 %1:_(s32) = COPY $sgpr1
28 %2:_(s32) = COPY $sgpr2
29 %3:_(s32) = G_CONSTANT i32 0
30 %4:_(s1) = G_ICMP intpred(eq), %2, %3
31 %5:_(s32), %6:_(s1) = G_USUBE %0, %1, %4
40 liveins: $vgpr0, $sgpr0, $sgpr1
41 ; FAST-LABEL: name: usube_s32_vss
42 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
43 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
44 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
45 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
46 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
47 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
48 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
49 ; FAST: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY]], [[COPY3]], [[COPY4]]
50 ; GREEDY-LABEL: name: usube_s32_vss
51 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
52 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
53 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
54 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
55 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
56 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
57 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
58 ; GREEDY: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY]], [[COPY3]], [[COPY4]]
59 %0:_(s32) = COPY $vgpr0
60 %1:_(s32) = COPY $sgpr0
61 %2:_(s32) = COPY $sgpr1
62 %3:_(s32) = G_CONSTANT i32 0
63 %4:_(s1) = G_ICMP intpred(eq), %2, %3
64 %5:_(s32), %6:_(s1) = G_USUBE %0, %1, %4
72 liveins: $sgpr0, $sgpr1, $vgpr0
73 ; FAST-LABEL: name: usube_s32_ssv
74 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
75 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
76 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
77 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY2]](s32)
78 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
79 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
80 ; FAST: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
81 ; FAST: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY3]], [[COPY4]], [[COPY5]]
82 ; GREEDY-LABEL: name: usube_s32_ssv
83 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
84 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
85 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
86 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY2]](s32)
87 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
88 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
89 ; GREEDY: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
90 ; GREEDY: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY3]], [[COPY4]], [[COPY5]]
91 %0:_(s32) = COPY $sgpr0
92 %1:_(s32) = COPY $sgpr1
93 %2:_(s32) = COPY $vgpr0
95 %4:_(s32), %5:_(s1) = G_USUBE %0, %1, %3
104 liveins: $vgpr0, $vgpr1, $sgpr0
105 ; FAST-LABEL: name: usube_s32_vvs
106 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
107 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
108 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
109 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
110 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
111 ; FAST: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY]], [[COPY1]], [[COPY3]]
112 ; GREEDY-LABEL: name: usube_s32_vvs
113 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
114 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
115 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
116 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
117 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
118 ; GREEDY: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY]], [[COPY1]], [[COPY3]]
119 %0:_(s32) = COPY $vgpr0
120 %1:_(s32) = COPY $vgpr1
121 %2:_(s32) = COPY $sgpr0
122 %3:_(s1) = G_TRUNC %2
123 %4:_(s32), %5:_(s1) = G_USUBE %0, %1, %3
127 name: usube_s32_sss_noscc
132 liveins: $sgpr0, $sgpr1, $sgpr2
133 ; FAST-LABEL: name: usube_s32_sss_noscc
134 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
135 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
136 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
137 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
138 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[TRUNC]](s1)
139 ; FAST: [[USUBE:%[0-9]+]]:sgpr(s32), [[USUBE1:%[0-9]+]]:scc(s1) = G_USUBE [[COPY]], [[COPY1]], [[COPY3]]
140 ; GREEDY-LABEL: name: usube_s32_sss_noscc
141 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
142 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
143 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
144 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
145 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
146 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
147 ; GREEDY: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
148 ; GREEDY: [[USUBE:%[0-9]+]]:vgpr(s32), [[USUBE1:%[0-9]+]]:vcc(s1) = G_USUBE [[COPY3]], [[COPY4]], [[COPY5]]
149 %0:_(s32) = COPY $sgpr0
150 %1:_(s32) = COPY $sgpr1
151 %2:_(s32) = COPY $sgpr2
152 %3:_(s1) = G_TRUNC %2
153 %4:_(s32), %5:_(s1) = G_USUBE %0, %1, %3