@@ -61,14 +61,7 @@ PhysicalRegisterInfo::PhysicalRegisterInfo(const TargetRegisterInfo &tri,
61
61
std::pair<uint32_t , LaneBitmask> P = *I;
62
62
UnitInfo &UI = UnitInfos[P.first ];
63
63
UI.Reg = F;
64
- if (P.second .any ()) {
65
- UI.Mask = P.second ;
66
- } else {
67
- if (const TargetRegisterClass *RC = RegInfos[F].RegClass )
68
- UI.Mask = RC->LaneMask ;
69
- else
70
- UI.Mask = LaneBitmask::getAll ();
71
- }
64
+ UI.Mask = P.second ;
72
65
}
73
66
}
74
67
}
@@ -141,7 +134,7 @@ std::set<RegisterId> PhysicalRegisterInfo::getUnits(RegisterRef RR) const {
141
134
return Units; // Empty
142
135
for (MCRegUnitMaskIterator UM (RR.idx (), &TRI); UM.isValid (); ++UM) {
143
136
auto [U, M] = *UM;
144
- if (M. none () || (M & RR.Mask ).any ())
137
+ if ((M & RR.Mask ).any ())
145
138
Units.insert (U);
146
139
}
147
140
return Units;
@@ -200,13 +193,6 @@ bool PhysicalRegisterInfo::equal_to(RegisterRef A, RegisterRef B) const {
200
193
auto [AReg, AMask] = *AI;
201
194
auto [BReg, BMask] = *BI;
202
195
203
- // Lane masks are "none" for units that don't correspond to subregs
204
- // e.g. a single unit in a leaf register, or aliased unit.
205
- if (AMask.none ())
206
- AMask = LaneBitmask::getAll ();
207
- if (BMask.none ())
208
- BMask = LaneBitmask::getAll ();
209
-
210
196
// If both iterators point to a unit contained in both A and B, then
211
197
// compare the units.
212
198
if ((AMask & A.Mask ).any () && (BMask & B.Mask ).any ()) {
@@ -245,13 +231,6 @@ bool PhysicalRegisterInfo::less(RegisterRef A, RegisterRef B) const {
245
231
auto [AReg, AMask] = *AI;
246
232
auto [BReg, BMask] = *BI;
247
233
248
- // Lane masks are "none" for units that don't correspond to subregs
249
- // e.g. a single unit in a leaf register, or aliased unit.
250
- if (AMask.none ())
251
- AMask = LaneBitmask::getAll ();
252
- if (BMask.none ())
253
- BMask = LaneBitmask::getAll ();
254
-
255
234
// If both iterators point to a unit contained in both A and B, then
256
235
// compare the units.
257
236
if ((AMask & A.Mask ).any () && (BMask & B.Mask ).any ()) {
@@ -303,7 +282,7 @@ bool RegisterAggr::hasAliasOf(RegisterRef RR) const {
303
282
304
283
for (MCRegUnitMaskIterator U (RR.Reg , &PRI.getTRI ()); U.isValid (); ++U) {
305
284
std::pair<uint32_t , LaneBitmask> P = *U;
306
- if (P. second . none () || (P.second & RR.Mask ).any ())
285
+ if ((P.second & RR.Mask ).any ())
307
286
if (Units.test (P.first ))
308
287
return true ;
309
288
}
@@ -318,7 +297,7 @@ bool RegisterAggr::hasCoverOf(RegisterRef RR) const {
318
297
319
298
for (MCRegUnitMaskIterator U (RR.Reg , &PRI.getTRI ()); U.isValid (); ++U) {
320
299
std::pair<uint32_t , LaneBitmask> P = *U;
321
- if (P. second . none () || (P.second & RR.Mask ).any ())
300
+ if ((P.second & RR.Mask ).any ())
322
301
if (!Units.test (P.first ))
323
302
return false ;
324
303
}
@@ -333,7 +312,7 @@ RegisterAggr &RegisterAggr::insert(RegisterRef RR) {
333
312
334
313
for (MCRegUnitMaskIterator U (RR.Reg , &PRI.getTRI ()); U.isValid (); ++U) {
335
314
std::pair<uint32_t , LaneBitmask> P = *U;
336
- if (P. second . none () || (P.second & RR.Mask ).any ())
315
+ if ((P.second & RR.Mask ).any ())
337
316
Units.set (P.first );
338
317
}
339
318
return *this ;
@@ -407,7 +386,7 @@ RegisterRef RegisterAggr::makeRegRef() const {
407
386
for (MCRegUnitMaskIterator I (F, &PRI.getTRI ()); I.isValid (); ++I) {
408
387
std::pair<uint32_t , LaneBitmask> P = *I;
409
388
if (Units.test (P.first ))
410
- M |= P.second . none () ? LaneBitmask::getAll () : P. second ;
389
+ M |= P.second ;
411
390
}
412
391
return RegisterRef (F, M);
413
392
}
0 commit comments