Merge pull request #21293 from compnerd/msvcrt-fileio

Platform: make MSVCRT more Unix-libc like
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1187d4d..7e4ce32 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,22 @@
 
 Swift 5.0
 ---------
+* [SR-5719][]:
+
+  Starting from `-swift-version 5`, implicit `@autoclosure` function type
+  forwarding has been disabled, and new a diagnostic has been added suggesting
+  to add `()` to call the function value in such case. The call itself would be
+  wrapped in an implicit closure and passed to the corresponding parameter.
+
+  Example:
+
+  ```swift
+  func foo(_ fn: @autoclosure () -> Int) {}
+  func bar(_ fn: @autoclosure () -> Int) {
+    foo(fn)   // Incorrect, `fn` can't be forwarded and has to be called
+    foo(fn()) // Ok
+  }
+  ```
 
 * [SR-7139][]:
 
@@ -7306,3 +7322,4 @@
 [SR-4248]: <https://bugs.swift.org/browse/SR-4248>
 [SR-7139]: <https://bugs.swift.org/browse/SR-7139>
 [SR-7251]: <https://bugs.swift.org/browse/SR-7251>
+[SR-5719]: <https://bugs.swift.org/browse/SR-5719>
diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake
index df4fb5d..b6b720b 100644
--- a/cmake/modules/AddSwift.cmake
+++ b/cmake/modules/AddSwift.cmake
@@ -1878,7 +1878,7 @@
       endforeach()
 
       # Add PrivateFrameworks, rdar://28466433
-      if(SWIFTLIB_IS_SDK_OVERLAY)
+      if(sdk IN_LIST SWIFT_APPLE_PLATFORMS AND SWIFTLIB_IS_SDK_OVERLAY)
         set(swiftlib_swift_compile_private_frameworks_flag "-Fsystem" "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}/System/Library/PrivateFrameworks/")
       endif()
 
diff --git a/include/swift/Frontend/FrontendOptions.h b/include/swift/Frontend/FrontendOptions.h
index 3c9a0d4..9b4e0f5 100644
--- a/include/swift/Frontend/FrontendOptions.h
+++ b/include/swift/Frontend/FrontendOptions.h
@@ -126,6 +126,9 @@
     EmitModuleOnly, ///< Emit module only
     MergeModules,   ///< Merge modules only
 
+    /// Build from a swiftinterface, as close to `import` as possible
+    BuildModuleFromParseableInterface,
+
     EmitSIBGen, ///< Emit serialized AST + raw SIL
     EmitSIB,    ///< Emit serialized AST + canonical SIL
 
diff --git a/include/swift/Frontend/ParseableInterfaceSupport.h b/include/swift/Frontend/ParseableInterfaceSupport.h
index c369e38..9e007bb 100644
--- a/include/swift/Frontend/ParseableInterfaceSupport.h
+++ b/include/swift/Frontend/ParseableInterfaceSupport.h
@@ -69,10 +69,13 @@
 
   std::string CacheDir;
 
-  void
-  configureSubInvocationAndOutputPaths(CompilerInvocation &SubInvocation,
-                                       Identifier ModuleName, StringRef InPath,
-                                       llvm::SmallString<128> &OutPath);
+  /// Wire up the SubInvocation's InputsAndOutputs to contain both input and
+  /// output filenames.
+  ///
+  /// This is a method rather than a helper function in the implementation file
+  /// because it accesses non-public bits of FrontendInputsAndOutputs.
+  static void configureSubInvocationInputsAndOutputs(
+    CompilerInvocation &SubInvocation, StringRef InPath, StringRef OutPath);
 
   std::error_code
   openModuleFiles(AccessPathElem ModuleID, StringRef DirName,
@@ -89,6 +92,17 @@
     return std::unique_ptr<ParseableInterfaceModuleLoader>(
         new ParseableInterfaceModuleLoader(ctx, cacheDir, tracker, loadMode));
   }
+
+  /// Unconditionally build \p InPath (a swiftinterface file) to \p OutPath (as
+  /// a swiftmodule file).
+  ///
+  /// A simplified version of the core logic in #openModuleFiles, mostly for
+  /// testing purposes.
+  static bool buildSwiftModuleFromSwiftInterface(ASTContext &Ctx,
+                                                 StringRef CacheDir,
+                                                 StringRef ModuleName,
+                                                 StringRef InPath,
+                                                 StringRef OutPath);
 };
 
 
diff --git a/include/swift/Option/FrontendOptions.td b/include/swift/Option/FrontendOptions.td
index cf4bcbc..5a6eeae 100644
--- a/include/swift/Option/FrontendOptions.td
+++ b/include/swift/Option/FrontendOptions.td
@@ -513,6 +513,11 @@
    HelpText<"Parse input file(s) and dump interface token hash(es)">,
    ModeOpt;
 
+def build_module_from_parseable_interface :
+  Flag<["-"], "build-module-from-parseable-interface">,
+  HelpText<"Treat the (single) input as a swiftinterface and produce a module">,
+  ModeOpt;
+
 def enable_resilience_bypass : Flag<["-"], "enable-resilience-bypass">,
    HelpText<"Completely bypass resilience when accessing types in resilient frameworks">;
 
diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp
index 717cf47..8177807 100644
--- a/lib/AST/ASTPrinter.cpp
+++ b/lib/AST/ASTPrinter.cpp
@@ -104,6 +104,7 @@
   result.OmitNameOfInaccessibleProperties = true;
   result.FunctionDefinitions = true;
   result.CollapseSingleGetterProperty = false;
+  result.VarInitializers = true;
 
   result.FunctionBody = [](const ValueDecl *decl, ASTPrinter &printer) {
     auto AFD = dyn_cast<AbstractFunctionDecl>(decl);
@@ -2099,20 +2100,19 @@
     }
 
     if (Options.VarInitializers) {
-      // FIXME: Implement once we can pretty-print expressions.
+      auto vd = entry.getAnchoringVarDecl();
+      if (entry.hasInitStringRepresentation() &&
+          vd->isInitExposedToClients()) {
+        SmallString<128> scratch;
+        Printer << " = " << entry.getInitStringRepresentation(scratch);
+      }
     }
 
-    auto vd = entry.getAnchoringVarDecl();
-    if (entry.hasInitStringRepresentation() &&
-        vd->isInitExposedToClients()) {
-      SmallString<128> scratch;
-      Printer << " = " << entry.getInitStringRepresentation(scratch);
-    }
-
-    // HACK: If we're just printing a single pattern and it has accessors,
-    //       print the accessors here.
-    if (decl->getNumPatternEntries() == 1) {
-      printAccessors(vd);
+    // If we're just printing a single pattern and it has accessors,
+    // print the accessors here. It is an error to add accessors to a
+    // pattern binding with multiple entries.
+    if (auto var = decl->getSingleVar()) {
+      printAccessors(var);
     }
   }
 }
@@ -3230,7 +3230,7 @@
     // Stored variables in Swift source will be picked up by the
     // PatternBindingDecl.
     if (auto *VD = dyn_cast<VarDecl>(this)) {
-      if (!VD->hasClangNode() && VD->getImplInfo().isSimpleStored())
+      if (!VD->hasClangNode() && VD->hasStorage())
         return false;
     }
 
@@ -3241,7 +3241,7 @@
         auto pattern =
           pbd->getPatternList()[0].getPattern()->getSemanticsProvidingPattern();
         if (auto named = dyn_cast<NamedPattern>(pattern)) {
-          if (!named->getDecl()->getImplInfo().isSimpleStored())
+          if (!named->getDecl()->hasStorage())
             return false;
         }
       }
diff --git a/lib/Frontend/ArgsToFrontendOptionsConverter.cpp b/lib/Frontend/ArgsToFrontendOptionsConverter.cpp
index 743df2a..d2e93f6 100644
--- a/lib/Frontend/ArgsToFrontendOptionsConverter.cpp
+++ b/lib/Frontend/ArgsToFrontendOptionsConverter.cpp
@@ -370,6 +370,8 @@
     return FrontendOptions::ActionType::REPL;
   if (Opt.matches(OPT_interpret))
     return FrontendOptions::ActionType::Immediate;
+  if (Opt.matches(OPT_build_module_from_parseable_interface))
+    return FrontendOptions::ActionType::BuildModuleFromParseableInterface;
 
   llvm_unreachable("Unhandled mode option");
 }
diff --git a/lib/Frontend/FrontendOptions.cpp b/lib/Frontend/FrontendOptions.cpp
index a43b85a..b036989 100644
--- a/lib/Frontend/FrontendOptions.cpp
+++ b/lib/Frontend/FrontendOptions.cpp
@@ -48,6 +48,7 @@
   case ActionType::EmitSIB:
   case ActionType::EmitModuleOnly:
   case ActionType::MergeModules:
+  case ActionType::BuildModuleFromParseableInterface:
     return true;
   case ActionType::Immediate:
   case ActionType::REPL:
@@ -83,6 +84,7 @@
   case ActionType::EmitSIB:
   case ActionType::EmitModuleOnly:
   case ActionType::MergeModules:
+  case ActionType::BuildModuleFromParseableInterface:
     return false;
   case ActionType::Immediate:
   case ActionType::REPL:
@@ -170,6 +172,7 @@
 
   case ActionType::MergeModules:
   case ActionType::EmitModuleOnly:
+  case ActionType::BuildModuleFromParseableInterface:
     return TY_SwiftModuleFile;
 
   case ActionType::Immediate:
@@ -207,6 +210,7 @@
   case ActionType::DumpScopeMaps:
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
     return false;
@@ -242,6 +246,7 @@
   case ActionType::DumpScopeMaps:
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
     return false;
@@ -277,6 +282,7 @@
   case ActionType::DumpScopeMaps:
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
     return false;
@@ -309,6 +315,7 @@
   case ActionType::DumpScopeMaps:
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
     return false;
@@ -347,6 +354,7 @@
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
   case ActionType::EmitSILGen:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
     return false;
@@ -379,15 +387,16 @@
   case ActionType::DumpAST:
   case ActionType::EmitSyntax:
   case ActionType::PrintAST:
+  case ActionType::EmitImportedModules:
   case ActionType::EmitPCH:
   case ActionType::DumpScopeMaps:
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::DumpTypeInfo:
   case ActionType::EmitSILGen:
   case ActionType::EmitSIBGen:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::Immediate:
   case ActionType::REPL:
-  case ActionType::EmitImportedModules:
     return false;
   case ActionType::Typecheck:
   case ActionType::MergeModules:
@@ -427,6 +436,7 @@
   case ActionType::EmitObject:
   case ActionType::EmitImportedModules:
   case ActionType::MergeModules:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::DumpTypeInfo:
     return true;
 
@@ -446,6 +456,7 @@
   case ActionType::EmitSIB:
   case ActionType::MergeModules:
   case ActionType::EmitModuleOnly:
+  case ActionType::BuildModuleFromParseableInterface:
   case ActionType::EmitBC:
   case ActionType::EmitObject:
   case ActionType::Immediate:
@@ -488,6 +499,7 @@
   case ActionType::DumpTypeRefinementContexts:
   case ActionType::EmitImportedModules:
   case ActionType::EmitPCH:
+  case ActionType::BuildModuleFromParseableInterface:
     return false;
   case ActionType::EmitSILGen:
   case ActionType::EmitSIBGen:
