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
10 liveins: $sgpr0, $sgpr1, $sgpr2
11 ; FAST-LABEL: name: uadde_s32_sss
12 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
13 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
14 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
15 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
16 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
17 ; FAST: [[UADDE:%[0-9]+]]:sgpr(s32), [[UADDE1:%[0-9]+]]:scc(s1) = G_UADDE [[COPY]], [[COPY1]], [[ICMP]]
18 ; GREEDY-LABEL: name: uadde_s32_sss
19 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
20 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
21 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
22 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
23 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
24 ; GREEDY: [[UADDE:%[0-9]+]]:sgpr(s32), [[UADDE1:%[0-9]+]]:scc(s1) = G_UADDE [[COPY]], [[COPY1]], [[ICMP]]
25 %0:_(s32) = COPY $sgpr0
26 %1:_(s32) = COPY $sgpr1
27 %2:_(s32) = COPY $sgpr2
28 %3:_(s32) = G_CONSTANT i32 0
29 %4:_(s1) = G_ICMP intpred(eq), %2, %3
30 %5:_(s32), %6:_(s1) = G_UADDE %0, %1, %4
39 liveins: $vgpr0, $sgpr0, $sgpr1
40 ; FAST-LABEL: name: uadde_s32_vss
41 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
42 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
43 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
44 ; FAST: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
45 ; FAST: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
46 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
47 ; FAST: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
48 ; FAST: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY]], [[COPY3]], [[COPY4]]
49 ; GREEDY-LABEL: name: uadde_s32_vss
50 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
51 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
52 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
53 ; GREEDY: [[C:%[0-9]+]]:sgpr(s32) = G_CONSTANT i32 0
54 ; GREEDY: [[ICMP:%[0-9]+]]:scc(s1) = G_ICMP intpred(eq), [[COPY2]](s32), [[C]]
55 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
56 ; GREEDY: [[COPY4:%[0-9]+]]:vcc(s1) = COPY [[ICMP]](s1)
57 ; GREEDY: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY]], [[COPY3]], [[COPY4]]
58 %0:_(s32) = COPY $vgpr0
59 %1:_(s32) = COPY $sgpr0
60 %2:_(s32) = COPY $sgpr1
61 %3:_(s32) = G_CONSTANT i32 0
62 %4:_(s1) = G_ICMP intpred(eq), %2, %3
63 %5:_(s32), %6:_(s1) = G_UADDE %0, %1, %4
71 liveins: $sgpr0, $sgpr1, $vgpr0
72 ; FAST-LABEL: name: uadde_s32_ssv
73 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
74 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
75 ; FAST: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
76 ; FAST: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY2]](s32)
77 ; FAST: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
78 ; FAST: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
79 ; FAST: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
80 ; FAST: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY3]], [[COPY4]], [[COPY5]]
81 ; GREEDY-LABEL: name: uadde_s32_ssv
82 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
83 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
84 ; GREEDY: [[COPY2:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
85 ; GREEDY: [[TRUNC:%[0-9]+]]:vgpr(s1) = G_TRUNC [[COPY2]](s32)
86 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
87 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
88 ; GREEDY: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
89 ; GREEDY: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY3]], [[COPY4]], [[COPY5]]
90 %0:_(s32) = COPY $sgpr0
91 %1:_(s32) = COPY $sgpr1
92 %2:_(s32) = COPY $vgpr0
94 %4:_(s32), %5:_(s1) = G_UADDE %0, %1, %3
103 liveins: $vgpr0, $vgpr1, $sgpr0
104 ; FAST-LABEL: name: uadde_s32_vvs
105 ; FAST: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
106 ; FAST: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
107 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
108 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
109 ; FAST: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
110 ; FAST: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY]], [[COPY1]], [[COPY3]]
111 ; GREEDY-LABEL: name: uadde_s32_vvs
112 ; GREEDY: [[COPY:%[0-9]+]]:vgpr(s32) = COPY $vgpr0
113 ; GREEDY: [[COPY1:%[0-9]+]]:vgpr(s32) = COPY $vgpr1
114 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
115 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
116 ; GREEDY: [[COPY3:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
117 ; GREEDY: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY]], [[COPY1]], [[COPY3]]
118 %0:_(s32) = COPY $vgpr0
119 %1:_(s32) = COPY $vgpr1
120 %2:_(s32) = COPY $sgpr0
121 %3:_(s1) = G_TRUNC %2
122 %4:_(s32), %5:_(s1) = G_UADDE %0, %1, %3
126 name: uadde_s32_sss_noscc
131 liveins: $sgpr0, $sgpr1, $sgpr2
132 ; FAST-LABEL: name: uadde_s32_sss_noscc
133 ; FAST: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
134 ; FAST: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
135 ; FAST: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
136 ; FAST: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
137 ; FAST: [[COPY3:%[0-9]+]]:scc(s1) = COPY [[TRUNC]](s1)
138 ; FAST: [[UADDE:%[0-9]+]]:sgpr(s32), [[UADDE1:%[0-9]+]]:scc(s1) = G_UADDE [[COPY]], [[COPY1]], [[COPY3]]
139 ; GREEDY-LABEL: name: uadde_s32_sss_noscc
140 ; GREEDY: [[COPY:%[0-9]+]]:sgpr(s32) = COPY $sgpr0
141 ; GREEDY: [[COPY1:%[0-9]+]]:sgpr(s32) = COPY $sgpr1
142 ; GREEDY: [[COPY2:%[0-9]+]]:sgpr(s32) = COPY $sgpr2
143 ; GREEDY: [[TRUNC:%[0-9]+]]:sgpr(s1) = G_TRUNC [[COPY2]](s32)
144 ; GREEDY: [[COPY3:%[0-9]+]]:vgpr(s32) = COPY [[COPY]](s32)
145 ; GREEDY: [[COPY4:%[0-9]+]]:vgpr(s32) = COPY [[COPY1]](s32)
146 ; GREEDY: [[COPY5:%[0-9]+]]:vcc(s1) = COPY [[TRUNC]](s1)
147 ; GREEDY: [[UADDE:%[0-9]+]]:vgpr(s32), [[UADDE1:%[0-9]+]]:vcc(s1) = G_UADDE [[COPY3]], [[COPY4]], [[COPY5]]
148 %0:_(s32) = COPY $sgpr0
149 %1:_(s32) = COPY $sgpr1
150 %2:_(s32) = COPY $sgpr2
151 %3:_(s1) = G_TRUNC %2
152 %4:_(s32), %5:_(s1) = G_UADDE %0, %1, %3