[SimplifyCFG] Fix for non-determinism in codegen
authorMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 24 Apr 2017 19:20:45 +0000 (19:20 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Mon, 24 Apr 2017 19:20:45 +0000 (19:20 +0000)
Summary: This patch fixes issues in codegen uncovered due to https://reviews.llvm.org/D26718

Reviewers: majnemer, chenli, davide

Reviewed By: davide

Subscribers: davide, arsenm, llvm-commits

Differential Revision: https://reviews.llvm.org/D26726

llvm-svn: 301222

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

index e625766..e9152b8 100644 (file)
@@ -3754,7 +3754,7 @@ bool SimplifyCFGOpt::SimplifyCommonResume(ResumeInst *RI) {
     if (!isa<DbgInfoIntrinsic>(I))
       return false;
 
-  SmallSet<BasicBlock *, 4> TrivialUnwindBlocks;
+  SmallSetVector<BasicBlock *, 4> TrivialUnwindBlocks;
   auto *PhiLPInst = cast<PHINode>(RI->getValue());
 
   // Check incoming blocks to see if any of them are trivial.