diff --git a/lib/Frontend/ParseableInterfaceSupport.cpp b/lib/Frontend/ParseableInterfaceSupport.cpp
index 65c93e0..d682f79 100644
--- a/lib/Frontend/ParseableInterfaceSupport.cpp
+++ b/lib/Frontend/ParseableInterfaceSupport.cpp
@@ -107,7 +107,7 @@
 /// with dead entries -- when other factors change, such as the contents of
 /// the .swiftinterface input or its dependencies.
 static std::string getCacheHash(ASTContext &Ctx,
-                                CompilerInvocation &SubInvocation,
+                                const CompilerInvocation &SubInvocation,
                                 StringRef InPath) {
   // Start with the compiler version (which will be either tag names or revs).
   std::string vers = swift::version::getSwiftFullVersion(
@@ -128,16 +128,14 @@
   return llvm::APInt(64, H).toString(36, /*Signed=*/false);
 }
 
-void
-ParseableInterfaceModuleLoader::configureSubInvocationAndOutputPaths(
-    CompilerInvocation &SubInvocation,
-    Identifier ModuleName,
-    StringRef InPath,
-    llvm::SmallString<128> &OutPath) {
-
+static CompilerInvocation
+createInvocationForBuildingFromInterface(ASTContext &Ctx, StringRef ModuleName,
+                                         StringRef CacheDir) {
   auto &SearchPathOpts = Ctx.SearchPathOpts;
   auto &LangOpts = Ctx.LangOpts;
 
+  CompilerInvocation SubInvocation;
+
   // Start with a SubInvocation that copies various state from our
   // invoking ASTContext.
   SubInvocation.setImportSearchPaths(SearchPathOpts.ImportSearchPaths);
@@ -147,7 +145,7 @@
   SubInvocation.setRuntimeResourcePath(SearchPathOpts.RuntimeResourcePath);
   SubInvocation.setTargetTriple(LangOpts.Target);
   SubInvocation.setClangModuleCachePath(CacheDir);
-  SubInvocation.setModuleName(ModuleName.str());
+  SubInvocation.setModuleName(ModuleName);
 
   // Inhibit warnings from the SubInvocation since we are assuming the user
   // is not in a position to fix them.
@@ -161,24 +159,35 @@
   // modules that don't import Foundation.
   SubInvocation.getLangOptions().EnableObjCAttrRequiresFoundation = false;
 
-  // Calculate an output filename that includes a hash of relevant key data, and
-  // wire up the SubInvocation's InputsAndOutputs to contain both input and
-  // output filenames.
-  OutPath = CacheDir;
-  llvm::sys::path::append(OutPath, ModuleName.str());
+  return SubInvocation;
+}
+
+/// Calculate an output filename in \p SubInvocation's cache path that includes
+/// a hash of relevant key data.
+static void computeCachedOutputPath(ASTContext &Ctx,
+                                    const CompilerInvocation &SubInvocation,
+                                    StringRef InPath,
+                                    llvm::SmallString<128> &OutPath) {
+  OutPath = SubInvocation.getClangModuleCachePath();
+  llvm::sys::path::append(OutPath, SubInvocation.getModuleName());
   OutPath.append("-");
   OutPath.append(getCacheHash(Ctx, SubInvocation, InPath));
   OutPath.append(".");
   auto OutExt = file_types::getExtension(file_types::TY_SwiftModuleFile);
   OutPath.append(OutExt);
+}
 
+void ParseableInterfaceModuleLoader::configureSubInvocationInputsAndOutputs(
+    CompilerInvocation &SubInvocation, StringRef InPath, StringRef OutPath) {
   auto &SubFEOpts = SubInvocation.getFrontendOptions();
   SubFEOpts.RequestedAction = FrontendOptions::ActionType::EmitModuleOnly;
   SubFEOpts.EnableParseableModuleInterface = true;
   SubFEOpts.InputsAndOutputs.addPrimaryInputFile(InPath);
   SupplementaryOutputPaths SOPs;
   SOPs.ModuleOutputPath = OutPath.str();
-  StringRef MainOut = "/dev/null";
+
+  // Pick a primary output path that will cause problems to use.
+  StringRef MainOut = "/<unused>";
   SubFEOpts.InputsAndOutputs.setMainAndSupplementaryOutputs({MainOut}, {SOPs});
 }
 
@@ -258,6 +267,9 @@
     uint64_t Hash = xxHash64(DepBuf->getBuffer());
     Deps.push_back(FileDependency{Size, Hash, DepName});
 
+    if (ModuleCachePath.empty())
+      continue;
+
     // If Dep is itself a .swiftmodule in the cache dir, pull out its deps
     // and include them in our own, so we have a single-file view of
     // transitive deps: removes redundancies, and avoids opening and reading
@@ -290,11 +302,21 @@
 
 static bool buildSwiftModuleFromSwiftInterface(
     clang::vfs::FileSystem &FS, DiagnosticEngine &Diags, SourceLoc DiagLoc,
-    CompilerInvocation &SubInvocation, StringRef InPath, StringRef OutPath,
-    StringRef ModuleCachePath, DependencyTracker *OuterTracker) {
+    CompilerInvocation &SubInvocation, StringRef ModuleCachePath,
+    DependencyTracker *OuterTracker) {
   bool SubError = false;
   bool RunSuccess = llvm::CrashRecoveryContext().RunSafelyOnThread([&] {
-    (void)llvm::sys::fs::create_directory(ModuleCachePath);
+    // Note that we don't assume ModuleCachePath is the same as the Clang
+    // module cache path at this point.
+    if (!ModuleCachePath.empty())
+      (void)llvm::sys::fs::create_directory(ModuleCachePath);
+
+    FrontendOptions &FEOpts = SubInvocation.getFrontendOptions();
+    const auto &InputInfo = FEOpts.InputsAndOutputs.firstInput();
+    StringRef InPath = InputInfo.file();
+    const auto &OutputInfo =
+        InputInfo.getPrimarySpecificPaths().SupplementaryOutputs;
+    StringRef OutPath = OutputInfo.ModuleOutputPath;
 
     llvm::BumpPtrAllocator SubArgsAlloc;
     llvm::StringSaver SubArgSaver(SubArgsAlloc);
@@ -343,6 +365,7 @@
     LLVM_DEBUG(llvm::dbgs() << "Setting up instance to compile "
                << InPath << " to " << OutPath << "\n");
     CompilerInstance SubInstance;
+    SubInstance.getSourceMgr().setFileSystem(&FS);
 
     ForwardingDiagnosticConsumer FDC(Diags);
     SubInstance.addDiagnosticConsumer(&FDC);
@@ -372,7 +395,6 @@
 
     // Setup the callbacks for serialization, which can occur during the
     // optimization pipeline.
-    FrontendOptions &FEOpts = SubInvocation.getFrontendOptions();
     SerializationOptions SerializationOpts;
     std::string OutPathStr = OutPath;
     SerializationOpts.OutputPath = OutPathStr.c_str();
@@ -456,15 +478,16 @@
 
   // Set up a _potential_ sub-invocation to consume the .swiftinterface and emit
   // the .swiftmodule.
-  CompilerInvocation SubInvocation;
-  configureSubInvocationAndOutputPaths(SubInvocation, ModuleID.first, InPath,
-                                       OutPath);
+  CompilerInvocation SubInvocation =
+      createInvocationForBuildingFromInterface(Ctx, ModuleID.first.str(), CacheDir);
+  computeCachedOutputPath(Ctx, SubInvocation, InPath, OutPath);
+  configureSubInvocationInputsAndOutputs(SubInvocation, InPath, OutPath);
 
   // Evaluate if we need to run this sub-invocation, and if so run it.
   if (!swiftModuleIsUpToDate(FS, ModuleID, OutPath, Diags, dependencyTracker)) {
-    if (buildSwiftModuleFromSwiftInterface(FS, Diags, ModuleID.second,
-                                           SubInvocation, InPath, OutPath,
-                                           CacheDir, dependencyTracker))
+    if (::buildSwiftModuleFromSwiftInterface(FS, Diags, ModuleID.second,
+                                             SubInvocation, CacheDir,
+                                             dependencyTracker))
       return std::make_error_code(std::errc::invalid_argument);
   }
 
@@ -484,6 +507,21 @@
   return ErrorCode;
 }
 
+bool
+ParseableInterfaceModuleLoader::buildSwiftModuleFromSwiftInterface(
+    ASTContext &Ctx, StringRef CacheDir, StringRef ModuleName,
+    StringRef InPath, StringRef OutPath) {
+  CompilerInvocation SubInvocation =
+      createInvocationForBuildingFromInterface(Ctx, ModuleName, CacheDir);
+  configureSubInvocationInputsAndOutputs(SubInvocation, InPath, OutPath);
+
+  auto &FS = *Ctx.SourceMgr.getFileSystem();
+  auto &Diags = Ctx.Diags;
+  return ::buildSwiftModuleFromSwiftInterface(FS, Diags, /*DiagLoc*/SourceLoc(),
+                                              SubInvocation, /*CachePath*/"",
+                                              /*OuterTracker*/nullptr);
+}
+
 /// Diagnose any scoped imports in \p imports, i.e. those with a non-empty
 /// access path. These are not yet supported by parseable interfaces, since the
 /// information about the declaration kind is not preserved through the binary
diff --git a/lib/FrontendTool/FrontendTool.cpp b/lib/FrontendTool/FrontendTool.cpp
index cc8997c..5575f30 100644
--- a/lib/FrontendTool/FrontendTool.cpp
+++ b/lib/FrontendTool/FrontendTool.cpp
@@ -559,6 +559,17 @@
           .InputsAndOutputs.getSingleOutputFilename());
 }
 
+static bool buildModuleFromParseableInterface(CompilerInvocation &Invocation,
+                                              CompilerInstance &Instance) {
+  const auto &InputsAndOutputs =
+      Invocation.getFrontendOptions().InputsAndOutputs;
+  assert(InputsAndOutputs.hasSingleInput());
+  StringRef InputPath = InputsAndOutputs.getFilenameOfFirstInput();
+  return ParseableInterfaceModuleLoader::buildSwiftModuleFromSwiftInterface(
+      Instance.getASTContext(), Invocation.getClangModuleCachePath(),
+      Invocation.getModuleName(), InputPath, Invocation.getOutputFilename());
+}
+
 static bool compileLLVMIR(CompilerInvocation &Invocation,
                           CompilerInstance &Instance,
                           UnifiedStatsReporter *Stats) {
@@ -923,6 +934,9 @@
   if (Action == FrontendOptions::ActionType::EmitPCH)
     return precompileBridgingHeader(Invocation, Instance);
 
+  if (Action == FrontendOptions::ActionType::BuildModuleFromParseableInterface)
+    return buildModuleFromParseableInterface(Invocation, Instance);
+
   if (Invocation.getInputKind() == InputFileKind::LLVM)
     return compileLLVMIR(Invocation, Instance, Stats);
 
diff --git a/lib/LLVMPasses/LLVMMergeFunctions.cpp b/lib/LLVMPasses/LLVMMergeFunctions.cpp
index 31d4709..b9da940 100644
--- a/lib/LLVMPasses/LLVMMergeFunctions.cpp
+++ b/lib/LLVMPasses/LLVMMergeFunctions.cpp
@@ -515,6 +515,17 @@
   return true;
 }
 
+/// Returns true if functions containing calls to \p F may be merged together.
+static bool mayMergeCallsToFunction(Function &F) {
+  StringRef Name = F.getName();
+
+  // Calls to dtrace probes must generate unique patchpoints.
+  if (Name.startswith("__dtrace"))
+    return false;
+
+  return true;
+}
+
 /// Returns true if function \p F is eligible for merging.
 static bool isEligibleFunction(Function *F) {
   if (F->isDeclaration())
@@ -535,6 +546,8 @@
     for (Instruction &I : BB) {
       if (CallSite CS = CallSite(&I)) {
         Function *Callee = CS.getCalledFunction();
+        if (Callee && !mayMergeCallsToFunction(*Callee))
+          return false;
         if (!Callee || !Callee->isIntrinsic()) {
           Benefit += 5;
           continue;
diff --git a/lib/SILGen/SILGenLValue.cpp b/lib/SILGen/SILGenLValue.cpp
index a548ef4..034dc85 100644
--- a/lib/SILGen/SILGenLValue.cpp
+++ b/lib/SILGen/SILGenLValue.cpp
@@ -843,8 +843,11 @@
                          ManagedValue base) && override {
       assert(base.getType().isExistentialType() &&
              "base for open existential component must be an existential");
-      assert(base.getType().isAddress() &&
-             "base value of open-existential component was not an address?");
+      assert((base.getType().isAddress() ||
+              base.getType().getPreferredExistentialRepresentation(SGF.SGM.M) ==
+                  ExistentialRepresentation::Boxed) &&
+             "base value of open-existential component was not an address or a "
+             "boxed existential?");
       SILValue addr;
 
       auto rep = base.getType().getPreferredExistentialRepresentation(SGF.SGM.M);
diff --git a/stdlib/public/Darwin/Foundation/NSDictionary.swift b/stdlib/public/Darwin/Foundation/NSDictionary.swift
index 2155e41..4d2ec75 100644
--- a/stdlib/public/Darwin/Foundation/NSDictionary.swift
+++ b/stdlib/public/Darwin/Foundation/NSDictionary.swift
@@ -34,7 +34,7 @@
   ///
   /// The provided `NSDictionary` will be copied to ensure that the copy can
   /// not be mutated by other code.
-  fileprivate init(_cocoaDictionary: __shared AnyObject) {
+  fileprivate init(_cocoaDictionary: __shared NSDictionary) {
     assert(
       _isBridgedVerbatimToObjectiveC(Key.self) &&
       _isBridgedVerbatimToObjectiveC(Value.self),
diff --git a/stdlib/public/Darwin/SceneKit/SceneKit.swift.gyb b/stdlib/public/Darwin/SceneKit/SceneKit.swift.gyb
index dfa349e..4f544db 100644
--- a/stdlib/public/Darwin/SceneKit/SceneKit.swift.gyb
+++ b/stdlib/public/Darwin/SceneKit/SceneKit.swift.gyb
@@ -164,6 +164,8 @@
       primitiveCount = indexCount
     case .polygon:
       fatalError("Expected constant number of indices per primitive")
+    @unknown default:
+      fatalError("Unexpected primitive type")
     }
     self.init(
       data: Data(bytes: indices, count: indexCount * MemoryLayout<IndexType>.stride),
diff --git a/stdlib/public/runtime/Metadata.cpp b/stdlib/public/runtime/Metadata.cpp
index 09c30f3..8e7287e 100644
--- a/stdlib/public/runtime/Metadata.cpp
+++ b/stdlib/public/runtime/Metadata.cpp
@@ -3669,7 +3669,8 @@
     int compareWithKey(const Key other) const {
       if (auto r = comparePointers(other.protocol, key.protocol))
         return r;
-      return strcmp(other.type->Name.get(), key.type->Name.get());
+
+      return TypeContextIdentity(other.type).compare(TypeContextIdentity(key.type));
     }
 
     static size_t getExtraAllocationSize(const Key,
diff --git a/test/LLVMPasses/merge_func.ll b/test/LLVMPasses/merge_func.ll
index 0e3c021..789547f 100644
--- a/test/LLVMPasses/merge_func.ll
+++ b/test/LLVMPasses/merge_func.ll
@@ -502,3 +502,31 @@
   ret void
 }
 
+; Ensure that we do not merge functions which make use of distinct dtrace
+; probes. Each call to a dtrace probe must resolve to a unique patchpoint.
+
+declare void @"__dtrace_probe$Apple$Probe1$v1$696e74"(i32) local_unnamed_addr
+
+; CHECK-LABEL: define i32 @use_dtrace_probe1
+; CHECK: call void @"__dtrace_probe$Apple$Probe1$v1$696e74"
+define i32 @use_dtrace_probe1(i32 %x, i32 %y) {
+  %sum = add i32 %x, %y
+  %sum2 = add i32 %sum, %y
+  %l = load i32, i32* @g1, align 4
+  %sum3 = add i32 %sum2, %y
+  tail call void @"__dtrace_probe$Apple$Probe1$v1$696e74"(i32 undef)
+  ret i32 %sum3
+}
+
+declare void @"__dtrace_probe$Apple$Probe2$v1$696e74"(i32) local_unnamed_addr
+
+; CHECK-LABEL: define i32 @use_dtrace_probe2
+; CHECK: call void @"__dtrace_probe$Apple$Probe2$v1$696e74"
+define i32 @use_dtrace_probe2(i32 %x, i32 %y) {
+  %sum = add i32 %x, %y
+  %sum2 = add i32 %sum, %y
+  %l = load i32, i32* @g2, align 4
+  %sum3 = add i32 %sum2, %y
+  tail call void @"__dtrace_probe$Apple$Probe2$v1$696e74"(i32 undef)
+  ret i32 %sum3
+}
diff --git a/test/ParseableInterface/ParseStdlib.swiftinterface b/test/ParseableInterface/ParseStdlib.swiftinterface
new file mode 100644
index 0000000..9072c2d
--- /dev/null
+++ b/test/ParseableInterface/ParseStdlib.swiftinterface
@@ -0,0 +1,12 @@
+// swift-interface-format-version: 1.0
+// swift-module-flags: -parse-stdlib
+
+// Note that the "-parse-stdlib" is picked up from the module flags. It should
+// not be written in any of the invocations below.
+
+// RUN: %empty-directory(%t)
+// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/ParseStdlib.swiftmodule %s
+// RUN: %target-swift-ide-test -print-module -module-to-print ParseStdlib -I %t -source-filename x -print-interface | %FileCheck %s
+
+// CHECK: func test(_: Int42)
+public func test(_: Builtin.Int42) {}
diff --git a/test/ParseableInterface/SmokeTest.swiftinterface b/test/ParseableInterface/SmokeTest.swiftinterface
index 2efe97d..345b239 100644
--- a/test/ParseableInterface/SmokeTest.swiftinterface
+++ b/test/ParseableInterface/SmokeTest.swiftinterface
@@ -1,4 +1,4 @@
-// swift-tools-version: 4.0
+// swift-interface-format-version: 1.0
 // swift-module-flags: 
 
 // Make sure parse-only works...
@@ -6,7 +6,7 @@
 
 // ...and then make sure parse-and-typecheck-and-serialize works.
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -emit-module -o %t/SmokeTest.swiftmodule %s
+// RUN: %target-swift-frontend -build-module-from-parseable-interface -o %t/SmokeTest.swiftmodule %s
 // RUN: %target-swift-ide-test -print-module -module-to-print SmokeTest -I %t -source-filename x -print-interface > %t/SmokeTest.txt
 // RUN: %FileCheck %s < %t/SmokeTest.txt
 // RUN: %FileCheck -check-prefix NEGATIVE %s < %t/SmokeTest.txt
diff --git a/test/ParseableInterface/stored-properties-client.swift b/test/ParseableInterface/stored-properties-client.swift
index 24d63b9..c1b24a2 100644
--- a/test/ParseableInterface/stored-properties-client.swift
+++ b/test/ParseableInterface/stored-properties-client.swift
@@ -17,7 +17,7 @@
 // COMMON: %[[BAGOFVARIABLES:T16StoredProperties14BagOfVariablesV]] = type <{ %TSi, %TSb, [{{(3|7)}} x i8], %TSi }>
 
 // This type is non-@_fixed_layout, so it becomes opaque in a resilient module
-// CHECK: %[[HASSTOREDPROPERTIES:T16StoredProperties03HasaB0V]] = type <{ %TSi, %TSi, %TSb, [{{(3|7)}} x i8], %TSi, %TSb }>
+// CHECK: %[[HASSTOREDPROPERTIES:T16StoredProperties03HasaB0V]] = type <{ %TSi, %TSi, %TSb, [{{(3|7)}} x i8], %TSi, %TSb, [{{3|7}} x i8], %TSi }>
 // RESILIENT: %[[HASSTOREDPROPERTIES:swift.opaque]] = type opaque
 
 // COMMON: %[[HASSTOREDPROPERTIESFIXEDLAYOUT:T16StoredProperties03HasaB11FixedLayoutV]] = type <{ %[[BAGOFVARIABLES]], %[[BAGOFVARIABLES]] }>
diff --git a/test/ParseableInterface/stored-properties.swift b/test/ParseableInterface/stored-properties.swift
index 35e7682..774553e 100644
--- a/test/ParseableInterface/stored-properties.swift
+++ b/test/ParseableInterface/stored-properties.swift
@@ -52,6 +52,15 @@
   // CHECK: private var _: [[BOOL]]
   private var privateVar: Bool
 
+  // CHECK: @_hasStorage @_hasInitialValue public var storedWithObserversInitialValue: [[INT]] {
+  // RESILIENT: {{^}}  @_hasInitialValue public var storedWithObserversInitialValue: [[INT]] {
+  // COMMON-NEXT: get
+  // COMMON-NEXT: set
+  // COMMON-NEXT: }
+  public var storedWithObserversInitialValue: Int = 0 {
+    didSet {}
+  }
+
   // COMMON: public init(){{$}}
   public init() {
     self.simpleStoredImmutable = 0
diff --git a/test/Runtime/conformance_uniquing.swift b/test/Runtime/conformance_uniquing.swift
new file mode 100644
index 0000000..3f221d8
--- /dev/null
+++ b/test/Runtime/conformance_uniquing.swift
@@ -0,0 +1,20 @@
+// RUN: %target-run-simple-swift
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+import StdlibUnittest
+import Foundation
+
+let conformanceUniquingTests = TestSuite("ConformanceUniquing")
+
+func isSimpleSetAlgebra<T: SetAlgebra>(_: T.Type) -> Bool {
+  return T.self == T.Element.self
+}
+
+// rdar://problem/46685973
+conformanceUniquingTests.test("Nested types with the same name") {
+  expectTrue(isSimpleSetAlgebra(NSData.WritingOptions.self))
+  expectTrue(isSimpleSetAlgebra(JSONSerialization.WritingOptions.self))
+}
+
+runAllTests()
diff --git a/test/SIL/Parser/array_roundtrip.swift b/test/SIL/Parser/array_roundtrip.swift
index 95db2f5..c2e24b3 100644
--- a/test/SIL/Parser/array_roundtrip.swift
+++ b/test/SIL/Parser/array_roundtrip.swift
@@ -1,2 +1,7 @@
 // RUN: %target-swift-frontend %s -emit-sil -Ounchecked | %target-sil-opt -assume-parsing-unqualified-ownership-sil
+
+// Fails if the positions of the two Collection subscript requirements are
+// reversed. rdar://problem/46650834
+// XFAIL: swift_evolve
+
 var W = [UInt32](repeating: 0, count: 16)
diff --git a/test/SILGen/NSApplicationMain.swift b/test/SILGen/NSApplicationMain.swift
index db45064..016dbad 100644
--- a/test/SILGen/NSApplicationMain.swift
+++ b/test/SILGen/NSApplicationMain.swift
@@ -1,7 +1,7 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 // RUN: %target-swift-emit-ir -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s -check-prefix=IR
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -D REFERENCE | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -D REFERENCE | %FileCheck %s
 // RUN: %target-swift-emit-ir -parse-as-library -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -D REFERENCE | %FileCheck %s -check-prefix=IR
 
 // REQUIRES: OS=macosx
diff --git a/test/SILGen/access_marker_gen.swift b/test/SILGen/access_marker_gen.swift
index d4d1de2..f879a88 100644
--- a/test/SILGen/access_marker_gen.swift
+++ b/test/SILGen/access_marker_gen.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name access_marker_gen -parse-as-library -Xllvm -sil-full-demangle -enforce-exclusivity=checked -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name access_marker_gen -parse-as-library -Xllvm -sil-full-demangle -enforce-exclusivity=checked %s | %FileCheck %s
 
 func modify<T>(_ x: inout T) {}
 
diff --git a/test/SILGen/accessibility_warnings.swift b/test/SILGen/accessibility_warnings.swift
index 730351c..8b88ffb 100644
--- a/test/SILGen/accessibility_warnings.swift
+++ b/test/SILGen/accessibility_warnings.swift
@@ -1,5 +1,5 @@
 // RUN: %target-typecheck-verify-swift
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // This file tests that the AST produced after fixing accessibility warnings
 // is valid according to SILGen and the verifiers.
diff --git a/test/SILGen/accessors.swift b/test/SILGen/accessors.swift
index ddf5435..5c5c8ea 100644
--- a/test/SILGen/accessors.swift
+++ b/test/SILGen/accessors.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name accessors -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name accessors -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 // Hold a reference to do to magically become non-POD.
 class Reference {}
diff --git a/test/SILGen/address_only_types.swift b/test/SILGen/address_only_types.swift
index 3d08f59..388309a 100644
--- a/test/SILGen/address_only_types.swift
+++ b/test/SILGen/address_only_types.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name address_only_types -enable-sil-ownership -parse-as-library -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name address_only_types -parse-as-library -parse-stdlib %s | %FileCheck %s
 
 precedencegroup AssignmentPrecedence { assignment: true }
 
diff --git a/test/SILGen/argument_labels.swift b/test/SILGen/argument_labels.swift
index 08ed4ca..024f9e8 100644
--- a/test/SILGen/argument_labels.swift
+++ b/test/SILGen/argument_labels.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name argument_labels -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name argument_labels %s | %FileCheck %s
 
 public struct X { }
 public struct Y { }
diff --git a/test/SILGen/argument_shuffle.swift b/test/SILGen/argument_shuffle.swift
index 9566f6f..44e64b0 100644
--- a/test/SILGen/argument_shuffle.swift
+++ b/test/SILGen/argument_shuffle.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s
+// RUN: %target-swift-emit-silgen %s
 
 struct Horse<T> {
   func walk(_: (String, Int), reverse: Bool) {}
diff --git a/test/SILGen/arguments.swift b/test/SILGen/arguments.swift
index 5a50f4a..0cafa4e 100644
--- a/test/SILGen/arguments.swift
+++ b/test/SILGen/arguments.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name Swift -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name Swift -parse-stdlib %s | %FileCheck %s
 
 struct Int {}
 struct Float {}
diff --git a/test/SILGen/arguments_as_tuple_overloads.swift b/test/SILGen/arguments_as_tuple_overloads.swift
index a5e562d..301fd3b 100644
--- a/test/SILGen/arguments_as_tuple_overloads.swift
+++ b/test/SILGen/arguments_as_tuple_overloads.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -module-name=test -enable-sil-ownership -primary-file %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library -module-name=test -primary-file %s | %FileCheck %s
 
 // Check if we mangle the following constructors, functions, and
 // subscripts correctly.
diff --git a/test/SILGen/assignment.swift b/test/SILGen/assignment.swift
index e705c5d..efd0029 100644
--- a/test/SILGen/assignment.swift
+++ b/test/SILGen/assignment.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -enforce-exclusivity=checked %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enforce-exclusivity=checked %s | %FileCheck %s
 
 class C {}
 
diff --git a/test/SILGen/auto_closures.swift b/test/SILGen/auto_closures.swift
index faa8c81..c0b42f2 100644
--- a/test/SILGen/auto_closures.swift
+++ b/test/SILGen/auto_closures.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name auto_closures -enable-sil-ownership -parse-stdlib -swift-version 5 %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name auto_closures -parse-stdlib -swift-version 5 %s | %FileCheck %s
 
 struct Bool {}
 var false_ = Bool()
diff --git a/test/SILGen/auto_closures_swift4.swift b/test/SILGen/auto_closures_swift4.swift
index 3dbb717..3db0083 100644
--- a/test/SILGen/auto_closures_swift4.swift
+++ b/test/SILGen/auto_closures_swift4.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name auto_closures -enable-sil-ownership -parse-stdlib -swift-version 4 %s
+// RUN: %target-swift-emit-silgen -module-name auto_closures -parse-stdlib -swift-version 4 %s
 
 // Swift 4-style autoclosure forwarding should not crash - rdar://problem/44657505
 
diff --git a/test/SILGen/auto_generated_super_init_call.swift b/test/SILGen/auto_generated_super_init_call.swift
index 237da70..4b95506 100644
--- a/test/SILGen/auto_generated_super_init_call.swift
+++ b/test/SILGen/auto_generated_super_init_call.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-print-debuginfo -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-print-debuginfo %s | %FileCheck %s
 
 // Test that we emit a call to super.init at the end of the initializer, when none has been previously added.
 
diff --git a/test/SILGen/availability_query.swift b/test/SILGen/availability_query.swift
index 59df695..5ae132e 100644
--- a/test/SILGen/availability_query.swift
+++ b/test/SILGen/availability_query.swift
@@ -1,5 +1,5 @@
 // RUN: %target-swift-emit-sil %s -target x86_64-apple-macosx10.50 -verify
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -target x86_64-apple-macosx10.50 | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s -target x86_64-apple-macosx10.50 | %FileCheck %s
 
 // REQUIRES: OS=macosx
 
diff --git a/test/SILGen/borrow.swift b/test/SILGen/borrow.swift
index 7529343..ada3c18 100644
--- a/test/SILGen/borrow.swift
+++ b/test/SILGen/borrow.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name borrow -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name borrow -parse-stdlib %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SILGen/boxed_existentials.swift b/test/SILGen/boxed_existentials.swift
index c4f1ffa..ddce8bc 100644
--- a/test/SILGen/boxed_existentials.swift
+++ b/test/SILGen/boxed_existentials.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-emit-silgen -module-name boxed_existentials -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -module-name boxed_existentials -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s --check-prefix=GUARANTEED
+// RUN: %target-swift-emit-silgen -module-name boxed_existentials -Xllvm -sil-full-demangle %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name boxed_existentials -Xllvm -sil-full-demangle %s | %FileCheck %s --check-prefix=GUARANTEED
 
 func test_type_lowering(_ x: Error) { }
 // CHECK-LABEL: sil hidden @$s18boxed_existentials18test_type_loweringyys5Error_pF : $@convention(thin) (@guaranteed Error) -> () {
@@ -223,3 +223,21 @@
     return plusOneError()
   }
 }
+
+extension Error {
+  var myError: Error {
+    return self
+  }
+}
+
+// Make sure we don't assert on this.
+// CHECK-LABEL: sil hidden @$s18boxed_existentials4testyyF
+// CHECK:  [[ERROR_ADDR:%.*]] = alloc_stack $Error
+// CHECK:  [[ARRAY_GET:%.*]] = function_ref @$sSayxSicig
+// CHECK:  apply [[ARRAY_GET]]<Error>([[ERROR_ADDR]]
+// CHECK:  [[ERROR:%.*]] = load [take] [[ERROR_ADDR]] : $*Error
+// CHECK:  open_existential_box [[ERROR]]
+func test() {
+  var errors: [Error] = []
+  test_property(errors[0].myError)
+}
diff --git a/test/SILGen/c_function_pointers.swift b/test/SILGen/c_function_pointers.swift
index 721e47d..9736575 100644
--- a/test/SILGen/c_function_pointers.swift
+++ b/test/SILGen/c_function_pointers.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -verify %s | %FileCheck %s
 
 func values(_ arg: @escaping @convention(c) (Int) -> Int) -> @convention(c) (Int) -> Int {
   return arg
diff --git a/test/SILGen/c_modify_linkage.swift b/test/SILGen/c_modify_linkage.swift
index 836c1d5..d62c4fa 100644
--- a/test/SILGen/c_modify_linkage.swift
+++ b/test/SILGen/c_modify_linkage.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import AppKit
 
diff --git a/test/SILGen/call_chain_reabstraction.swift b/test/SILGen/call_chain_reabstraction.swift
index cabacbd..7402c23 100644
--- a/test/SILGen/call_chain_reabstraction.swift
+++ b/test/SILGen/call_chain_reabstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name call_chain_reabstraction -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name call_chain_reabstraction %s | %FileCheck %s
 
 struct A {
         func g<U>(_ recur: (A, U) -> U) -> (A, U) -> U {
diff --git a/test/SILGen/capture-canonicalization.swift b/test/SILGen/capture-canonicalization.swift
index 5b34b24..ec734c8 100644
--- a/test/SILGen/capture-canonicalization.swift
+++ b/test/SILGen/capture-canonicalization.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 struct Foo<T> {}
 struct Bar {}
diff --git a/test/SILGen/capture-transitive.swift b/test/SILGen/capture-transitive.swift
index 5a410f4..eafa4d6 100644
--- a/test/SILGen/capture-transitive.swift
+++ b/test/SILGen/capture-transitive.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 // SR-8398
 func fibonacci(_ n: Int) -> Int {
   var cache: [Int: Int] = [:]
diff --git a/test/SILGen/capture_inout.swift b/test/SILGen/capture_inout.swift
index 07158de..8244661 100644
--- a/test/SILGen/capture_inout.swift
+++ b/test/SILGen/capture_inout.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 typealias Int = Builtin.Int64
 
diff --git a/test/SILGen/capture_list.swift b/test/SILGen/capture_list.swift
index b214a28..08de6f9 100644
--- a/test/SILGen/capture_list.swift
+++ b/test/SILGen/capture_list.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s
+// RUN: %target-swift-emit-silgen %s
 
 // Capture list with weak capture vs noescape closure
 func transform<T>(fn: () -> T) -> T {
diff --git a/test/SILGen/capture_typealias.swift b/test/SILGen/capture_typealias.swift
index 61e255e..e8bc2b0 100644
--- a/test/SILGen/capture_typealias.swift
+++ b/test/SILGen/capture_typealias.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 typealias Int = Builtin.Int64
 
diff --git a/test/SILGen/capture_typed_boxes.swift b/test/SILGen/capture_typed_boxes.swift
index d01e694..541e113 100644
--- a/test/SILGen/capture_typed_boxes.swift
+++ b/test/SILGen/capture_typed_boxes.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name capture_typed_boxes -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name capture_typed_boxes %s | %FileCheck %s
 
 func foo(_ x: Int) -> () -> Int {
   var x = x
diff --git a/test/SILGen/casts.swift b/test/SILGen/casts.swift
index 4a7278d..4c911a1 100644
--- a/test/SILGen/casts.swift
+++ b/test/SILGen/casts.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name casts -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name casts %s | %FileCheck %s
 
 class B { }
 class D : B { }
diff --git a/test/SILGen/cdecl.swift b/test/SILGen/cdecl.swift
index 6a83377..ec1a6ac 100644
--- a/test/SILGen/cdecl.swift
+++ b/test/SILGen/cdecl.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden [thunk] @pear : $@convention(c)
 // CHECK:         function_ref @$s5cdecl5apple{{[_0-9a-zA-Z]*}}F
diff --git a/test/SILGen/cf_members.swift b/test/SILGen/cf_members.swift
index 5926ace..ac6f248 100644
--- a/test/SILGen/cf_members.swift
+++ b/test/SILGen/cf_members.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -I %S/../IDE/Inputs/custom-modules %s -enable-objc-interop -I %S/Inputs/usr/include | %FileCheck %s
+// RUN: %target-swift-emit-silgen -I %S/../IDE/Inputs/custom-modules %s -enable-objc-interop -I %S/Inputs/usr/include | %FileCheck %s
 
 import ImportAsMember
 
diff --git a/test/SILGen/class_bound_protocols.swift b/test/SILGen/class_bound_protocols.swift
index e2376cc..fd7930f 100644
--- a/test/SILGen/class_bound_protocols.swift
+++ b/test/SILGen/class_bound_protocols.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
 
 enum Optional<T> {
   case some(T)
diff --git a/test/SILGen/class_resilience.swift b/test/SILGen/class_resilience.swift
index aa459d5..fd87eb3 100644
--- a/test/SILGen/class_resilience.swift
+++ b/test/SILGen/class_resilience.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_class.swiftmodule -module-name=resilient_class -I %t %S/../Inputs/resilient_class.swift
-// RUN: %target-swift-emit-silgen -module-name class_resilience -I %t -enable-sil-ownership -enable-resilience %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name class_resilience -I %t -enable-resilience %s | %FileCheck %s
 
 import resilient_class
 
diff --git a/test/SILGen/closure_inline_initializer.swift b/test/SILGen/closure_inline_initializer.swift
index 2eb309b..d6326ed 100644
--- a/test/SILGen/closure_inline_initializer.swift
+++ b/test/SILGen/closure_inline_initializer.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // CHECK-LABEL: sil private @$s26closure_inline_initializer3FooV3fooSivpfiSiyXEfU_
 
diff --git a/test/SILGen/closures.swift b/test/SILGen/closures.swift
index 28a6b3f..7c5a72d 100644
--- a/test/SILGen/closures.swift
+++ b/test/SILGen/closures.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-emit-silgen -module-name closures -enable-sil-ownership -parse-stdlib -parse-as-library %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -module-name closures -enable-sil-ownership -parse-stdlib -parse-as-library  %s | %FileCheck %s --check-prefix=GUARANTEED
+// RUN: %target-swift-emit-silgen -module-name closures -parse-stdlib -parse-as-library %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name closures -parse-stdlib -parse-as-library  %s | %FileCheck %s --check-prefix=GUARANTEED
 
 import Swift
 
diff --git a/test/SILGen/closures_callee_guaranteed.swift b/test/SILGen/closures_callee_guaranteed.swift
index 0de6809..5c63bed 100644
--- a/test/SILGen/closures_callee_guaranteed.swift
+++ b/test/SILGen/closures_callee_guaranteed.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib -parse-as-library  %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -parse-as-library  %s | %FileCheck %s
 import Swift
 
 // CHECK-LABEL: sil @{{.*}}apply{{.*}} : $@convention(thin) (@noescape @callee_guaranteed () -> Int)
diff --git a/test/SILGen/collection_subtype_downcast.swift b/test/SILGen/collection_subtype_downcast.swift
index 8647e52..911d106 100644
--- a/test/SILGen/collection_subtype_downcast.swift
+++ b/test/SILGen/collection_subtype_downcast.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name collection_subtype_downcast -enable-sil-ownership -sdk %S/Inputs %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name collection_subtype_downcast -sdk %S/Inputs %s | %FileCheck %s
 
 struct S { var x, y: Int }
 
diff --git a/test/SILGen/collection_subtype_upcast.swift b/test/SILGen/collection_subtype_upcast.swift
index a420f73..f118d43 100644
--- a/test/SILGen/collection_subtype_upcast.swift
+++ b/test/SILGen/collection_subtype_upcast.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name collection_subtype_upcast -enable-sil-ownership -sdk %S/Inputs %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name collection_subtype_upcast -sdk %S/Inputs %s | %FileCheck %s
 
 struct S { var x, y: Int }
 
diff --git a/test/SILGen/complete_object_init.swift b/test/SILGen/complete_object_init.swift
index d50ef19..d2bd23f 100644
--- a/test/SILGen/complete_object_init.swift
+++ b/test/SILGen/complete_object_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 struct X { }
 
diff --git a/test/SILGen/conditional_conformance.swift b/test/SILGen/conditional_conformance.swift
index cc3dfd3..6c651a0 100644
--- a/test/SILGen/conditional_conformance.swift
+++ b/test/SILGen/conditional_conformance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol P1 {
   func normal()
diff --git a/test/SILGen/constrained_extensions.swift b/test/SILGen/constrained_extensions.swift
index 587890a..ad5e5a8 100644
--- a/test/SILGen/constrained_extensions.swift
+++ b/test/SILGen/constrained_extensions.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name constrained_extensions -enable-sil-ownership -primary-file %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name constrained_extensions -primary-file %s | %FileCheck %s
 // RUN: %target-swift-emit-sil -module-name constrained_extensions -O -primary-file %s > /dev/null
 // RUN: %target-swift-emit-ir -module-name constrained_extensions -primary-file %s > /dev/null
 
diff --git a/test/SILGen/copy_lvalue_peepholes.swift b/test/SILGen/copy_lvalue_peepholes.swift
index 67c6491..31ba196 100644
--- a/test/SILGen/copy_lvalue_peepholes.swift
+++ b/test/SILGen/copy_lvalue_peepholes.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib -parse-as-library %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -parse-as-library %s | %FileCheck %s
 
 precedencegroup AssignmentPrecedence { assignment: true }
 
diff --git a/test/SILGen/decls.swift b/test/SILGen/decls.swift
index 9fa4494..4a4002a 100644
--- a/test/SILGen/decls.swift
+++ b/test/SILGen/decls.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s5decls11void_returnyyF
 // CHECK: = tuple
diff --git a/test/SILGen/default_arguments.swift b/test/SILGen/default_arguments.swift
index 91b650d..a795fa0 100644
--- a/test/SILGen/default_arguments.swift
+++ b/test/SILGen/default_arguments.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -enable-sil-ownership -swift-version 4 %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -enable-sil-ownership -swift-version 4 %s | %FileCheck %s --check-prefix=NEGATIVE
+// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -swift-version 4 %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name default_arguments -Xllvm -sil-full-demangle -swift-version 4 %s | %FileCheck %s --check-prefix=NEGATIVE
 
 // __FUNCTION__ used as top-level parameter produces the module name.
 // CHECK-LABEL: sil @main
diff --git a/test/SILGen/default_arguments_generic.swift b/test/SILGen/default_arguments_generic.swift
index a79c338..a79df8d 100644
--- a/test/SILGen/default_arguments_generic.swift
+++ b/test/SILGen/default_arguments_generic.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name default_arguments_generic -enable-sil-ownership -swift-version 4 %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name default_arguments_generic -swift-version 4 %s | %FileCheck %s
 
 func foo<T: ExpressibleByIntegerLiteral>(_: T.Type, x: T = 0) { }
 
diff --git a/test/SILGen/default_arguments_imported.swift b/test/SILGen/default_arguments_imported.swift
index dca4f7c..84a8d22 100644
--- a/test/SILGen/default_arguments_imported.swift
+++ b/test/SILGen/default_arguments_imported.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // Test SIL generation for imported default arguments.
 
diff --git a/test/SILGen/default_arguments_inherited.swift b/test/SILGen/default_arguments_inherited.swift
index 846bd91..3f209e3 100644
--- a/test/SILGen/default_arguments_inherited.swift
+++ b/test/SILGen/default_arguments_inherited.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // When we synthesize an inherited designated initializer, the default
 // arguments are still conceptually rooted on the base declaration.
diff --git a/test/SILGen/default_constructor.swift b/test/SILGen/default_constructor.swift
index dc5f1d9..965e65d 100644
--- a/test/SILGen/default_constructor.swift
+++ b/test/SILGen/default_constructor.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -enable-sil-ownership -primary-file %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -primary-file %s | %FileCheck %s
 
 struct B {
   var i : Int, j : Float
diff --git a/test/SILGen/dependent_member_lowering.swift b/test/SILGen/dependent_member_lowering.swift
index a883385..f01dc5a 100644
--- a/test/SILGen/dependent_member_lowering.swift
+++ b/test/SILGen/dependent_member_lowering.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name dependent_member_lowering -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name dependent_member_lowering %s | %FileCheck %s
 
 protocol P {
   associatedtype A
diff --git a/test/SILGen/downcast_reabstraction.swift b/test/SILGen/downcast_reabstraction.swift
index a79a796..129b8ef 100644
--- a/test/SILGen/downcast_reabstraction.swift
+++ b/test/SILGen/downcast_reabstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name downcast_reabstraction -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name downcast_reabstraction %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s22downcast_reabstraction19condFunctionFromAnyyyypF
 // CHECK:         checked_cast_addr_br take_always Any in [[IN:%.*]] : $*Any to () -> () in [[OUT:%.*]] : $*@callee_guaranteed () -> @out (), [[YES:bb[0-9]+]], [[NO:bb[0-9]+]]
diff --git a/test/SILGen/dso_handle.swift b/test/SILGen/dso_handle.swift
index cc9f114..507daa2 100644
--- a/test/SILGen/dso_handle.swift
+++ b/test/SILGen/dso_handle.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 // CHECK: sil_global [[DSO:@__dso_handle]] : $Builtin.RawPointer
 
diff --git a/test/SILGen/dynamic_init.swift b/test/SILGen/dynamic_init.swift
index 0058e52..c4fa979 100644
--- a/test/SILGen/dynamic_init.swift
+++ b/test/SILGen/dynamic_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class C {
   required init() { }
diff --git a/test/SILGen/dynamic_self.swift b/test/SILGen/dynamic_self.swift
index 7fe93d4..3f1c40d 100644
--- a/test/SILGen/dynamic_self.swift
+++ b/test/SILGen/dynamic_self.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name dynamic_self -enable-sil-ownership %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name dynamic_self %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 // RUN: %target-swift-emit-sil -module-name dynamic_self -O %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
 // RUN: %target-swift-emit-ir -module-name dynamic_self %s -disable-objc-attr-requires-foundation-module -enable-objc-interop
 
diff --git a/test/SILGen/dynamically_replaceable.swift b/test/SILGen/dynamically_replaceable.swift
index 82a54c9..a661d57 100644
--- a/test/SILGen/dynamically_replaceable.swift
+++ b/test/SILGen/dynamically_replaceable.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -swift-version 5 %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -swift-version 5 %s -enable-implicit-dynamic | %FileCheck %s --check-prefix=IMPLICIT
+// RUN: %target-swift-emit-silgen -swift-version 5 %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -swift-version 5 %s -enable-implicit-dynamic | %FileCheck %s --check-prefix=IMPLICIT
 
 // CHECK-LABEL: sil hidden @$s23dynamically_replaceable014maybe_dynamic_B0yyF : $@convention(thin) () -> () {
 // IMPLICIT-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable014maybe_dynamic_B0yyF : $@convention(thin) () -> () {
diff --git a/test/SILGen/effectsattr.swift b/test/SILGen/effectsattr.swift
index a7cd2e0..ad98e5f 100644
--- a/test/SILGen/effectsattr.swift
+++ b/test/SILGen/effectsattr.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 
 //CHECK: [readonly] @func1
diff --git a/test/SILGen/enum.swift b/test/SILGen/enum.swift
index eaa3572..17077e4 100644
--- a/test/SILGen/enum.swift
+++ b/test/SILGen/enum.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -parse-stdlib -parse-as-library -enable-sil-ownership -module-name Swift %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
 
 precedencegroup AssignmentPrecedence { assignment: true }
 
diff --git a/test/SILGen/enum_generic_raw_value.swift b/test/SILGen/enum_generic_raw_value.swift
index 1cf3821..aadd337 100644
--- a/test/SILGen/enum_generic_raw_value.swift
+++ b/test/SILGen/enum_generic_raw_value.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s22enum_generic_raw_value1EO
 enum E<T>: Int {
diff --git a/test/SILGen/enum_raw_representable.swift b/test/SILGen/enum_raw_representable.swift
index 648d897..2a6a48c 100644
--- a/test/SILGen/enum_raw_representable.swift
+++ b/test/SILGen/enum_raw_representable.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-sorted-sil %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-sorted-sil -enable-resilience %s | %FileCheck -check-prefix=CHECK-RESILIENT %s
+// RUN: %target-swift-emit-silgen -emit-sorted-sil %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -emit-sorted-sil -enable-resilience %s | %FileCheck -check-prefix=CHECK-RESILIENT %s
 
 public enum E: Int {
   case a, b, c
diff --git a/test/SILGen/enum_raw_representable_objc.swift b/test/SILGen/enum_raw_representable_objc.swift
index c14a6d6..6a3bccd 100644
--- a/test/SILGen/enum_raw_representable_objc.swift
+++ b/test/SILGen/enum_raw_representable_objc.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-sorted-sil -enable-objc-interop -disable-objc-attr-requires-foundation-module %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-sorted-sil -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-resilience %s | %FileCheck -check-prefix=CHECK-RESILIENT %s
+// RUN: %target-swift-emit-silgen -emit-sorted-sil -enable-objc-interop -disable-objc-attr-requires-foundation-module %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -emit-sorted-sil -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-resilience %s | %FileCheck -check-prefix=CHECK-RESILIENT %s
 
 @objc public enum CLike: Int {
   case a, b, c
diff --git a/test/SILGen/enum_resilience.swift b/test/SILGen/enum_resilience.swift
index 885dadb..099d0f3 100644
--- a/test/SILGen/enum_resilience.swift
+++ b/test/SILGen/enum_resilience.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift
-// RUN: %target-swift-emit-silgen -module-name enum_resilience -I %t -enable-sil-ownership -enable-resilience %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name enum_resilience -I %t -enable-resilience %s | %FileCheck %s
 
 import resilient_enum
 
diff --git a/test/SILGen/enum_resilience_testable.swift b/test/SILGen/enum_resilience_testable.swift
index f455da3..a82d41d 100644
--- a/test/SILGen/enum_resilience_testable.swift
+++ b/test/SILGen/enum_resilience_testable.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_struct.swiftmodule -module-name=resilient_struct %S/../Inputs/resilient_struct.swift
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_enum.swiftmodule -module-name=resilient_enum -I %t %S/../Inputs/resilient_enum.swift -enable-testing
-// RUN: %target-swift-emit-silgen -module-name enum_resilience_testable -I %t -enable-sil-ownership -enable-nonfrozen-enum-exhaustivity-diagnostics -swift-version 5 %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name enum_resilience_testable -I %t -enable-nonfrozen-enum-exhaustivity-diagnostics -swift-version 5 %s | %FileCheck %s
 
 // This is mostly testing the same things as enum_resilienc.swift, just in a
 // context where the user will never be forced to write a default case. It's the
diff --git a/test/SILGen/erasure_reabstraction.swift b/test/SILGen/erasure_reabstraction.swift
index 186b7bf..355f6b7 100644
--- a/test/SILGen/erasure_reabstraction.swift
+++ b/test/SILGen/erasure_reabstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 struct Foo {}
 class Bar {}
diff --git a/test/SILGen/errors.swift b/test/SILGen/errors.swift
index 1191377..b0ed1ad 100644
--- a/test/SILGen/errors.swift
+++ b/test/SILGen/errors.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-stdlib -enable-sil-ownership -Xllvm -sil-print-debuginfo -verify -swift-version 5 -primary-file %s %S/Inputs/errors_other.swift | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -Xllvm -sil-print-debuginfo -verify -swift-version 5 -primary-file %s %S/Inputs/errors_other.swift | %FileCheck %s
 
 import Swift
 
diff --git a/test/SILGen/existential_erasure.swift b/test/SILGen/existential_erasure.swift
index 176ebfb..b0a18ba 100644
--- a/test/SILGen/existential_erasure.swift
+++ b/test/SILGen/existential_erasure.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name existential_erasure -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name existential_erasure %s | %FileCheck %s
 
 protocol P {
   func downgrade(_ m68k: Bool) -> Self
diff --git a/test/SILGen/existential_metatypes.swift b/test/SILGen/existential_metatypes.swift
index 6029999..bcfd60b 100644
--- a/test/SILGen/existential_metatypes.swift
+++ b/test/SILGen/existential_metatypes.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 @_semantics("typechecker.type(of:)")
 public func type<T, Metatype>(of value: T) -> Metatype {}
diff --git a/test/SILGen/expressions.swift b/test/SILGen/expressions.swift
index 1e8aeb2..ddc90cc 100644
--- a/test/SILGen/expressions.swift
+++ b/test/SILGen/expressions.swift
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: echo "public var x = Int()" | %target-swift-frontend -module-name FooBar -emit-module -o %t -
-// RUN: %target-swift-emit-silgen -parse-stdlib -module-name expressions -enable-sil-ownership %s -I%t -disable-access-control | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -module-name expressions %s -I%t -disable-access-control | %FileCheck %s
 
 import Swift
 import FooBar
diff --git a/test/SILGen/extensions.swift b/test/SILGen/extensions.swift
index cc3bddf..df0da75 100644
--- a/test/SILGen/extensions.swift
+++ b/test/SILGen/extensions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class Foo {
   // CHECK-LABEL: sil hidden @$s10extensions3FooC3zim{{[_0-9a-zA-Z]*}}F
diff --git a/test/SILGen/extensions_multifile.swift b/test/SILGen/extensions_multifile.swift
index 6eab4db..508c6d4 100644
--- a/test/SILGen/extensions_multifile.swift
+++ b/test/SILGen/extensions_multifile.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/struct_with_initializer.swift -module-name extensions_multifile -enable-sil-ownership | %FileCheck %s --check-prefix=FRAGILE --check-prefix=CHECK
-// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/struct_with_initializer.swift -module-name extensions_multifile -enable-sil-ownership -enable-resilience | %FileCheck %s --check-prefix=RESILIENT --check-prefix=CHECK
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/struct_with_initializer.swift -module-name extensions_multifile | %FileCheck %s --check-prefix=FRAGILE --check-prefix=CHECK
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/struct_with_initializer.swift -module-name extensions_multifile -enable-resilience | %FileCheck %s --check-prefix=RESILIENT --check-prefix=CHECK
 
 // CHECK-LABEL: sil hidden @$s20extensions_multifile12HasInitValueV1zACSi_tcfC : $@convention(method) (Int, @thin HasInitValue.Type) -> @owned HasInitValue {
 // CHECK: function_ref @$s20extensions_multifile12HasInitValueV1xSivpfi : $@convention(thin) () -> Int
diff --git a/test/SILGen/extensions_objc.swift b/test/SILGen/extensions_objc.swift
index 55ba68c..d5bdc23 100644
--- a/test/SILGen/extensions_objc.swift
+++ b/test/SILGen/extensions_objc.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name extensions_objc -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name extensions_objc -sdk %S/Inputs %s -I %S/Inputs -enable-source-import | %FileCheck %s
 //
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/external-associated-type-conformance.swift b/test/SILGen/external-associated-type-conformance.swift
index 7002ac1..b8d490b 100644
--- a/test/SILGen/external-associated-type-conformance.swift
+++ b/test/SILGen/external-associated-type-conformance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/external-associated-type-conformance.h %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/external-associated-type-conformance.h %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 extension BadError: LocalizedError {}
diff --git a/test/SILGen/external_definitions.swift b/test/SILGen/external_definitions.swift
index 3ca95bd..1be7221 100644
--- a/test/SILGen/external_definitions.swift
+++ b/test/SILGen/external_definitions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs %s -enable-objc-interop | %FileCheck %s
 
 import ansible
 
diff --git a/test/SILGen/final.swift b/test/SILGen/final.swift
index 90af97d..8782796 100644
--- a/test/SILGen/final.swift
+++ b/test/SILGen/final.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name final -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name final %s | %FileCheck %s
 
 class TestClass {
 
diff --git a/test/SILGen/fixed_layout_attribute.swift b/test/SILGen/fixed_layout_attribute.swift
index 99fe0c0..ab0c710 100644
--- a/test/SILGen/fixed_layout_attribute.swift
+++ b/test/SILGen/fixed_layout_attribute.swift
@@ -1,8 +1,8 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-as-library %s | %FileCheck %s --check-prefix=FRAGILE --check-prefix=CHECK
-// RUN: %target-swift-emit-silgen -enable-resilience -enable-sil-ownership -parse-as-library %s | %FileCheck %s --check-prefix=RESILIENT --check-prefix=CHECK
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s --check-prefix=FRAGILE --check-prefix=CHECK
+// RUN: %target-swift-emit-silgen -enable-resilience -parse-as-library %s | %FileCheck %s --check-prefix=RESILIENT --check-prefix=CHECK
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-as-library -enable-testing %s
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-as-library -enable-testing -enable-resilience %s
+// RUN: %target-swift-emit-silgen -parse-as-library -enable-testing %s
+// RUN: %target-swift-emit-silgen -parse-as-library -enable-testing -enable-resilience %s
 
 public let global = 0
 
diff --git a/test/SILGen/for_loop_tuple_destructure_reabstraction.swift b/test/SILGen/for_loop_tuple_destructure_reabstraction.swift
index 8758512..43e568d 100644
--- a/test/SILGen/for_loop_tuple_destructure_reabstraction.swift
+++ b/test/SILGen/for_loop_tuple_destructure_reabstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s
+// RUN: %target-swift-emit-silgen -verify %s
 
 protocol P {}
 
diff --git a/test/SILGen/force_cast_chained_optional.swift b/test/SILGen/force_cast_chained_optional.swift
index 7487cef..c10133b 100644
--- a/test/SILGen/force_cast_chained_optional.swift
+++ b/test/SILGen/force_cast_chained_optional.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name force_cast_chained_optional -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name force_cast_chained_optional %s | %FileCheck %s
 
 class Foo {
   var bar: Bar!
diff --git a/test/SILGen/foreach.swift b/test/SILGen/foreach.swift
index 9c77cbd..355fd15 100644
--- a/test/SILGen/foreach.swift
+++ b/test/SILGen/foreach.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name foreach -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name foreach %s | %FileCheck %s
 
 //////////////////
 // Declarations //
diff --git a/test/SILGen/fully-concrete-extension-of-generic.swift b/test/SILGen/fully-concrete-extension-of-generic.swift
index b557ecf..82ca945 100644
--- a/test/SILGen/fully-concrete-extension-of-generic.swift
+++ b/test/SILGen/fully-concrete-extension-of-generic.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s 
+// RUN: %target-swift-emit-silgen -verify %s 
 
 class C<T> {
   init() {}
diff --git a/test/SILGen/function_conversion_objc.swift b/test/SILGen/function_conversion_objc.swift
index 8857724..78e659a 100644
--- a/test/SILGen/function_conversion_objc.swift
+++ b/test/SILGen/function_conversion_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name function_conversion_objc -sdk %S/Inputs %s -I %S/Inputs -enable-sil-ownership -enable-source-import -enable-objc-interop -verify | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name function_conversion_objc -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -enable-objc-interop -verify | %FileCheck %s
 
 import Foundation
 
diff --git a/test/SILGen/function_conversion_se0110.swift b/test/SILGen/function_conversion_se0110.swift
index 6c30cbf..e952453 100644
--- a/test/SILGen/function_conversion_se0110.swift
+++ b/test/SILGen/function_conversion_se0110.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name function_conversion -enable-sil-ownership -primary-file %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name function_conversion -primary-file %s | %FileCheck %s
 
 // Check SILGen against various FunctionConversionExprs emitted by Sema.
 
diff --git a/test/SILGen/functions.swift b/test/SILGen/functions.swift
index ce1bbd0..2a6d067 100644
--- a/test/SILGen/functions.swift
+++ b/test/SILGen/functions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name functions -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name functions -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library %s | %FileCheck %s
 
 import Swift // just for Optional
 
diff --git a/test/SILGen/generic_casts.swift b/test/SILGen/generic_casts.swift
index 36b286c..061fa8d 100644
--- a/test/SILGen/generic_casts.swift
+++ b/test/SILGen/generic_casts.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -swift-version 5 -module-name generic_casts -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-runtime %s
+// RUN: %target-swift-emit-silgen -swift-version 5 -module-name generic_casts -Xllvm -sil-full-demangle %s | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-runtime %s
 
 protocol ClassBound : class {}
 protocol NotClassBound {}
diff --git a/test/SILGen/generic_casts_swift4.swift b/test/SILGen/generic_casts_swift4.swift
index 2322261..4e08812 100644
--- a/test/SILGen/generic_casts_swift4.swift
+++ b/test/SILGen/generic_casts_swift4.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -swift-version 4 -module-name generic_casts -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -swift-version 4 -module-name generic_casts -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 // The below tests are to ensure we maintain compatibility with Swift 4.1's
 // behaviour when casting to an archetype – the compiler assumes a non-optional
diff --git a/test/SILGen/generic_closures.swift b/test/SILGen/generic_closures.swift
index 7f2f26b..14680fe 100644
--- a/test/SILGen/generic_closures.swift
+++ b/test/SILGen/generic_closures.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name generic_closures  -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name generic_closures  -parse-stdlib %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SILGen/generic_literals.swift b/test/SILGen/generic_literals.swift
index 132fc76..f032ed1 100644
--- a/test/SILGen/generic_literals.swift
+++ b/test/SILGen/generic_literals.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s16generic_literals0A14IntegerLiteral1xyx_ts013ExpressibleBycD0RzlF : $@convention(thin) <T where T : ExpressibleByIntegerLiteral> (@in_guaranteed T) -> () {
 func genericIntegerLiteral<T : ExpressibleByIntegerLiteral>(x: T) {
diff --git a/test/SILGen/generic_local_property.swift b/test/SILGen/generic_local_property.swift
index ffac5bd..e9293aa 100644
--- a/test/SILGen/generic_local_property.swift
+++ b/test/SILGen/generic_local_property.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 func use<T>(_: T) {}
 
diff --git a/test/SILGen/generic_property_base_lifetime.swift b/test/SILGen/generic_property_base_lifetime.swift
index f46855a..74b54e2 100644
--- a/test/SILGen/generic_property_base_lifetime.swift
+++ b/test/SILGen/generic_property_base_lifetime.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name generic_property_base_lifetime %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name generic_property_base_lifetime %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 
 protocol ProtocolA: class {
     var intProp: Int { get set }
diff --git a/test/SILGen/generic_signatures.swift b/test/SILGen/generic_signatures.swift
index 777dfbf..d73c767 100644
--- a/test/SILGen/generic_signatures.swift
+++ b/test/SILGen/generic_signatures.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s
 
 protocol P {
   associatedtype Assoc
diff --git a/test/SILGen/generic_tuples.swift b/test/SILGen/generic_tuples.swift
index 863487c..1a76763 100644
--- a/test/SILGen/generic_tuples.swift
+++ b/test/SILGen/generic_tuples.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name generic_tuples -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name generic_tuples -parse-as-library %s | %FileCheck %s
 
 
 func dup<T>(_ x: T) -> (T, T) { return (x,x) }
diff --git a/test/SILGen/global_init_attribute.swift b/test/SILGen/global_init_attribute.swift
index 750cb17..64fffbd 100644
--- a/test/SILGen/global_init_attribute.swift
+++ b/test/SILGen/global_init_attribute.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -Xllvm -sil-full-demangle -emit-module -o %t %S/Inputs/def_global.swift -enable-sil-ownership
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library -enable-sil-ownership -I %t %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library -I %t %s | %FileCheck %s
 //
 // Test that SILGen uses the "global_init" attribute for all global
 // variable addressors.
diff --git a/test/SILGen/guaranteed-let-peephole-reabstraction.swift b/test/SILGen/guaranteed-let-peephole-reabstraction.swift
index f84abce..a75ef18 100644
--- a/test/SILGen/guaranteed-let-peephole-reabstraction.swift
+++ b/test/SILGen/guaranteed-let-peephole-reabstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s 
+// RUN: %target-swift-emit-silgen -verify %s 
 class BlockBox<T> {
   let block: (T) -> Void = { _ in }
 
diff --git a/test/SILGen/guaranteed_closure_context.swift b/test/SILGen/guaranteed_closure_context.swift
index 570d58e..709e93f 100644
--- a/test/SILGen/guaranteed_closure_context.swift
+++ b/test/SILGen/guaranteed_closure_context.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership  %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library  %s | %FileCheck %s
 
 func use<T>(_: T) {}
 
diff --git a/test/SILGen/guaranteed_normal_args.swift b/test/SILGen/guaranteed_normal_args.swift
index 2700163..0e1c799 100644
--- a/test/SILGen/guaranteed_normal_args.swift
+++ b/test/SILGen/guaranteed_normal_args.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -parse-as-library -module-name Swift -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library -module-name Swift -parse-stdlib %s | %FileCheck %s
 
 // This test checks specific codegen related to normal arguments being passed at
 // +0. Eventually, it should be merged into normal SILGen tests.
diff --git a/test/SILGen/guaranteed_normal_args_curry_thunks.swift b/test/SILGen/guaranteed_normal_args_curry_thunks.swift
index ec0ed57..31bdb69 100644
--- a/test/SILGen/guaranteed_normal_args_curry_thunks.swift
+++ b/test/SILGen/guaranteed_normal_args_curry_thunks.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -module-name Swift -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library -module-name Swift -parse-stdlib %s | %FileCheck %s
 
 // This test checks specific codegen related to converting curry thunks to
 // canonical representations when we are emitting guaranteed normal
diff --git a/test/SILGen/guaranteed_self.swift b/test/SILGen/guaranteed_self.swift
index 0d13173..8e7d5a0 100644
--- a/test/SILGen/guaranteed_self.swift
+++ b/test/SILGen/guaranteed_self.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name guaranteed_self -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name guaranteed_self -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 
 protocol Fooable {
   init()
diff --git a/test/SILGen/if_expr.swift b/test/SILGen/if_expr.swift
index ff4aa6a..5e27e65 100644
--- a/test/SILGen/if_expr.swift
+++ b/test/SILGen/if_expr.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 func fizzbuzz(i: Int) -> String {
   return i % 3 == 0
diff --git a/test/SILGen/if_while_binding.swift b/test/SILGen/if_while_binding.swift
index 6f311bf..23d4cc3 100644
--- a/test/SILGen/if_while_binding.swift
+++ b/test/SILGen/if_while_binding.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name if_while_binding -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name if_while_binding -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 func foo() -> String? { return "" }
 func bar() -> String? { return "" }
diff --git a/test/SILGen/implicitly_unwrapped_optional.swift b/test/SILGen/implicitly_unwrapped_optional.swift
index 2a86827..41a8a79 100644
--- a/test/SILGen/implicitly_unwrapped_optional.swift
+++ b/test/SILGen/implicitly_unwrapped_optional.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name implicitly_unwrapped_optional -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name implicitly_unwrapped_optional %s | %FileCheck %s
 
 func foo(f f: (() -> ())!) {
   var f: (() -> ())! = f
diff --git a/test/SILGen/import_as_member_cf.swift b/test/SILGen/import_as_member_cf.swift
index 22d48c3..cdfa76b 100644
--- a/test/SILGen/import_as_member_cf.swift
+++ b/test/SILGen/import_as_member_cf.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -I %S/../IDE/Inputs/custom-modules %s -enable-objc-interop -sdk %S/Inputs 2>&1 | %FileCheck --check-prefix=SIL %s
+// RUN: %target-swift-emit-silgen -I %S/../IDE/Inputs/custom-modules %s -enable-objc-interop -sdk %S/Inputs 2>&1 | %FileCheck --check-prefix=SIL %s
 
 import ImportAsMember.C
 
diff --git a/test/SILGen/imported_struct_array_field.swift b/test/SILGen/imported_struct_array_field.swift
index 56fdfbd..6b114b9 100644
--- a/test/SILGen/imported_struct_array_field.swift
+++ b/test/SILGen/imported_struct_array_field.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -import-objc-header %S/Inputs/array_typedef.h %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/array_typedef.h %s | %FileCheck %s
 
 // CHECK-LABEL: sil shared [transparent] [serializable] @$sSo4NameV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (UInt8, UInt8, UInt8, UInt8, @thin Name.Type) -> Name
 func useImportedArrayTypedefInit() -> Name {
diff --git a/test/SILGen/indirect_enum.swift b/test/SILGen/indirect_enum.swift
index 2ef47ba..07c29fb 100644
--- a/test/SILGen/indirect_enum.swift
+++ b/test/SILGen/indirect_enum.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name indirect_enum -Xllvm -sil-print-debuginfo %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name indirect_enum -Xllvm -sil-print-debuginfo %s | %FileCheck %s
 
 indirect enum TreeA<T> {
   case Nil
diff --git a/test/SILGen/inherit_initializers.swift b/test/SILGen/inherit_initializers.swift
index 7daff76..444f304 100644
--- a/test/SILGen/inherit_initializers.swift
+++ b/test/SILGen/inherit_initializers.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -verify
+// RUN: %target-swift-emit-silgen %s -verify
 
 // We just want to SILGen this and ensure it doesn't crash. Don't particularly
 // care about the generated SIL.
diff --git a/test/SILGen/inherited_protocol_conformance_multi_file.swift b/test/SILGen/inherited_protocol_conformance_multi_file.swift
index d7c85a4..b89f402 100644
--- a/test/SILGen/inherited_protocol_conformance_multi_file.swift
+++ b/test/SILGen/inherited_protocol_conformance_multi_file.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file.swift -module-name main | %FileCheck %s --check-prefix=THIS_FILE
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file.swift -module-name main | %FileCheck %s --check-prefix=OTHER_FILE
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file.swift -module-name main | %FileCheck %s --check-prefix=THIS_FILE
+// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file.swift -module-name main | %FileCheck %s --check-prefix=OTHER_FILE
 
 // THIS_FILE-NOT: sil_witness_table {{.*}} B: P
 // THIS_FILE-LABEL: sil_witness_table hidden D: R module main
diff --git a/test/SILGen/inherited_protocol_conformance_multi_file_2.swift b/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
index 9c13719..c5851c1 100644
--- a/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
+++ b/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
@@ -1,46 +1,46 @@
 // -- Try all the permutations of file order possible.
 
 // Abc
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
 // aBc
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
 // abC
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
 
 // Bac
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
 // bAc
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
 // baC
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
 
 // OS X 10.9
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
 // cAb
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
 // caB
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
 
 // Acb
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_A
 // aCb
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_C
 // abC
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen %s %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -module-name main | %FileCheck %s --check-prefix=FILE_B
 
 // Bca
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_B
 // bCa
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_C
 // bcA
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %s -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %s -module-name main | %FileCheck %s --check-prefix=FILE_A
 
 // Cba
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_C
+// RUN: %target-swift-emit-silgen -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_C
 // cBa
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_B
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift -primary-file %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift %s -module-name main | %FileCheck %s --check-prefix=FILE_B
 // cbA
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %s -module-name main | %FileCheck %s --check-prefix=FILE_A
+// RUN: %target-swift-emit-silgen %S/Inputs/inherited_protocol_conformance_other_file_2_c.swift %S/Inputs/inherited_protocol_conformance_other_file_2_b.swift -primary-file %s -module-name main | %FileCheck %s --check-prefix=FILE_A
 
 // FILE_A-NOT: sil [transparent] [thunk] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
 // FILE_A-NOT: sil [transparent] [thunk] @$s4main5ThingVSkAAsADP9hashValueSivgTW
diff --git a/test/SILGen/initializers.swift b/test/SILGen/initializers.swift
index 72a241e..1075538 100644
--- a/test/SILGen/initializers.swift
+++ b/test/SILGen/initializers.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -disable-objc-attr-requires-foundation-module -enable-objc-interop %s -module-name failable_initializers | %FileCheck %s
+// RUN: %target-swift-emit-silgen -disable-objc-attr-requires-foundation-module -enable-objc-interop %s -module-name failable_initializers | %FileCheck %s
 
 // High-level tests that silgen properly emits code for failable and thorwing
 // initializers.
diff --git a/test/SILGen/inlinable_attribute.swift b/test/SILGen/inlinable_attribute.swift
index 619071b..ad5937e 100644
--- a/test/SILGen/inlinable_attribute.swift
+++ b/test/SILGen/inlinable_attribute.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name inlinable_attribute -enable-sil-ownership -emit-verbose-sil -warnings-as-errors %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name inlinable_attribute -emit-verbose-sil -warnings-as-errors %s | %FileCheck %s
 
 // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute15fragileFunctionyyF : $@convention(thin) () -> ()
 @inlinable public func fragileFunction() {
diff --git a/test/SILGen/inline_always.swift b/test/SILGen/inline_always.swift
index 12243af..e8b193c 100644
--- a/test/SILGen/inline_always.swift
+++ b/test/SILGen/inline_always.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden [always_inline] @$s13inline_always0b1_A7_calleeyyF : $@convention(thin) () -> ()
 @inline(__always)
diff --git a/test/SILGen/interface_type_mangling.swift b/test/SILGen/interface_type_mangling.swift
index 39cb598..27b8d27 100644
--- a/test/SILGen/interface_type_mangling.swift
+++ b/test/SILGen/interface_type_mangling.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 protocol P {
   associatedtype Assoc1
diff --git a/test/SILGen/ivar_destroyer.swift b/test/SILGen/ivar_destroyer.swift
index fd00132..1661bee 100644
--- a/test/SILGen/ivar_destroyer.swift
+++ b/test/SILGen/ivar_destroyer.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
 // Only derived classes with non-trivial ivars need an ivar destroyer.
 
diff --git a/test/SILGen/keypath_application.swift b/test/SILGen/keypath_application.swift
index 83dcad1..67f177c 100644
--- a/test/SILGen/keypath_application.swift
+++ b/test/SILGen/keypath_application.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class A {}
 class B {}
diff --git a/test/SILGen/keypath_dynamic.swift b/test/SILGen/keypath_dynamic.swift
index cb9dedb..1aa3333 100644
--- a/test/SILGen/keypath_dynamic.swift
+++ b/test/SILGen/keypath_dynamic.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name A %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name A %s | %FileCheck %s
 
 struct Foo {
   var x : Int {
diff --git a/test/SILGen/lazy_global_access.swift b/test/SILGen/lazy_global_access.swift
index 5f09180..8d9e3ee 100644
--- a/test/SILGen/lazy_global_access.swift
+++ b/test/SILGen/lazy_global_access.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s -check-prefix=MAIN
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s -check-prefix=LIBRARY
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s -check-prefix=MAIN
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s -check-prefix=LIBRARY
 
 // The following code is valid as a library or as a main source file. Script
 // variables should be accessed directly, whereas library global variables
diff --git a/test/SILGen/lazy_globals.swift b/test/SILGen/lazy_globals.swift
index 26ecf94..9fa2e1c 100644
--- a/test/SILGen/lazy_globals.swift
+++ b/test/SILGen/lazy_globals.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
 // CHECK: sil private @globalinit_[[T:.*]]_func0 : $@convention(c) () -> () {
 // CHECK:   alloc_global @$s12lazy_globals1xSiv
diff --git a/test/SILGen/lazy_globals_multiple_vars.swift b/test/SILGen/lazy_globals_multiple_vars.swift
index 277d348..e4e1b12 100644
--- a/test/SILGen/lazy_globals_multiple_vars.swift
+++ b/test/SILGen/lazy_globals_multiple_vars.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
 // CHECK:       sil private [[INIT_A_B:@globalinit_.*]] :
 // CHECK:         alloc_global @$s26lazy_globals_multiple_vars1aSiv
diff --git a/test/SILGen/lazy_properties.swift b/test/SILGen/lazy_properties.swift
index d63ce08..bf92e18 100644
--- a/test/SILGen/lazy_properties.swift
+++ b/test/SILGen/lazy_properties.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library -enable-sil-ownership -primary-file %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library -primary-file %s | %FileCheck %s
 
 // <rdar://problem/17405715> lazy property crashes silgen of implicit memberwise initializer
 
diff --git a/test/SILGen/let_decls.swift b/test/SILGen/let_decls.swift
index 79f2909..fb03b53 100644
--- a/test/SILGen/let_decls.swift
+++ b/test/SILGen/let_decls.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name let_decls -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name let_decls -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 func takeClosure(_ a : () -> Int) {}
 
diff --git a/test/SILGen/lifetime_nonmutating_address_only.swift b/test/SILGen/lifetime_nonmutating_address_only.swift
index aaffdf2..43bbbfd 100644
--- a/test/SILGen/lifetime_nonmutating_address_only.swift
+++ b/test/SILGen/lifetime_nonmutating_address_only.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s
+// RUN: %target-swift-emit-silgen -verify %s
 
 // SR-8990
 
diff --git a/test/SILGen/lifetime_unions.swift b/test/SILGen/lifetime_unions.swift
index dbd6fad..7c9f57d 100644
--- a/test/SILGen/lifetime_unions.swift
+++ b/test/SILGen/lifetime_unions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
 enum TrivialUnion {
   case Foo
diff --git a/test/SILGen/literals.swift b/test/SILGen/literals.swift
index 76630b2..7946f86 100644
--- a/test/SILGen/literals.swift
+++ b/test/SILGen/literals.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 func takesOptionalFunction(_: (() -> ())?) {}
 
diff --git a/test/SILGen/load_from_lvalue_in_plus_zero_context.swift b/test/SILGen/load_from_lvalue_in_plus_zero_context.swift
index 24c293d..94767f7 100644
--- a/test/SILGen/load_from_lvalue_in_plus_zero_context.swift
+++ b/test/SILGen/load_from_lvalue_in_plus_zero_context.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class A {
   lazy var b: B = B()
diff --git a/test/SILGen/local_captures.swift b/test/SILGen/local_captures.swift
index 968fe51..22c1273 100644
--- a/test/SILGen/local_captures.swift
+++ b/test/SILGen/local_captures.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen  -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen  -parse-as-library %s | %FileCheck %s
 
 // Check that we don't crash if a local function references another local
 // function without captures.
diff --git a/test/SILGen/local_recursion.swift b/test/SILGen/local_recursion.swift
index 822bbd4..ac4f598 100644
--- a/test/SILGen/local_recursion.swift
+++ b/test/SILGen/local_recursion.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen  -parse-as-library -enable-sil-ownership %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -enable-astscope-lookup  -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen  -parse-as-library %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enable-astscope-lookup  -parse-as-library %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s15local_recursionAA_1yySi_SitF : $@convention(thin) (Int, Int) -> () {
 // CHECK:       bb0([[X:%0]] : $Int, [[Y:%1]] : $Int):
diff --git a/test/SILGen/lying_about_optional_return.swift b/test/SILGen/lying_about_optional_return.swift
index 6020ee6..f671b32 100644
--- a/test/SILGen/lying_about_optional_return.swift
+++ b/test/SILGen/lying_about_optional_return.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/c_function_pointer_in_c_struct.h -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/c_function_pointer_in_c_struct.h %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s27lying_about_optional_return0C37ChainingForeignFunctionTypeProperties{{[_0-9a-zA-Z]*}}F
 func optionalChainingForeignFunctionTypeProperties(a: SomeCallbacks?) {
diff --git a/test/SILGen/lying_about_optional_return_objc.swift b/test/SILGen/lying_about_optional_return_objc.swift
index 7bd075a..2b3f8e3 100644
--- a/test/SILGen/lying_about_optional_return_objc.swift
+++ b/test/SILGen/lying_about_optional_return_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -enable-objc-interop -import-objc-header %S/Inputs/block_property_in_objc_class.h -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -enable-objc-interop -import-objc-header %S/Inputs/block_property_in_objc_class.h %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s32lying_about_optional_return_objc0C37ChainingForeignFunctionTypeProperties{{[_0-9a-zA-Z]*}}F
 func optionalChainingForeignFunctionTypeProperties(b: BlockProperty?) {
diff --git a/test/SILGen/magic_identifiers_inside_property_initializers.swift b/test/SILGen/magic_identifiers_inside_property_initializers.swift
index dc78563..a381cac 100644
--- a/test/SILGen/magic_identifiers_inside_property_initializers.swift
+++ b/test/SILGen/magic_identifiers_inside_property_initializers.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class Test {
     // CHECK-LABEL: sil hidden [transparent] @$s46magic_identifiers_inside_property_initializers4TestC4fileSSvpfi
diff --git a/test/SILGen/mangling_generic_extensions.swift b/test/SILGen/mangling_generic_extensions.swift
index 3f34be8..5b9b5a0 100644
--- a/test/SILGen/mangling_generic_extensions.swift
+++ b/test/SILGen/mangling_generic_extensions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 struct Foo<T> {
 }
diff --git a/test/SILGen/mangling_retroactive_overlay.swift b/test/SILGen/mangling_retroactive_overlay.swift
index d6c8ec6..9138221 100644
--- a/test/SILGen/mangling_retroactive_overlay.swift
+++ b/test/SILGen/mangling_retroactive_overlay.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import ObjectiveC
diff --git a/test/SILGen/metatype_abstraction.swift b/test/SILGen/metatype_abstraction.swift
index 0b24282..dc6ea68 100644
--- a/test/SILGen/metatype_abstraction.swift
+++ b/test/SILGen/metatype_abstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name Swift -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name Swift -parse-stdlib %s | %FileCheck %s
 
 @_semantics("typechecker.type(of:)")
 public func type<T, Metatype>(of value: T) -> Metatype {}
diff --git a/test/SILGen/metatype_casts.swift b/test/SILGen/metatype_casts.swift
index 25eee00..bc0f1d0 100644
--- a/test/SILGen/metatype_casts.swift
+++ b/test/SILGen/metatype_casts.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s14metatype_casts6t_is_u{{[_0-9a-zA-Z]*}}F
 // CHECK:         checked_cast_br {{.*}} $@thick T.Type to $@thick U.Type
diff --git a/test/SILGen/metatype_object_conversion.swift b/test/SILGen/metatype_object_conversion.swift
index acfc327..46ffb1f 100644
--- a/test/SILGen/metatype_object_conversion.swift
+++ b/test/SILGen/metatype_object_conversion.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import -enable-objc-interop %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import -enable-objc-interop %s | %FileCheck %s
 
 import Foundation
 
diff --git a/test/SILGen/metatypes.swift b/test/SILGen/metatypes.swift
index 912dc64..d15ed76 100644
--- a/test/SILGen/metatypes.swift
+++ b/test/SILGen/metatypes.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SILGen/minimum_foreach.swift b/test/SILGen/minimum_foreach.swift
index 3345686..423d3fe 100644
--- a/test/SILGen/minimum_foreach.swift
+++ b/test/SILGen/minimum_foreach.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name Swift -parse-stdlib -parse-as-library -enable-sil-ownership %s
+// RUN: %target-swift-emit-silgen -module-name Swift -parse-stdlib -parse-as-library %s
 
 // This files contains a minimal implementation for Swift to emit foreach loops
 // for a type. It acts partially as a guide for users and since it is in the
diff --git a/test/SILGen/multi_file.swift b/test/SILGen/multi_file.swift
index fba71d1..39ce991 100644
--- a/test/SILGen/multi_file.swift
+++ b/test/SILGen/multi_file.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name multi_file -enable-sil-ownership -primary-file %s %S/Inputs/multi_file_helper.swift | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name multi_file -primary-file %s %S/Inputs/multi_file_helper.swift | %FileCheck %s
 
 func markUsed<T>(_ t: T) {}
 
diff --git a/test/SILGen/nested_types_referencing_nested_functions.swift b/test/SILGen/nested_types_referencing_nested_functions.swift
index d8ac3c6..e355b6e 100644
--- a/test/SILGen/nested_types_referencing_nested_functions.swift
+++ b/test/SILGen/nested_types_referencing_nested_functions.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name nested_types_referencing_nested_functions -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name nested_types_referencing_nested_functions %s | %FileCheck %s
 
 do {
   func foo() { bar(2) }
diff --git a/test/SILGen/noescape_reabstraction.swift b/test/SILGen/noescape_reabstraction.swift
index 4c36b23..0e27339 100644
--- a/test/SILGen/noescape_reabstraction.swift
+++ b/test/SILGen/noescape_reabstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name noescape_reabstraction -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name noescape_reabstraction %s | %FileCheck %s
 
 struct S {}
 
diff --git a/test/SILGen/nsmanaged-witness.swift b/test/SILGen/nsmanaged-witness.swift
index c734f46..fb9a65c 100644
--- a/test/SILGen/nsmanaged-witness.swift
+++ b/test/SILGen/nsmanaged-witness.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -sdk %S/Inputs %s -I %S/Inputs -enable-source-import | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs %s -I %S/Inputs -enable-source-import | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_attr_NSManaged.swift b/test/SILGen/objc_attr_NSManaged.swift
index d901aef..0c4ace1 100644
--- a/test/SILGen/objc_attr_NSManaged.swift
+++ b/test/SILGen/objc_attr_NSManaged.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name objc_attr_NSManaged -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_attr_NSManaged -sdk %S/Inputs %s -I %S/Inputs -enable-source-import | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_attr_NSManaged_multi.swift b/test/SILGen/objc_attr_NSManaged_multi.swift
index 0753431..77d970b 100644
--- a/test/SILGen/objc_attr_NSManaged_multi.swift
+++ b/test/SILGen/objc_attr_NSManaged_multi.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name objc_attr_NSManaged_multi -sdk %S/Inputs -primary-file %s %S/objc_attr_NSManaged.swift -I %S/Inputs -enable-source-import -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_attr_NSManaged_multi -sdk %S/Inputs -primary-file %s %S/objc_attr_NSManaged.swift -I %S/Inputs -enable-source-import | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_blocks_bridging.swift b/test/SILGen/objc_blocks_bridging.swift
index 921ed4c..b94b9f0 100644
--- a/test/SILGen/objc_blocks_bridging.swift
+++ b/test/SILGen/objc_blocks_bridging.swift
@@ -1,8 +1,8 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_blocks_bridging -verify -I %S/Inputs -disable-objc-attr-requires-foundation-module -enable-sil-ownership %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_blocks_bridging -verify -I %S/Inputs -disable-objc-attr-requires-foundation-module -enable-sil-ownership  %s | %FileCheck %s --check-prefix=GUARANTEED
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_blocks_bridging -verify -I %S/Inputs -disable-objc-attr-requires-foundation-module %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_blocks_bridging -verify -I %S/Inputs -disable-objc-attr-requires-foundation-module  %s | %FileCheck %s --check-prefix=GUARANTEED
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_bridged_generic_nonnull.swift b/test/SILGen/objc_bridged_generic_nonnull.swift
index 6f2265d..360fd56 100644
--- a/test/SILGen/objc_bridged_generic_nonnull.swift
+++ b/test/SILGen/objc_bridged_generic_nonnull.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -verify -import-objc-header %S/Inputs/objc_bridged_generic_nonnull.h -enable-sil-ownership %s
+// RUN: %target-swift-emit-silgen -verify -import-objc-header %S/Inputs/objc_bridged_generic_nonnull.h %s
 // REQUIRES: objc_interop
 
 public func test<T>(_ x: NonnullMembers<T>) -> T? {
diff --git a/test/SILGen/objc_bridged_results.swift b/test/SILGen/objc_bridged_results.swift
index 0db7c08..2447a01 100644
--- a/test/SILGen/objc_bridged_results.swift
+++ b/test/SILGen/objc_bridged_results.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
 
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_bridged_results %s -Xllvm -sil-print-debuginfo -import-objc-header %S/Inputs/objc_bridged_results.h -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_bridged_results %s -Xllvm -sil-print-debuginfo -import-objc-header %S/Inputs/objc_bridged_results.h | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_bridged_using_protocol_extension_impl.swift b/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
index 1361c9a..04705cd 100644
--- a/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
+++ b/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/objc_bridging.swift b/test/SILGen/objc_bridging.swift
index 25ae9bd..e14ebbc 100644
--- a/test/SILGen/objc_bridging.swift
+++ b/test/SILGen/objc_bridging.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
 // RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -emit-module -o %t -I %S/../Inputs/ObjCBridging %S/../Inputs/ObjCBridging/Appliances.swift
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_bridging -I %S/../Inputs/ObjCBridging -Xllvm -sil-full-demangle %s -enable-sil-ownership | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-os-%target-cpu
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_bridging -I %S/../Inputs/ObjCBridging -Xllvm -sil-full-demangle %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-cpu --check-prefix=CHECK-%target-os-%target-cpu
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_bridging_any.swift b/test/SILGen/objc_bridging_any.swift
index 46da5ae..84b4d86 100644
--- a/test/SILGen/objc_bridging_any.swift
+++ b/test/SILGen/objc_bridging_any.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_bridging_any -Xllvm -sil-print-debuginfo -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_bridging_any -Xllvm -sil-print-debuginfo %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/objc_bridging_peephole.swift b/test/SILGen/objc_bridging_peephole.swift
index c9ffa9b..a36c9f1 100644
--- a/test/SILGen/objc_bridging_peephole.swift
+++ b/test/SILGen/objc_bridging_peephole.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_bridging_peephole -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_bridging_peephole %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/objc_currying.swift b/test/SILGen/objc_currying.swift
index 7b2073e..42cd1fe 100644
--- a/test/SILGen/objc_currying.swift
+++ b/test/SILGen/objc_currying.swift
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_currying -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_currying %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_dealloc.swift b/test/SILGen/objc_dealloc.swift
index a04abad..99df51a 100644
--- a/test/SILGen/objc_dealloc.swift
+++ b/test/SILGen/objc_dealloc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_deprecated_objc_thunks.swift b/test/SILGen/objc_deprecated_objc_thunks.swift
index 029c465..6072e86 100644
--- a/test/SILGen/objc_deprecated_objc_thunks.swift
+++ b/test/SILGen/objc_deprecated_objc_thunks.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -enable-swift3-objc-inference -swift-version 4 -enable-sil-ownership -enable-objc-interop | %FileCheck -check-prefix CHECK-SWIFT4 %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs %s -I %S/Inputs -enable-source-import -enable-swift3-objc-inference -swift-version 4 -enable-objc-interop | %FileCheck -check-prefix CHECK-SWIFT4 %s
 
 import Foundation
 
diff --git a/test/SILGen/objc_dictionary_bridging.swift b/test/SILGen/objc_dictionary_bridging.swift
index cda53dd..e8c44f6 100644
--- a/test/SILGen/objc_dictionary_bridging.swift
+++ b/test/SILGen/objc_dictionary_bridging.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
 
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_dictionary_bridging -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_dictionary_bridging %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_dynamic_init.swift b/test/SILGen/objc_dynamic_init.swift
index 101ad86..9c31493 100644
--- a/test/SILGen/objc_dynamic_init.swift
+++ b/test/SILGen/objc_dynamic_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/objc_dynamic_init.h -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/objc_dynamic_init.h %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/objc_enum.swift b/test/SILGen/objc_enum.swift
index a49d37a..6739be1 100644
--- a/test/SILGen/objc_enum.swift
+++ b/test/SILGen/objc_enum.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership > %t.out
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s > %t.out
 // RUN: %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s < %t.out
 // RUN: %FileCheck -check-prefix=NEGATIVE %s < %t.out
 
diff --git a/test/SILGen/objc_enum_unused_witnesses.swift b/test/SILGen/objc_enum_unused_witnesses.swift
index f2e650b..9e0cfac 100644
--- a/test/SILGen/objc_enum_unused_witnesses.swift
+++ b/test/SILGen/objc_enum_unused_witnesses.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_error.swift b/test/SILGen/objc_error.swift
index 03b7557..902a8e0 100644
--- a/test/SILGen/objc_error.swift
+++ b/test/SILGen/objc_error.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-clang-importer-objc-overlays
 
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_error -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk-nosource -I %t) -module-name objc_error %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_extensions.swift b/test/SILGen/objc_extensions.swift
index c0701fc..357c837 100644
--- a/test/SILGen/objc_extensions.swift
+++ b/test/SILGen/objc_extensions.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name objc_extensions -enable-sil-ownership -sdk %S/Inputs/ -I %S/Inputs -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_extensions -sdk %S/Inputs/ -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_factory_init.swift b/test/SILGen/objc_factory_init.swift
index 58abc27..ce2944a 100644
--- a/test/SILGen/objc_factory_init.swift
+++ b/test/SILGen/objc_factory_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -I %S/../IDE/Inputs/custom-modules %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -I %S/../IDE/Inputs/custom-modules %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_final.swift b/test/SILGen/objc_final.swift
index cb5f62b..172caba 100644
--- a/test/SILGen/objc_final.swift
+++ b/test/SILGen/objc_final.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_generic_class.swift b/test/SILGen/objc_generic_class.swift
index 3db553f..8c9e655 100644
--- a/test/SILGen/objc_generic_class.swift
+++ b/test/SILGen/objc_generic_class.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_imported_generic.swift b/test/SILGen/objc_imported_generic.swift
index f1a2385..72b96b8 100644
--- a/test/SILGen/objc_imported_generic.swift
+++ b/test/SILGen/objc_imported_generic.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_imported_generic %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name objc_imported_generic %s | %FileCheck %s
 // For integration testing, ensure we get through IRGen too.
 // RUN: %target-swift-emit-ir(mock-sdk: %clang-importer-sdk) -module-name objc_imported_generic -verify -DIRGEN_INTEGRATION_TEST %s
 
diff --git a/test/SILGen/objc_imported_init.swift b/test/SILGen/objc_imported_init.swift
index a6584d1..77bec2b 100644
--- a/test/SILGen/objc_imported_init.swift
+++ b/test/SILGen/objc_imported_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -verify -sdk %S/Inputs -I %S/Inputs -enable-source-import -enable-sil-ownership %s -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -verify -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import Foundation
 
diff --git a/test/SILGen/objc_init_ref_delegation.swift b/test/SILGen/objc_init_ref_delegation.swift
index 21ad96c..e58fb57 100644
--- a/test/SILGen/objc_init_ref_delegation.swift
+++ b/test/SILGen/objc_init_ref_delegation.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_local.swift b/test/SILGen/objc_local.swift
index 8dd0507..009f7dd 100644
--- a/test/SILGen/objc_local.swift
+++ b/test/SILGen/objc_local.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-sil-ownership -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_metatypes.swift b/test/SILGen/objc_metatypes.swift
index f839f0f..6966638 100644
--- a/test/SILGen/objc_metatypes.swift
+++ b/test/SILGen/objc_metatypes.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_nonnull_lie_hack.swift b/test/SILGen/objc_nonnull_lie_hack.swift
index 04cce86..051510e 100644
--- a/test/SILGen/objc_nonnull_lie_hack.swift
+++ b/test/SILGen/objc_nonnull_lie_hack.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file -enable-sil-ownership %s | %FileCheck -check-prefix=SILGEN %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=SILGEN %s
 // RUN: %target-swiftemit-sil -O -sdk %S/Inputs -I %S/Inputs -I %S/Inputs/objc_nonnull_lie_hack/ -enable-source-import -primary-file %s | %FileCheck -check-prefix=OPT %s
 
 // REQUIRES: objc_interop
diff --git a/test/SILGen/objc_ownership_conventions.swift b/test/SILGen/objc_ownership_conventions.swift
index 95f9b39..3a8cde7 100644
--- a/test/SILGen/objc_ownership_conventions.swift
+++ b/test/SILGen/objc_ownership_conventions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name objc_ownership_conventions -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-sil-ownership -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_ownership_conventions -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_properties.swift b/test/SILGen/objc_properties.swift
index 56eaf40..2361d38 100644
--- a/test/SILGen/objc_properties.swift
+++ b/test/SILGen/objc_properties.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -emit-verbose-sil -sdk %S/Inputs -I %S/Inputs -enable-source-import | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s -emit-verbose-sil -sdk %S/Inputs -I %S/Inputs -enable-source-import | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_protocol_native_thunk.swift b/test/SILGen/objc_protocol_native_thunk.swift
index f5d2d3b..97fe463 100644
--- a/test/SILGen/objc_protocol_native_thunk.swift
+++ b/test/SILGen/objc_protocol_native_thunk.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/objc_protocols.swift b/test/SILGen/objc_protocols.swift
index f811cee..935040d 100644
--- a/test/SILGen/objc_protocols.swift
+++ b/test/SILGen/objc_protocols.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name objc_protocols -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_protocols -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_set_bridging.swift b/test/SILGen/objc_set_bridging.swift
index 9d32deb..586c0b6 100644
--- a/test/SILGen/objc_set_bridging.swift
+++ b/test/SILGen/objc_set_bridging.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
 
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_set_bridging %s -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name objc_set_bridging %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_subscript.swift b/test/SILGen/objc_subscript.swift
index 219578d..60a1032 100644
--- a/test/SILGen/objc_subscript.swift
+++ b/test/SILGen/objc_subscript.swift
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
 
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -enable-sil-ownership %s -emit-verbose-sil -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-verbose-sil -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_super.swift b/test/SILGen/objc_super.swift
index e477c61..0ae3020 100644
--- a/test/SILGen/objc_super.swift
+++ b/test/SILGen/objc_super.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop | %FileCheck %s
 
 import gizmo
 
diff --git a/test/SILGen/objc_thunks.swift b/test/SILGen/objc_thunks.swift
index d508a83..18b9a25 100644
--- a/test/SILGen/objc_thunks.swift
+++ b/test/SILGen/objc_thunks.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-emit-silgen -module-name objc_thunks -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil -enable-sil-ownership | %FileCheck %s
-// RUN: %target-swift-emit-silgen -module-name objc_thunks -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil -enable-sil-ownership -swift-version 5 | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_thunks -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name objc_thunks -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -emit-verbose-sil -swift-version 5 | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/objc_witnesses.swift b/test/SILGen/objc_witnesses.swift
index 7a1b931..cfbf9e6 100644
--- a/test/SILGen/objc_witnesses.swift
+++ b/test/SILGen/objc_witnesses.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/opaque_ownership.swift b/test/SILGen/opaque_ownership.swift
index 6254e36..82bd47a 100644
--- a/test/SILGen/opaque_ownership.swift
+++ b/test/SILGen/opaque_ownership.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-opaque-values -enable-sil-ownership -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
-// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.9 -enable-sil-opaque-values -enable-sil-ownership -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck --check-prefix=CHECK-OSX %s
+// RUN: %target-swift-emit-silgen -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -target x86_64-apple-macosx10.9 -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck --check-prefix=CHECK-OSX %s
 
 public typealias AnyObject = Builtin.AnyObject
 
diff --git a/test/SILGen/opaque_values_silgen_lib.swift b/test/SILGen/opaque_values_silgen_lib.swift
index 5294e08..970c0163 100644
--- a/test/SILGen/opaque_values_silgen_lib.swift
+++ b/test/SILGen/opaque_values_silgen_lib.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle -parse-stdlib -parse-as-library -module-name Swift %s | %FileCheck %s
 
 precedencegroup AssignmentPrecedence { assignment: true }
 
diff --git a/test/SILGen/opaque_values_silgen_todo.swift b/test/SILGen/opaque_values_silgen_todo.swift
index 1f4c3f3..24d10eb 100644
--- a/test/SILGen/opaque_values_silgen_todo.swift
+++ b/test/SILGen/opaque_values_silgen_todo.swift
@@ -1,2 +1,2 @@
-// RUN: %target-swift-emit-silgen -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enable-sil-opaque-values -emit-sorted-sil -Xllvm -sil-full-demangle %s | %FileCheck %s
 // REQUIRES: EnableSILOpaqueValues
diff --git a/test/SILGen/optional-cast.swift b/test/SILGen/optional-cast.swift
index ef6893c..a5e2b46 100644
--- a/test/SILGen/optional-cast.swift
+++ b/test/SILGen/optional-cast.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class A {}
 class B : A {}
diff --git a/test/SILGen/optional.swift b/test/SILGen/optional.swift
index e66669e..bdad60c 100644
--- a/test/SILGen/optional.swift
+++ b/test/SILGen/optional.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name optional -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name optional %s | %FileCheck %s
 
 func testCall(_ f: (() -> ())?) {
   f?()
diff --git a/test/SILGen/optional_chain_addressor.swift b/test/SILGen/optional_chain_addressor.swift
index 17460ec..660cdb5 100644
--- a/test/SILGen/optional_chain_addressor.swift
+++ b/test/SILGen/optional_chain_addressor.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -verify -parse-as-library -enable-sil-ownership %s
+// RUN: %target-swift-emit-silgen -verify -parse-as-library %s
 
 func foo(x: UnsafeMutablePointer<UnsafeMutablePointer<()>?>) { // expected-warning {{UnsafeMutablePointer<Void> has been replaced by UnsafeMutableRawPointer}}
   _ = x.pointee?.pointee
diff --git a/test/SILGen/optional_lvalue.swift b/test/SILGen/optional_lvalue.swift
index e8f6364..83fa487 100644
--- a/test/SILGen/optional_lvalue.swift
+++ b/test/SILGen/optional_lvalue.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name optional_lvalue -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name optional_lvalue %s | %FileCheck %s
 
 // CHECK-LABEL: sil hidden @$s15optional_lvalue07assign_a1_B0yySiSgz_SitF
 // CHECK:         [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Optional<Int>
diff --git a/test/SILGen/optional_to_bool.swift b/test/SILGen/optional_to_bool.swift
index 09b20d4..8b1a02e 100644
--- a/test/SILGen/optional_to_bool.swift
+++ b/test/SILGen/optional_to_bool.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
 
 public protocol P {}
 extension Int: P {}
diff --git a/test/SILGen/optional_to_optional.swift b/test/SILGen/optional_to_optional.swift
index 1be6c12..17b216b 100644
--- a/test/SILGen/optional_to_optional.swift
+++ b/test/SILGen/optional_to_optional.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol P {}
 
diff --git a/test/SILGen/owned.swift b/test/SILGen/owned.swift
index 7d8d6f2..a3e694e 100644
--- a/test/SILGen/owned.swift
+++ b/test/SILGen/owned.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // see shared.swift for thunks/conversions between __shared and __owned.
 
diff --git a/test/SILGen/ownership.swift b/test/SILGen/ownership.swift
index e139007..724d7a2 100644
--- a/test/SILGen/ownership.swift
+++ b/test/SILGen/ownership.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-stdlib -module-name Swift -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -module-name Swift -parse-as-library %s | %FileCheck %s
 
 protocol Error {}
 
diff --git a/test/SILGen/partial_apply_generic.swift b/test/SILGen/partial_apply_generic.swift
index 9f4282c..25a92ca 100644
--- a/test/SILGen/partial_apply_generic.swift
+++ b/test/SILGen/partial_apply_generic.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name partial_apply_generic -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name partial_apply_generic %s | %FileCheck %s
 
 protocol Panda {
   associatedtype Cuddles : Foo
diff --git a/test/SILGen/partial_apply_init.swift b/test/SILGen/partial_apply_init.swift
index 9cdf951..e8b522e 100644
--- a/test/SILGen/partial_apply_init.swift
+++ b/test/SILGen/partial_apply_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class C {
   init(x: Int) {}
diff --git a/test/SILGen/partial_apply_protocol_class_refinement_method.swift b/test/SILGen/partial_apply_protocol_class_refinement_method.swift
index 193ab0e..7e58222 100644
--- a/test/SILGen/partial_apply_protocol_class_refinement_method.swift
+++ b/test/SILGen/partial_apply_protocol_class_refinement_method.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name partial_apply_protocol_class_refinement_method -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name partial_apply_protocol_class_refinement_method %s | %FileCheck %s
 
 protocol P { func foo() }
 protocol Q: class, P {}
diff --git a/test/SILGen/partial_apply_super.swift b/test/SILGen/partial_apply_super.swift
index d86ab40..d81d8dd 100644
--- a/test/SILGen/partial_apply_super.swift
+++ b/test/SILGen/partial_apply_super.swift
@@ -9,7 +9,7 @@
 
 // RUN: %target-swift-frontend -emit-module -I %t -o %t %S/../Inputs/fixed_layout_class.swift
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name partial_apply_super -enable-resilience -parse-as-library -I %t %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name partial_apply_super -enable-resilience -parse-as-library -I %t %s | %FileCheck %s
 
 import resilient_class
 import fixed_layout_class
diff --git a/test/SILGen/pointer_conversion.swift b/test/SILGen/pointer_conversion.swift
index 74df8ef..79a3767 100644
--- a/test/SILGen/pointer_conversion.swift
+++ b/test/SILGen/pointer_conversion.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name pointer_conversion -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name pointer_conversion -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
 
 // FIXME: rdar://problem/19648117 Needs splitting objc parts out
 // XFAIL: linux
diff --git a/test/SILGen/pointer_conversion_nonaccessing.swift b/test/SILGen/pointer_conversion_nonaccessing.swift
index a415736..6dfcfdd 100644
--- a/test/SILGen/pointer_conversion_nonaccessing.swift
+++ b/test/SILGen/pointer_conversion_nonaccessing.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -swift-version 4 -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -swift-version 4 %s | %FileCheck %s
 
 // rdar://33265254
 
diff --git a/test/SILGen/pointer_conversion_nonaccessing_objc.swift b/test/SILGen/pointer_conversion_nonaccessing_objc.swift
index ea96629..6c959b1 100644
--- a/test/SILGen/pointer_conversion_nonaccessing_objc.swift
+++ b/test/SILGen/pointer_conversion_nonaccessing_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -swift-version 4 -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -swift-version 4 %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/property_abstraction.swift b/test/SILGen/property_abstraction.swift
index dd657c1..d339248 100644
--- a/test/SILGen/property_abstraction.swift
+++ b/test/SILGen/property_abstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name property_abstraction -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name property_abstraction %s | %FileCheck %s
 
 struct Int {
   mutating func foo() {}
diff --git a/test/SILGen/protocol_class_refinement.swift b/test/SILGen/protocol_class_refinement.swift
index 574c855..b7b0697 100644
--- a/test/SILGen/protocol_class_refinement.swift
+++ b/test/SILGen/protocol_class_refinement.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol UID {
     func uid() -> Int
diff --git a/test/SILGen/protocol_optional.swift b/test/SILGen/protocol_optional.swift
index 647bd7d..ab50b00 100644
--- a/test/SILGen/protocol_optional.swift
+++ b/test/SILGen/protocol_optional.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name protocol_optional -parse-as-library -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name protocol_optional -parse-as-library -disable-objc-attr-requires-foundation-module -enable-objc-interop %s | %FileCheck %s
 
 @objc protocol P1 {
   @objc optional func method(_ x: Int)
diff --git a/test/SILGen/protocol_resilience_objc.swift b/test/SILGen/protocol_resilience_objc.swift
index a6a565e..57ac56c 100644
--- a/test/SILGen/protocol_resilience_objc.swift
+++ b/test/SILGen/protocol_resilience_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-sil-ownership -enable-resilience %s | %FileCheck %s --check-prefix=CHECK
+// RUN: %target-swift-emit-silgen -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-resilience %s | %FileCheck %s --check-prefix=CHECK
 
 // @objc protocols don't need default witness tables
 @objc public protocol ObjCProtocol {
diff --git a/test/SILGen/protocols.swift b/test/SILGen/protocols.swift
index 885bb51..2da8d2c 100644
--- a/test/SILGen/protocols.swift
+++ b/test/SILGen/protocols.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name protocols -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name protocols %s | %FileCheck %s
 
 //===----------------------------------------------------------------------===//
 // Calling Existential Subscripts
diff --git a/test/SILGen/reabstract-tuple.swift b/test/SILGen/reabstract-tuple.swift
index 59cd022..62c90fb 100644
--- a/test/SILGen/reabstract-tuple.swift
+++ b/test/SILGen/reabstract-tuple.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -verify %s | %FileCheck %s
 
 // SR-3090:
 
diff --git a/test/SILGen/reabstract_lvalue.swift b/test/SILGen/reabstract_lvalue.swift
index e7d38ae..27be882 100644
--- a/test/SILGen/reabstract_lvalue.swift
+++ b/test/SILGen/reabstract_lvalue.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name reabstract_lvalue -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name reabstract_lvalue %s | %FileCheck %s
 
 struct MyMetatypeIsThin {}
 
diff --git a/test/SILGen/required_init.swift b/test/SILGen/required_init.swift
index 5bb4a07..b522602 100644
--- a/test/SILGen/required_init.swift
+++ b/test/SILGen/required_init.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 func subclassFloatLiteral() -> Bar {
   let x: Bar = 1.0
diff --git a/test/SILGen/result_abstraction.swift b/test/SILGen/result_abstraction.swift
index f4927c7..1bfc011 100644
--- a/test/SILGen/result_abstraction.swift
+++ b/test/SILGen/result_abstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name result_abstraction -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name result_abstraction %s | %FileCheck %s
 
 struct S {}
 struct R {}
diff --git a/test/SILGen/retaining_globals.swift b/test/SILGen/retaining_globals.swift
index 07039ea..4563d5d 100644
--- a/test/SILGen/retaining_globals.swift
+++ b/test/SILGen/retaining_globals.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name retaining_globals -import-objc-header %S/Inputs/globals.h -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -module-name retaining_globals -import-objc-header %S/Inputs/globals.h %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 
diff --git a/test/SILGen/same_type_abstraction.swift b/test/SILGen/same_type_abstraction.swift
index fac6258..b76a52e 100644
--- a/test/SILGen/same_type_abstraction.swift
+++ b/test/SILGen/same_type_abstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol Associated {
   associatedtype Assoc
diff --git a/test/SILGen/same_type_across_generic_depths.swift b/test/SILGen/same_type_across_generic_depths.swift
index 2a01d44..535c185 100644
--- a/test/SILGen/same_type_across_generic_depths.swift
+++ b/test/SILGen/same_type_across_generic_depths.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s > %t/out.sil
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %t/out.sil | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s > %t/out.sil
+// RUN: %target-swift-emit-silgen %t/out.sil | %FileCheck %s
 class X<A> {}
 struct Foo<T> {
   // CHECK-LABEL: sil hidden @{{.*}}Foo{{.*}}bar{{.*}} : $@convention(method) <T><U where T == X<U>>
diff --git a/test/SILGen/scalar_to_tuple_args.swift b/test/SILGen/scalar_to_tuple_args.swift
index d2dae53..83f203b 100644
--- a/test/SILGen/scalar_to_tuple_args.swift
+++ b/test/SILGen/scalar_to_tuple_args.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name scalar_to_tuple_args -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name scalar_to_tuple_args %s | %FileCheck %s
 
 func inoutWithDefaults(_ x: inout Int, y: Int = 0, z: Int = 0) {}
 func inoutWithCallerSideDefaults(_ x: inout Int, y: Int = #line) {}
diff --git a/test/SILGen/semanticsattr.swift b/test/SILGen/semanticsattr.swift
index 7f7cc32..78af33e 100644
--- a/test/SILGen/semanticsattr.swift
+++ b/test/SILGen/semanticsattr.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -parse-stdlib -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 // CHECK: [_semantics "123"] [_semantics "223"] @func1
 @_semantics("223") @_semantics("123")
diff --git a/test/SILGen/shared.swift b/test/SILGen/shared.swift
index 97c1cee..93c24f5 100644
--- a/test/SILGen/shared.swift
+++ b/test/SILGen/shared.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: owned_parameters
 
diff --git a/test/SILGen/sibling-nested-generic.swift b/test/SILGen/sibling-nested-generic.swift
index 630915f..2dfc90f 100644
--- a/test/SILGen/sibling-nested-generic.swift
+++ b/test/SILGen/sibling-nested-generic.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s
+// RUN: %target-swift-emit-silgen -verify %s
 
 protocol AP {
   associatedtype B: BP
diff --git a/test/SILGen/sil_locations.swift b/test/SILGen/sil_locations.swift
index 23959d0..a5b8fa7 100644
--- a/test/SILGen/sil_locations.swift
+++ b/test/SILGen/sil_locations.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name sil_locations -Xllvm -sil-print-debuginfo -emit-verbose-sil -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name sil_locations -Xllvm -sil-print-debuginfo -emit-verbose-sil %s | %FileCheck %s
 
 // FIXME: Not sure if this an ideal source info for the branch - 
 // it points to if, not the last instruction in the block.
diff --git a/test/SILGen/sil_locations_top_level.swift b/test/SILGen/sil_locations_top_level.swift
index 89e8495..ababfcc 100644
--- a/test/SILGen/sil_locations_top_level.swift
+++ b/test/SILGen/sil_locations_top_level.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -emit-verbose-sil -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -emit-verbose-sil %s | %FileCheck %s
 
 // Test top-level/module locations.
 class TopLevelObjectTy {
diff --git a/test/SILGen/source_location.swift b/test/SILGen/source_location.swift
index 32437a1..56c6773 100644
--- a/test/SILGen/source_location.swift
+++ b/test/SILGen/source_location.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name source_location -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name source_location -Xllvm -sil-full-demangle -Xllvm -sil-print-debuginfo %s | %FileCheck %s
 
 func printSourceLocation(file: String = #file, line: Int = #line) {}
 
diff --git a/test/SILGen/specialize_attr.swift b/test/SILGen/specialize_attr.swift
index c18b65b..6ee536b 100644
--- a/test/SILGen/specialize_attr.swift
+++ b/test/SILGen/specialize_attr.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name specialize_attr -enable-sil-ownership -emit-verbose-sil %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name specialize_attr -emit-verbose-sil %s | %FileCheck %s
 
 // CHECK-LABEL: @_specialize(exported: false, kind: full, where T == Int, U == Float)
 // CHECK-NEXT: func specializeThis<T, U>(_ t: T, u: U)
diff --git a/test/SILGen/statements.swift b/test/SILGen/statements.swift
index 0003835..85e8056 100644
--- a/test/SILGen/statements.swift
+++ b/test/SILGen/statements.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name statements -Xllvm -sil-full-demangle -parse-as-library -enable-sil-ownership -verify %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name statements -Xllvm -sil-full-demangle -parse-as-library -verify %s | %FileCheck %s
 
 class MyClass { 
   func foo() { }
diff --git a/test/SILGen/static-stored-properties-in-concrete-contexts.swift b/test/SILGen/static-stored-properties-in-concrete-contexts.swift
index bfe9da8..c800c47 100644
--- a/test/SILGen/static-stored-properties-in-concrete-contexts.swift
+++ b/test/SILGen/static-stored-properties-in-concrete-contexts.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 struct Foo<T> {
   static var foo: T { return (0 as Int) as! T }
diff --git a/test/SILGen/subscripts.swift b/test/SILGen/subscripts.swift
index a3e2823..643f9b4 100644
--- a/test/SILGen/subscripts.swift
+++ b/test/SILGen/subscripts.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -o /dev/null %s
+// RUN: %target-swift-emit-silgen -o /dev/null %s
 
 func inoutFunc(_ x: inout Int) {}
 
diff --git a/test/SILGen/swift_newtype_result_convention.swift b/test/SILGen/swift_newtype_result_convention.swift
index 6f33da7..6bc248a 100644
--- a/test/SILGen/swift_newtype_result_convention.swift
+++ b/test/SILGen/swift_newtype_result_convention.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/swift_newtype_result_convention.h -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -import-objc-header %S/Inputs/swift_newtype_result_convention.h %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Foundation
diff --git a/test/SILGen/switch.swift b/test/SILGen/switch.swift
index b1f904c..055242e 100644
--- a/test/SILGen/switch.swift
+++ b/test/SILGen/switch.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name switch %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name switch %s | %FileCheck %s
 
 func markUsed<T>(_ t: T) {}
 
diff --git a/test/SILGen/switch_abstraction.swift b/test/SILGen/switch_abstraction.swift
index d4af84b..ec15a25 100644
--- a/test/SILGen/switch_abstraction.swift
+++ b/test/SILGen/switch_abstraction.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name switch_abstraction -enable-sil-ownership -parse-stdlib %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name switch_abstraction -parse-stdlib %s | %FileCheck %s
 
 struct A {}
 
diff --git a/test/SILGen/switch_fallthrough.swift b/test/SILGen/switch_fallthrough.swift
index 2f1b68a..b11fae3 100644
--- a/test/SILGen/switch_fallthrough.swift
+++ b/test/SILGen/switch_fallthrough.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // Some fake predicates for pattern guards.
 func runced() -> Bool { return true }
diff --git a/test/SILGen/switch_objc.swift b/test/SILGen/switch_objc.swift
index f78f0e4..46d4f63 100644
--- a/test/SILGen/switch_objc.swift
+++ b/test/SILGen/switch_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: %clang-importer-sdk) %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/switch_ownership.swift b/test/SILGen/switch_ownership.swift
index eed567c..bfd968e 100644
--- a/test/SILGen/switch_ownership.swift
+++ b/test/SILGen/switch_ownership.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -module-name switch -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name switch %s | %FileCheck %s
 //
 // A temporary file for testing switch code around ownership. Once SILGenPattern
 // refactoring is complete, this will be merged into the normal pattern file.
diff --git a/test/SILGen/switch_var.swift b/test/SILGen/switch_var.swift
index ddcefc3..c0f093d 100644
--- a/test/SILGen/switch_var.swift
+++ b/test/SILGen/switch_var.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -module-name switch_var %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name switch_var %s | %FileCheck %s
 
 // TODO: Implement tuple equality in the library.
 // BLOCKED: <rdar://problem/13822406>
diff --git a/test/SILGen/toplevel.swift b/test/SILGen/toplevel.swift
index 7e6e983..3df1c63 100644
--- a/test/SILGen/toplevel.swift
+++ b/test/SILGen/toplevel.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 func markUsed<T>(_ t: T) {}
 
diff --git a/test/SILGen/toplevel_errors.swift b/test/SILGen/toplevel_errors.swift
index 9d5a2e2..59a149a 100644
--- a/test/SILGen/toplevel_errors.swift
+++ b/test/SILGen/toplevel_errors.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 enum MyError : Error {
   case A, B
diff --git a/test/SILGen/transparent_attribute.swift b/test/SILGen/transparent_attribute.swift
index 4bce83f..cce1a60 100644
--- a/test/SILGen/transparent_attribute.swift
+++ b/test/SILGen/transparent_attribute.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -emit-verbose-sil -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -emit-verbose-sil %s | %FileCheck %s
 
 // Test that the attribute gets set on default argument generators.
 
diff --git a/test/SILGen/tuple_attribute_reabstraction.swift b/test/SILGen/tuple_attribute_reabstraction.swift
index b6cd6a6..934331f 100644
--- a/test/SILGen/tuple_attribute_reabstraction.swift
+++ b/test/SILGen/tuple_attribute_reabstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 public struct G<T> {
   var t: T
diff --git a/test/SILGen/tuples.swift b/test/SILGen/tuples.swift
index 8b2697a..5eeeffa 100644
--- a/test/SILGen/tuples.swift
+++ b/test/SILGen/tuples.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name tuples -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name tuples %s | %FileCheck %s
 class C {}
 
 enum Foo {
diff --git a/test/SILGen/types.swift b/test/SILGen/types.swift
index 6ee46d4..fa52693 100644
--- a/test/SILGen/types.swift
+++ b/test/SILGen/types.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name types -parse-as-library -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name types -parse-as-library %s | %FileCheck %s
 
 class C {
   var member: Int = 0
diff --git a/test/SILGen/unicode_scalar_concat.swift b/test/SILGen/unicode_scalar_concat.swift
index 200243a..3ca91d2 100644
--- a/test/SILGen/unicode_scalar_concat.swift
+++ b/test/SILGen/unicode_scalar_concat.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // Check that string literals that are unicode scalar literals 
 // are emitted as string_literal instead of integers.
diff --git a/test/SILGen/unmanaged_ownership.swift b/test/SILGen/unmanaged_ownership.swift
index e304982..f5e8aa7 100644
--- a/test/SILGen/unmanaged_ownership.swift
+++ b/test/SILGen/unmanaged_ownership.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -parse-stdlib -module-name Swift %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -parse-stdlib -module-name Swift %s | %FileCheck %s
 
 class C {}
 
diff --git a/test/SILGen/unowned.swift b/test/SILGen/unowned.swift
index 60e11be..c9903b2 100644
--- a/test/SILGen/unowned.swift
+++ b/test/SILGen/unowned.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name unowned -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name unowned %s | %FileCheck %s
 
 func takeClosure(_ fn: () -> Int) {}
 
diff --git a/test/SILGen/value_ownership.swift b/test/SILGen/value_ownership.swift
index 17f755e..0d059d1 100644
--- a/test/SILGen/value_ownership.swift
+++ b/test/SILGen/value_ownership.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-verbose-sil %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -emit-verbose-sil %s | %FileCheck %s
 
 protocol OwnershipProto {
   __consuming func elided(_ default: String, _ shared: __shared String, _ owned: __owned String)
diff --git a/test/SILGen/variadic-subscript-single-arg.swift b/test/SILGen/variadic-subscript-single-arg.swift
index 57a0a89..012814f 100644
--- a/test/SILGen/variadic-subscript-single-arg.swift
+++ b/test/SILGen/variadic-subscript-single-arg.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -verify %s
+// RUN: %target-swift-emit-silgen -verify %s
 
 struct Butt {
   subscript(butts: Int...) -> Int {
diff --git a/test/SILGen/versioned_attribute.swift b/test/SILGen/versioned_attribute.swift
index 1a758a5..763aa8a 100644
--- a/test/SILGen/versioned_attribute.swift
+++ b/test/SILGen/versioned_attribute.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -emit-verbose-sil %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -emit-verbose-sil %s | %FileCheck %s
 
 // Check that @usableFromInline entities have public linkage.
 // CHECK-LABEL: sil @$s19versioned_attribute25referencedFromTransparentyyF : $@convention(thin) () -> () {
diff --git a/test/SILGen/vtable_thunks.swift b/test/SILGen/vtable_thunks.swift
index 5a94218..7a892e0 100644
--- a/test/SILGen/vtable_thunks.swift
+++ b/test/SILGen/vtable_thunks.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 
 protocol AddrOnly {}
 
diff --git a/test/SILGen/vtable_thunks_reabstraction.swift b/test/SILGen/vtable_thunks_reabstraction.swift
index 5bf154d..604f3a2 100644
--- a/test/SILGen/vtable_thunks_reabstraction.swift
+++ b/test/SILGen/vtable_thunks_reabstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 // RUN: %target-swift-frontend -emit-ir %s
 
 struct S {}
diff --git a/test/SILGen/vtable_thunks_reabstraction_final.swift b/test/SILGen/vtable_thunks_reabstraction_final.swift
index 2eab2c6..20ef9d7 100644
--- a/test/SILGen/vtable_thunks_reabstraction_final.swift
+++ b/test/SILGen/vtable_thunks_reabstraction_final.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name vtable_thunks_reabstraction_final -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name vtable_thunks_reabstraction_final %s | %FileCheck %s
 
 protocol Fooable {
   func foo(_ x: Int) -> Int?
diff --git a/test/SILGen/vtables.swift b/test/SILGen/vtables.swift
index f4cf21a..55ad2ac 100644
--- a/test/SILGen/vtables.swift
+++ b/test/SILGen/vtables.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // Test for compilation order independence
 class C : B {
diff --git a/test/SILGen/vtables_objc.swift b/test/SILGen/vtables_objc.swift
index d1cf53f..ea78874 100644
--- a/test/SILGen/vtables_objc.swift
+++ b/test/SILGen/vtables_objc.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name vtables_objc -enable-sil-ownership -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name vtables_objc -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/weak.swift b/test/SILGen/weak.swift
index 6c0cec7..e3ddf51 100644
--- a/test/SILGen/weak.swift
+++ b/test/SILGen/weak.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name weak -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name weak -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 class C {
   func f() -> Int { return 42 }
diff --git a/test/SILGen/weak_multiple_modules.swift b/test/SILGen/weak_multiple_modules.swift
index f44bc7e..4610e4d 100644
--- a/test/SILGen/weak_multiple_modules.swift
+++ b/test/SILGen/weak_multiple_modules.swift
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -emit-module-path=%t/weak_other.swiftmodule -module-name=weak_other %S/Inputs/weak_other.swift
-// RUN: %target-swift-emit-silgen -module-name weak_multiple_modules -I %t -enable-sil-ownership %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-emit-silgen -module-name weak_multiple_modules -I %t %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
 
 import weak_other
 
diff --git a/test/SILGen/without_actually_escaping.swift b/test/SILGen/without_actually_escaping.swift
index a3ffa76..16848b1 100644
--- a/test/SILGen/without_actually_escaping.swift
+++ b/test/SILGen/without_actually_escaping.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name without_actually_escaping -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name without_actually_escaping %s | %FileCheck %s
 
 var escapeHatch: Any = 0
 
diff --git a/test/SILGen/without_actually_escaping_block.swift b/test/SILGen/without_actually_escaping_block.swift
index c3bd9eb..bf4959b 100644
--- a/test/SILGen/without_actually_escaping_block.swift
+++ b/test/SILGen/without_actually_escaping_block.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-silgen-test-overlays
-// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name without_actually_escaping -enable-sil-ownership %s -sdk %S/Inputs -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-emit-silgen(mock-sdk: -sdk %S/Inputs -I %t) -module-name without_actually_escaping %s -sdk %S/Inputs -enable-objc-interop | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILGen/witness_accessibility.swift b/test/SILGen/witness_accessibility.swift
index 1f3d099..fc9d1c7 100644
--- a/test/SILGen/witness_accessibility.swift
+++ b/test/SILGen/witness_accessibility.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 public protocol P {
   func publicRequirement()
diff --git a/test/SILGen/witness_single_tuple.swift b/test/SILGen/witness_single_tuple.swift
index 22ca024..2d59c02 100644
--- a/test/SILGen/witness_single_tuple.swift
+++ b/test/SILGen/witness_single_tuple.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol Runcible {
   func runce(x: Int)
diff --git a/test/SILGen/witness_table_overrides.swift b/test/SILGen/witness_table_overrides.swift
index 1f4ca9e..a082ddc 100644
--- a/test/SILGen/witness_table_overrides.swift
+++ b/test/SILGen/witness_table_overrides.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // Test the use of "override" on protocol requirements.
 
diff --git a/test/SILGen/witness_tables.swift b/test/SILGen/witness_tables.swift
index c10a972..fdee231 100644
--- a/test/SILGen/witness_tables.swift
+++ b/test/SILGen/witness_tables.swift
@@ -1,9 +1,9 @@
 
-// RUN: %target-swift-emit-silgen -module-name witness_tables  -enable-sil-ownership -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop > %t.sil
+// RUN: %target-swift-emit-silgen -module-name witness_tables  -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop > %t.sil
 // RUN: %FileCheck -check-prefix=TABLE -check-prefix=TABLE-ALL %s < %t.sil
 // RUN: %FileCheck -check-prefix=SYMBOL %s < %t.sil
 
-// RUN: %target-swift-emit-silgen -module-name witness_tables  -enable-sil-ownership -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-testing > %t.testable.sil
+// RUN: %target-swift-emit-silgen -module-name witness_tables  -I %S/Inputs -enable-source-import %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-testing > %t.testable.sil
 // RUN: %FileCheck -check-prefix=TABLE-TESTABLE -check-prefix=TABLE-ALL %s < %t.testable.sil
 // RUN: %FileCheck -check-prefix=SYMBOL-TESTABLE %s < %t.testable.sil
 
diff --git a/test/SILGen/witness_tables_multifile.swift b/test/SILGen/witness_tables_multifile.swift
index 3fd41ad..b6560d9 100644
--- a/test/SILGen/witness_tables_multifile.swift
+++ b/test/SILGen/witness_tables_multifile.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -primary-file %s %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %s -allow-deprecated-dag-overlap -check-prefix=CHECK-FIRST-FILE
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -primary-file %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %S/Inputs/witness_tables_multifile_2.swift -check-prefix=CHECK-SECOND-FILE
+// RUN: %target-swift-emit-silgen -primary-file %s %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %s -allow-deprecated-dag-overlap -check-prefix=CHECK-FIRST-FILE
+// RUN: %target-swift-emit-silgen %s -primary-file %S/Inputs/witness_tables_multifile_2.swift | %FileCheck %S/Inputs/witness_tables_multifile_2.swift -check-prefix=CHECK-SECOND-FILE
 
 
 protocol InheritsFooable : Fooable {}
diff --git a/test/SILGen/witness_tables_serialized.swift b/test/SILGen/witness_tables_serialized.swift
index 924d7be..d4d4a40 100644
--- a/test/SILGen/witness_tables_serialized.swift
+++ b/test/SILGen/witness_tables_serialized.swift
@@ -1,7 +1,7 @@
 // This file is also used by witness_tables_serialized_import.swift.
 
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-NONRESILIENT %s
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -enable-resilience %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-NONRESILIENT %s
+// RUN: %target-swift-emit-silgen -enable-resilience %s | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
 
 public protocol PublicProtocol {}
 
diff --git a/test/SILGen/witnesses.swift b/test/SILGen/witnesses.swift
index 2c5d40d..f15a5ab 100644
--- a/test/SILGen/witnesses.swift
+++ b/test/SILGen/witnesses.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name witnesses -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-sil-ownership | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name witnesses -Xllvm -sil-full-demangle %s -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s
 
 infix operator <~>
 
diff --git a/test/SILGen/witnesses_canonical.swift b/test/SILGen/witnesses_canonical.swift
index ea6853fc..7157819 100644
--- a/test/SILGen/witnesses_canonical.swift
+++ b/test/SILGen/witnesses_canonical.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 // rdar://problem/20714534 -- we need to canonicalize an associated type's
 // protocols when emitting witness method table for a conformance.
diff --git a/test/SILGen/witnesses_class.swift b/test/SILGen/witnesses_class.swift
index ae87cde..897ceb1 100644
--- a/test/SILGen/witnesses_class.swift
+++ b/test/SILGen/witnesses_class.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-emit-silgen -module-name witnesses_class -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name witnesses_class %s | %FileCheck %s
 
 protocol Fooable: class {
   func foo()
diff --git a/test/SILGen/witnesses_inheritance.swift b/test/SILGen/witnesses_inheritance.swift
index 05fb5e9..7cc610d 100644
--- a/test/SILGen/witnesses_inheritance.swift
+++ b/test/SILGen/witnesses_inheritance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol Fooable {
   func foo()
diff --git a/test/SILGen/witnesses_refinement.swift b/test/SILGen/witnesses_refinement.swift
index a9ae0c6..7620c64 100644
--- a/test/SILGen/witnesses_refinement.swift
+++ b/test/SILGen/witnesses_refinement.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 protocol Saturable: Comparable {
   func saturated(max: Self) -> Self
diff --git a/test/SILGen/writeback.swift b/test/SILGen/writeback.swift
index d266fbe..80cf2e5 100644
--- a/test/SILGen/writeback.swift
+++ b/test/SILGen/writeback.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -Xllvm -sil-full-demangle %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle %s | %FileCheck %s
 
 struct Foo {
   mutating           // used to test writeback.
diff --git a/test/SILGen/writeback_conflict_diagnostics.swift b/test/SILGen/writeback_conflict_diagnostics.swift
index 33369cb..30533b6 100644
--- a/test/SILGen/writeback_conflict_diagnostics.swift
+++ b/test/SILGen/writeback_conflict_diagnostics.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-emit-silgen -enable-sil-ownership %s -o /dev/null -verify
-// RUN: %target-swift-emit-silgen -enable-sil-ownership -enforce-exclusivity=checked %s -o /dev/null -verify
+// RUN: %target-swift-emit-silgen %s -o /dev/null -verify
+// RUN: %target-swift-emit-silgen -enforce-exclusivity=checked %s -o /dev/null -verify
 
 func takeInOut<T>(_: inout T) {}
 
diff --git a/test/SourceKit/DocSupport/doc_clang_module.swift b/test/SourceKit/DocSupport/doc_clang_module.swift
index d40aac8..1c40da7 100644
--- a/test/SourceKit/DocSupport/doc_clang_module.swift
+++ b/test/SourceKit/DocSupport/doc_clang_module.swift
@@ -1,5 +1,8 @@
 // REQUIRES: objc_interop
 
+// SourceKit is expected to produce documentation in source order.
+// UNSUPPORTED: swift_evolve
+
 // FIXME: the test output we're comparing to is specific to macOS.
 // REQUIRES-ANY: OS=macosx
 
diff --git a/test/SourceKit/InterfaceGen/gen_stdlib.swift b/test/SourceKit/InterfaceGen/gen_stdlib.swift
index a5bff37..1b5291e 100644
--- a/test/SourceKit/InterfaceGen/gen_stdlib.swift
+++ b/test/SourceKit/InterfaceGen/gen_stdlib.swift
@@ -8,17 +8,17 @@
 
 // Just check a small part, mainly to make sure we can print the interface of the stdlib.
 // CHECK-STDLIB-NOT: extension _SwiftNSOperatingSystemVersion
-// CHECK-STDLIB: struct Int : FixedWidthInteger, SignedInteger {
-// CHECK-STDLIB:   static var bitWidth: Int { get }
-// CHECK-STDLIB:   var nonzeroBitCount: Int { get }
+// CHECK-STDLIB-LABEL: struct Int : FixedWidthInteger, SignedInteger {
+// CHECK-STDLIB-DAG:   static var bitWidth: Int { get }
+// CHECK-STDLIB-DAG:   var nonzeroBitCount: Int { get }
 // CHECK-STDLIB: }
 
 // Check that extensions of nested decls are showing up.
 // CHECK-STDLIB-LABEL: extension String.Index {
-// CHECK-STDLIB: func samePosition(in utf8: String.UTF8View) -> String.UTF8View.Index?
-// CHECK-STDLIB: func samePosition(in characters: String) -> String.Index?
-// CHECK-STDLIB: func samePosition(in unicodeScalars: String.UnicodeScalarView) -> String.UnicodeScalarIndex?
-// CHECK-STDLIB-NEXT: }
+// CHECK-STDLIB-DAG: func samePosition(in utf8: String.UTF8View) -> String.UTF8View.Index?
+// CHECK-STDLIB-DAG: func samePosition(in characters: String) -> String.Index?
+// CHECK-STDLIB-DAG: func samePosition(in unicodeScalars: String.UnicodeScalarView) -> String.UnicodeScalarIndex?
+// CHECK-STDLIB: }
 
 // CHECK-MUTATING-ATTR: mutating func
 
diff --git a/test/api-digester/dump-module.swift b/test/api-digester/dump-module.swift
index bc16c5a..c8217ed 100644
--- a/test/api-digester/dump-module.swift
+++ b/test/api-digester/dump-module.swift
@@ -13,3 +13,8 @@
 // RUN: diff -u %S/Outputs/cake.json %t.dump.json
 // RUN: %api-digester -deserialize-sdk --input-paths %S/Outputs/cake-abi.json -o %t.dump.json
 // RUN: diff -u %S/Outputs/cake-abi.json %t.dump.json
+
+// The input JSON files need to be modified when standard library declarations
+// are reordered. This is expected behavior and we simply shouldn't run the test
+// when automatically evolving the standard library.
+// UNSUPPORTED: swift_evolve
diff --git a/test/api-digester/stability-stdlib-abi.swift b/test/api-digester/stability-stdlib-abi.swift
index 3657775..9c69761 100644
--- a/test/api-digester/stability-stdlib-abi.swift
+++ b/test/api-digester/stability-stdlib-abi.swift
@@ -6,3 +6,9 @@
 // RUN: %clang -E -P -x c %S/Outputs/stability-stdlib-abi.swift.expected -o - | sed '/^\s*$/d' | sort > %t.tmp/stability-stdlib-abi.swift.expected
 // RUN: %clang -E -P -x c %t.tmp/changes.txt -o - | sed '/^\s*$/d' | sort > %t.tmp/changes.txt.tmp
 // RUN: diff -u %t.tmp/stability-stdlib-abi.swift.expected %t.tmp/changes.txt.tmp
+
+// The digester hasn't learned that we've stopped baking non-stored class member
+// order into the ABI. rdar://problem/46617463
+// The digester can incorrectly register a generic signature change when
+// declarations are shuffled. rdar://problem/46618883
+// XFAIL: swift_evolve
diff --git a/test/lit.cfg b/test/lit.cfg
index 449453d..285335f 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -540,6 +540,9 @@
 else:
     lit_config.fatal("Unknown test mode %r" % swift_test_subset)
 
+if 'swift_evolve' in lit_config.params:
+    config.available_features.add("swift_evolve")
+
 # Enable benchmark testing when the binary is found (has fully qualified path).
 if config.benchmark_o != 'Benchmark_O':
     config.available_features.add('benchmark')
diff --git a/test/stdlib/ErrorBridged.swift b/test/stdlib/ErrorBridged.swift
index 2d502e4..6a90d1c 100644
--- a/test/stdlib/ErrorBridged.swift
+++ b/test/stdlib/ErrorBridged.swift
@@ -70,6 +70,8 @@
   }
 }
 
+// Gated on the availability of NSKeyedArchiver.archivedData(withRootObject:).
+@available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *)
 func archiveAndUnarchiveObject<T: NSCoding>(
   _ object: T
 ) -> T?
@@ -81,11 +83,13 @@
   return unarchiver.decodeObject(of: T.self, forKey: "root")
 }
 ErrorBridgingTests.test("NSCoding") {
-  autoreleasepool {
-    let orig = EnumError.ReallyBadError as NSError
-    let unarchived = archiveAndUnarchiveObject(orig)!
-    expectEqual(orig, unarchived)
-    expectTrue(type(of: unarchived) == NSError.self)
+  if #available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *) {
+    autoreleasepool {
+      let orig = EnumError.ReallyBadError as NSError
+      let unarchived = archiveAndUnarchiveObject(orig)!
+      expectEqual(orig, unarchived)
+      expectTrue(type(of: unarchived) == NSError.self)
+    }
   }
 }
 
diff --git a/test/stdlib/TestUserInfo.swift b/test/stdlib/TestUserInfo.swift
index 31c0957..7cd76b3 100644
--- a/test/stdlib/TestUserInfo.swift
+++ b/test/stdlib/TestUserInfo.swift
@@ -135,12 +135,16 @@
     func test_classForCoder() {
         // confirm internal bridged impl types are not exposed to archival machinery
         // we have to be circuitous here, as bridging makes it very difficult to confirm this
-        let note = Notification(name: Notification.Name(rawValue: "TestSwiftNotification"), userInfo: [AnyHashable("key"):"value"])
-        let archivedNote = NSKeyedArchiver.archivedData(withRootObject: note)
-        let noteAsPlist = try! PropertyListSerialization.propertyList(from: archivedNote, options: [], format: nil)
-        let plistAsData = try! PropertyListSerialization.data(fromPropertyList: noteAsPlist, format: .xml, options: 0)
-        let xml = NSString(data: plistAsData, encoding: String.Encoding.utf8.rawValue)!
-        expectEqual(xml.range(of: "_NSUserInfoDictionary").location, NSNotFound)
+        //
+        // Gated on the availability of NSKeyedArchiver.archivedData(withRootObject:).
+        if #available(macOS 10.11, iOS 9.0, tvOS 9.0, watchOS 2.0, *) {
+            let note = Notification(name: Notification.Name(rawValue: "TestSwiftNotification"), userInfo: [AnyHashable("key"):"value"])
+            let archivedNote = NSKeyedArchiver.archivedData(withRootObject: note)
+            let noteAsPlist = try! PropertyListSerialization.propertyList(from: archivedNote, options: [], format: nil)
+            let plistAsData = try! PropertyListSerialization.data(fromPropertyList: noteAsPlist, format: .xml, options: 0)
+            let xml = NSString(data: plistAsData, encoding: String.Encoding.utf8.rawValue)!
+            expectEqual(xml.range(of: "_NSUserInfoDictionary").location, NSNotFound)
+        }
     }
 
     func test_AnyHashableContainingNotification() {