From: Tom Stellard Date: Wed, 25 Jul 2012 12:46:35 +0000 (-0400) Subject: radeon/llvm: Assert if we try to copy SCC reg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4bdd09d4714ae51b9f5675f7f5c678d431061e8;p=mesa.git radeon/llvm: Assert if we try to copy SCC reg --- diff --git a/src/gallium/drivers/radeon/SIInstrInfo.cpp b/src/gallium/drivers/radeon/SIInstrInfo.cpp index 4438d67f877..26f45fce417 100644 --- a/src/gallium/drivers/radeon/SIInstrInfo.cpp +++ b/src/gallium/drivers/radeon/SIInstrInfo.cpp @@ -38,6 +38,12 @@ SIInstrInfo::copyPhysReg(MachineBasicBlock &MBB, unsigned DestReg, unsigned SrcReg, bool KillSrc) const { + + // If we are trying to copy to or from SCC, there is a bug somewhere else in + // the backend. While it may be theoretically possible to do this, it should + // never be necessary. + assert(DestReg != AMDGPU::SCC && SrcReg != AMDGPU::SCC); + BuildMI(MBB, MI, DL, get(AMDGPU::V_MOV_B32_e32), DestReg) .addReg(SrcReg, getKillRegState(KillSrc)); }