@@ -348,7 +348,8 @@ void AMDGPUHotBlockRegisterRenamingImpl::calculateValueDensity(
348348
349349 // Access LiveIntervalUnion for this PhysReg
350350 for (MCRegUnit Unit : TRI->regunits (PhysReg)) {
351- LiveIntervalUnion &LIU = LRM->getLiveUnions ()[Unit];
351+ LiveIntervalUnion &LIU =
352+ LRM->getLiveUnions ()[static_cast <unsigned >(Unit)];
352353
353354 for (LiveIntervalUnion::SegmentIter SI = LIU.begin (); SI.valid (); ++SI) {
354355 SlotIndex SegStart = SI.start ();
@@ -389,7 +390,8 @@ void AMDGPUHotBlockRegisterRenamingImpl::findFreeRegisters(
389390
390391 // Check all register units
391392 for (MCRegUnit Unit : TRI->regunits (PhysReg)) {
392- LiveIntervalUnion &LIU = LRM->getLiveUnions ()[Unit];
393+ LiveIntervalUnion &LIU =
394+ LRM->getLiveUnions ()[static_cast <unsigned >(Unit)];
393395
394396 // Check if anything is live in this BB
395397 LiveIntervalUnion::SegmentIter SI = LIU.find (BBStart);
@@ -498,7 +500,7 @@ bool AMDGPUHotBlockRegisterRenamingImpl::tryMoveValue(
498500 const DenseMap<MCRegister, SmallVector<SlotIndex, 4 >> &PhysRegDefs) {
499501 // Find a movable local value in DenseReg
500502 for (MCRegUnit Unit : TRI->regunits (DenseReg)) {
501- LiveIntervalUnion &LIU = LRM->getLiveUnions ()[Unit];
503+ LiveIntervalUnion &LIU = LRM->getLiveUnions ()[static_cast < unsigned >( Unit) ];
502504
503505 for (LiveIntervalUnion::SegmentIter SI = LIU.begin (); SI.valid (); ++SI) {
504506 Register VirtReg = SI.value ()->reg ();
0 commit comments