diff --git a/llvm/include/llvm/ADT/GenericUniformityImpl.h b/llvm/include/llvm/ADT/GenericUniformityImpl.h --- a/llvm/include/llvm/ADT/GenericUniformityImpl.h +++ b/llvm/include/llvm/ADT/GenericUniformityImpl.h @@ -876,6 +876,11 @@ } if (!Promoted) break; + + // Restore the set property for the temporary vector + llvm::sort(Temp); + Temp.erase(std::unique(Temp.begin(), Temp.end()), Temp.end()); + DomFrontier = Temp; }