[PM] SCCP should preserve GlobalsAA even if the IR is mutated.

llvm-svn: 271149
This commit is contained in:
Davide Italiano 2016-05-29 00:31:15 +00:00
parent e6c8fa4530
commit 484b5ab39d
1 changed files with 4 additions and 1 deletions

View File

@ -1629,7 +1629,10 @@ PreservedAnalyses SCCPPass::run(Function &F, AnalysisManager<Function> &AM) {
auto &TLI = AM.getResult<TargetLibraryAnalysis>(F);
if (!runSCCP(F, DL, &TLI))
return PreservedAnalyses::all();
return PreservedAnalyses::none();
auto PA = PreservedAnalyses();
PA.preserve<GlobalsAA>();
return PA;
}
namespace {