Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp =================================================================== --- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp +++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp @@ -2392,7 +2392,8 @@ case VCCZ: { const MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); const TargetRegisterClass *RC = MRI.getRegClass(TrueReg); - assert(MRI.getRegClass(FalseReg) == RC); + if (MRI.getRegClass(FalseReg) != RC) + return false; int NumInsts = AMDGPU::getRegBitWidth(RC->getID()) / 32; CondCycles = TrueCycles = FalseCycles = NumInsts; // ??? @@ -2406,7 +2407,8 @@ // with a vector one. const MachineRegisterInfo &MRI = MBB.getParent()->getRegInfo(); const TargetRegisterClass *RC = MRI.getRegClass(TrueReg); - assert(MRI.getRegClass(FalseReg) == RC); + if (MRI.getRegClass(FalseReg) != RC) + return false; int NumInsts = AMDGPU::getRegBitWidth(RC->getID()) / 32;