From d4bdd09d4714ae51b9f5675f7f5c678d431061e8 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Jul 2012 08:46:35 -0400 Subject: [PATCH] radeon/llvm: Assert if we try to copy SCC reg --- src/gallium/drivers/radeon/SIInstrInfo.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/radeon/SIInstrInfo.cpp b/src/gallium/drivers/radeon/SIInstrInfo.cpp index 4438d67..26f45fc 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)); } -- 2.7.4