File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -267,15 +267,16 @@ bool SILowerSGPRSpills::spillCalleeSavedRegs(
267267
268268 std::vector<CalleeSavedInfo> CSI;
269269 const MCPhysReg *CSRegs = MRI.getCalleeSavedRegs ();
270- Register RetAddrReg = TRI->getReturnAddressReg (MF);
270+ MCRegister RetAddrReg = TRI->getReturnAddressReg (MF);
271+ MCRegister RetAddrRegSub0 = TRI->getSubReg (RetAddrReg, AMDGPU::sub0);
272+ MCRegister RetAddrRegSub1 = TRI->getSubReg (RetAddrReg, AMDGPU::sub1);
271273 bool SpillRetAddrReg = false ;
272274
273275 for (unsigned I = 0 ; CSRegs[I]; ++I) {
274276 MCRegister Reg = CSRegs[I];
275277
276278 if (SavedRegs.test (Reg)) {
277- if (Reg == TRI->getSubReg (RetAddrReg, AMDGPU::sub0) ||
278- Reg == TRI->getSubReg (RetAddrReg, AMDGPU::sub1)) {
279+ if (Reg == RetAddrRegSub0 || Reg == RetAddrRegSub1) {
279280 SpillRetAddrReg = true ;
280281 continue ;
281282 }
You can’t perform that action at this time.
0 commit comments