Skip to content

Commit 1cc9a8c

Browse files
authored
AMDGPU: Stop using the wavemask register class for SCC cross class copies (#161801)
SCC should be copied to a 32-bit SGPR. Using a wave mask doesn't make sense.
1 parent 6620e53 commit 1cc9a8c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,7 @@ SIRegisterInfo::getPointerRegClass(unsigned Kind) const {
11181118

11191119
const TargetRegisterClass *
11201120
SIRegisterInfo::getCrossCopyRegClass(const TargetRegisterClass *RC) const {
1121-
if (RC == &AMDGPU::SCC_CLASSRegClass)
1122-
return getWaveMaskRegClass();
1123-
return RC;
1121+
return RC == &AMDGPU::SCC_CLASSRegClass ? &AMDGPU::SReg_32RegClass : RC;
11241122
}
11251123

11261124
static unsigned getNumSubRegsForSpillOp(const MachineInstr &MI,

0 commit comments

Comments
 (0)