@@ -4058,7 +4058,7 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineInstr &MI,
4058
4058
(ST.getConstantBusLimit (Opc) > 1 || !Src0->isReg () ||
4059
4059
!RI.isSGPRReg (MBB.getParent ()->getRegInfo (), Src0->getReg ()))) {
4060
4060
MachineInstr *DefMI;
4061
- const auto killDef = [&](SlotIndex OldUseIdx ) -> void {
4061
+ const auto killDef = [&]() -> void {
4062
4062
MachineRegisterInfo &MRI = MBB.getParent ()->getRegInfo ();
4063
4063
// The only user is the instruction which will be killed.
4064
4064
Register DefReg = DefMI->getOperand (0 ).getReg ();
@@ -4107,10 +4107,9 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineInstr &MI,
4107
4107
.addImm (Imm)
4108
4108
.setMIFlags (MI.getFlags ());
4109
4109
updateLiveVariables (LV, MI, *MIB);
4110
- SlotIndex NewIdx;
4111
4110
if (LIS)
4112
- NewIdx = LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4113
- killDef (NewIdx );
4111
+ LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4112
+ killDef ();
4114
4113
return MIB;
4115
4114
}
4116
4115
}
@@ -4129,10 +4128,9 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineInstr &MI,
4129
4128
.setMIFlags (MI.getFlags ());
4130
4129
updateLiveVariables (LV, MI, *MIB);
4131
4130
4132
- SlotIndex NewIdx;
4133
4131
if (LIS)
4134
- NewIdx = LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4135
- killDef (NewIdx );
4132
+ LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4133
+ killDef ();
4136
4134
return MIB;
4137
4135
}
4138
4136
}
@@ -4153,11 +4151,10 @@ MachineInstr *SIInstrInfo::convertToThreeAddress(MachineInstr &MI,
4153
4151
.setMIFlags (MI.getFlags ());
4154
4152
updateLiveVariables (LV, MI, *MIB);
4155
4153
4156
- SlotIndex NewIdx;
4157
4154
if (LIS)
4158
- NewIdx = LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4155
+ LIS->ReplaceMachineInstrInMaps (MI, *MIB);
4159
4156
if (DefMI)
4160
- killDef (NewIdx );
4157
+ killDef ();
4161
4158
return MIB;
4162
4159
}
4163
4160
}
0 commit comments