Index: lib/CodeGen/LivePhysRegs.cpp =================================================================== --- lib/CodeGen/LivePhysRegs.cpp +++ lib/CodeGen/LivePhysRegs.cpp @@ -225,7 +225,7 @@ void LivePhysRegs::addLiveOuts(const MachineBasicBlock &MBB) { const MachineFunction &MF = *MBB.getParent(); - if (!MBB.isReturnBlock()) { + if (!MBB.isReturnBlock() || !MBB.succ_empty()) { addPristines(MF); addLiveOutsNoPristines(MBB); } else { Index: test/CodeGen/ARM/pr25838.ll =================================================================== --- test/CodeGen/ARM/pr25838.ll +++ test/CodeGen/ARM/pr25838.ll @@ -1,4 +1,4 @@ -; RUN: llc < %s +; RUN: llc -verify-machineinstrs < %s ; PR25838 target triple = "armv7--linux-android"