Index: lib/Analysis/ScalarEvolution.cpp =================================================================== --- lib/Analysis/ScalarEvolution.cpp +++ lib/Analysis/ScalarEvolution.cpp @@ -5554,6 +5554,8 @@ if (NumExits == 1) return; + assert(ENT && "ExitNotTakenExtras array is NULL, cannot further compute exits"); + auto &Exits = ExitNotTaken.ExtraInfo->Exits; // Handle the rare case of multiple computable exits. Index: lib/IR/Verifier.cpp =================================================================== --- lib/IR/Verifier.cpp +++ lib/IR/Verifier.cpp @@ -2074,7 +2074,7 @@ continue; // FIXME: Once N is canonical, check "SP == &N". - Assert(SP->describes(&F), + Assert(SP && SP->describes(&F), "!dbg attachment points at wrong subprogram for function", N, &F, &I, DL, Scope, SP); } Index: lib/Target/AMDGPU/SIInstrInfo.cpp =================================================================== --- lib/Target/AMDGPU/SIInstrInfo.cpp +++ lib/Target/AMDGPU/SIInstrInfo.cpp @@ -1837,7 +1837,7 @@ MO = &MI->getOperand(OpIdx); if (isVALU(*MI) && - usesConstantBus(MRI, *MO, DefinedRC->getSize())) { + usesConstantBus(MRI, *MO, DefinedRC ? DefinedRC->getSize() : 0)) { RegSubRegPair SGPRUsed; if (MO->isReg()) Index: lib/Target/ARM/AsmParser/ARMAsmParser.cpp =================================================================== --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -9961,7 +9961,9 @@ return true; // '.align' is target specifically handled to mean 2**2 byte alignment. - if (getStreamer().getCurrentSection().first->UseCodeAlign()) + const MCSection *Section = getStreamer().getCurrentSection().first; + assert(Section && "must have section to emit alignment"); + if (Section->UseCodeAlign()) getStreamer().EmitCodeAlignment(4, 0); else getStreamer().EmitValueToAlignment(4, 0, 1, 0);