Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp =================================================================== --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -4268,7 +4268,7 @@ if (DTU && DTU->hasDomTree()) DT = &DTU->getDomTree(); - if (!isGuaranteedNotToBePoison(ExtraCase, AC, BI, DT)) + if (!isGuaranteedNotToBeUndefOrPoison(ExtraCase, AC, BI, DT)) ExtraCase = Builder.CreateFreeze(ExtraCase); if (TrueWhenEqual)