Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp =================================================================== --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -2269,7 +2269,7 @@ // Register the new instruction with the assumption cache if necessary. if (auto *II = dyn_cast_or_null(N)) - if (II->getIntrinsicID() == Intrinsic::assume) + if (AC && II->getIntrinsicID() == Intrinsic::assume) AC->registerAssumption(II); }