radeon/llvm: Assert if we try to copy SCC reg
authorTom Stellard <thomas.stellard@amd.com>
Wed, 25 Jul 2012 12:46:35 +0000 (08:46 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Fri, 27 Jul 2012 17:08:09 +0000 (17:08 +0000)
src/gallium/drivers/radeon/SIInstrInfo.cpp

index 4438d67..26f45fc 100644 (file)
@@ -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));
 }