[SimplifyCFG] Fix nondeterministic iteration order

We iterate over the result from SafeToMergeTerminators, so make it a SmallSetVector instead of a SmallPtrSet.

Should fix stage3 convergence builds.

llvm-svn: 280342
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index d8f8851..67024bb 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -176,7 +176,7 @@
 /// terminator instructions together.
 static bool
 SafeToMergeTerminators(TerminatorInst *SI1, TerminatorInst *SI2,
-                       SmallPtrSetImpl<BasicBlock *> *FailBlocks = nullptr) {
+                       SmallSetVector<BasicBlock *, 4> *FailBlocks = nullptr) {
   if (SI1 == SI2)
     return false; // Can't merge with self!
 
@@ -961,7 +961,7 @@
     Value *PCV = isValueEqualityComparison(PTI); // PredCondVal
 
     if (PCV == CV && TI != PTI) {
-      SmallPtrSet<BasicBlock*, 4> FailBlocks;
+      SmallSetVector<BasicBlock*, 4> FailBlocks;
       if (!SafeToMergeTerminators(TI, PTI, &FailBlocks)) {
         for (auto *Succ : FailBlocks) {
           std::vector<BasicBlock*> Blocks = { TI->getParent() };