Merge pull request #21477 from palimondo/against-the-dark

[benchmark] BenchmarkDriver check --markdown
diff --git a/.gitignore b/.gitignore
index 05e0373..fd9d7fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,6 +34,9 @@
 # Finder metadata
 .DS_Store
 
+# Visual Studio metadata
+.vs
+
 #==============================================================================#
 # Ignore CMake temporary files
 #==============================================================================#
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e4ce32..80380e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,12 +23,49 @@
 
 Swift 5.0
 ---------
+
+* Swift 3 mode has been removed. Supported values for the `-swift-version`
+  flag are `4`, `4.2`, and `5`.
+
+* [SE-0228][]:
+
+  String interpolation has been overhauled to improve its performance,
+  clarity, and efficiency.
+
+  Note that the old `_ExpressibleByStringInterpolation` protocol has been
+  removed; any code making use of this protocol will need to be updated
+  for the new design. An `#if compiler` block can be used to conditionalize
+  code between 4.2 and 5.0, for example:
+  
+  ```swift
+  #if compiler(<5.0)
+  extension MyType : _ExpressibleByStringInterpolation { ... }
+  #else
+  extension MyType : ExpressibleByStringInterpolation { ... }
+  #endif
+  ```
+
+* [SE-0213][]:
+
+  If `T` conforms to one of the `ExpressibleBy*` protocols and `literal` is a
+  literal expression, then `T(literal)` will construct a literal of type `T`
+  using the corresponding protocol, rather than calling a constructor member
+  of `T` with a value of  the protocol's default literal type.
+
+  For example, expressions like `UInt64(0xffff_ffff_ffff_ffff)` are now valid,
+  where previously they would overflow the default integer literal type of `Int`.
+
+* [SE-0230][]:
+
+  In Swift 5 mode, `try?` with an expression of Optional type will flatten the
+  resulting Optional, instead of returning an Optional of an Optional.
+
 * [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.
+  In Swift 5 mode, `@autoclosure` parameters can no longer be forwarded to
+  `@autoclosure` arguments in another function call. Instead, you must explicitly
+  call the function value with `()`; the call itself is wrapped inside an
+  implicit closure, guaranteeing the same behavior as in Swift 4 mode.
 
   Example:
 
@@ -40,6 +77,56 @@
   }
   ```
 
+* [SR-8109][]:
+
+  Single-element labeled tuple expressions, for example `(label: 123)`, were
+  allowed in some contexts but often resulted in surprising, inconsistent
+  behavior that varied across compiler releases. They are now completely
+  disallowed.
+
+  Note that single-element labeled _types_, for example `var x: (label: Int)`,
+  have already been prohibited since Swift 3.
+
+* [SR-695][]:
+
+  In Swift 5 mode, a class method returning `Self` can no longer be overridden
+  with a method returning a non-final concrete class type. Such code is not
+  type safe and will need to be updated.
+
+  For example,
+
+  ```swift
+  class Base {
+    class func factory() -> Self { ... }
+  }
+
+  class Derived : Base {
+    class override func factory() -> Derived { ... }
+  }
+  ```
+
+* In Swift 5 mode, the type of `self` in a convenience initializer of a non-final
+  class is now the dynamic `Self` type, and not the concrete class type.
+
+* [SR-5581][]:
+
+  Protocols can now constrain their conforming types to those that subclasses a
+  given class. Two equivalent forms are supported:
+
+  ```swift
+  protocol MyView : UIView { ... }
+  protocol MyView where Self : UIView { ... }
+  ```
+
+  Note that Swift 4.2 accepted the second form, but it was not fully implemented
+  and could sometimes crash at compile time or run time.
+
+* [SR-631][]:
+
+  Extension binding now supports extensions of nested types which themselves are
+  defined inside extensions. Previously this could fail with some declaration orders,
+  producing spurious "undeclared type" errors.
+
 * [SR-7139][]:
 
   Exclusive memory access is now enforced at runtime by default in
@@ -129,7 +216,7 @@
 
 * [SE-0214][]:
 
-  Renamed the `DictionaryLiteral` type to `KeyValuePairs`.
+  The `DictionaryLiteral` type has been renamed to `KeyValuePairs`.
   A typealias preserves the old name for compatibility.
 
 * [SR-2608][]
@@ -137,8 +224,16 @@
   Default arguments are now printed in SourceKit-generated interfaces for Swift
   modules, instead of just using a placeholder `default`.
 
-* Notable bug fix: unowned and unowned(unsafe) variables now support optional
-  types.
+* `unowned` and `unowned(unsafe)` variables now support Optional types.
+
+* Designated initializers with variadic parameters are now correctly inherited
+  in subclasses.
+
+* Extensions of concrete subclasses of generic classes can now contain
+  `@objc` members.
+
+* Complex recursive type definitions involving classes and generics that would
+  previously cause deadlocks at run time are now fully supported.
 
 * [SR-419][]
 
@@ -7309,9 +7404,13 @@
 [SE-0225]: <https://github.com/apple/swift-evolution/blob/master/proposals/0225-binaryinteger-iseven-isodd-ismultiple.md>
 [SE-0226]: <https://github.com/apple/swift-evolution/blob/master/proposals/0226-package-manager-target-based-dep-resolution.md>
 [SE-0227]: <https://github.com/apple/swift-evolution/blob/master/proposals/0227-identity-keypath.md>
+[SE-0228]: <https://github.com/apple/swift-evolution/blob/master/proposals/0228-fix-expressiblebystringinterpolation.md>
+[SE-0230]: <https://github.com/apple/swift-evolution/blob/master/proposals/0230-flatten-optional-try.md>
 
 [SR-106]: <https://bugs.swift.org/browse/SR-106>
 [SR-419]: <https://bugs.swift.org/browse/SR-419>
+[SR-631]: <https://bugs.swift.org/browse/SR-631>
+[SR-695]: <https://bugs.swift.org/browse/SR-695>
 [SR-1009]: <https://bugs.swift.org/browse/SR-1009>
 [SR-1446]: <https://bugs.swift.org/browse/SR-1446>
 [SR-1529]: <https://bugs.swift.org/browse/SR-1529>
@@ -7320,6 +7419,8 @@
 [SR-2394]: <https://bugs.swift.org/browse/SR-2394>
 [SR-2608]: <https://bugs.swift.org/browse/SR-2608>
 [SR-4248]: <https://bugs.swift.org/browse/SR-4248>
+[SR-5581]: <https://bugs.swift.org/browse/SR-5581>
+[SR-5719]: <https://bugs.swift.org/browse/SR-5719>
 [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>
+[SR-8109]: <https://bugs.swift.org/browse/SR-8109>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd63221..8166b35 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -898,14 +898,20 @@
   if(CMAKE_C_COMPILER_ID STREQUAL Clang AND
      CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.8
      OR LLVM_USE_SANITIZER)
-   set(SWIFT_LIBDISPATCH_C_COMPILER ${CMAKE_C_COMPILER})
-   set(SWIFT_LIBDISPATCH_CXX_COMPILER ${CMAKE_CXX_COMPILER})
- elseif(${CMAKE_SYSTEM_NAME} STREQUAL ${CMAKE_HOST_SYSTEM_NAME})
-   set(SWIFT_LIBDISPATCH_C_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang)
-   set(SWIFT_LIBDISPATCH_CXX_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang++)
- else()
-   message(SEND_ERROR "libdispatch requires a newer clang compiler (${CMAKE_C_COMPILER_VERSION} < 3.9)")
- endif()
+    set(SWIFT_LIBDISPATCH_C_COMPILER ${CMAKE_C_COMPILER})
+    set(SWIFT_LIBDISPATCH_CXX_COMPILER ${CMAKE_CXX_COMPILER})
+  elseif(${CMAKE_SYSTEM_NAME} STREQUAL ${CMAKE_HOST_SYSTEM_NAME})
+    set(SWIFT_LIBDISPATCH_C_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang)
+    set(SWIFT_LIBDISPATCH_CXX_COMPILER ${PATH_TO_CLANG_BUILD}/bin/clang++)
+  else()
+    message(SEND_ERROR "libdispatch requires a newer clang compiler (${CMAKE_C_COMPILER_VERSION} < 3.9)")
+  endif()
+
+  if(SWIFT_HOST_VARIANT_SDK STREQUAL Windows)
+    set(SOURCEKIT_LIBDISPATCH_RUNTIME_DIR bin)
+  else()
+    set(SOURCEKIT_LIBDISPATCH_RUNTIME_DIR lib)
+  endif()
 
   include(ExternalProject)
   ExternalProject_Add(libdispatch
@@ -923,6 +929,7 @@
                         -DCMAKE_LINKER=${CMAKE_LINKER}
                         -DCMAKE_RANLIB=${CMAKE_RANLIB}
                         -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
+                        -DBUILD_SHARED_LIBS=YES
                         -DENABLE_SWIFT=NO
                         -DENABLE_TESTING=NO
                       INSTALL_COMMAND
@@ -933,9 +940,9 @@
                       STEP_TARGETS
                         install
                       BUILD_BYPRODUCTS
-                        <INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
+                        <INSTALL_DIR>/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
                         <INSTALL_DIR>/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}dispatch${CMAKE_IMPORT_LIBRARY_SUFFIX}
-                        <INSTALL_DIR>/lib/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
+                        <INSTALL_DIR>/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
                         <INSTALL_DIR>/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}BlocksRuntime${CMAKE_IMPORT_LIBRARY_SUFFIX}
                       BUILD_ALWAYS
                         1)
@@ -951,7 +958,7 @@
   set_target_properties(dispatch
                         PROPERTIES
                           IMPORTED_LOCATION
-                            ${install_dir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
+                            ${install_dir}/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}dispatch${CMAKE_SHARED_LIBRARY_SUFFIX}
                           IMPORTED_IMPLIB
                             ${install_dir}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}dispatch${CMAKE_IMPORT_LIBRARY_SUFFIX}
                           INTERFACE_INCLUDE_DIRECTORIES
@@ -961,7 +968,7 @@
   set_target_properties(BlocksRuntime
                         PROPERTIES
                           IMPORTED_LOCATION
-                            ${install_dir}/lib/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
+                            ${install_dir}/${SOURCEKIT_LIBDISPATCH_RUNTIME_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}BlocksRuntime${CMAKE_SHARED_LIBRARY_SUFFIX}
                           IMPORTED_IMPLIB
                             ${install_dir}/lib/${CMAKE_IMPORT_LIBRARY_PREFIX}BlocksRuntime${CMAKE_IMPORT_LIBRARY_SUFFIX}
                           INTERFACE_INCLUDE_DIRECTORIES
diff --git a/benchmark/single-source/DataBenchmarks.swift b/benchmark/single-source/DataBenchmarks.swift
index 52aa244..1ccf8d7 100644
--- a/benchmark/single-source/DataBenchmarks.swift
+++ b/benchmark/single-source/DataBenchmarks.swift
@@ -60,12 +60,12 @@
     BenchmarkInfo(name: "DataAppendDataLargeToSmall", runFunction: run_AppendDataLargeToSmall, tags: [.validation, .api, .Data]),
     BenchmarkInfo(name: "DataAppendDataLargeToMedium", runFunction: run_AppendDataLargeToMedium, tags: [.validation, .api, .Data]),
     BenchmarkInfo(name: "DataAppendDataLargeToLarge", runFunction: run_AppendDataLargeToLarge, tags: [.validation, .api, .Data, .skip]),
-    BenchmarkInfo(name: "DataToStringEmpty", runFunction: run_DataToStringEmpty, tags: [.validation, .api, .Data]),
-    BenchmarkInfo(name: "DataToStringSmall", runFunction: run_DataToStringSmall, tags: [.validation, .api, .Data]),
-    BenchmarkInfo(name: "DataToStringMedium", runFunction: run_DataToStringMedium, tags: [.validation, .api, .Data]),
-    BenchmarkInfo(name: "StringToDataEmpty", runFunction: run_StringToDataEmpty, tags: [.validation, .api, .Data]),
-    BenchmarkInfo(name: "StringToDataSmall", runFunction: run_StringToDataSmall, tags: [.validation, .api, .Data]),
-    BenchmarkInfo(name: "StringToDataMedium", runFunction: run_StringToDataMedium, tags: [.validation, .api, .Data]),
+    BenchmarkInfo(name: "DataToStringEmpty", runFunction: run_DataToStringEmpty, tags: [.validation, .api, .Data], legacyFactor: 50),
+    BenchmarkInfo(name: "DataToStringSmall", runFunction: run_DataToStringSmall, tags: [.validation, .api, .Data], legacyFactor: 50),
+    BenchmarkInfo(name: "DataToStringMedium", runFunction: run_DataToStringMedium, tags: [.validation, .api, .Data], legacyFactor: 50),
+    BenchmarkInfo(name: "StringToDataEmpty", runFunction: run_StringToDataEmpty, tags: [.validation, .api, .Data], legacyFactor: 50),
+    BenchmarkInfo(name: "StringToDataSmall", runFunction: run_StringToDataSmall, tags: [.validation, .api, .Data], legacyFactor: 50),
+    BenchmarkInfo(name: "StringToDataMedium", runFunction: run_StringToDataMedium, tags: [.validation, .api, .Data], legacyFactor: 50),
 ]
 
 enum SampleKind {
@@ -165,7 +165,7 @@
     case .string: return sampleString()
     case .immutableBacking: return sampleBridgedNSData()
     }
-    
+
 }
 
 func benchmark_AccessBytes(_ N: Int, _ data: Data) {
@@ -598,7 +598,7 @@
 @inline(never)
 public func run_DataToStringEmpty(_ N: Int) {
     let d = Data()
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let s = String(decoding: d, as: UTF8.self)
         blackHole(s)
     }
@@ -607,7 +607,7 @@
 @inline(never)
 public func run_DataToStringSmall(_ N: Int) {
     let d = Data([0x0D, 0x0A])
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let s = String(decoding: d, as: UTF8.self)
         blackHole(s)
     }
@@ -616,7 +616,7 @@
 @inline(never)
 public func run_DataToStringMedium(_ N: Int) {
     let d = Data([0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A])
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let s = String(decoding: d, as: UTF8.self)
         blackHole(s)
     }
@@ -625,7 +625,7 @@
 @inline(never)
 public func run_StringToDataEmpty(_ N: Int) {
     let s = ""
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let d = Data(s.utf8)
         blackHole(d)
     }
@@ -634,7 +634,7 @@
 @inline(never)
 public func run_StringToDataSmall(_ N: Int) {
     let s = "\r\n"
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let d = Data(s.utf8)
         blackHole(d)
     }
@@ -643,7 +643,7 @@
 @inline(never)
 public func run_StringToDataMedium(_ N: Int) {
     let s = "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"
-    for _ in 0..<10000 * N {
+    for _ in 0..<200 * N {
         let d = Data(s.utf8)
         blackHole(d)
     }
diff --git a/benchmark/single-source/SetTests.swift b/benchmark/single-source/SetTests.swift
index 07b4e7b..b317ff8 100644
--- a/benchmark/single-source/SetTests.swift
+++ b/benchmark/single-source/SetTests.swift
@@ -16,6 +16,10 @@
 let half = size / 2
 let quarter = size / 4
 
+// Construction of empty sets.
+let setE: Set<Int> = []
+let setOE: Set<Box<Int>> = []
+
 // Construction kit for sets with 25% overlap
 let setAB = Set(0 ..< size)                              //   0 ..< 400
 let setCD = Set(size ..< 2 * size)                       // 400 ..< 800
@@ -54,6 +58,11 @@
 public let SetTests = [
   // Mnemonic: number after name is percentage of common elements in input sets.
   BenchmarkInfo(
+    name: "Set.Empty.IsSubsetInt0",
+    runFunction: { n in run_SetIsSubsetInt(setE, setAB, true, 5000 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setE, setAB]) }),
+  BenchmarkInfo(
     name: "SetIsSubsetInt0",
     runFunction: { n in run_SetIsSubsetInt(setAB, setCD, false, 5000 * n) },
     tags: [.validation, .api, .Set],
@@ -85,6 +94,47 @@
     setUpFunction: { blackHole([setP, setQ]) }),
 
   BenchmarkInfo(
+    name: "Set.Empty.IsDisjointInt0",
+    runFunction: { n in run_SetIsDisjointInt(setE, setAB, true, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setE, setAB]) }),
+  BenchmarkInfo(
+    name: "Set.Empty.IsDisjointBox0",
+    runFunction: { n in run_SetIsDisjointBox(setOE, setOAB, true, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setOE, setOAB]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointInt0",
+    runFunction: { n in run_SetIsDisjointInt(setAB, setCD, true, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setAB, setCD]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointBox0",
+    runFunction: { n in run_SetIsDisjointBox(setOAB, setOCD, true, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setOAB, setOCD]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointInt25",
+    runFunction: { n in run_SetIsDisjointInt(setB, setAB, false, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setB, setAB]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointBox25",
+    runFunction: { n in run_SetIsDisjointBox(setOB, setOAB, false, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setOB, setOAB]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointInt50",
+    runFunction: { n in run_SetIsDisjointInt(setY, setXY, false, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setY, setXY]) }),
+  BenchmarkInfo(
+    name: "SetIsDisjointInt100",
+    runFunction: { n in run_SetIsDisjointInt(setP, setQ, false, 50 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setP, setQ]) }),
+  
+  BenchmarkInfo(
     name: "SetSymmetricDifferenceInt0",
     runFunction: { n in run_SetSymmetricDifferenceInt(setAB, setCD, countABCD, 10 * n) },
     tags: [.validation, .api, .Set],
@@ -178,6 +228,16 @@
     setUpFunction: { blackHole([setP, setQ]) }),
 
   BenchmarkInfo(
+    name: "Set.Empty.SubtractingInt0",
+    runFunction: { n in run_SetSubtractingInt(setE, setAB, 0, 10 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setE, setAB]) }),
+  BenchmarkInfo(
+    name: "Set.Empty.SubtractingBox0",
+    runFunction: { n in run_SetSubtractingBox(setOE, setOAB, 0, 10 * n) },
+    tags: [.validation, .api, .Set],
+    setUpFunction: { blackHole([setOE, setOAB]) }),
+  BenchmarkInfo(
     name: "SetSubtractingInt0",
     runFunction: { n in run_SetSubtractingInt(setAB, setCD, countAB, 10 * n) },
     tags: [.validation, .api, .Set],
@@ -296,6 +356,18 @@
   }
 }
 
+@inline(never)
+public func run_SetIsDisjointInt(
+    _ a: Set<Int>,
+    _ b: Set<Int>,
+    _ r: Bool,
+    _ n: Int) {
+    for _ in 0 ..< n {
+        let isDisjoint = a.isDisjoint(with: identity(b))
+        CheckResults(isDisjoint == r)
+    }
+}
+
 class Box<T : Hashable> : Hashable {
   var value: T
 
@@ -371,3 +443,15 @@
     CheckResults(and.count == r)
   }
 }
+
+@inline(never)
+func run_SetIsDisjointBox(
+    _ a: Set<Box<Int>>,
+    _ b: Set<Box<Int>>,
+    _ r: Bool,
+    _ n: Int) {
+    for _ in 0 ..< n {
+        let isDisjoint = a.isDisjoint(with: identity(b))
+        CheckResults(isDisjoint == r)
+    }
+}
diff --git a/benchmark/single-source/StrComplexWalk.swift b/benchmark/single-source/StrComplexWalk.swift
index db9f082..b464934 100644
--- a/benchmark/single-source/StrComplexWalk.swift
+++ b/benchmark/single-source/StrComplexWalk.swift
@@ -15,13 +15,14 @@
 public let StrComplexWalk = BenchmarkInfo(
   name: "StrComplexWalk",
   runFunction: run_StrComplexWalk,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 10)
 
 @inline(never)
 public func run_StrComplexWalk(_ N: Int) {
   var s = "निरन्तरान्धकारिता-दिगन्तर-कन्दलदमन्द-सुधारस-बिन्दु-सान्द्रतर-घनाघन-वृन्द-सन्देहकर-स्यन्दमान-मकरन्द-बिन्दु-बन्धुरतर-माकन्द-तरु-कुल-तल्प-कल्प-मृदुल-सिकता-जाल-जटिल-मूल-तल-मरुवक-मिलदलघु-लघु-लय-कलित-रमणीय-पानीय-शालिका-बालिका-करार-विन्द-गलन्तिका-गलदेला-लवङ्ग-पाटल-घनसार-कस्तूरिकातिसौरभ-मेदुर-लघुतर-मधुर-शीतलतर-सलिलधारा-निराकरिष्णु-तदीय-विमल-विलोचन-मयूख-रेखापसारित-पिपासायास-पथिक-लोकान्"
   let ref_result = 379
-  for _ in 1...2000*N {
+  for _ in 1...200*N {
     var count = 0
     for _ in s.unicodeScalars {
       count += 1
@@ -29,4 +30,3 @@
     CheckResults(count == ref_result)
   }
 }
-
diff --git a/benchmark/single-source/StrToInt.swift b/benchmark/single-source/StrToInt.swift
index 77cfa1c..c70c535 100644
--- a/benchmark/single-source/StrToInt.swift
+++ b/benchmark/single-source/StrToInt.swift
@@ -17,7 +17,8 @@
 public let StrToInt = BenchmarkInfo(
   name: "StrToInt",
   runFunction: run_StrToInt,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 10)
 
 @inline(never)
 public func run_StrToInt(_ N: Int) {
@@ -45,7 +46,7 @@
     return r
   }
   var res = Int.max
-  for _ in 1...1000*N {
+  for _ in 1...100*N {
     res = res & DoOneIter(input)
   }
   CheckResults(res == ref_result)
diff --git a/benchmark/single-source/StringBuilder.swift b/benchmark/single-source/StringBuilder.swift
index 6c3ec52..5017c9b 100644
--- a/benchmark/single-source/StringBuilder.swift
+++ b/benchmark/single-source/StringBuilder.swift
@@ -28,27 +28,33 @@
   BenchmarkInfo(
     name: "StringUTF16Builder",
     runFunction: run_StringUTF16Builder,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
   BenchmarkInfo(
     name: "StringUTF16SubstringBuilder",
     runFunction: run_StringUTF16SubstringBuilder,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
   BenchmarkInfo(
     name: "StringBuilderLong",
     runFunction: run_StringBuilderLong,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
   BenchmarkInfo(
     name: "StringBuilderWithLongSubstring",
     runFunction: run_StringBuilderWithLongSubstring,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
   BenchmarkInfo(
     name: "StringWordBuilder",
     runFunction: run_StringWordBuilder,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
   BenchmarkInfo(
     name: "StringWordBuilderReservingCapacity",
     runFunction: run_StringWordBuilderReservingCapacity,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
 ]
 
 @inline(never)
@@ -110,14 +116,14 @@
 
 @inline(never)
 public func run_StringUTF16Builder(_ N: Int) {
-  for _ in 1...5000*N {
+  for _ in 1...500*N {
     blackHole(buildStringUTF16("a"))
   }
 }
 
 @inline(never)
 public func run_StringUTF16SubstringBuilder(_ N: Int) {
-  for _ in 1...5000*N {
+  for _ in 1...500*N {
     blackHole(buildStringFromSmallSubstrings("a"))
   }
 }
@@ -153,14 +159,14 @@
 
 @inline(never)
 public func run_StringBuilderLong(_ N: Int) {
-  for _ in 1...5000*N {
+  for _ in 1...500*N {
     blackHole(buildStringLong("👻"))
   }
 }
 
 @inline(never)
 public func run_StringBuilderWithLongSubstring(_ N: Int) {
-  for _ in 1...5000*N {
+  for _ in 1...500*N {
     blackHole(buildStringWithLongSubstring("👻"))
   }
 }
@@ -184,13 +190,16 @@
 
 @inline(never)
 public func run_StringWordBuilder(_ N: Int) {
-  blackHole(buildString(
-    word: "bumfuzzle", count: 50_000 * N, reservingCapacity: false))
+  for _ in 1...N {
+    blackHole(buildString(
+      word: "bumfuzzle", count: 5_000, reservingCapacity: false))
+  }
 }
 
 @inline(never)
 public func run_StringWordBuilderReservingCapacity(_ N: Int) {
-  blackHole(buildString(
-    word: "bumfuzzle", count: 50_000 * N, reservingCapacity: true))
+  for _ in 1...N {
+    blackHole(buildString(
+      word: "bumfuzzle", count: 5_000, reservingCapacity: true))
+  }
 }
-
diff --git a/benchmark/single-source/StringComparison.swift b/benchmark/single-source/StringComparison.swift
index 34178b6..8bce7dc 100644
--- a/benchmark/single-source/StringComparison.swift
+++ b/benchmark/single-source/StringComparison.swift
@@ -28,10 +28,6 @@
     return self.split(separator: "\n").map { String($0) }
   }
 }
-
-
-
-
 public let StringComparison: [BenchmarkInfo] = [
   BenchmarkInfo(
     name: "StringComparison_ascii",
@@ -43,43 +39,50 @@
     name: "StringComparison_latin1",
     runFunction: run_StringComparison_latin1,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_latin1) }
+    setUpFunction: { blackHole(Workload_latin1) },
+		legacyFactor: 2
   ),
   BenchmarkInfo(
     name: "StringComparison_fastPrenormal",
     runFunction: run_StringComparison_fastPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_fastPrenormal) }
+    setUpFunction: { blackHole(Workload_fastPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringComparison_slowerPrenormal",
     runFunction: run_StringComparison_slowerPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_slowerPrenormal) }
+    setUpFunction: { blackHole(Workload_slowerPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringComparison_nonBMPSlowestPrenormal",
     runFunction: run_StringComparison_nonBMPSlowestPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) }
+    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringComparison_emoji",
     runFunction: run_StringComparison_emoji,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_emoji) }
+    setUpFunction: { blackHole(Workload_emoji) },
+		legacyFactor: 4
   ),
   BenchmarkInfo(
     name: "StringComparison_abnormal",
     runFunction: run_StringComparison_abnormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_abnormal) }
+    setUpFunction: { blackHole(Workload_abnormal) },
+		legacyFactor: 20
   ),
   BenchmarkInfo(
     name: "StringComparison_zalgo",
     runFunction: run_StringComparison_zalgo,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_zalgo) }
+    setUpFunction: { blackHole(Workload_zalgo) },
+		legacyFactor: 25
   ),
   BenchmarkInfo(
     name: "StringComparison_longSharedPrefix",
@@ -100,43 +103,50 @@
     name: "StringHashing_latin1",
     runFunction: run_StringHashing_latin1,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_latin1) }
+    setUpFunction: { blackHole(Workload_latin1) },
+		legacyFactor: 2
   ),
   BenchmarkInfo(
     name: "StringHashing_fastPrenormal",
     runFunction: run_StringHashing_fastPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_fastPrenormal) }
+    setUpFunction: { blackHole(Workload_fastPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringHashing_slowerPrenormal",
     runFunction: run_StringHashing_slowerPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_slowerPrenormal) }
+    setUpFunction: { blackHole(Workload_slowerPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringHashing_nonBMPSlowestPrenormal",
     runFunction: run_StringHashing_nonBMPSlowestPrenormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) }
+    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "StringHashing_emoji",
     runFunction: run_StringHashing_emoji,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_emoji) }
+    setUpFunction: { blackHole(Workload_emoji) },
+		legacyFactor: 4
   ),
   BenchmarkInfo(
     name: "StringHashing_abnormal",
     runFunction: run_StringHashing_abnormal,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_abnormal) }
+    setUpFunction: { blackHole(Workload_abnormal) },
+		legacyFactor: 20
   ),
   BenchmarkInfo(
     name: "StringHashing_zalgo",
     runFunction: run_StringHashing_zalgo,
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_zalgo) }
+    setUpFunction: { blackHole(Workload_zalgo) },
+		legacyFactor: 25
   ),
 ]
 
@@ -151,43 +161,50 @@
     name: "NormalizedIterator_latin1",
     runFunction: run_NormalizedIterator_latin1,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_latin1) }
+    setUpFunction: { blackHole(Workload_latin1) },
+		legacyFactor: 2
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_fastPrenormal",
     runFunction: run_NormalizedIterator_fastPrenormal,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_fastPrenormal) }
+    setUpFunction: { blackHole(Workload_fastPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_slowerPrenormal",
     runFunction: run_NormalizedIterator_slowerPrenormal,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_slowerPrenormal) }
+    setUpFunction: { blackHole(Workload_slowerPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_nonBMPSlowestPrenormal",
     runFunction: run_NormalizedIterator_nonBMPSlowestPrenormal,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) }
+    setUpFunction: { blackHole(Workload_nonBMPSlowestPrenormal) },
+		legacyFactor: 10
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_emoji",
     runFunction: run_NormalizedIterator_emoji,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_emoji) }
+    setUpFunction: { blackHole(Workload_emoji) },
+		legacyFactor: 4
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_abnormal",
     runFunction: run_NormalizedIterator_abnormal,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_abnormal) }
+    setUpFunction: { blackHole(Workload_abnormal) },
+		legacyFactor: 20
   ),
   BenchmarkInfo(
     name: "NormalizedIterator_zalgo",
     runFunction: run_NormalizedIterator_zalgo,
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_zalgo) }
+    setUpFunction: { blackHole(Workload_zalgo) },
+		legacyFactor: 25
   ),
 ]
 
@@ -635,7 +652,8 @@
       óôõö÷øùúûüýþÿ
       123.456£=>¥
       123.456
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/2
   )
   static let fastPrenormal = Workload(
     name: "FastPrenormal",
@@ -656,7 +674,8 @@
       ʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰ
       ʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏːˑ˒˓˔˕˖˗˘˙˚˛˜˝˞˟ˠˡˢˣˤ˥˦
       ˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   static let slowerPrenormal = Workload(
     name: "SlowerPrenormal",
@@ -673,7 +692,8 @@
       в чащах юга жил-был цитрус
       \u{300c}\u{300e}今日は\u{3001}世界\u{3002}\u{300f}\u{300d}
       но фальшивый экземпляр
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   // static let slowestPrenormal = """
   //   """.lines()
@@ -691,7 +711,8 @@
       𓃘𓃙𓃚𓃛𓃠𓃡𓃢𓃣𓃦𓃧𓃨𓃩𓃬𓃭𓃮𓃯𓃰𓃲𓃳𓃴𓃵𓃶𓃷
       𓀀𓀁𓀂𓀃𓀄𓆇𓆈𓆉𓆊𓆋𓆌𓆍𓆎𓆏𓆐𓆑𓆒𓆓𓆔𓆗𓆘𓆙𓆚𓆛𓆝𓆞𓆟𓆠𓆡𓆢𓆣𓆤
       𓆥𓆦𓆧𓆨𓆩𓆪𓆫𓆬𓆭𓆮𓆯𓆰𓆱𓆲𓆳𓆴𓆵𓆶𓆷𓆸𓆹𓆺𓆻
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   static let emoji = Workload(
     name: "Emoji",
@@ -704,7 +725,8 @@
       😋🤑🤗🤓😎😒😏🤠🤡😞😔😟😕😖😣☹️🙁😫😩😤😠😑😐😶😡😯
       😦😧😮😱😳😵😲😨😰😢😥
       😪😓😭🤤😴🙄🤔🤥🤧🤢🤐😬😷🤒🤕😈💩👺👹👿👻💀☠️👽
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/4
   )
 
   static let abnormal = Workload(
@@ -715,7 +737,8 @@
     \u{f900}\u{f901}\u{f902}\u{f903}\u{f904}\u{f905}\u{f906}\u{f907}\u{f908}\u{f909}\u{f90a}
     \u{f90b}\u{f90c}\u{f90d}\u{f90e}\u{f90f}\u{f910}\u{f911}\u{f912}\u{f913}\u{f914}\u{f915}\u{f916}\u{f917}\u{f918}\u{f919}
     \u{f900}\u{f91a}\u{f91b}\u{f91c}\u{f91d}\u{f91e}\u{f91f}\u{f920}\u{f921}\u{f922}
-    """.lines()
+    """.lines(),
+    scaleMultiplier: 1/20
   )
   // static let pathological = """
   //   """.lines()
@@ -739,9 +762,9 @@
     ơ̗̘̙̜̹̺̻̼͇͈͉͍͎̽̾̿̀́͂̓̈́͆͊͋͌̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͥͦͧͨͩͪͫͬͭͮ͘
     xͣͤͥͦͧͨͩͪͫͬͭͮ
     """.lines(),
-    scaleMultiplier: 0.25
+    scaleMultiplier: 1/100
   )
-  
+
   static let longSharedPrefix = Workload(
     name: "LongSharedPrefix",
     payload: """
@@ -756,7 +779,7 @@
     🤔Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.🤔
     """.lines()
   )
-  
+
 }
 
 // Local Variables:
diff --git a/benchmark/single-source/StringComparison.swift.gyb b/benchmark/single-source/StringComparison.swift.gyb
index d833a92..f89d872 100644
--- a/benchmark/single-source/StringComparison.swift.gyb
+++ b/benchmark/single-source/StringComparison.swift.gyb
@@ -29,21 +29,30 @@
     return self.split(separator: "\n").map { String($0) }
   }
 }
+%{
+AllWorkloads = ["ascii", "latin1", "fastPrenormal", "slowerPrenormal",
+                "nonBMPSlowestPrenormal", "emoji", "abnormal", "zalgo",
+                "longSharedPrefix"]
+ComparisonWorkloads = AllWorkloads
+HashingWorkloads = AllWorkloads[:-1]
+NormalizedIteratorWorkloads = AllWorkloads[:-1]
 
-% AllWorkloads = ["ascii", "latin1", "fastPrenormal", "slowerPrenormal", "nonBMPSlowestPrenormal", "emoji", "abnormal", "zalgo", "longSharedPrefix"]
-% ComparisonWorkloads = AllWorkloads
-% HashingWorkloads = ["ascii", "latin1", "fastPrenormal", "slowerPrenormal", "nonBMPSlowestPrenormal", "emoji", "abnormal", "zalgo"]
+LegacyFactor = dict(abnormal=20, emoji=4, latin1=2, fastPrenormal=10,
+                    slowerPrenormal=10, nonBMPSlowestPrenormal=10, zalgo=25)
 
-
-% NormalizedIteratorWorkloads = ["ascii", "latin1", "fastPrenormal", "slowerPrenormal", "nonBMPSlowestPrenormal", "emoji", "abnormal", "zalgo"]
-
+def legacyFactor(name):
+  lf = LegacyFactor.get(name)
+  return (
+    ',\n\t\tlegacyFactor: {0}'.format(lf) if lf else
+    '')
+}%
 public let StringComparison: [BenchmarkInfo] = [
 % for Name in ComparisonWorkloads:
   BenchmarkInfo(
     name: "StringComparison_${Name}",
     runFunction: run_StringComparison_${Name},
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_${Name}) }
+    setUpFunction: { blackHole(Workload_${Name}) }${legacyFactor(Name)}
   ),
 % end # ComparisonWorkloads
 ]
@@ -54,7 +63,7 @@
     name: "StringHashing_${Name}",
     runFunction: run_StringHashing_${Name},
     tags: [.validation, .api, .String],
-    setUpFunction: { blackHole(Workload_${Name}) }
+    setUpFunction: { blackHole(Workload_${Name}) }${legacyFactor(Name)}
   ),
 % end # HashingWorkloads
 ]
@@ -65,7 +74,7 @@
     name: "NormalizedIterator_${Name}",
     runFunction: run_NormalizedIterator_${Name},
     tags: [.validation, .String],
-    setUpFunction: { blackHole(Workload_${Name}) }
+    setUpFunction: { blackHole(Workload_${Name}) }${legacyFactor(Name)}
   ),
 % end # NormalizedIteratorWorkloads
 ]
@@ -212,7 +221,8 @@
       óôõö÷øùúûüýþÿ
       123.456£=>¥
       123.456
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/2
   )
   static let fastPrenormal = Workload(
     name: "FastPrenormal",
@@ -233,7 +243,8 @@
       ʅʆʇʈʉʊʋʌʍʎʏʐʑʒʓʔʕʖʗʘʙʚʛʜʝʞʟʠʡʢʣʤʥʦʧʨʩʪʫʬʭʮʯʰ
       ʱʲʳʴʵʶʷʸʹʺʻʼʽʾʿˀˁ˂˃˄˅ˆˇˈˉˊˋˌˍˎˏːˑ˒˓˔˕˖˗˘˙˚˛˜˝˞˟ˠˡˢˣˤ˥˦
       ˧˨˩˪˫ˬ˭ˮ˯˰˱˲˳˴˵˶˷˸˹˺˻˼˽˾
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   static let slowerPrenormal = Workload(
     name: "SlowerPrenormal",
@@ -250,7 +261,8 @@
       в чащах юга жил-был цитрус
       \u{300c}\u{300e}今日は\u{3001}世界\u{3002}\u{300f}\u{300d}
       но фальшивый экземпляр
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   // static let slowestPrenormal = """
   //   """.lines()
@@ -268,7 +280,8 @@
       𓃘𓃙𓃚𓃛𓃠𓃡𓃢𓃣𓃦𓃧𓃨𓃩𓃬𓃭𓃮𓃯𓃰𓃲𓃳𓃴𓃵𓃶𓃷
       𓀀𓀁𓀂𓀃𓀄𓆇𓆈𓆉𓆊𓆋𓆌𓆍𓆎𓆏𓆐𓆑𓆒𓆓𓆔𓆗𓆘𓆙𓆚𓆛𓆝𓆞𓆟𓆠𓆡𓆢𓆣𓆤
       𓆥𓆦𓆧𓆨𓆩𓆪𓆫𓆬𓆭𓆮𓆯𓆰𓆱𓆲𓆳𓆴𓆵𓆶𓆷𓆸𓆹𓆺𓆻
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/10
   )
   static let emoji = Workload(
     name: "Emoji",
@@ -281,7 +294,8 @@
       😋🤑🤗🤓😎😒😏🤠🤡😞😔😟😕😖😣☹️🙁😫😩😤😠😑😐😶😡😯
       😦😧😮😱😳😵😲😨😰😢😥
       😪😓😭🤤😴🙄🤔🤥🤧🤢🤐😬😷🤒🤕😈💩👺👹👿👻💀☠️👽
-      """.lines()
+      """.lines(),
+      scaleMultiplier: 1/4
   )
 
   static let abnormal = Workload(
@@ -292,7 +306,8 @@
     \u{f900}\u{f901}\u{f902}\u{f903}\u{f904}\u{f905}\u{f906}\u{f907}\u{f908}\u{f909}\u{f90a}
     \u{f90b}\u{f90c}\u{f90d}\u{f90e}\u{f90f}\u{f910}\u{f911}\u{f912}\u{f913}\u{f914}\u{f915}\u{f916}\u{f917}\u{f918}\u{f919}
     \u{f900}\u{f91a}\u{f91b}\u{f91c}\u{f91d}\u{f91e}\u{f91f}\u{f920}\u{f921}\u{f922}
-    """.lines()
+    """.lines(),
+    scaleMultiplier: 1/20
   )
   // static let pathological = """
   //   """.lines()
@@ -316,9 +331,9 @@
     ơ̗̘̙̜̹̺̻̼͇͈͉͍͎̽̾̿̀́͂̓̈́͆͊͋͌̚ͅ͏͓͔͕͖͙͚͐͑͒͗͛ͥͦͧͨͩͪͫͬͭͮ͘
     xͣͤͥͦͧͨͩͪͫͬͭͮ
     """.lines(),
-    scaleMultiplier: 0.25
+    scaleMultiplier: 1/100
   )
-  
+
   static let longSharedPrefix = Workload(
     name: "LongSharedPrefix",
     payload: """
@@ -333,7 +348,7 @@
     🤔Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.🤔
     """.lines()
   )
-  
+
 }
 
 // ${'Local Variables'}:
diff --git a/benchmark/single-source/StringEdits.swift b/benchmark/single-source/StringEdits.swift
index 23fc8bf..729bb58 100644
--- a/benchmark/single-source/StringEdits.swift
+++ b/benchmark/single-source/StringEdits.swift
@@ -20,7 +20,8 @@
 public let StringEdits = BenchmarkInfo(
   name: "StringEdits",
   runFunction: run_StringEdits,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 100)
 
 var editWords: [String] = [
   "woodshed",
@@ -34,13 +35,13 @@
   let splits = word.indices.map {
     (String(word[..<$0]), String(word[$0...]))
   }
-  
+
   var result: Array<String> = []
-  
+
   for (left, right) in splits {
     // drop a character
     result.append(left + right.dropFirst())
-    
+
     // transpose two characters
     if let fst = right.first {
       let drop1 = right.dropFirst()
@@ -48,28 +49,27 @@
         result.append(left + [snd,fst] + drop1.dropFirst())
       }
     }
-    
+
     // replace each character with another
     for letter in alphabet {
       result.append(left + [letter] + right.dropFirst())
     }
-    
+
     // insert rogue characters
     for letter in alphabet {
       result.append(left + [letter] + right)
     }
   }
-  
+
   // have to map back to strings right at the end
   return Set(result)
 }
 
 @inline(never)
 public func run_StringEdits(_ N: Int) {
-  for _ in 1...N*100 {
+  for _ in 1...N {
     for word in editWords {
-      _ = edits(word)      
+      _ = edits(word)
     }
   }
 }
-
diff --git a/benchmark/single-source/StringEnum.swift b/benchmark/single-source/StringEnum.swift
index 06031eb..90746df 100644
--- a/benchmark/single-source/StringEnum.swift
+++ b/benchmark/single-source/StringEnum.swift
@@ -15,7 +15,8 @@
 public let StringEnum = BenchmarkInfo(
   name: "StringEnumRawValueInitialization",
   runFunction: run_StringEnumRawValueInitialization,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 20)
 
 enum TestEnum : String {
   case c1 = "Swift"
@@ -216,11 +217,10 @@
   let short = "To"
   let long = "(C, C++, Objective-C)."
   let last = "code."
-  for _ in 1...2000*N {
+  for _ in 1...100*N {
     convert(first)
     convert(short)
     convert(long)
     convert(last)
   }
 }
-
diff --git a/benchmark/single-source/StringInterpolation.swift b/benchmark/single-source/StringInterpolation.swift
index ec179a2..0596c03 100644
--- a/benchmark/single-source/StringInterpolation.swift
+++ b/benchmark/single-source/StringInterpolation.swift
@@ -15,15 +15,18 @@
 public let StringInterpolation = BenchmarkInfo(
   name: "StringInterpolation",
   runFunction: run_StringInterpolation,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 100)
 public let StringInterpolationSmall = BenchmarkInfo(
   name: "StringInterpolationSmall",
   runFunction: run_StringInterpolationSmall,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 10)
 public let StringInterpolationManySmallSegments = BenchmarkInfo(
   name: "StringInterpolationManySmallSegments",
   runFunction: run_StringInterpolationManySmallSegments,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 100)
 
 class RefTypePrintable : CustomStringConvertible {
   var description: String {
@@ -38,7 +41,7 @@
   let anInt: Int64 = 0x1234567812345678
   let aRefCountedObject = RefTypePrintable()
 
-  for _ in 1...100*N {
+  for _ in 1...N {
     var result = 0
     for _ in 1...reps {
       let s: String = getString(
@@ -61,7 +64,7 @@
   let refResult = reps
   let anInt: Int64 = 0x42
 
-  for _ in 1...100*N {
+  for _ in 1...10*N {
     var result = 0
     for _ in 1...reps {
       let s: String = getString(
@@ -95,7 +98,7 @@
   }
 
   let reps = 100
-  for _ in 1...100*N {
+  for _ in 1...N {
     for _ in 1...reps {
       blackHole("""
         \(getSegment(0)) \(getSegment(1))/\(getSegment(2))_\(getSegment(3))
diff --git a/benchmark/single-source/StringMatch.swift b/benchmark/single-source/StringMatch.swift
index ed833ec..d13591b 100644
--- a/benchmark/single-source/StringMatch.swift
+++ b/benchmark/single-source/StringMatch.swift
@@ -20,14 +20,15 @@
 public let StringMatch = BenchmarkInfo(
   name: "StringMatch",
   runFunction: run_StringMatch,
-  tags: [.validation, .api, .String])
+  tags: [.validation, .api, .String],
+  legacyFactor: 100)
 
 /* match: search for regexp anywhere in text */
 func match(regexp: String, text: String) -> Bool {
   if regexp.first == "^" {
     return matchHere(regexp.dropFirst(), text[...])
   }
-  
+
   var idx = text.startIndex
   while true {  // must look even if string is empty
     if matchHere(regexp[...], text[idx..<text.endIndex]) {
@@ -37,7 +38,7 @@
     // do while sufficed in the original C version...
     text.formIndex(after: &idx)
   } // while idx++ != string.endIndex
-  
+
   return false
 }
 
@@ -46,19 +47,19 @@
   if regexp.isEmpty {
     return true
   }
-  
+
   if let c = regexp.first, regexp.dropFirst().first == "*" {
     return matchStar(c, regexp.dropFirst(2), text)
   }
-  
+
   if regexp.first == "$" && regexp.dropFirst().isEmpty {
     return text.isEmpty
   }
-  
+
   if let tc = text.first, let rc = regexp.first, rc == "." || tc == rc {
     return matchHere(regexp.dropFirst(), text.dropFirst())
   }
-  
+
   return false
 }
 
@@ -87,10 +88,9 @@
 
 @inline(never)
 public func run_StringMatch(_ N: Int) {
-  for _ in 1...N*100 {
+  for _ in 1...N {
     for (regex, text) in tests {
       _ = match(regexp: regex,text: text)
     }
   }
 }
-
diff --git a/benchmark/single-source/StringTests.swift b/benchmark/single-source/StringTests.swift
index a4e2ff4..40321e7 100644
--- a/benchmark/single-source/StringTests.swift
+++ b/benchmark/single-source/StringTests.swift
@@ -12,11 +12,30 @@
 import TestsUtils
 
 public let StringTests = [
-  BenchmarkInfo(name: "StringEqualPointerComparison", runFunction: run_StringEqualPointerComparison, tags: [.validation, .api, .String]),
-  BenchmarkInfo(name: "StringHasPrefixAscii", runFunction: run_StringHasPrefixAscii, tags: [.validation, .api, .String]),
-  BenchmarkInfo(name: "StringHasPrefixUnicode", runFunction: run_StringHasPrefixUnicode, tags: [.validation, .api, .String]),
-  BenchmarkInfo(name: "StringHasSuffixAscii", runFunction: run_StringHasSuffixAscii, tags: [.validation, .api, .String]),
-  BenchmarkInfo(name: "StringHasSuffixUnicode", runFunction: run_StringHasSuffixUnicode, tags: [.validation, .api, .String]),
+  BenchmarkInfo(
+    name: "StringEqualPointerComparison",
+    runFunction: run_StringEqualPointerComparison,
+    tags: [.validation, .api, .String]),
+  BenchmarkInfo(
+    name: "StringHasPrefixAscii",
+    runFunction: run_StringHasPrefixAscii,
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
+  BenchmarkInfo(
+    name: "StringHasPrefixUnicode",
+    runFunction: run_StringHasPrefixUnicode,
+    tags: [.validation, .api, .String],
+    legacyFactor: 1000),
+  BenchmarkInfo(
+    name: "StringHasSuffixAscii",
+    runFunction: run_StringHasSuffixAscii,
+    tags: [.validation, .api, .String],
+    legacyFactor: 10),
+  BenchmarkInfo(
+    name: "StringHasSuffixUnicode",
+    runFunction: run_StringHasSuffixUnicode,
+    tags: [.validation, .api, .String],
+    legacyFactor: 1000),
 ]
 
 // FIXME(string)
@@ -25,7 +44,7 @@
   let prefix = "prefix"
   let testString = "prefixedString"
   for _ in 0 ..< N {
-    for _ in 0 ..< 100_000 {
+    for _ in 0 ..< 10_000 {
       CheckResults(testString.hasPrefix(getString(prefix)))
     }
   }
@@ -38,7 +57,7 @@
   let suffix = "Suffixed"
   let testString = "StringSuffixed"
   for _ in 0 ..< N {
-    for _ in 0 ..< 100_000 {
+    for _ in 0 ..< 10_000 {
       CheckResults(testString.hasSuffix(getString(suffix)))
     }
   }
@@ -51,7 +70,7 @@
   let prefix = "❄️prefix"
   let testString = "❄️prefixedString"
   for _ in 0 ..< N {
-    for _ in 0 ..< 100_000 {
+    for _ in 0 ..< 100 {
       CheckResults(testString.hasPrefix(getString(prefix)))
     }
   }
@@ -64,7 +83,7 @@
   let suffix = "❄️Suffixed"
   let testString = "String❄️Suffixed"
   for _ in 0 ..< N {
-    for _ in 0 ..< 100_000 {
+    for _ in 0 ..< 100 {
       CheckResults(testString.hasSuffix(getString(suffix)))
     }
   }
diff --git a/benchmark/single-source/StringWalk.swift b/benchmark/single-source/StringWalk.swift
index 8e46600..3bcd8e1 100644
--- a/benchmark/single-source/StringWalk.swift
+++ b/benchmark/single-source/StringWalk.swift
@@ -84,7 +84,7 @@
 }
 
 // Extended String benchmarks:
-let baseMultiplier = 10_000
+let baseMultiplier = 250
 let unicodeScalarsMultiplier = baseMultiplier
 let charactersMultiplier = baseMultiplier / 5
 
@@ -95,404 +95,477 @@
   BenchmarkInfo(
     name: "StringWalk",
     runFunction: run_StringWalk,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_ascii_unicodeScalars",
     runFunction: run_StringWalk_ascii_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_ascii_characters",
     runFunction: run_StringWalk_ascii_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_ascii_unicodeScalars",
     runFunction: run_CharIteration_ascii_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_ascii_unicodeScalars",
     runFunction: run_CharIndexing_ascii_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_ascii_unicodeScalars_Backwards",
     runFunction: run_StringWalk_ascii_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_ascii_characters_Backwards",
     runFunction: run_StringWalk_ascii_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_ascii_unicodeScalars_Backwards",
     runFunction: run_CharIteration_ascii_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_ascii_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_ascii_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_utf16_unicodeScalars",
     runFunction: run_StringWalk_utf16_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_utf16_characters",
     runFunction: run_StringWalk_utf16_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_utf16_unicodeScalars",
     runFunction: run_CharIteration_utf16_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_utf16_unicodeScalars",
     runFunction: run_CharIndexing_utf16_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_utf16_unicodeScalars_Backwards",
     runFunction: run_StringWalk_utf16_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_utf16_characters_Backwards",
     runFunction: run_StringWalk_utf16_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_utf16_unicodeScalars_Backwards",
     runFunction: run_CharIteration_utf16_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_utf16_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_utf16_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_tweet_unicodeScalars",
     runFunction: run_StringWalk_tweet_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_tweet_characters",
     runFunction: run_StringWalk_tweet_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_tweet_unicodeScalars",
     runFunction: run_CharIteration_tweet_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_tweet_unicodeScalars",
     runFunction: run_CharIndexing_tweet_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_tweet_unicodeScalars_Backwards",
     runFunction: run_StringWalk_tweet_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_tweet_characters_Backwards",
     runFunction: run_StringWalk_tweet_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_tweet_unicodeScalars_Backwards",
     runFunction: run_CharIteration_tweet_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_tweet_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_tweet_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_japanese_unicodeScalars",
     runFunction: run_StringWalk_japanese_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_japanese_characters",
     runFunction: run_StringWalk_japanese_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_japanese_unicodeScalars",
     runFunction: run_CharIteration_japanese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_japanese_unicodeScalars",
     runFunction: run_CharIndexing_japanese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_japanese_unicodeScalars_Backwards",
     runFunction: run_StringWalk_japanese_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_japanese_characters_Backwards",
     runFunction: run_StringWalk_japanese_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_japanese_unicodeScalars_Backwards",
     runFunction: run_CharIteration_japanese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_japanese_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_japanese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_chinese_unicodeScalars",
     runFunction: run_StringWalk_chinese_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_chinese_characters",
     runFunction: run_StringWalk_chinese_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_chinese_unicodeScalars",
     runFunction: run_CharIteration_chinese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_chinese_unicodeScalars",
     runFunction: run_CharIndexing_chinese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_chinese_unicodeScalars_Backwards",
     runFunction: run_StringWalk_chinese_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_chinese_characters_Backwards",
     runFunction: run_StringWalk_chinese_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_chinese_unicodeScalars_Backwards",
     runFunction: run_CharIteration_chinese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_chinese_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_chinese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_korean_unicodeScalars",
     runFunction: run_StringWalk_korean_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_korean_characters",
     runFunction: run_StringWalk_korean_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_korean_unicodeScalars",
     runFunction: run_CharIteration_korean_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_korean_unicodeScalars",
     runFunction: run_CharIndexing_korean_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_korean_unicodeScalars_Backwards",
     runFunction: run_StringWalk_korean_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_korean_characters_Backwards",
     runFunction: run_StringWalk_korean_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_korean_unicodeScalars_Backwards",
     runFunction: run_CharIteration_korean_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_korean_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_korean_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_russian_unicodeScalars",
     runFunction: run_StringWalk_russian_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_russian_characters",
     runFunction: run_StringWalk_russian_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_russian_unicodeScalars",
     runFunction: run_CharIteration_russian_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_russian_unicodeScalars",
     runFunction: run_CharIndexing_russian_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_russian_unicodeScalars_Backwards",
     runFunction: run_StringWalk_russian_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_russian_characters_Backwards",
     runFunction: run_StringWalk_russian_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_russian_unicodeScalars_Backwards",
     runFunction: run_CharIteration_russian_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_russian_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_russian_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_punctuated_unicodeScalars",
     runFunction: run_StringWalk_punctuated_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_punctuated_characters",
     runFunction: run_StringWalk_punctuated_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_punctuated_unicodeScalars",
     runFunction: run_CharIteration_punctuated_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_punctuated_unicodeScalars",
     runFunction: run_CharIndexing_punctuated_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_punctuated_unicodeScalars_Backwards",
     runFunction: run_StringWalk_punctuated_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_punctuated_characters_Backwards",
     runFunction: run_StringWalk_punctuated_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_punctuated_unicodeScalars_Backwards",
     runFunction: run_CharIteration_punctuated_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_punctuated_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_punctuated_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_punctuatedJapanese_unicodeScalars",
     runFunction: run_StringWalk_punctuatedJapanese_unicodeScalars,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_punctuatedJapanese_characters",
     runFunction: run_StringWalk_punctuatedJapanese_characters,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_punctuatedJapanese_unicodeScalars",
     runFunction: run_CharIteration_punctuatedJapanese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_punctuatedJapanese_unicodeScalars",
     runFunction: run_CharIndexing_punctuatedJapanese_unicodeScalars,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "StringWalk_punctuatedJapanese_unicodeScalars_Backwards",
     runFunction: run_StringWalk_punctuatedJapanese_unicodeScalars_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "StringWalk_punctuatedJapanese_characters_Backwards",
     runFunction: run_StringWalk_punctuatedJapanese_characters_Backwards,
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 
   BenchmarkInfo(
     name: "CharIteration_punctuatedJapanese_unicodeScalars_Backwards",
     runFunction: run_CharIteration_punctuatedJapanese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_punctuatedJapanese_unicodeScalars_Backwards",
     runFunction: run_CharIndexing_punctuatedJapanese_unicodeScalars_Backwards,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 ]
 
 
diff --git a/benchmark/single-source/StringWalk.swift.gyb b/benchmark/single-source/StringWalk.swift.gyb
index bed81ca..4762459 100644
--- a/benchmark/single-source/StringWalk.swift.gyb
+++ b/benchmark/single-source/StringWalk.swift.gyb
@@ -85,7 +85,7 @@
 }
 
 // Extended String benchmarks:
-let baseMultiplier = 10_000
+let baseMultiplier = 250
 let unicodeScalarsMultiplier = baseMultiplier
 let charactersMultiplier = baseMultiplier / 5
 
@@ -99,7 +99,8 @@
   BenchmarkInfo(
     name: "StringWalk",
     runFunction: run_StringWalk,
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
 % for Name in Names:
 %   for Direction in Directions:
@@ -108,19 +109,22 @@
   BenchmarkInfo(
     name: "StringWalk_${Name}_${Kind}${Direction}",
     runFunction: run_StringWalk_${Name}_${Kind}${Direction},
-    tags: [.api, .String, .skip]),
+    tags: [.api, .String, .skip],
+    legacyFactor: 40),
 
 %     end # Kinds
 
   BenchmarkInfo(
     name: "CharIteration_${Name}_unicodeScalars${Direction}",
     runFunction: run_CharIteration_${Name}_unicodeScalars${Direction},
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 
   BenchmarkInfo(
     name: "CharIndexing_${Name}_unicodeScalars${Direction}",
     runFunction: run_CharIndexing_${Name}_unicodeScalars${Direction},
-    tags: [.validation, .api, .String]),
+    tags: [.validation, .api, .String],
+    legacyFactor: 40),
 %   end # Directions
 % end # Names
 ]
diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake
index b6b720b..a9165aa 100644
--- a/cmake/modules/AddSwift.cmake
+++ b/cmake/modules/AddSwift.cmake
@@ -307,6 +307,11 @@
       list(APPEND result "\"${CMAKE_INCLUDE_FLAG_C}${path}\"")
     endforeach()
     list(APPEND result "-D__ANDROID_API__=${SWIFT_ANDROID_API_LEVEL}")
+  elseif(CFLAGS_SDK STREQUAL WINDOWS)
+    swift_windows_include_for_arch(${CFLAGS_ARCH} ${CFLAGS_ARCH}_INCLUDE)
+    foreach(path ${${CFLAGS_ARCH}_INCLUDE})
+      list(APPEND result "\"${CMAKE_INCLUDE_FLAG_C}${path}\"")
+    endforeach()
   endif()
 
   set("${CFLAGS_RESULT_VAR_NAME}" "${result}" PARENT_SCOPE)
@@ -434,12 +439,14 @@
     # we need to add the math library, which is linked implicitly by libc++.
     list(APPEND result "-nostdlib++" "-lm")
     if("${LFLAGS_ARCH}" MATCHES armv7)
-      list(APPEND result "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a/libc++_shared.so")
+      set(android_libcxx_path "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a")
     elseif("${LFLAGS_ARCH}" MATCHES aarch64)
-      list(APPEND result "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so")
+      set(android_libcxx_path "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/arm64-v8a")
     else()
       message(SEND_ERROR "unknown architecture (${LFLAGS_ARCH}) for android")
     endif()
+    list(APPEND link_libraries "${android_libcxx_path}/libc++abi.a")
+    list(APPEND link_libraries "${android_libcxx_path}/libc++_shared.so")
     swift_android_lib_for_arch(${LFLAGS_ARCH} ${LFLAGS_ARCH}_LIB)
     foreach(path IN LISTS ${LFLAGS_ARCH}_LIB)
       list(APPEND library_search_directories ${path})
@@ -1273,7 +1280,7 @@
   # doing so will result in incorrect symbol resolution and linkage.  We created
   # import library targets when the library was added.  Use that to adjust the
   # link libraries.
-  if("${SWIFTLIB_SINGLE_SDK}" STREQUAL "WINDOWS")
+  if(SWIFTLIB_SINGLE_SDK STREQUAL WINDOWS AND NOT CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
     foreach(library_list LINK_LIBRARIES INTERFACE_LINK_LIBRARIES PRIVATE_LINK_LIBRARIES)
       set(import_libraries)
       foreach(library ${SWIFTLIB_SINGLE_${library_list}})
@@ -1283,7 +1290,7 @@
         # libraries are only associated with shared libraries, so add an
         # additional check for that as well.
         set(import_library ${library})
-        if(TARGET ${library} AND NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+        if(TARGET ${library})
           get_target_property(type ${library} TYPE)
           if(${type} STREQUAL "SHARED_LIBRARY")
             set(import_library ${library}_IMPLIB)
@@ -2322,26 +2329,26 @@
       "${ADDSWIFTHOSTTOOL_multiple_parameter_options}" # multi-value args
       ${ARGN})
 
+  precondition(ADDSWIFTHOSTTOOL_SWIFT_COMPONENT
+               MESSAGE "Swift Component is required to add a host tool")
+
   # Create the executable rule.
   add_swift_executable(
     ${executable} 
     ${ADDSWIFTHOSTTOOL_UNPARSED_ARGUMENTS}
   )
 
-  # And then create the install rule if we are asked to.
-  if (ADDSWIFTHOSTTOOL_SWIFT_COMPONENT)
-    swift_install_in_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
-      TARGETS ${executable}
-      RUNTIME DESTINATION bin)
+  swift_install_in_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
+    TARGETS ${executable}
+    RUNTIME DESTINATION bin)
 
-    swift_is_installing_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
-      is_installing)
-  
-    if(NOT is_installing)
-      set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable})
-    else()
-      set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${executable})
-    endif()
+  swift_is_installing_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
+    is_installing)
+
+  if(NOT is_installing)
+    set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable})
+  else()
+    set_property(GLOBAL APPEND PROPERTY SWIFT_EXPORTS ${executable})
   endif()
 endfunction()
 
diff --git a/cmake/modules/StandaloneOverlay.cmake b/cmake/modules/StandaloneOverlay.cmake
index 54b7b39..98f55ef 100644
--- a/cmake/modules/StandaloneOverlay.cmake
+++ b/cmake/modules/StandaloneOverlay.cmake
@@ -58,6 +58,10 @@
 precondition(SWIFT_HOST_VARIANT_SDK)
 precondition(TOOLCHAIN_DIR)
 
+# Some overlays include the runtime's headers,
+# and some of those headers are generated at build time.
+add_subdirectory("${SWIFT_SOURCE_DIR}/include" "swift/include")
+
 # Without this line, installing components is broken. This needs refactoring.
 swift_configure_components()
 
diff --git a/cmake/modules/SwiftConfigureSDK.cmake b/cmake/modules/SwiftConfigureSDK.cmake
index 21e47a6..f8a59d6 100644
--- a/cmake/modules/SwiftConfigureSDK.cmake
+++ b/cmake/modules/SwiftConfigureSDK.cmake
@@ -12,9 +12,9 @@
 function(_report_sdk prefix)
   message(STATUS "${SWIFT_SDK_${prefix}_NAME} SDK:")
   if("${prefix}" STREQUAL "WINDOWS")
-    message(STATUS "  UCRT Version: $ENV{UCRTVersion}")
-    message(STATUS "  UCRT SDK Dir: $ENV{UniversalCRTSdkDir}")
-    message(STATUS "  VC Dir: $ENV{VCToolsInstallDir}")
+    message(STATUS "  UCRT Version: ${UCRTVersion}")
+    message(STATUS "  UCRT SDK Dir: ${UniversalCRTSdkDir}")
+    message(STATUS "  VC Dir: ${VCToolsInstallDir}")
     if("${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
       message(STATUS "  ${CMAKE_BUILD_TYPE} VC++ CRT: MDd")
     else()
@@ -250,6 +250,8 @@
   # Note: this has to be implemented as a macro because it sets global
   # variables.
 
+  swift_windows_cache_VCVARS()
+
   string(TOUPPER ${name} prefix)
   string(TOLOWER ${name} platform)
 
@@ -274,10 +276,10 @@
     # NOTE(compnerd) workaround incorrectly extensioned import libraries from
     # the Windows SDK on case sensitive file systems.
     swift_windows_arch_spelling(${arch} WinSDKArchitecture)
-    set(WinSDK${arch}UMDir "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/um/${WinSDKArchitecture}")
+    set(WinSDK${arch}UMDir "${UniversalCRTSdkDir}/Lib/${UCRTVersion}/um/${WinSDKArchitecture}")
     set(OverlayDirectory "${CMAKE_BINARY_DIR}/winsdk_lib_${arch}_symlinks")
 
-    if(NOT EXISTS "$ENV{UniversalCRTSdkDir}/Include/$ENV{UCRTVersion}/um/WINDOWS.H")
+    if(NOT EXISTS "${UniversalCRTSdkDir}/Include/${UCRTVersion}/um/WINDOWS.H")
       file(MAKE_DIRECTORY ${OverlayDirectory})
 
       file(GLOB libraries RELATIVE "${WinSDK${arch}UMDir}" "${WinSDK${arch}UMDir}/*")
diff --git a/cmake/modules/SwiftWindowsSupport.cmake b/cmake/modules/SwiftWindowsSupport.cmake
index c0dd779..fb4ebb7 100644
--- a/cmake/modules/SwiftWindowsSupport.cmake
+++ b/cmake/modules/SwiftWindowsSupport.cmake
@@ -15,35 +15,16 @@
   endif()
 endfunction()
 
-function(swift_verify_windows_environment_variables)
-  set(VCToolsInstallDir $ENV{VCToolsInstallDir})
-  set(UniversalCRTSdkDir $ENV{UniversalCRTSdkDir})
-  set(UCRTVersion $ENV{UCRTVersion})
-
-  precondition(VCToolsInstallDir
-               MESSAGE
-                 "VCToolsInstallDir environment variable must be set")
-  precondition(UniversalCRTSdkDir
-               MESSAGE
-                 "UniversalCRTSdkDir environment variable must be set")
-  precondition(UCRTVersion
-               MESSAGE
-                 "UCRTVersion environment variable must be set")
-endfunction()
-
 function(swift_windows_include_for_arch arch var)
-  swift_verify_windows_environment_variables()
-
   set(paths
-        "$ENV{VCToolsInstallDir}/include"
-        "$ENV{UniversalCRTSdkDir}/Include/$ENV{UCRTVersion}/ucrt"
-        "$ENV{UniversalCRTSdkDir}/Include/$ENV{UCRTVersion}/shared"
-        "$ENV{UniversalCRTSdkDir}/Include/$ENV{UCRTVersion}/um")
+      "${VCToolsInstallDir}/include"
+      "${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt"
+      "${UniversalCRTSdkDir}/Include/${UCRTVersion}/shared"
+      "${UniversalCRTSdkDir}/Include/${UCRTVersion}/um")
   set(${var} ${paths} PARENT_SCOPE)
 endfunction()
 
 function(swift_windows_lib_for_arch arch var)
-  swift_verify_windows_environment_variables()
   swift_windows_arch_spelling(${arch} ARCH)
 
   set(paths)
@@ -51,29 +32,27 @@
   # NOTE(compnerd) provide compatibility with VS2015 which had the libraries in
   # a directory called "Lib" rather than VS2017 which normalizes the layout and
   # places them in a directory named "lib".
-  if(IS_DIRECTORY "$ENV{VCToolsInstallDir}/Lib")
+  if(IS_DIRECTORY "${VCToolsInstallDir}/Lib")
     if(${ARCH} STREQUAL x86)
-      list(APPEND paths "$ENV{VCToolsInstallDir}/Lib/")
+      list(APPEND paths "${VCToolsInstallDir}/Lib/")
     else()
-      list(APPEND paths "$ENV{VCToolsInstallDir}/Lib/${ARCH}")
+      list(APPEND paths "${VCToolsInstallDir}/Lib/${ARCH}")
     endif()
   else()
-    list(APPEND paths "$ENV{VCToolsInstallDir}/lib/${ARCH}")
+    list(APPEND paths "${VCToolsInstallDir}/lib/${ARCH}")
   endif()
 
   list(APPEND paths
-          "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/ucrt/${ARCH}"
-          "$ENV{UniversalCRTSdkDir}/Lib/$ENV{UCRTVersion}/um/${ARCH}")
+          "${UniversalCRTSdkDir}/Lib/${UCRTVersion}/ucrt/${ARCH}"
+          "${UniversalCRTSdkDir}/Lib/${UCRTVersion}/um/${ARCH}")
 
   set(${var} ${paths} PARENT_SCOPE)
 endfunction()
 
 function(swift_windows_generate_sdk_vfs_overlay flags)
-  swift_verify_windows_environment_variables()
-
-  get_filename_component(VCToolsInstallDir $ENV{VCToolsInstallDir} ABSOLUTE)
-  get_filename_component(UniversalCRTSdkDir $ENV{UniversalCRTSdkDir} ABSOLUTE)
-  set(UCRTVersion $ENV{UCRTVersion})
+  get_filename_component(VCToolsInstallDir ${VCToolsInstallDir} ABSOLUTE)
+  get_filename_component(UniversalCRTSdkDir ${UniversalCRTSdkDir} ABSOLUTE)
+  set(UCRTVersion ${UCRTVersion})
 
   # TODO(compnerd) use a target to avoid re-creating this file all the time
   configure_file("${SWIFT_SOURCE_DIR}/utils/WindowsSDKVFSOverlay.yaml.in"
@@ -85,3 +64,19 @@
       PARENT_SCOPE)
 endfunction()
 
+function(swift_verify_windows_VCVAR var)
+  if (NOT DEFINED "${var}" AND NOT DEFINED "ENV{${var}}")
+    message(FATAL_ERROR "${var} environment variable must be set")
+  endif()
+endfunction()
+
+function(swift_windows_cache_VCVARS)
+  swift_verify_windows_VCVAR(VCToolsInstallDir)
+  swift_verify_windows_VCVAR(UniversalCRTSdkDir)
+  swift_verify_windows_VCVAR(UCRTVersion)
+
+  set(VCToolsInstallDir $ENV{VCToolsInstallDir} CACHE STRING "")
+  set(UniversalCRTSdkDir $ENV{UniversalCRTSdkDir} CACHE STRING "")
+  set(UCRTVersion $ENV{UCRTVersion} CACHE STRING "")
+endfunction()
+
diff --git a/docs/ABI/Mangling.rst b/docs/ABI/Mangling.rst
index 1f44445..34bef31 100644
--- a/docs/ABI/Mangling.rst
+++ b/docs/ABI/Mangling.rst
@@ -633,7 +633,9 @@
 ::
 
   concrete-protocol-conformance ::= type protocol-conformance-ref any-protocol-conformance-list 'HC'
-  protocol-conformance-ref ::= protocol module?
+  protocol-conformance-ref ::= protocol 'HP'   // same module as conforming type
+  protocol-conformance-ref ::= protocol 'Hp'   // same module as protocol
+  protocol-conformance-ref ::= protocol module // "retroactive"
 
   any-protocol-conformance ::= concrete-protocol-conformance
   any-protocol-conformance ::= dependent-protocol-conformance
@@ -651,10 +653,13 @@
   dependent-associated-conformance ::= type protocol
 
 A compact representation used to represent mangled protocol conformance witness
-arguments at runtime. The ``module`` is only specified for conformances that are
-"retroactive", meaning that the context in which the conformance is defined is
-in neither the protocol or type module. The concrete protocol conformances that
-follow are for the conditional conformance requirements.
+arguments at runtime. The ``module`` is only specified for conformances that
+are "retroactive", meaning that the context in which the conformance is defined
+is in neither the protocol or type module. For a non-retroactive conformance
+where both the type *and* the protocol are in the same module, or for
+synthesized conformances that have no owning module, the "HP" operator is
+preferred. The concrete protocol conformances that follow are for the
+conditional conformance requirements.
 
 Dependent protocol conformances mangle the access path required to extract a
 protocol conformance from some conformance passed into the environment. The
diff --git a/docs/WindowsBuild.md b/docs/WindowsBuild.md
index 66bfc7c..762e690 100644
--- a/docs/WindowsBuild.md
+++ b/docs/WindowsBuild.md
@@ -58,12 +58,7 @@
 VsDevCmd -arch=x86
 ```
 
-- Then adapt the following command and run it. Make sure to use forward slashes 
-  (`/`) instead of backslashes (`\`) as the path separators. `clang` breaks 
-  with backslashed paths.
-```cmd
-set swift_source_dir=path-to-directory-containing-all-cloned-repositories
-```
+- We will use the assumption that the sources are on the `S` drive.  Replace it with the path to the checkout.  Make sure to use forward slashes (`/`) instead of backslashes (`\`) as the path separators. `clang` breaks with backslashed paths.
 
 - Decide whether you want to build a release or debug version of Swift on Windows and 
   replace the `CMAKE_BUILD_TYPE` parameter in the build steps below with the correct value 
@@ -72,17 +67,26 @@
 
 - Set up the `ucrt`, `visualc`, and `WinSDK` modules by copying  `ucrt.modulemap` located at
   `swift/stdlib/public/Platform/ucrt.modulemap` into
-  `${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap`, copying `visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap` into `${VCToolsInstallDir}/include` as `module.modulemap`, and copying `winsdk.modulemap` located at `swift/stdlib/public/Platform/winsdk.modulemap` into `${UniversalCRTSdkDir}/Include/10.0.107663/um`
+  `${UniversalCRTSdkDir}/Include/${UCRTVersion}/ucrt` as `module.modulemap`, copying `visualc.modulemap` located at `swift/stdlib/public/Platform/visualc.modulemap` into `${VCToolsInstallDir}/include` as `module.modulemap`, and copying `winsdk.modulemap` located at `swift/stdlib/public/Platform/winsdk.modulemap` into `${UniversalCRTSdkDir}/Include/${UCRTVersion}/um` and setup the `visualc.apinotes` located at `swift/stdlib/public/Platform/visualc.apinotes` into `${VCToolsInstallDir}/include` as `visualc.apinotes`
+
+```cmd
+cd %UniversalCRTSdkDir%\Include\%UCRTVersion%\ucrt
+mklink module.modulemap S:\swift\stdlib\public\Platform\ucrt.modulemap
+cd %VCToolsInstallDir%\include
+mklink module.modulemap S:\swift\stdlib\public\Platform\visualc.modulemap
+mklink visualc.apinotes S:\swift\stdlib\public\Platform\visualc.apinotes
+cd %UniversalCRTSdkDir\Include\%UCRTVersion%\um
+mklink module.modulemap S:\swift\stdlib\public\Platform\winsdk.modulemap
+```
 
 ### 5. Build CMark
 - This must be done from within a developer command prompt. CMark is a fairly
   small project and should only take a few minutes to build.
 ```cmd
-mkdir "%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64"
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64"
-cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug "%swift_source_dir%/cmark"
+mkdir S:/build/Ninja-DebugAssert/cmark-windows-amd64"
+pushd S:/build/Ninja-DebugAssert/cmark-windows-amd64" "S:/%swift_source_dir%/cmark"
 popd
-cmake --build "%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64/"
+cmake --build "S:/build/Ninja-DebugAssert/cmark-windows-amd64/"
 ```
 
 ### 6. Build LLVM/Clang
@@ -91,24 +95,22 @@
   type (e.g. `Debug`, `Release`, `RelWithDebInfoAssert`) for LLVM/Clang matches the
   build type for Swift.
 ```cmd
-mkdir "%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"
+mkdir "S:/build/Ninja-DebugAssert/llvm-windows-amd64"
+pushd "S:/build/Ninja-DebugAssert/llvm-windows-amd64"
 cmake -G "Ninja"^
  -DLLVM_ENABLE_ASSERTIONS=TRUE^
  -DCMAKE_BUILD_TYPE=Debug^
  -DLLVM_ENABLE_PROJECTS=clang^
  -DLLVM_TARGETS_TO_BUILD=X86^
  -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-windows-msvc^
- "%swift_source_dir%/llvm"
+ "S:/llvm"
 popd
-cmake --build "%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"
+cmake --build "S:/build/Ninja-DebugAssert/llvm-windows-amd64"
 ```
-- Store the LLVM `bin` directory in an environment variable so it can be used
-  to build Swift. Assuming you followed the instructions exactly, the path
-  below is correct, but it may be different based on your build variant and
-  platform, so double check.
+
+- If you intend to build any libraries, update your path to include the LLVM tools.
 ```cmd
-set llvm_bin_dir="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64/bin"
+set PATH=%PATH%;S:\build\Ninja-DebugAssert\llvm-windows-amd64\bin
 ```
 
 ### 7. Build Swift
@@ -117,31 +119,31 @@
 - You may need to adjust the `SWIFT_WINDOWS_LIB_DIRECTORY` parameter depending on
   your target platform or Windows SDK version.
 ```cmd
-mkdir "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
+mkdir "S:/build/Ninja-DebugAssert/swift-windows-amd64"
+pushd "S:/build/Ninja-DebugAssert/swift-windows-amd64"
 cmake -G "Ninja"^
  -DCMAKE_BUILD_TYPE=Debug^
- -DCMAKE_C_COMPILER="%llvm_bin_dir%/clang-cl.exe"^
- -DCMAKE_CXX_COMPILER="%llvm_bin_dir%/clang-cl.exe"^
- -DSWIFT_PATH_TO_CMARK_SOURCE="%swift_source_dir%/cmark"^
+ -DCMAKE_C_COMPILER="S:/build/Ninja-DebugAssert/llvm-windows-amd64/clang-cl.exe"^
+ -DCMAKE_CXX_COMPILER="S:/build/Ninja-DebugAssert/llvm-windows-amd64/clang-cl.exe"^
+ -DSWIFT_PATH_TO_CMARK_SOURCE="S:/cmark"^
  -DCMAKE_CXX_FLAGS="-Wno-c++98-compat -Wno-c++98-compat-pedantic"^
  -DCMAKE_EXE_LINKER_FLAGS:STRING="/INCREMENTAL:NO"^
  -DCMAKE_SHARED_LINKER_FLAGS="/INCREMENTAL:NO"^
  -DSWIFT_INCLUDE_DOCS=NO^
- -DSWIFT_PATH_TO_LLVM_SOURCE="%swift_source_dir%/llvm"^
- -DSWIFT_PATH_TO_CLANG_SOURCE="%swift_source_dir%/clang"^
- -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE="%swift_source_dir%/swift-corelibs-libdispatch"^
- -DSWIFT_PATH_TO_LLVM_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
- -DSWIFT_PATH_TO_CLANG_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
- -DSWIFT_PATH_TO_CMARK_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64"^
- -DSWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE="%swift_source_dir%/icu/include"^
- -DSWIFT_WINDOWS_x86_64_ICU_UC="%swift_source_dir%/icu/lib64/icuuc.lib"^
- -DSWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE="%swift_source_dir%/icu/include"^
- -DSWIFT_WINDOWS_x86_64_ICU_I18N="%swift_source_dir%/icu/lib64/icuin.lib"^
+ -DSWIFT_PATH_TO_LLVM_SOURCE="S:/llvm"^
+ -DSWIFT_PATH_TO_CLANG_SOURCE="S:/clang"^
+ -DSWIFT_PATH_TO_LIBDISPATCH_SOURCE="S:/swift-corelibs-libdispatch"^
+ -DSWIFT_PATH_TO_LLVM_BUILD="S:/build/Ninja-DebugAssert/llvm-windows-amd64"^
+ -DSWIFT_PATH_TO_CLANG_BUILD="S:/build/Ninja-DebugAssert/llvm-windows-amd64"^
+ -DSWIFT_PATH_TO_CMARK_BUILD="S:/build/Ninja-DebugAssert/cmark-windows-amd64"^
+ -DSWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE="S:/icu/include"^
+ -DSWIFT_WINDOWS_x86_64_ICU_UC="S:/icu/lib64/icuuc.lib"^
+ -DSWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE="S:/icu/include"^
+ -DSWIFT_WINDOWS_x86_64_ICU_I18N="S:/icu/lib64/icuin.lib"^
  -DCMAKE_INSTALL_PREFIX="C:/Program Files (x86)/Swift"^
- "%swift_source_dir%/swift"
+ "S:/swift"
 popd
-cmake --build "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
+cmake --build "S:/build/Ninja-DebugAssert/swift-windows-amd64"
 ```
 
 - To create a Visual Studio project, you'll need to change the generator and,
@@ -161,30 +163,80 @@
 - This must be done from within a developer command prompt and could take hours
   depending on your system.
 ```cmd
-mkdir "%swift_source_dir%/build/Ninja-DebugAssert/lldb-windows-amd64"
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/lldb-windows-amd64"
-cmake -G "Ninja" "%swift_source_dir%/lldb"^
+mkdir "S:/build/Ninja-DebugAssert/lldb-windows-amd64"
+pushd "S:/build/Ninja-DebugAssert/lldb-windows-amd64"
+cmake -G "Ninja" "S:/lldb"^
   -DCMAKE_BUILD_TYPE=Debug^
-  -DLLDB_PATH_TO_CMARK_SOURCE="%swift_source_dir%/cmark"^
-  -DLLDB_PATH_TO_LLVM_SOURCE="%swift_source_dir%/llvm"^
-  -DLLDB_PATH_TO_CLANG_SOURCE="%swift_source_dir%/clang"^
-  -DLLDB_PATH_TO_SWIFT_SOURCE="%swift_source_dir%/swift"^
-  -DLLDB_PATH_TO_CMARK_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64"^
-  -DLLDB_PATH_TO_CLANG_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
-  -DLLDB_PATH_TO_LLVM_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
-  -DLLDB_PATH_TO_SWIFT_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"^
+  -DLLDB_PATH_TO_CMARK_SOURCE="S:/cmark"^
+  -DLLDB_PATH_TO_LLVM_SOURCE="S:/llvm"^
+  -DLLDB_PATH_TO_CLANG_SOURCE="S:/clang"^
+  -DLLDB_PATH_TO_SWIFT_SOURCE="S:/swift"^
+  -DLLDB_PATH_TO_CMARK_BUILD="S:/build/Ninja-DebugAssert/cmark-windows-amd64"^
+  -DLLDB_PATH_TO_CLANG_BUILD="S:/build/Ninja-DebugAssert/llvm-windows-amd64"^
+  -DLLDB_PATH_TO_LLVM_BUILD="S:/build/Ninja-DebugAssert/llvm-windows-amd64"^
+  -DLLDB_PATH_TO_SWIFT_BUILD="S:/build/Ninja-DebugAssert/swift-windows-amd64"^
   -DLLVM_ENABLE_ASSERTIONS=YES
 popd
-cmake --build "%swift_source_dir%/build/Ninja-RelWithDebInfoAssert/lldb-windows-amd64"
+cmake --build "S:/build/Ninja-DebugAssert/lldb-windows-amd64"
 ```
 
-### 9. Install Swift on Windows
+### 9. Running tests on Windows
+
+Running the testsuite on Windows has additional external dependencies.  You must have a subset of the GNUWin32 programs installed and available in your path.  The following packages are currently required:
+
+  1. coreutils
+  2. diffutils
+  3. grep
+  4. sed
+  
+```cmd
+ninja -C "S:/build/Ninja-DebugAssert/swift-windows-amd64" check-swift
+```
+
+### 10. Build swift-corelibs-libdispatch
+
+```cmd
+mkdir "S:/build/Ninja-DebugAssert/swift-corelibs-libdispatch-windows-amd64"
+pushd "S:/build/Ninja-DebugAssert/swift-corelibs-libdispatch-windows-amd64"
+cmake -G "Ninja"^
+  -DCMAKE_BUILD_TYPE=Debug^
+  -DCMAKE_C_COMPILER="S:/build/Ninja-DebugAssert/llvm-windows-amd64/bin/clang-cl.exe"^
+  -DCMAKE_CXX_COMPILER="S:/build/Ninja-DebugAssert/llvm-windows-amd64/bin/clang-cl.exe"^
+  -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-DebugAssert/swift-windows-amd64/bin/swiftc.exe"^
+  -DSwift_DIR="S:/build/Ninja-DebugAssert/swift-windows-amd64/lib/cmake/swift"^
+  -DENABLE_SWIFT=YES^
+  -DENABLE_TESTING=NO^
+  S:/swift-corelibs-libdispatch
+popd
+cmake --build
+```
+
+### 11. Build swift-corelibs-foundation
+
+```cmd
+mkdir "S:/build/Ninja-DebugAssert/swift-corelibs-foundation-windows-amd64"
+pushd "S:/build/Ninja-DebugAssert/swift-corelibs-foundation-windows-amd64"
+cmake -G "Ninja"^
+  -DCMAKE_BUILD_TYPE=Debug^
+  -DCMAKE_C_COMPILER="S:/build/Ninja-DebugAssert/llvm-windows-amd64/bin/clang-cl.exe"^
+  -DCMAKE_SWIFT_COMPILER="S:/build/Ninja-DebugAssert/swift-windows-amd64/bin/swiftc.exe"^
+  -DCURL_LIBRARY="S:/curl/builds/libcurl-VS15-x64-release-static-ipv6-sspi-winssl/lib/libcurl_a.lib"^
+  -DCURL_INCLUDE_DIR="S:/curl/builds/libcurl-VS15-x64-release-static-ipv6-sspi-winssl/include"^
+  -DICU_ROOT="S:/thirdparty/icu4c-63_1-Win64-MSVC2017"^
+  -DLIBXML2_LIBRARY="S:/libxml2/win32/bin.msvc/libxml2_a.lib"^
+  -DLIBXML2_INCLUDE_DIR="S:/libxml2/include"^
+  -DFOUNDATION_PATH_TO_LIBDISPATCH_SOURCE="S:/swift-corelibs-libdispatch"^
+  -DFOUNDATION_PATH_TO_LIBDISPATCH_BUILD="S:/build/Ninja-DebugAssert/swift-corelibs-libdispatch-windows-amd64"^
+   "S:/swift-corelibs-foundation"
+ cmake --build "S:/build/Ninja-DebugAssert/swift-corelibs-foundation-windows-amd64"
+
+```
+
+### 12. Install Swift on Windows
 
 - Run ninja install:
 ```cmd 
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
-ninja install
-popd
+ninja -C "S:/build/Ninja-DebugAssert/swift-windows-amd64" install
 ```
 - Add the Swift on Windows binaries path (`C:\Program Files (x86)\Swift\bin`)  to the 
   `Path` environment variable.
@@ -193,29 +245,4 @@
 
 ## MSVC
 
-Follow instructions 1-6 for `clang-cl`, but run the following instead to build Swift
-
-```cmd
-mkdir "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
-pushd "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
-cmake -G "Ninja"^
- -DCMAKE_BUILD_TYPE=Debug^
- -DSWIFT_PATH_TO_CMARK_SOURCE="%swift_source_dir%/cmark"^
- -DSWIFT_PATH_TO_CMARK_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64"^
- -DSWIFT_CMARK_LIBRARY_DIR="%swift_source_dir%/build/Ninja-DebugAssert/cmark-windows-amd64/src"^
- -DSWIFT_PATH_TO_LLVM_SOURCE="%swift_source_dir%/llvm"^
- -DSWIFT_PATH_TO_LLVM_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
- -DSWIFT_PATH_TO_CLANG_SOURCE="%swift_source_dir%/llvm/tools/clang"^
- -DSWIFT_PATH_TO_CLANG_BUILD="%swift_source_dir%/build/Ninja-DebugAssert/llvm-windows-amd64"^
- -DICU_WINDOWS_x86_64_UC_INCLUDE="%swift_source_dir%/icu/include"^
- -DICU_WINDOWS_x86_64_UC_LIBRARY="%swift_source_dir%/icu/lib64/icuuc.lib"^
- -DICU_WINDOWS_x86_64_I18N_INCLUDE="%swift_source_dir%/icu/include"^
- -DICU_WINDOWS_x86_64_I18N_LIBRARY="%swift_source_dir%/icu/lib64/icuin.lib"^
- -DSWIFT_INCLUDE_DOCS=FALSE^
- -DSWIFT_INCLUDE_TESTS=FALSE^
- -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY=FALSE^
- -DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER=FALSE^
-  "%swift_source_dir%/swift"
-popd
-cmake --build "%swift_source_dir%/build/Ninja-DebugAssert/swift-windows-amd64"
-```
+To use `cl` instead, just remove the `-DCMAKE_C_COMPILER` and `-DCMAKE_CXX_COMPILER` parameters to the `cmake` invocations.
diff --git a/include/swift/AST/DiagnosticsSema.def b/include/swift/AST/DiagnosticsSema.def
index f5f729d..1651bfb 100644
--- a/include/swift/AST/DiagnosticsSema.def
+++ b/include/swift/AST/DiagnosticsSema.def
@@ -1703,11 +1703,11 @@
       "matches a requirement in protocol %3",
       (DescriptiveDeclKind, DeclName, AccessLevel, DeclName))
 ERROR(witness_not_usable_from_inline,none,
-      "%0 %1 must be declared '@usableFromInline' because "
+      "%0 %1 must be declared '@usableFromInline' "
       "because it matches a requirement in protocol %2",
       (DescriptiveDeclKind, DeclName, DeclName))
 WARNING(witness_not_usable_from_inline_warn,none,
-        "%0 %1 should be declared '@usableFromInline' because "
+        "%0 %1 should be declared '@usableFromInline' "
         "because it matches a requirement in protocol %2",
         (DescriptiveDeclKind, DeclName, DeclName))
 ERROR(type_witness_objc_generic_parameter,none,
@@ -3442,6 +3442,8 @@
       "cannot create a single-element tuple with an element label", ())
 ERROR(tuple_ellipsis,none,
       "cannot create a variadic tuple", ())
+ERROR(enum_element_ellipsis,none,
+      "variadic enum cases are not supported", ())
 
 WARNING(implicitly_unwrapped_optional_in_illegal_position_interpreted_as_optional,none,
         "using '!' is not allowed here; treating this as '?' instead", ())
@@ -3884,6 +3886,10 @@
      "replaced function %0 could not be found", (DeclName))
 ERROR(dynamic_replacement_accessor_not_found, none,
       "replaced accessor for %0 could not be found", (DeclName))
+ERROR(dynamic_replacement_accessor_ambiguous, none,
+      "replaced accessor for %0 occurs in multiple places", (DeclName))
+NOTE(dynamic_replacement_accessor_ambiguous_candidate, none,
+      "candidate accessor found in module %0", (DeclName))
 ERROR(dynamic_replacement_function_of_type_not_found, none,
       "replaced function %0 of type %1 could not be found", (DeclName, Type))
 NOTE(dynamic_replacement_found_function_of_type, none,
@@ -4218,6 +4224,10 @@
 WARNING(override_nsobject_hashvalue,none,
         "override of 'NSObject.hashValue' is deprecated; "
         "override 'NSObject.hash' to get consistent hashing behavior", ())
+WARNING(hashvalue_implementation,none,
+        "'Hashable.hashValue' is deprecated as a protocol requirement; "
+        "conform type %0 to 'Hashable' by implementing 'hash(into:)' instead",
+        (Type))
 
 #ifndef DIAG_NO_UNDEF
 # if defined(DIAG)
diff --git a/include/swift/AST/KnownIdentifiers.def b/include/swift/AST/KnownIdentifiers.def
index 0808f93..5624a18 100644
--- a/include/swift/AST/KnownIdentifiers.def
+++ b/include/swift/AST/KnownIdentifiers.def
@@ -175,7 +175,6 @@
 IDENTIFIER_WITH_NAME(dollarInterpolation, "$interpolation")
 IDENTIFIER(arrayLiteral)
 IDENTIFIER(dictionaryLiteral)
-IDENTIFIER_(getBuiltinLogicValue)
 IDENTIFIER(className)
 
 IDENTIFIER_(ErrorType)
diff --git a/include/swift/AST/SILOptions.h b/include/swift/AST/SILOptions.h
index 42f7ab3..88296b4 100644
--- a/include/swift/AST/SILOptions.h
+++ b/include/swift/AST/SILOptions.h
@@ -114,9 +114,6 @@
   /// If set to true, compile with the SIL Ownership Model enabled.
   bool EnableSILOwnership = false;
 
-  /// When parsing SIL, assume unqualified ownership.
-  bool AssumeUnqualifiedOwnershipWhenParsing = false;
-
   /// Assume that code will be executed in a single-threaded environment.
   bool AssumeSingleThreaded = false;
 
diff --git a/include/swift/AST/Type.h b/include/swift/AST/Type.h
index 0d4c16a..8f7e3c4 100644
--- a/include/swift/AST/Type.h
+++ b/include/swift/AST/Type.h
@@ -647,7 +647,8 @@
   template<> struct DenseMapInfo<swift::CanType>
     : public DenseMapInfo<swift::Type> {
     static swift::CanType getEmptyKey() {
-      return swift::CanType(nullptr);
+      return swift::CanType(llvm::DenseMapInfo<swift::
+                              TypeBase*>::getEmptyKey());
     }
     static swift::CanType getTombstoneKey() {
       return swift::CanType(llvm::DenseMapInfo<swift::
diff --git a/include/swift/AST/Types.h b/include/swift/AST/Types.h
index cf5112f..055cb24 100644
--- a/include/swift/AST/Types.h
+++ b/include/swift/AST/Types.h
@@ -5346,6 +5346,7 @@
 
 inline bool CanType::isActuallyCanonicalOrNull() const {
   return getPointer() == nullptr ||
+         getPointer() == llvm::DenseMapInfo<TypeBase *>::getEmptyKey() ||
          getPointer() == llvm::DenseMapInfo<TypeBase *>::getTombstoneKey() ||
          getPointer()->isCanonical();
 }
diff --git a/include/swift/CMakeLists.txt b/include/swift/CMakeLists.txt
index 6580367..988af15 100644
--- a/include/swift/CMakeLists.txt
+++ b/include/swift/CMakeLists.txt
@@ -1,7 +1,13 @@
-configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
-               ESCAPE_QUOTES @ONLY)
-
-add_subdirectory(Option)
 add_subdirectory(Runtime)
-add_subdirectory(SwiftRemoteMirror)
-add_subdirectory(Syntax)
+
+if(SWIFT_BUILD_REMOTE_MIRROR)
+  add_subdirectory(SwiftRemoteMirror)
+endif()
+
+if(SWIFT_INCLUDE_TOOLS)
+  configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
+                ESCAPE_QUOTES @ONLY)
+  add_subdirectory(Option)
+  add_subdirectory(Syntax)
+endif()
+
diff --git a/include/swift/Demangling/DemangleNodes.def b/include/swift/Demangling/DemangleNodes.def
index 0255314..6adf033 100644
--- a/include/swift/Demangling/DemangleNodes.def
+++ b/include/swift/Demangling/DemangleNodes.def
@@ -156,7 +156,9 @@
 CONTEXT_NODE(Protocol)
 CONTEXT_NODE(ProtocolSymbolicReference)
 NODE(ProtocolConformance)
-NODE(ProtocolConformanceRef)
+NODE(ProtocolConformanceRefInTypeModule)
+NODE(ProtocolConformanceRefInProtocolModule)
+NODE(ProtocolConformanceRefInOtherModule)
 NODE(ProtocolDescriptor)
 NODE(ProtocolConformanceDescriptor)
 NODE(ProtocolList)
diff --git a/include/swift/Demangling/Demangler.h b/include/swift/Demangling/Demangler.h
index ea52235..9c3dbd0 100644
--- a/include/swift/Demangling/Demangler.h
+++ b/include/swift/Demangling/Demangler.h
@@ -458,7 +458,7 @@
   NodePointer getDependentGenericParamType(int depth, int index);
   NodePointer demangleGenericParamIndex();
   NodePointer popProtocolConformance();
-  NodePointer popProtocolConformanceRef();
+  NodePointer demangleRetroactiveProtocolConformanceRef();
   NodePointer popAnyProtocolConformance();
   NodePointer demangleConcreteProtocolConformance();
   NodePointer popDependentProtocolConformance();
diff --git a/include/swift/Driver/DependencyGraph.h b/include/swift/Driver/DependencyGraph.h
index 73da043..56c0e32 100644
--- a/include/swift/Driver/DependencyGraph.h
+++ b/include/swift/Driver/DependencyGraph.h
@@ -121,6 +121,7 @@
   llvm::StringMap<std::pair<std::vector<DependencyEntryTy>, DependencyMaskTy>> Dependencies;
 
   /// The set of marked nodes.
+
   llvm::SmallPtrSet<const void *, 16> Marked;
 
   /// A list of all external dependencies that cannot be resolved from just this
@@ -153,6 +154,8 @@
     (void)newlyInserted;
   }
 
+  /// See DependencyGraph::markTransitive.
+
   void markTransitive(SmallVectorImpl<const void *> &visited,
                       const void *node, MarkTracerImpl *tracer = nullptr);
   bool markIntransitive(const void *node) {
@@ -254,7 +257,7 @@
   /// Marks \p node and all nodes that depend on \p node, and places any nodes
   /// that get transitively marked into \p visited.
   ///
-  /// Nodes that have been previously marked are not included in \p newlyMarked,
+  /// Nodes that have been previously marked are not included in \p visited,
   /// nor are their successors traversed, <em>even if their "provides" set has
   /// been updated since it was marked.</em> (However, nodes that depend on the
   /// given \p node are always traversed.)
@@ -264,6 +267,14 @@
   ///
   /// If you want to see how each node gets added to \p visited, pass a local
   /// MarkTracer instance to \p tracer.
+  ///
+  /// Conservatively assumes that there exists a "cascading" edge into the
+  /// starting node. Therefore, mark the start. For each visited node, add it to
+  /// \p visited, and mark it if some incoming edge cascades. The start node is
+  /// NOT added to \p visited.
+  ///
+  /// The traversal routines use
+  /// \p visited to avoid endless recursion.
   template <unsigned N>
   void markTransitive(SmallVector<T, N> &visited, T node,
                       MarkTracer *tracer = nullptr) {
diff --git a/include/swift/Driver/Job.h b/include/swift/Driver/Job.h
index b4a8c4f..941d75a 100644
--- a/include/swift/Driver/Job.h
+++ b/include/swift/Driver/Job.h
@@ -230,9 +230,17 @@
 class Job {
 public:
   enum class Condition {
+    // There was no information about the previous build (i.e., an input map),
+    // or the map marked this Job as dirty or needing a cascading build.
+    // Be maximally conservative with dependencies.
     Always,
+    // The input changed, or this job was scheduled as non-cascading in the last
+    // build but didn't get to run.
     RunWithoutCascading,
+    // The best case: input didn't change, output exists.
+    // Only run if it depends on some other thing that changed.
     CheckDependencies,
+    // Run no matter what (but may or may not cascade).
     NewlyAdded
   };
 
diff --git a/include/swift/IDE/Utils.h b/include/swift/IDE/Utils.h
index 37f3093..c16a1ff 100644
--- a/include/swift/IDE/Utils.h
+++ b/include/swift/IDE/Utils.h
@@ -598,6 +598,7 @@
 struct CallArgInfo {
   Expr *ArgExp;
   CharSourceRange LabelRange;
+  bool IsTrailingClosure;
   CharSourceRange getEntireCharRange(const SourceManager &SM) const;
 };
 
@@ -605,6 +606,8 @@
 getCallArgInfo(SourceManager &SM, Expr *Arg, LabelRangeEndAt EndKind);
 
 // Get the ranges of argument labels from an Arg, either tuple or paren.
+// This includes empty ranges for any unlabelled arguments, and excludes
+// trailing closures.
 std::vector<CharSourceRange>
 getCallArgLabelRanges(SourceManager &SM, Expr *Arg, LabelRangeEndAt EndKind);
 
diff --git a/include/swift/Migrator/Migrator.h b/include/swift/Migrator/Migrator.h
index a43ef1a..8f88559 100644
--- a/include/swift/Migrator/Migrator.h
+++ b/include/swift/Migrator/Migrator.h
@@ -31,6 +31,11 @@
 bool updateCodeAndEmitRemapIfNeeded(CompilerInstance *Instance,
                                     const CompilerInvocation &Invocation);
 
+/// Specify options when running syntactic migration pass.
+struct SyntacticPassOptions {
+  bool RunOptionalTryMigration = false;
+};
+
 struct Migrator {
   CompilerInstance *StartInstance;
   const CompilerInvocation &StartInvocation;
@@ -69,7 +74,7 @@
   /// Returns true if failed:
   ///   - Setting up the Swift CompilerInstance failed.
   ///   - performSema emitted fatal errors along the way.
-  bool performSyntacticPasses();
+  bool performSyntacticPasses(SyntacticPassOptions Opts);
 
   /// Emit a replacement map from the very start state's output text to the
   /// final state's output text to the StartInvocation's output file.
diff --git a/include/swift/Option/FrontendOptions.td b/include/swift/Option/FrontendOptions.td
index 5a6eeae..9c6ebd4 100644
--- a/include/swift/Option/FrontendOptions.td
+++ b/include/swift/Option/FrontendOptions.td
@@ -310,9 +310,6 @@
 def enable_mandatory_semantic_arc_opts : Flag<["-"], "enable-mandatory-semantic-arc-opts">,
   HelpText<"Enable the mandatory semantic arc optimizer">;
 
-def assume_parsing_unqualified_ownership_sil : Flag<["-"], "assume-parsing-unqualified-ownership-sil">,
-  HelpText<"Assume unqualified SIL ownership when parsing SIL">;
-
 def suppress_static_exclusivity_swap : Flag<["-"], "suppress-static-exclusivity-swap">,
   HelpText<"Suppress static violations of exclusive access with swap()">;
 
diff --git a/include/swift/Runtime/CMakeConfig.h.in b/include/swift/Runtime/CMakeConfig.h.in
index 4d9ab7d..5a19acb 100644
--- a/include/swift/Runtime/CMakeConfig.h.in
+++ b/include/swift/Runtime/CMakeConfig.h.in
@@ -2,6 +2,7 @@
 // See https://cmake.org/cmake/help/v3.0/command/configure_file.html.
 
 #ifndef SWIFT_RUNTIME_CMAKECONFIG_H
+#define SWIFT_RUNTIME_CMAKECONFIG_H
 
 #cmakedefine01 SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
 
diff --git a/include/swift/SIL/AccessedStorage.def b/include/swift/SIL/AccessedStorage.def
new file mode 100644
index 0000000..ef8fb95
--- /dev/null
+++ b/include/swift/SIL/AccessedStorage.def
@@ -0,0 +1,39 @@
+//===--- AccessedStorage.def ----------------------------*- c++ -*---------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+///
+/// A file used for metaprogramming with accessed storage. Used to enable
+/// easily updateable visitors.
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef ACCESSED_STORAGE
+#error "Must define accesed storage before including this?!"
+#endif
+
+#ifndef ACCESSED_STORAGE_RANGE
+#define ACCESSED_STORAGE_RANGE(Name, Start, End)
+#endif
+
+ACCESSED_STORAGE(Box)
+ACCESSED_STORAGE(Stack)
+ACCESSED_STORAGE(Global)
+ACCESSED_STORAGE(Class)
+ACCESSED_STORAGE(Argument)
+ACCESSED_STORAGE(Yield)
+ACCESSED_STORAGE(Nested)
+ACCESSED_STORAGE(Unidentified)
+ACCESSED_STORAGE_RANGE(AccessedStorageKind, Box, Unidentified)
+
+#undef ACCESSED_STORAGE_RANGE
+#undef ACCESSED_STORAGE
diff --git a/include/swift/SIL/MemAccessUtils.h b/include/swift/SIL/MemAccessUtils.h
index 8878cf8..5765a68 100644
--- a/include/swift/SIL/MemAccessUtils.h
+++ b/include/swift/SIL/MemAccessUtils.h
@@ -106,15 +106,11 @@
   /// Enumerate over all valid begin_access bases. Clients can use a covered
   /// switch to warn if findAccessedAddressBase ever adds a case.
   enum Kind : uint8_t {
-    Box,
-    Stack,
-    Global,
-    Class,
-    Argument,
-    Yield,
-    Nested,
-    Unidentified,
-    NumKindBits = countBitsUsed(static_cast<unsigned>(Unidentified))
+#define ACCESSED_STORAGE(Name) Name,
+#define ACCESSED_STORAGE_RANGE(Name, Start, End)                               \
+  First_##Name = Start, Last_##Name = End,
+#include "swift/SIL/AccessedStorage.def"
+    NumKindBits = countBitsUsed(unsigned(Last_AccessedStorageKind))
   };
 
   static const char *getKindName(Kind k);
@@ -339,6 +335,26 @@
     return LHS.getObjectProjection() == RHS.getObjectProjection();
   }
 }
+
+template <class ImplTy, class ResultTy = void, typename... ArgTys>
+class AccessedStorageVisitor {
+  ImplTy &asImpl() { return static_cast<ImplTy &>(*this); }
+
+public:
+#define ACCESSED_STORAGE(Name)                                                 \
+  ResultTy visit##Name(const AccessedStorage &storage, ArgTys &&... args);
+#include "swift/SIL/AccessedStorage.def"
+
+  ResultTy visit(const AccessedStorage &storage, ArgTys &&... args) {
+    switch (storage.getKind()) {
+#define ACCESSED_STORAGE(Name)                                                 \
+  case AccessedStorage::Name:                                                  \
+    return asImpl().visit##Name(storage, std::forward<ArgTys>(args)...);
+#include "swift/SIL/AccessedStorage.def"
+    }
+  }
+};
+
 } // end namespace swift
 
 namespace llvm {
diff --git a/include/swift/SIL/SILBuilder.h b/include/swift/SIL/SILBuilder.h
index cbeed6c..8ee68cf 100644
--- a/include/swift/SIL/SILBuilder.h
+++ b/include/swift/SIL/SILBuilder.h
@@ -67,17 +67,6 @@
   /// only by SILGen or SIL deserializers.
   SILOpenedArchetypesTracker *OpenedArchetypesTracker = nullptr;
 
-  /// True if this SILBuilder is being used for parsing.
-  ///
-  /// This is important since in such a case, we want to not perform any
-  /// Ownership Verification in SILBuilder. This functionality is very useful
-  /// for determining if qualified or unqualified instructions are being created
-  /// in appropriate places, but prevents us from inferring ownership
-  /// qualification of functions when parsing. The ability to perform this
-  /// inference is important since otherwise, we would need to update all SIL
-  /// test cases while bringing up SIL ownership.
-  bool isParsing = false;
-
 public:
   explicit SILBuilderContext(
       SILModule &M, SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0)
@@ -130,10 +119,6 @@
   /// can store the SILGlobalVariable here as well.
   SILFunction *F;
 
-  /// If the current block that we are inserting into must assume that
-  /// the current context we are in has ownership.
-  bool hasOwnership;
-
   /// If this is non-null, the instruction is inserted in the specified
   /// basic block, at the specified InsertPt.  If null, created instructions
   /// are not auto-inserted.
@@ -143,21 +128,17 @@
   Optional<SILLocation> CurDebugLocOverride = None;
 
 public:
-  explicit SILBuilder(SILFunction &F, bool isParsing = false)
-      : TempContext(F.getModule()), C(TempContext), F(&F),
-        hasOwnership(F.hasQualifiedOwnership()), BB(0) {
-    C.isParsing = isParsing;
-  }
+  explicit SILBuilder(SILFunction &F)
+      : TempContext(F.getModule()), C(TempContext), F(&F), BB(nullptr) {}
 
   SILBuilder(SILFunction &F, SmallVectorImpl<SILInstruction *> *InsertedInstrs)
       : TempContext(F.getModule(), InsertedInstrs), C(TempContext), F(&F),
-        hasOwnership(F.hasQualifiedOwnership()), BB(0) {}
+        BB(nullptr) {}
 
   explicit SILBuilder(SILInstruction *I,
                       SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0)
       : TempContext(I->getFunction()->getModule(), InsertedInstrs),
-        C(TempContext), F(I->getFunction()),
-        hasOwnership(F->hasQualifiedOwnership()) {
+        C(TempContext), F(I->getFunction()) {
     setInsertionPoint(I);
   }
 
@@ -168,8 +149,7 @@
   explicit SILBuilder(SILBasicBlock *BB,
                       SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0)
       : TempContext(BB->getParent()->getModule(), InsertedInstrs),
-        C(TempContext), F(BB->getParent()),
-        hasOwnership(F->hasQualifiedOwnership()) {
+        C(TempContext), F(BB->getParent()) {
     setInsertionPoint(BB);
   }
 
@@ -179,8 +159,7 @@
   SILBuilder(SILBasicBlock *BB, SILBasicBlock::iterator InsertPt,
              SmallVectorImpl<SILInstruction *> *InsertedInstrs = 0)
       : TempContext(BB->getParent()->getModule(), InsertedInstrs),
-        C(TempContext), F(BB->getParent()),
-        hasOwnership(F->hasQualifiedOwnership()) {
+        C(TempContext), F(BB->getParent()) {
     setInsertionPoint(BB, InsertPt);
   }
 
@@ -189,8 +168,7 @@
   ///
   /// SILBuilderContext must outlive this SILBuilder instance.
   SILBuilder(SILInstruction *I, const SILDebugScope *DS, SILBuilderContext &C)
-      : TempContext(C.getModule()), C(C), F(I->getFunction()),
-        hasOwnership(F->hasQualifiedOwnership()) {
+      : TempContext(C.getModule()), C(C), F(I->getFunction()) {
     assert(DS && "instruction has no debug scope");
     setCurrentDebugScope(DS);
     setInsertionPoint(I);
@@ -201,8 +179,7 @@
   ///
   /// SILBuilderContext must outlive this SILBuilder instance.
   SILBuilder(SILBasicBlock *BB, const SILDebugScope *DS, SILBuilderContext &C)
-      : TempContext(C.getModule()), C(C), F(BB->getParent()),
-        hasOwnership(F->hasQualifiedOwnership()) {
+      : TempContext(C.getModule()), C(C), F(BB->getParent()) {
     assert(DS && "block has no debug scope");
     setCurrentDebugScope(DS);
     setInsertionPoint(BB);
@@ -260,15 +237,13 @@
     return SILDebugLocation(overriddenLoc, Scope);
   }
 
-  /// Allow for users to override has ownership if necessary.
-  ///
-  /// This is only used in the SILParser since it sets whether or not ownership
-  /// is qualified after the SILBuilder is constructed due to the usage of
-  /// AssumeUnqualifiedOwnershipWhenParsing.
-  ///
-  /// TODO: Once we start printing [ossa] on SILFunctions to indicate ownership
-  /// and get rid of this global option, this can go away.
-  void setHasOwnership(bool newHasOwnership) { hasOwnership = newHasOwnership; }
+  /// If we have a SILFunction, return SILFunction::hasOwnership(). If we have a
+  /// SILGlobalVariable, just return false.
+  bool hasOwnership() const {
+    if (F)
+      return F->hasOwnership();
+    return false;
+  }
 
   //===--------------------------------------------------------------------===//
   // Insertion Point Management
@@ -683,7 +658,7 @@
   LoadInst *createTrivialLoadOr(SILLocation Loc, SILValue LV,
                                 LoadOwnershipQualifier Qualifier,
                                 bool SupportUnqualifiedSIL = false) {
-    if (SupportUnqualifiedSIL && !getFunction().hasQualifiedOwnership()) {
+    if (SupportUnqualifiedSIL && !hasOwnership()) {
       assert(
           Qualifier != LoadOwnershipQualifier::Copy &&
           "In unqualified SIL, a copy must be done separately form the load");
@@ -699,11 +674,9 @@
   LoadInst *createLoad(SILLocation Loc, SILValue LV,
                        LoadOwnershipQualifier Qualifier) {
     assert((Qualifier != LoadOwnershipQualifier::Unqualified) ||
-           !getFunction().hasQualifiedOwnership() &&
-               "Unqualified inst in qualified function");
+           !hasOwnership() && "Unqualified inst in qualified function");
     assert((Qualifier == LoadOwnershipQualifier::Unqualified) ||
-           getFunction().hasQualifiedOwnership() &&
-               "Qualified inst in unqualified function");
+           hasOwnership() && "Qualified inst in unqualified function");
     assert(LV->getType().isLoadableOrOpaque(getModule()));
     return insert(new (getModule())
                       LoadInst(getSILDebugLocation(Loc), LV, Qualifier));
@@ -757,7 +730,7 @@
                                   SILValue DestAddr,
                                   StoreOwnershipQualifier Qualifier,
                                   bool SupportUnqualifiedSIL = false) {
-    if (SupportUnqualifiedSIL && !getFunction().hasQualifiedOwnership()) {
+    if (SupportUnqualifiedSIL && !hasOwnership()) {
       assert(
           Qualifier != StoreOwnershipQualifier::Assign &&
           "In unqualified SIL, assigns must be represented via 2 instructions");
@@ -773,11 +746,9 @@
   StoreInst *createStore(SILLocation Loc, SILValue Src, SILValue DestAddr,
                          StoreOwnershipQualifier Qualifier) {
     assert((Qualifier != StoreOwnershipQualifier::Unqualified) ||
-           !getFunction().hasQualifiedOwnership() &&
-               "Unqualified inst in qualified function");
+           !hasOwnership() && "Unqualified inst in qualified function");
     assert((Qualifier == StoreOwnershipQualifier::Unqualified) ||
-           getFunction().hasQualifiedOwnership() &&
-               "Qualified inst in unqualified function");
+           hasOwnership() && "Qualified inst in unqualified function");
     return insert(new (getModule()) StoreInst(getSILDebugLocation(Loc), Src,
                                                 DestAddr, Qualifier));
   }
@@ -1128,7 +1099,7 @@
 
   RetainValueInst *createRetainValue(SILLocation Loc, SILValue operand,
                                      Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     assert(operand->getType().isLoadableOrOpaque(getModule()));
     return insert(new (getModule()) RetainValueInst(getSILDebugLocation(Loc),
                                                       operand, atomicity));
@@ -1136,14 +1107,14 @@
 
   RetainValueAddrInst *createRetainValueAddr(SILLocation Loc, SILValue operand,
                                              Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     return insert(new (getModule()) RetainValueAddrInst(
         getSILDebugLocation(Loc), operand, atomicity));
   }
 
   ReleaseValueInst *createReleaseValue(SILLocation Loc, SILValue operand,
                                        Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     assert(operand->getType().isLoadableOrOpaque(getModule()));
     return insert(new (getModule()) ReleaseValueInst(getSILDebugLocation(Loc),
                                                        operand, atomicity));
@@ -1152,7 +1123,7 @@
   ReleaseValueAddrInst *createReleaseValueAddr(SILLocation Loc,
                                                SILValue operand,
                                                Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     return insert(new (getModule()) ReleaseValueAddrInst(
         getSILDebugLocation(Loc), operand, atomicity));
   }
@@ -1160,7 +1131,7 @@
   UnmanagedRetainValueInst *createUnmanagedRetainValue(SILLocation Loc,
                                                        SILValue operand,
                                                        Atomicity atomicity) {
-    assert(getFunction().hasQualifiedOwnership());
+    assert(hasOwnership());
     assert(operand->getType().isLoadableOrOpaque(getModule()));
     return insert(new (getModule()) UnmanagedRetainValueInst(
         getSILDebugLocation(Loc), operand, atomicity));
@@ -1169,7 +1140,7 @@
   UnmanagedReleaseValueInst *createUnmanagedReleaseValue(SILLocation Loc,
                                                          SILValue operand,
                                                          Atomicity atomicity) {
-    assert(getFunction().hasQualifiedOwnership());
+    assert(hasOwnership());
     assert(operand->getType().isLoadableOrOpaque(getModule()));
     return insert(new (getModule()) UnmanagedReleaseValueInst(
         getSILDebugLocation(Loc), operand, atomicity));
@@ -1201,21 +1172,21 @@
                            unsigned NumBaseElements) {
     return insert(ObjectInst::create(getSILDebugLocation(Loc), Ty, Elements,
                                      NumBaseElements, getModule(),
-                                     hasOwnership));
+                                     hasOwnership()));
   }
 
   StructInst *createStruct(SILLocation Loc, SILType Ty,
                            ArrayRef<SILValue> Elements) {
     assert(Ty.isLoadableOrOpaque(getModule()));
     return insert(StructInst::create(getSILDebugLocation(Loc), Ty, Elements,
-                                     getModule(), hasOwnership));
+                                     getModule(), hasOwnership()));
   }
 
   TupleInst *createTuple(SILLocation Loc, SILType Ty,
                          ArrayRef<SILValue> Elements) {
     assert(Ty.isLoadableOrOpaque(getModule()));
     return insert(TupleInst::create(getSILDebugLocation(Loc), Ty, Elements,
-                                    getModule(), hasOwnership));
+                                    getModule(), hasOwnership()));
   }
 
   TupleInst *createTuple(SILLocation loc, ArrayRef<SILValue> elts);
@@ -1296,7 +1267,7 @@
     assert(Ty.isLoadableOrOpaque(getModule()));
     return insert(SelectEnumInst::create(
         getSILDebugLocation(Loc), Operand, Ty, DefaultValue, CaseValues,
-        getModule(), CaseCounts, DefaultCount, hasOwnership));
+        getModule(), CaseCounts, DefaultCount, hasOwnership()));
   }
 
   SelectEnumAddrInst *createSelectEnumAddr(
@@ -1314,7 +1285,7 @@
       ArrayRef<std::pair<SILValue, SILValue>> CaseValuesAndResults) {
     return insert(SelectValueInst::create(getSILDebugLocation(Loc), Operand, Ty,
                                           DefaultResult, CaseValuesAndResults,
-                                          getModule(), hasOwnership));
+                                          getModule(), hasOwnership()));
   }
 
   TupleExtractInst *createTupleExtract(SILLocation Loc, SILValue Operand,
@@ -1501,7 +1472,7 @@
   OpenExistentialRefInst *
   createOpenExistentialRef(SILLocation Loc, SILValue Operand, SILType Ty) {
     auto *I = insert(new (getModule()) OpenExistentialRefInst(
-        getSILDebugLocation(Loc), Operand, Ty, hasOwnership));
+        getSILDebugLocation(Loc), Operand, Ty, hasOwnership()));
     if (C.OpenedArchetypesTracker)
       C.OpenedArchetypesTracker->registerOpenedArchetypes(I);
     return I;
@@ -1637,13 +1608,13 @@
 
   StrongRetainInst *createStrongRetain(SILLocation Loc, SILValue Operand,
                                        Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     return insert(new (getModule()) StrongRetainInst(getSILDebugLocation(Loc),
                                                        Operand, atomicity));
   }
   StrongReleaseInst *createStrongRelease(SILLocation Loc, SILValue Operand,
                                          Atomicity atomicity) {
-    assert(C.isParsing || !getFunction().hasQualifiedOwnership());
+    assert(!hasOwnership());
     return insert(new (getModule()) StrongReleaseInst(
         getSILDebugLocation(Loc), Operand, atomicity));
   }
@@ -2080,7 +2051,7 @@
   /// lowering for the non-address value.
   void emitDestroyValueOperation(SILLocation Loc, SILValue v) {
     assert(!v->getType().isAddress());
-    if (F->hasQualifiedOwnership() &&
+    if (F->hasOwnership() &&
         v.getOwnershipKind() == ValueOwnershipKind::Any)
       return;
     auto &lowering = getTypeLowering(v->getType());
diff --git a/include/swift/SIL/SILConstants.h b/include/swift/SIL/SILConstants.h
index 1a431ac..a6c9a29 100644
--- a/include/swift/SIL/SILConstants.h
+++ b/include/swift/SIL/SILConstants.h
@@ -30,7 +30,9 @@
 
 struct APIntSymbolicValue;
 struct ArraySymbolicValue;
+struct DerivedAddressValue;
 struct EnumWithPayloadSymbolicValue;
+struct SymbolicValueMemoryObject;
 struct UnknownSymbolicValue;
 
 extern llvm::cl::opt<unsigned> ConstExprLimit;
@@ -69,6 +71,10 @@
 class SymbolicValue {
 private:
   enum RepresentationKind {
+    /// This value is an alloc stack that has not (yet) been initialized
+    /// by flow-sensitive analysis.
+    RK_UninitMemory,
+
     /// This symbolic value cannot be determined, carries multiple values
     /// (i.e., varies dynamically at the top level), or is of some type that
     /// we cannot analyze and propagate (e.g. NSObject).
@@ -92,6 +98,12 @@
     /// This value is a struct or tuple of constants.  This is tracked by the
     /// "aggregate" member of the value union.
     RK_Aggregate,
+
+    /// This represents the address of a memory object.
+    RK_DirectAddress,
+
+    /// This represents an index *into* a memory object.
+    RK_DerivedAddress,
   };
 
   union {
@@ -115,6 +127,14 @@
     /// When this SymbolicValue is of "Aggregate" kind, this pointer stores
     /// information about the array elements and count.
     const SymbolicValue *aggregate;
+
+    /// When the representationKind is "DirectAddress", this pointer is the
+    /// memory object referenced.
+    SymbolicValueMemoryObject *directAddress;
+
+    /// When this SymbolicValue is of "DerivedAddress" kind, this pointer stores
+    /// information about the memory object and access path of the access.
+    DerivedAddressValue *derivedAddress;
   } value;
 
   RepresentationKind representationKind : 8;
@@ -150,6 +170,13 @@
 
     /// This can be an array, struct, tuple, etc.
     Aggregate,
+
+    /// This value represents the address of, or into, a memory object.
+    Address,
+
+    /// These values are generally only seen internally to the system, external
+    /// clients shouldn't have to deal with them.
+    UninitMemory
   };
 
   /// For constant values, return the type classification of this value.
@@ -158,7 +185,7 @@
   /// Return true if this represents a constant value.
   bool isConstant() const {
     auto kind = getKind();
-    return kind != Unknown;
+    return kind != Unknown && kind != UninitMemory;
   }
 
   static SymbolicValue getUnknown(SILNode *node, UnknownReason reason,
@@ -177,6 +204,12 @@
   /// Return the reason an unknown result was generated.
   UnknownReason getUnknownReason() const;
 
+  static SymbolicValue getUninitMemory() {
+    SymbolicValue result;
+    result.representationKind = RK_UninitMemory;
+    return result;
+  }
+
   static SymbolicValue getMetatype(CanType type) {
     SymbolicValue result;
     result.representationKind = RK_Metatype;
@@ -216,6 +249,25 @@
 
   ArrayRef<SymbolicValue> getAggregateValue() const;
 
+  /// Return a symbolic value that represents the address of a memory object.
+  static SymbolicValue getAddress(SymbolicValueMemoryObject *memoryObject) {
+    SymbolicValue result;
+    result.representationKind = RK_DirectAddress;
+    result.value.directAddress = memoryObject;
+    return result;
+  }
+
+  /// Return a symbolic value that represents the address of a memory object
+  /// indexed by a path.
+  static SymbolicValue getAddress(SymbolicValueMemoryObject *memoryObject,
+                                  ArrayRef<unsigned> indices,
+                                  ASTContext &astContext);
+
+  /// Return the memory object of this reference along with any access path
+  /// indices involved.
+  SymbolicValueMemoryObject *
+  getAddressValue(SmallVectorImpl<unsigned> &accessPath) const;
+
   //===--------------------------------------------------------------------===//
   // Helpers
 
@@ -247,6 +299,29 @@
   return os;
 }
 
+/// This is a representation of a memory object referred to by an address.
+/// Memory objects may be mutated over their lifetime, but their overall type
+/// remains the same.
+struct SymbolicValueMemoryObject {
+  Type getType() const { return type; }
+
+  SymbolicValue getValue() const { return value; }
+  void setValue(SymbolicValue newValue) { value = newValue; }
+
+  /// Create a new memory object whose overall type is as specified.
+  static SymbolicValueMemoryObject *create(Type type, SymbolicValue value,
+                                           ASTContext &astContext);
+
+private:
+  const Type type;
+  SymbolicValue value;
+
+  SymbolicValueMemoryObject(Type type, SymbolicValue value)
+      : type(type), value(value) {}
+  SymbolicValueMemoryObject(const SymbolicValueMemoryObject &) = delete;
+  void operator=(const SymbolicValueMemoryObject &) = delete;
+};
+
 } // end namespace swift
 
 #endif
diff --git a/include/swift/SIL/SILFunction.h b/include/swift/SIL/SILFunction.h
index 47fcde4..89a6d0f 100644
--- a/include/swift/SIL/SILFunction.h
+++ b/include/swift/SIL/SILFunction.h
@@ -232,12 +232,13 @@
   /// *) It is a function referenced by the specialization information.
   bool Zombie = false;
 
-  /// True if SILOwnership is enabled for this function.
+  /// True if this function is in Ownership SSA form and thus must pass
+  /// ownership verification.
   ///
   /// This enables the verifier to easily prove that before the Ownership Model
   /// Eliminator runs on a function, we only see a non-semantic-arc world and
   /// after the pass runs, we only see a semantic-arc world.
-  bool HasQualifiedOwnership = true;
+  bool HasOwnership = true;
 
   /// Set if the function body was deserialized from canonical SIL. This implies
   /// that the function's home module performed SIL diagnostics prior to
@@ -423,12 +424,12 @@
   bool isZombie() const { return Zombie; }
 
   /// Returns true if this function has qualified ownership instructions in it.
-  bool hasQualifiedOwnership() const { return HasQualifiedOwnership; }
+  bool hasOwnership() const { return HasOwnership; }
 
-  /// Sets the HasQualifiedOwnership flag to false. This signals to SIL that no
+  /// Sets the HasOwnership flag to false. This signals to SIL that no
   /// ownership instructions should be in this function any more.
-  void setUnqualifiedOwnership() {
-    HasQualifiedOwnership = false;
+  void setOwnershipEliminated() {
+    HasOwnership = false;
   }
 
   /// Returns true if this function was deserialized from canonical
diff --git a/include/swift/SIL/SILModule.h b/include/swift/SIL/SILModule.h
index 97ede7c..edba967 100644
--- a/include/swift/SIL/SILModule.h
+++ b/include/swift/SIL/SILModule.h
@@ -570,11 +570,6 @@
   /// hierarchy of \p Class.
   SILFunction *lookUpFunctionInVTable(ClassDecl *Class, SILDeclRef Member);
 
-  // Given a protocol conformance, attempt to create a witness table declaration
-  // for it.
-  SILWitnessTable *
-  createWitnessTableDeclaration(ProtocolConformance *C, SILLinkage linkage);
-
   // Given a protocol, attempt to create a default witness table declaration
   // for it.
   SILDefaultWitnessTable *
diff --git a/include/swift/SILOptimizer/Utils/CastOptimizer.h b/include/swift/SILOptimizer/Utils/CastOptimizer.h
index c8d37ad..6384dd5 100644
--- a/include/swift/SILOptimizer/Utils/CastOptimizer.h
+++ b/include/swift/SILOptimizer/Utils/CastOptimizer.h
@@ -129,6 +129,10 @@
                                        SILValue Dest, CanType Source,
                                        CanType Target, SILBasicBlock *SuccessBB,
                                        SILBasicBlock *FailureBB);
+
+  SILInstruction *
+  optimizeMetatypeConversion(ConversionInst *MCI,
+                             MetatypeRepresentation Representation);
 };
 
 } // namespace swift
diff --git a/include/swift/SILOptimizer/Utils/Devirtualize.h b/include/swift/SILOptimizer/Utils/Devirtualize.h
index ee08fd8..c9d3e3c 100644
--- a/include/swift/SILOptimizer/Utils/Devirtualize.h
+++ b/include/swift/SILOptimizer/Utils/Devirtualize.h
@@ -48,6 +48,18 @@
                       SILModule &M,
                       ClassHierarchyAnalysis::ClassList &Subs);
 
+/// Given an apply instruction of a protocol requirement and a witness method
+/// for the requirement, compute a substitution suitable for a direct call
+/// to the witness method.
+///
+/// \p Module SILModule
+/// \p AI ApplySite that applies a procotol method
+/// \p F SILFunction with convention @convention(witness_method)
+/// \p CRef a concrete ProtocolConformanceRef
+SubstitutionMap getWitnessMethodSubstitutions(SILModule &Module, ApplySite AI,
+                                              SILFunction *F,
+                                              ProtocolConformanceRef CRef);
+
 /// Attempt to devirtualize the given apply site.  If this fails,
 /// the returned ApplySite will be null.
 ///
diff --git a/include/swift/Subsystems.h b/include/swift/Subsystems.h
index 872cb9d..41215b0 100644
--- a/include/swift/Subsystems.h
+++ b/include/swift/Subsystems.h
@@ -342,6 +342,8 @@
 
     ~ParserUnit();
 
+    void parse();
+
     Parser &getParser();
     SourceFile &getSourceFile();
     DiagnosticEngine &getDiagnosticEngine();
diff --git a/lib/AST/ASTMangler.cpp b/lib/AST/ASTMangler.cpp
index 8f6434c..114d38a 100644
--- a/lib/AST/ASTMangler.cpp
+++ b/lib/AST/ASTMangler.cpp
@@ -1105,6 +1105,24 @@
   }
 }
 
+static bool conformanceHasIdentity(const RootProtocolConformance *root) {
+  auto conformance = dyn_cast<NormalProtocolConformance>(root);
+  if (!conformance) {
+    assert(isa<SelfProtocolConformance>(root));
+    return true;
+  }
+
+  // Synthesized non-unique conformances all get collapsed together at run time.
+  if (conformance->isSynthesizedNonUnique())
+    return false;
+
+  // Objective-C protocol conformances are checked by the ObjC runtime.
+  if (conformance->getProtocol()->isObjC())
+    return false;
+
+  return true;
+}
+
 /// Determine whether the given protocol conformance is itself retroactive,
 /// meaning that there might be multiple conflicting conformances of the
 /// same type to the same protocol.
@@ -1115,20 +1133,7 @@
     return false; // self-conformances are never retroactive.
   }
 
-  /// Non-retroactive conformances are... never retroactive.
-  if (!conformance->isRetroactive())
-    return false;
-
-  /// Synthesized non-unique conformances all get collapsed together at run
-  /// time.
-  if (conformance->isSynthesizedNonUnique())
-    return false;
-
-  /// Objective-C protocol conformances don't have identity.
-  if (conformance->getProtocol()->isObjC())
-    return false;
-
-  return true;
+  return conformance->isRetroactive();
 }
 
 /// Determine whether the given protocol conformance contains a retroactive
@@ -1137,16 +1142,32 @@
                                       const ProtocolConformance *conformance,
                                       ModuleDecl *module) {
   // If the root conformance is retroactive, it's retroactive.
-  if (isRetroactiveConformance(conformance->getRootConformance()))
+  const RootProtocolConformance *rootConformance =
+      conformance->getRootConformance();
+  if (isRetroactiveConformance(rootConformance) &&
+      conformanceHasIdentity(rootConformance))
     return true;
 
-  // If any of the substitutions used to form this conformance are retroactive,
-  // it's retroactive.
+  // If the conformance is conditional and any of the substitutions used to
+  // satisfy the conditions are retroactive, it's retroactive.
   auto subMap = conformance->getSubstitutions(module);
-  for (auto conformance : subMap.getConformances()) {
-    if (conformance.isConcrete() &&
-        containsRetroactiveConformance(conformance.getConcrete(), module))
+  for (auto requirement : rootConformance->getConditionalRequirements()) {
+    if (requirement.getKind() != RequirementKind::Conformance)
+      continue;
+    ProtocolDecl *proto =
+        requirement.getSecondType()->castTo<ProtocolType>()->getDecl();
+    Optional<ProtocolConformanceRef> conformance =
+        subMap.lookupConformance(requirement.getFirstType()->getCanonicalType(),
+                                 proto);
+    if (!conformance) {
+      // This should only happen when mangling invalid ASTs, but that happens
+      // for indexing purposes.
+      continue;
+    }
+    if (conformance->isConcrete() &&
+        containsRetroactiveConformance(conformance->getConcrete(), module)) {
       return true;
+    }
   }
 
   return false;
@@ -2278,10 +2299,19 @@
   appendProtocolName(conformance->getProtocol());
 
   // For retroactive conformances, add a reference to the module in which the
-  // conformance resides. For @objc protocols, there is no point: conformances
-  // are global anyway.
-  if (isRetroactiveConformance(conformance))
+  // conformance resides. Otherwise, use an operator to indicate which known
+  // module it's associated with.
+  if (!conformanceHasIdentity(conformance)) {
+    // Same as "conformance module matches type", below.
+    appendOperator("HP");
+  } else if (isRetroactiveConformance(conformance)) {
     appendModule(conformance->getDeclContext()->getParentModule());
+  } else if (conformance->getDeclContext()->getParentModule() ==
+               conformance->getType()->getAnyNominal()->getParentModule()) {
+    appendOperator("HP");
+  } else {
+    appendOperator("Hp");
+  }
 }
 
 /// Retrieve the index of the conformance requirement indicated by the
diff --git a/lib/AST/ASTVerifier.cpp b/lib/AST/ASTVerifier.cpp
index 568607b..f7d7e06 100644
--- a/lib/AST/ASTVerifier.cpp
+++ b/lib/AST/ASTVerifier.cpp
@@ -996,7 +996,7 @@
       case StmtConditionElement::CK_Boolean: {
         auto *E = elt.getBoolean();
         if (shouldVerifyChecked(E))
-          checkSameType(E->getType(), BuiltinIntegerType::get(1, Ctx),
+          checkSameType(E->getType(), Ctx.getBoolDecl()->getDeclaredType(),
                         "condition type");
         break;
       }
@@ -2070,8 +2070,8 @@
       PrettyStackTraceExpr debugStack(Ctx, "verifying IfExpr", E);
 
       auto condTy = E->getCondExpr()->getType();
-      if (!condTy->isBuiltinIntegerType(1)) {
-        Out << "IfExpr condition is not an i1\n";
+      if (!condTy->isBool()) {
+        Out << "IfExpr condition is not Bool\n";
         abort();
       }
 
diff --git a/lib/AST/GenericSignature.cpp b/lib/AST/GenericSignature.cpp
index c1e71d0..255c350 100644
--- a/lib/AST/GenericSignature.cpp
+++ b/lib/AST/GenericSignature.cpp
@@ -14,6 +14,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "GenericSignatureBuilderImpl.h"
 #include "swift/AST/GenericSignature.h"
 #include "swift/AST/ASTContext.h"
 #include "swift/AST/GenericSignatureBuilder.h"
@@ -667,11 +668,17 @@
         !isa<DependentMemberType>(component))
       return None;
 
-    // Find the equivalence class for this dependent member type.
-    auto equivClass =
-      builder.resolveEquivalenceClass(
-                               Type(component),
-                               ArchetypeResolutionKind::CompleteWellFormed);
+    // Find the equivalence class for this dependent type.
+    auto resolved = builder.maybeResolveEquivalenceClass(
+                      Type(component),
+                      ArchetypeResolutionKind::CompleteWellFormed,
+                      /*wantExactPotentialArchetype=*/false);
+    if (!resolved) return None;
+
+    if (auto concrete = resolved.getAsConcreteType())
+      return getCanonicalTypeInContext(concrete, builder);
+
+    auto equivClass = resolved.getEquivalenceClass(builder);
     if (!equivClass) return None;
 
     if (equivClass->concreteType) {
diff --git a/lib/AST/GenericSignatureBuilder.cpp b/lib/AST/GenericSignatureBuilder.cpp
index 12b0155..67c70df 100644
--- a/lib/AST/GenericSignatureBuilder.cpp
+++ b/lib/AST/GenericSignatureBuilder.cpp
@@ -16,6 +16,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "GenericSignatureBuilderImpl.h"
 #include "swift/AST/GenericSignatureBuilder.h"
 #include "swift/AST/ASTContext.h"
 #include "swift/AST/DiagnosticsSema.h"
@@ -1856,96 +1857,6 @@
   }
 }
 
-class GenericSignatureBuilder::ResolvedType {
-  llvm::PointerUnion<PotentialArchetype *, Type> type;
-  EquivalenceClass *equivClass;
-
-  /// For a type that could not be resolved further unless the given
-  /// equivalence class changes.
-  ResolvedType(EquivalenceClass *equivClass)
-    : type(), equivClass(equivClass) { }
-
-public:
-  /// A specific resolved potential archetype.
-  ResolvedType(PotentialArchetype *pa)
-    : type(pa), equivClass(pa->getEquivalenceClassIfPresent()) { }
-
-  /// A resolved type within the given equivalence class.
-  ResolvedType(Type type, EquivalenceClass *equivClass)
-      : type(type), equivClass(equivClass) {
-    assert(type->isTypeParameter() == static_cast<bool>(equivClass) &&
-           "type parameters must have equivalence classes");
-  }
-
-  /// Return an unresolved result, which could be resolved when we
-  /// learn more information about the given equivalence class.
-  static ResolvedType forUnresolved(EquivalenceClass *equivClass) {
-    return ResolvedType(equivClass);
-  }
-
-  /// Return a result for a concrete type.
-  static ResolvedType forConcrete(Type concreteType) {
-    return ResolvedType(concreteType, nullptr);
-  }
-
-  /// Determine whether this result was resolved.
-  explicit operator bool() const { return !type.isNull(); }
-
-  /// Retrieve the dependent type.
-  Type getDependentType(GenericSignatureBuilder &builder) const;
-
-  /// Retrieve the concrete type, or a null type if this result doesn't store
-  /// a concrete type.
-  Type getAsConcreteType() const {
-    assert(*this && "Doesn't contain any result");
-    if (equivClass) return Type();
-    return type.dyn_cast<Type>();
-  }
-
-  /// Realize a potential archetype for this type parameter.
-  PotentialArchetype *realizePotentialArchetype(
-                                            GenericSignatureBuilder &builder);
-
-  /// Retrieve the potential archetype, if already known.
-  PotentialArchetype *getPotentialArchetypeIfKnown() const {
-    return type.dyn_cast<PotentialArchetype *>();
-  }
-
-  /// Retrieve the equivalence class into which a resolved type refers.
-  EquivalenceClass *getEquivalenceClass(
-                     GenericSignatureBuilder &builder) const {
-    assert(*this && "Only for resolved types");
-    if (equivClass) return equivClass;
-
-    // Create the equivalence class now.
-    return type.get<PotentialArchetype *>()
-             ->getOrCreateEquivalenceClass(builder);
-  }
-
-  /// Retrieve the equivalence class into which a resolved type refers.
-  EquivalenceClass *getEquivalenceClassIfPresent() const {
-    assert(*this && "Only for resolved types");
-    if (equivClass) return equivClass;
-
-    // Create the equivalence class now.
-    return type.get<PotentialArchetype *>()->getEquivalenceClassIfPresent();
-  }
-
-  /// Retrieve the unresolved result.
-  EquivalenceClass *getUnresolvedEquivClass() const {
-    assert(!*this);
-    return equivClass;
-  }
-
-  /// Return an unresolved type.
-  ///
-  /// This loses equivalence-class information that could be useful, which
-  /// is unfortunate.
-  UnresolvedType getUnresolvedType() const {
-    return type;
-  }
-};
-
 bool EquivalenceClass::recordConformanceConstraint(
                                  GenericSignatureBuilder &builder,
                                  ResolvedType type,
@@ -4888,8 +4799,12 @@
   auto T1 = OrigT1->getRepresentative();
   auto T2 = OrigT2->getRepresentative();
 
-  // Pick representative based on the canonical ordering of the type parameters.
-  if (compareDependentTypes(depType2, depType1) < 0) {
+  // Decide which potential archetype is to be considered the representative.
+  // We prefer potential archetypes with lower nesting depths, because it
+  // prevents us from unnecessarily building deeply nested potential archetypes.
+  unsigned nestingDepth1 = T1->getNestingDepth();
+  unsigned nestingDepth2 = T2->getNestingDepth();
+  if (nestingDepth2 < nestingDepth1) {
     std::swap(T1, T2);
     std::swap(OrigT1, OrigT2);
     std::swap(equivClass, equivClass2);
diff --git a/lib/AST/GenericSignatureBuilderImpl.h b/lib/AST/GenericSignatureBuilderImpl.h
new file mode 100644
index 0000000..88467f5
--- /dev/null
+++ b/lib/AST/GenericSignatureBuilderImpl.h
@@ -0,0 +1,107 @@
+//
+//  GenericSignatureBuilderImpl.h
+//  Swift
+//
+//  Created by Doug Gregor on 12/17/18.
+//
+
+#ifndef SWIFT_AST_GENERIC_SIGNATURE_BUILDER_IMPL_H
+#define SWIFT_AST_GENERIC_SIGNATURE_BUILDER_IMPL_H
+
+#include "swift/AST/GenericSignatureBuilder.h"
+
+namespace swift {
+
+class GenericSignatureBuilder::ResolvedType {
+  llvm::PointerUnion<PotentialArchetype *, Type> type;
+  EquivalenceClass *equivClass;
+
+  /// For a type that could not be resolved further unless the given
+  /// equivalence class changes.
+  ResolvedType(EquivalenceClass *equivClass)
+    : type(), equivClass(equivClass) { }
+
+public:
+  /// A specific resolved potential archetype.
+  ResolvedType(PotentialArchetype *pa)
+    : type(pa), equivClass(pa->getEquivalenceClassIfPresent()) { }
+
+  /// A resolved type within the given equivalence class.
+  ResolvedType(Type type, EquivalenceClass *equivClass)
+      : type(type), equivClass(equivClass) {
+    assert(type->isTypeParameter() == static_cast<bool>(equivClass) &&
+           "type parameters must have equivalence classes");
+  }
+
+  /// Return an unresolved result, which could be resolved when we
+  /// learn more information about the given equivalence class.
+  static ResolvedType forUnresolved(EquivalenceClass *equivClass) {
+    return ResolvedType(equivClass);
+  }
+
+  /// Return a result for a concrete type.
+  static ResolvedType forConcrete(Type concreteType) {
+    return ResolvedType(concreteType, nullptr);
+  }
+
+  /// Determine whether this result was resolved.
+  explicit operator bool() const { return !type.isNull(); }
+
+  /// Retrieve the dependent type.
+  Type getDependentType(GenericSignatureBuilder &builder) const;
+
+  /// Retrieve the concrete type, or a null type if this result doesn't store
+  /// a concrete type.
+  Type getAsConcreteType() const {
+    assert(*this && "Doesn't contain any result");
+    if (equivClass) return Type();
+    return type.dyn_cast<Type>();
+  }
+
+  /// Realize a potential archetype for this type parameter.
+  PotentialArchetype *realizePotentialArchetype(
+                                            GenericSignatureBuilder &builder);
+
+  /// Retrieve the potential archetype, if already known.
+  PotentialArchetype *getPotentialArchetypeIfKnown() const {
+    return type.dyn_cast<PotentialArchetype *>();
+  }
+
+  /// Retrieve the equivalence class into which a resolved type refers.
+  EquivalenceClass *getEquivalenceClass(
+                     GenericSignatureBuilder &builder) const {
+    assert(*this && "Only for resolved types");
+    if (equivClass) return equivClass;
+
+    // Create the equivalence class now.
+    return type.get<PotentialArchetype *>()
+             ->getOrCreateEquivalenceClass(builder);
+  }
+
+  /// Retrieve the equivalence class into which a resolved type refers.
+  EquivalenceClass *getEquivalenceClassIfPresent() const {
+    assert(*this && "Only for resolved types");
+    if (equivClass) return equivClass;
+
+    // Create the equivalence class now.
+    return type.get<PotentialArchetype *>()->getEquivalenceClassIfPresent();
+  }
+
+  /// Retrieve the unresolved result.
+  EquivalenceClass *getUnresolvedEquivClass() const {
+    assert(!*this);
+    return equivClass;
+  }
+
+  /// Return an unresolved type.
+  ///
+  /// This loses equivalence-class information that could be useful, which
+  /// is unfortunate.
+  UnresolvedType getUnresolvedType() const {
+    return type;
+  }
+};
+
+} // end namepsace swift
+
+#endif // SWIFT_AST_GENERIC_SIGNATURE_BUILDER_IMPL_H
diff --git a/lib/AST/NameLookup.cpp b/lib/AST/NameLookup.cpp
index 0313b28..cd39b2e 100644
--- a/lib/AST/NameLookup.cpp
+++ b/lib/AST/NameLookup.cpp
@@ -254,6 +254,24 @@
         break;
       }
 
+      // Prefer declarations in the any module over those in the standard
+      // library module.
+      if (auto swiftModule = ctx.getStdlibModule()) {
+        if ((firstModule == swiftModule) != (secondModule == swiftModule)) {
+          // If the second module is the standard library module, the second
+          // declaration is shadowed by the first.
+          if (secondModule == swiftModule) {
+            shadowed.insert(secondDecl);
+            continue;
+          }
+
+          // Otherwise, the first declaration is shadowed by the second. There is
+          // no point in continuing to compare the first declaration to others.
+          shadowed.insert(firstDecl);
+          break;
+        }
+      }
+
       // Prefer declarations in an overlay to similar declarations in
       // the Clang module it customizes.
       if (firstDecl->hasClangNode() != secondDecl->hasClangNode()) {
@@ -336,26 +354,33 @@
       }
     }
 
-    // We need an interface type here.
-    if (typeResolver)
-      typeResolver->resolveDeclSignature(decl);
+    CanType signature;
 
-    // If the decl is currently being validated, this is likely a recursive
-    // reference and we'll want to skip ahead so as to avoid having its type
-    // attempt to desugar itself.
-    if (!decl->hasValidSignature())
+    if (!isa<TypeDecl>(decl)) {
+      // We need an interface type here.
+      if (typeResolver)
+        typeResolver->resolveDeclSignature(decl);
+
+      // If the decl is currently being validated, this is likely a recursive
+      // reference and we'll want to skip ahead so as to avoid having its type
+      // attempt to desugar itself.
+      if (!decl->hasValidSignature())
+        continue;
+
+      // FIXME: the canonical type makes a poor signature, because we don't
+      // canonicalize away default arguments.
+      signature = decl->getInterfaceType()->getCanonicalType();
+
+      // FIXME: The type of a variable or subscript doesn't include
+      // enough context to distinguish entities from different
+      // constrained extensions, so use the overload signature's
+      // type. This is layering a partial fix upon a total hack.
+      if (auto asd = dyn_cast<AbstractStorageDecl>(decl))
+        signature = asd->getOverloadSignatureType();
+    } else if (decl->getDeclContext()->isTypeContext()) {
+      // Do not apply shadowing rules for member types.
       continue;
-
-    // FIXME: the canonical type makes a poor signature, because we don't
-    // canonicalize away default arguments.
-    auto signature = decl->getInterfaceType()->getCanonicalType();
-
-    // FIXME: The type of a variable or subscript doesn't include
-    // enough context to distinguish entities from different
-    // constrained extensions, so use the overload signature's
-    // type. This is layering a partial fix upon a total hack.
-    if (auto asd = dyn_cast<AbstractStorageDecl>(decl))
-      signature = asd->getOverloadSignatureType();
+    }
 
     // Record this declaration based on its signature.
     auto &known = collisions[signature];
@@ -1169,6 +1194,11 @@
   lookupInModule(&M, {}, Name, CurModuleResults, NLKind::UnqualifiedLookup,
                  resolutionKind, TypeResolver, DC, extraImports);
 
+  // Always perform name shadowing for type lookup.
+  if (options.contains(Flags::TypeLookup)) {
+    removeShadowedDecls(CurModuleResults, &M);
+  }
+
   for (auto VD : CurModuleResults)
     Results.push_back(LookupResultEntry(VD));
 
diff --git a/lib/Basic/UUID.cpp b/lib/Basic/UUID.cpp
index f17aab4..ad90e55 100644
--- a/lib/Basic/UUID.cpp
+++ b/lib/Basic/UUID.cpp
@@ -23,6 +23,7 @@
 #define NOMINMAX
 #include <objbase.h>
 #include <string>
+#include <algorithm>
 #else
 #include <uuid/uuid.h>
 #endif
@@ -94,6 +95,7 @@
 
   char* signedStr = reinterpret_cast<char*>(str);
   memcpy(out.data(), signedStr, StringBufferSize);
+  std::transform(std::begin(out), std::end(out), std::begin(out), toupper);
 #else
   uuid_unparse_upper(Value, out.data());
 #endif
diff --git a/lib/Demangling/Demangler.cpp b/lib/Demangling/Demangler.cpp
index eb59acb..1888edf 100644
--- a/lib/Demangling/Demangler.cpp
+++ b/lib/Demangling/Demangler.cpp
@@ -610,6 +610,12 @@
       case 'C': return demangleConcreteProtocolConformance();
       case 'D': return demangleDependentProtocolConformanceRoot();
       case 'I': return demangleDependentProtocolConformanceInherited();
+      case 'P':
+        return createWithChild(
+            Node::Kind::ProtocolConformanceRefInTypeModule, popProtocol());
+      case 'p':
+        return createWithChild(
+            Node::Kind::ProtocolConformanceRefInProtocolModule, popProtocol());
       default:
         pushBack();
         pushBack();
@@ -1294,22 +1300,27 @@
   });
 }
 
-NodePointer Demangler::popProtocolConformanceRef() {
+NodePointer Demangler::demangleRetroactiveProtocolConformanceRef() {
   NodePointer module = popModule();
   NodePointer proto = popProtocol();
   auto protocolConformanceRef =
-    createWithChild(Node::Kind::ProtocolConformanceRef, proto);
-
-  // The module is optional, present only for retroactive conformances. Add it
-  // as the second child.
-  if (protocolConformanceRef && module)
-    protocolConformanceRef->addChild(module, *this);
+      createWithChildren(Node::Kind::ProtocolConformanceRefInOtherModule,
+                         proto, module);
   return protocolConformanceRef;
 }
 
 NodePointer Demangler::demangleConcreteProtocolConformance() {
   NodePointer conditionalConformanceList = popAnyProtocolConformanceList();
-  NodePointer conformanceRef = popProtocolConformanceRef();
+
+  NodePointer conformanceRef =
+      popNode(Node::Kind::ProtocolConformanceRefInTypeModule);
+  if (!conformanceRef) {
+    conformanceRef =
+        popNode(Node::Kind::ProtocolConformanceRefInProtocolModule);
+  }
+  if (!conformanceRef)
+    conformanceRef = demangleRetroactiveProtocolConformanceRef();
+
   NodePointer type = popNode(Node::Kind::Type);
   return createWithChildren(Node::Kind::ConcreteProtocolConformance,
                             type, conformanceRef, conditionalConformanceList);
diff --git a/lib/Demangling/NodePrinter.cpp b/lib/Demangling/NodePrinter.cpp
index ba3350f..345748d 100644
--- a/lib/Demangling/NodePrinter.cpp
+++ b/lib/Demangling/NodePrinter.cpp
@@ -497,7 +497,9 @@
     case Node::Kind::DependentProtocolConformanceAssociated:
     case Node::Kind::DependentProtocolConformanceInherited:
     case Node::Kind::DependentProtocolConformanceRoot:
-    case Node::Kind::ProtocolConformanceRef:
+    case Node::Kind::ProtocolConformanceRefInTypeModule:
+    case Node::Kind::ProtocolConformanceRefInProtocolModule:
+    case Node::Kind::ProtocolConformanceRefInOtherModule:
     case Node::Kind::DynamicallyReplaceableFunctionKey:
     case Node::Kind::DynamicallyReplaceableFunctionImpl:
     case Node::Kind::DynamicallyReplaceableFunctionVar:
@@ -2172,7 +2174,16 @@
       << " ";
     printChildren(Node);
     return nullptr;
-  case Node::Kind::ProtocolConformanceRef:
+  case Node::Kind::ProtocolConformanceRefInTypeModule:
+    Printer << "protocol conformance ref (type's module) ";
+    printChildren(Node);
+    return nullptr;
+  case Node::Kind::ProtocolConformanceRefInProtocolModule:
+    Printer << "protocol conformance ref (protocol's module) ";
+    printChildren(Node);
+    return nullptr;
+  case Node::Kind::ProtocolConformanceRefInOtherModule:
+    Printer << "protocol conformance ref (retroactive) ";
     printChildren(Node);
     return nullptr;
   }
diff --git a/lib/Demangling/OldRemangler.cpp b/lib/Demangling/OldRemangler.cpp
index 9556ba6..71c6abf 100644
--- a/lib/Demangling/OldRemangler.cpp
+++ b/lib/Demangling/OldRemangler.cpp
@@ -680,7 +680,15 @@
   unreachable("Retroactive conformances aren't in the old mangling");
 }
 
-void Remangler::mangleProtocolConformanceRef(Node *node) {
+void Remangler::mangleProtocolConformanceRefInTypeModule(Node *node) {
+  unreachable("Protocol conformance references aren't in the old mangling");
+}
+
+void Remangler::mangleProtocolConformanceRefInProtocolModule(Node *node) {
+  unreachable("Protocol conformance references aren't in the old mangling");
+}
+
+void Remangler::mangleProtocolConformanceRefInOtherModule(Node *node) {
   unreachable("Protocol conformance references aren't in the old mangling");
 }
 
diff --git a/lib/Demangling/Remangler.cpp b/lib/Demangling/Remangler.cpp
index c86a3d8..a11e80e 100644
--- a/lib/Demangling/Remangler.cpp
+++ b/lib/Demangling/Remangler.cpp
@@ -1655,15 +1655,24 @@
     mangle(GenSig);
 }
 
-void Remangler::mangleProtocolConformanceRef(Node *node) {
+void Remangler::mangleProtocolConformanceRefInTypeModule(Node *node) {
   manglePureProtocol(node->getChild(0));
-  if (node->getNumChildren() > 1)
-    mangleChildNode(node, 1);
+  Buffer << "HP";
+}
+
+void Remangler::mangleProtocolConformanceRefInProtocolModule(Node *node) {
+  manglePureProtocol(node->getChild(0));
+  Buffer << "Hp";
+}
+
+void Remangler::mangleProtocolConformanceRefInOtherModule(Node *node) {
+  manglePureProtocol(node->getChild(0));
+  mangleChildNode(node, 1);
 }
 
 void Remangler::mangleConcreteProtocolConformance(Node *node) {
   mangleType(node->getChild(0));
-  mangleProtocolConformanceRef(node->getChild(1));
+  mangle(node->getChild(1));
   if (node->getNumChildren() > 2)
     mangleAnyProtocolConformanceList(node->getChild(2));
   else
diff --git a/lib/Driver/Compilation.cpp b/lib/Driver/Compilation.cpp
index de773fe..83d9c5c 100644
--- a/lib/Driver/Compilation.cpp
+++ b/lib/Driver/Compilation.cpp
@@ -206,9 +206,10 @@
     /// Jobs that incremental-mode has decided it can skip.
     CommandSet DeferredCommands;
 
-    /// Jobs in the initial set with Condition::Always, or lacking existing
+    /// Jobs in the initial set with Condition::Always, and having an existing
     /// .swiftdeps files.
-    SmallVector<const Job *, 16> InitialOutOfDateCommands;
+    /// Set by scheduleInitialJobs and used only by scheduleAdditionalJobs.
+    SmallVector<const Job *, 16> InitialCascadingCommands;
 
     /// Dependency graph for deciding which jobs are dirty (need running)
     /// or clean (can be skipped).
@@ -382,7 +383,7 @@
       DeferredCommands.clear();
     }
 
-    /// Helper that attmepts to reload a job's .swiftdeps file after the job
+    /// Helper that attempts to reload a job's .swiftdeps file after the job
     /// exits, and re-run transitive marking to ensure everything is properly
     /// invalidated by any new dependency edges introduced by it. If reloading
     /// fails, this can cause deferred jobs to be immediately scheduled.
@@ -406,6 +407,13 @@
         // If we have a dependency file /and/ the frontend task exited normally,
         // we can be discerning about what downstream files to rebuild.
         if (ReturnCode == EXIT_SUCCESS || ReturnCode == EXIT_FAILURE) {
+          // "Marked" means that everything provided by this node (i.e. Job) is
+          // dirty. Thus any file using any of these provides must be
+          // recompiled. (Only non-private entities are output as provides.) In
+          // other words, this Job "cascades"; the need to recompile it causes
+          // other recompilations. It is possible that the current code marks
+          // things that do not need to be marked. Unecessary compilation would
+          // result if that were the case.
           bool wasCascading = DepGraph.isMarked(FinishedCmd);
 
           switch (DepGraph.loadFromPath(FinishedCmd, DependenciesFile)) {
@@ -715,7 +723,15 @@
         switch (Condition) {
         case Job::Condition::Always:
           if (Comp.getIncrementalBuildEnabled() && !DependenciesFile.empty()) {
-            InitialOutOfDateCommands.push_back(Cmd);
+            // Ensure dependents will get recompiled.
+            InitialCascadingCommands.push_back(Cmd);
+            // Mark this job as cascading.
+            //
+            // It would probably be safe and simpler to markTransitive on the
+            // start nodes in the "Always" condition from the start instead of
+            // using markIntransitive and having later functions call
+            // markTransitive. That way markIntransitive would be an
+            // implementation detail of DependencyGraph.
             DepGraph.markIntransitive(Cmd);
           }
           LLVM_FALLTHROUGH;
@@ -740,7 +756,7 @@
         // We scheduled all of the files that have actually changed. Now add the
         // files that haven't changed, so that they'll get built in parallel if
         // possible and after the first set of files if it's not.
-        for (auto *Cmd : InitialOutOfDateCommands) {
+        for (auto *Cmd : InitialCascadingCommands) {
           DepGraph.markTransitive(AdditionalOutOfDateCommands, Cmd,
                                   IncrementalTracer);
         }
diff --git a/lib/Driver/CompilationRecord.h b/lib/Driver/CompilationRecord.h
index 82f3783..ce12150 100644
--- a/lib/Driver/CompilationRecord.h
+++ b/lib/Driver/CompilationRecord.h
@@ -19,8 +19,8 @@
 namespace driver {
 namespace compilation_record {
 
-/// Compilation record files (.swiftdeps files) are YAML files composed of these
-/// top-level keys.
+/// Compilation record files (-master.swiftdeps files) are YAML files composed
+/// of these top-level keys.
 enum class TopLevelKey {
   /// The key for the Swift compiler version used to produce the compilation
   /// record.
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 3c10618..885ddd4 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -731,8 +731,6 @@
   Opts.DisableSILPartialApply |=
     Args.hasArg(OPT_disable_sil_partial_apply);
   Opts.EnableSILOwnership |= Args.hasArg(OPT_enable_sil_ownership);
-  Opts.AssumeUnqualifiedOwnershipWhenParsing
-    |= Args.hasArg(OPT_assume_parsing_unqualified_ownership_sil);
   Opts.EnableMandatorySemanticARCOpts |=
       Args.hasArg(OPT_enable_mandatory_semantic_arc_opts);
   Opts.EnableLargeLoadableTypes |= Args.hasArg(OPT_enable_large_loadable_types);
@@ -1079,8 +1077,11 @@
   return false;
 }
 
-static std::string getScriptFileName(StringRef name) {
-  return (Twine(name) + "4" + ".json").str();
+static std::string getScriptFileName(StringRef name, version::Version &ver) {
+  if (ver.isVersionAtLeast(4, 2))
+    return (Twine(name) + "42" + ".json").str();
+  else
+    return (Twine(name) + "4" + ".json").str();
 }
 
 static bool ParseMigratorArgs(MigratorOptions &Opts,
@@ -1124,20 +1125,20 @@
 
     bool Supported = true;
     llvm::SmallString<128> dataPath(basePath);
-
+    auto &langVer = LangOpts.EffectiveLanguageVersion;
     if (Triple.isMacOSX())
-      llvm::sys::path::append(dataPath, getScriptFileName("macos"));
+      llvm::sys::path::append(dataPath, getScriptFileName("macos", langVer));
     else if (Triple.isiOS())
-      llvm::sys::path::append(dataPath, getScriptFileName("ios"));
+      llvm::sys::path::append(dataPath, getScriptFileName("ios", langVer));
     else if (Triple.isTvOS())
-      llvm::sys::path::append(dataPath, getScriptFileName("tvos"));
+      llvm::sys::path::append(dataPath, getScriptFileName("tvos", langVer));
     else if (Triple.isWatchOS())
-      llvm::sys::path::append(dataPath, getScriptFileName("watchos"));
+      llvm::sys::path::append(dataPath, getScriptFileName("watchos", langVer));
     else
       Supported = false;
     if (Supported) {
       llvm::SmallString<128> authoredDataPath(basePath);
-      llvm::sys::path::append(authoredDataPath, getScriptFileName("overlay"));
+      llvm::sys::path::append(authoredDataPath, getScriptFileName("overlay", langVer));
       // Add authored list first to take higher priority.
       Opts.APIDigesterDataStorePaths.push_back(authoredDataPath.str());
       Opts.APIDigesterDataStorePaths.push_back(dataPath.str());
diff --git a/lib/Frontend/ParseableInterfaceSupport.cpp b/lib/Frontend/ParseableInterfaceSupport.cpp
index d682f79..bb85cf8 100644
--- a/lib/Frontend/ParseableInterfaceSupport.cpp
+++ b/lib/Frontend/ParseableInterfaceSupport.cpp
@@ -562,7 +562,7 @@
 }
 
 llvm::Regex swift::getSwiftInterfaceModuleFlagsRegex() {
-  return llvm::Regex("^// " SWIFT_MODULE_FLAGS_KEY ": (.*)$",
+  return llvm::Regex("^// " SWIFT_MODULE_FLAGS_KEY ":(.*)$",
                      llvm::Regex::Newline);
 }
 
diff --git a/lib/IDE/SwiftSourceDocInfo.cpp b/lib/IDE/SwiftSourceDocInfo.cpp
index 300db68..cad151b 100644
--- a/lib/IDE/SwiftSourceDocInfo.cpp
+++ b/lib/IDE/SwiftSourceDocInfo.cpp
@@ -1640,15 +1640,18 @@
         if (EndKind == LabelRangeEndAt::LabelNameOnly)
           LabelEnd = LabelStart.getAdvancedLoc(NameIdentifier.getLength());
       }
-
+      bool IsTrailingClosure = TE->hasTrailingClosure() &&
+        ElemIndex == TE->getNumElements() - 1;
       InfoVec.push_back({getSingleNonImplicitChild(Elem),
-        CharSourceRange(SM, LabelStart, LabelEnd)});
+        CharSourceRange(SM, LabelStart, LabelEnd), IsTrailingClosure});
       ++ElemIndex;
     }
   } else if (auto *PE = dyn_cast<ParenExpr>(Arg)) {
     if (auto Sub = PE->getSubExpr())
       InfoVec.push_back({getSingleNonImplicitChild(Sub),
-        CharSourceRange(Sub->getStartLoc(), 0)});
+        CharSourceRange(Sub->getStartLoc(), 0),
+        PE->hasTrailingClosure()
+      });
   }
   return InfoVec;
 }
@@ -1657,7 +1660,13 @@
 getCallArgLabelRanges(SourceManager &SM, Expr *Arg, LabelRangeEndAt EndKind) {
   std::vector<CharSourceRange> Ranges;
   auto InfoVec = getCallArgInfo(SM, Arg, EndKind);
-  std::transform(InfoVec.begin(), InfoVec.end(), std::back_inserter(Ranges),
+
+  auto EndWithoutTrailing = std::remove_if(InfoVec.begin(), InfoVec.end(),
+                                           [](CallArgInfo &Info) {
+                                             return Info.IsTrailingClosure;
+                                           });
+  std::transform(InfoVec.begin(), EndWithoutTrailing,
+                 std::back_inserter(Ranges),
                  [](CallArgInfo &Info) { return Info.LabelRange; });
   return Ranges;
 }
diff --git a/lib/IDE/Utils.cpp b/lib/IDE/Utils.cpp
index c2c0c43..5763d54 100644
--- a/lib/IDE/Utils.cpp
+++ b/lib/IDE/Utils.cpp
@@ -104,16 +104,9 @@
   SourceManager SM;
   auto BufferID = SM.addNewSourceBuffer(std::move(MemBuf));
   ParserUnit Parse(SM, SFKind, BufferID);
-  Parser &P = Parse.getParser();
-
-  bool Done;
-  do {
-    P.parseTopLevel();
-    Done = P.Tok.is(tok::eof);
-  } while (!Done);
-
+  Parse.parse();
   SourceCompleteResult SCR;
-  SCR.IsComplete = !P.isInputIncomplete();
+  SCR.IsComplete = !Parse.getParser().isInputIncomplete();
 
   // Use the same code that was in the REPL code to track the indent level
   // for now. In the future we should get this from the Parser if possible.
diff --git a/lib/IRGen/GenClass.cpp b/lib/IRGen/GenClass.cpp
index fe009fa..15b0b7f 100644
--- a/lib/IRGen/GenClass.cpp
+++ b/lib/IRGen/GenClass.cpp
@@ -1908,8 +1908,9 @@
       else
         (void)0;
       
-      // If the property has storage, emit the ivar name last.
-      if (prop->hasStorage())
+      // If the property is an instance property and has storage, emit the ivar
+      // name last.
+      if (!prop->isStatic() && prop->hasStorage())
         outs << ",V" << prop->getName();
     }
 
diff --git a/lib/IRGen/GenDecl.cpp b/lib/IRGen/GenDecl.cpp
index a9c20e6..55f852e 100644
--- a/lib/IRGen/GenDecl.cpp
+++ b/lib/IRGen/GenDecl.cpp
@@ -1099,30 +1099,8 @@
   while (!LazyTypeMetadata.empty() ||
          !LazyTypeContextDescriptors.empty() ||
          !LazyFunctionDefinitions.empty() ||
-         !LazyFieldTypes.empty() ||
          !LazyWitnessTables.empty()) {
 
-    while (!LazyFieldTypes.empty()) {
-      auto info = LazyFieldTypes.pop_back_val();
-      auto &IGM = *info.IGM;
-
-      for (auto fieldType : info.fieldTypes) {
-        if (fieldType->hasArchetype())
-          continue;
-
-        // All of the required attributes are going to be preserved
-        // by field reflection metadata in the mangled name, so
-        // there is no need to worry about ownership semantics here.
-        if (auto refStorTy = dyn_cast<ReferenceStorageType>(fieldType))
-          fieldType = refStorTy.getReferentType();
-
-        // Make sure that all of the field type metadata is forced,
-        // otherwise there might be a problem when fields are accessed
-        // through reflection.
-        (void)irgen::getOrCreateTypeMetadataAccessFunction(IGM, fieldType);
-      }
-    }
-
     // Emit any lazy type metadata we require.
     while (!LazyTypeMetadata.empty()) {
       NominalTypeDecl *type = LazyTypeMetadata.pop_back_val();
diff --git a/lib/IRGen/GenMeta.cpp b/lib/IRGen/GenMeta.cpp
index 08d9344..b24f2d6 100644
--- a/lib/IRGen/GenMeta.cpp
+++ b/lib/IRGen/GenMeta.cpp
@@ -510,6 +510,7 @@
     
     void layout() {
       super::layout();
+      asImpl().addGenericSignature();
     }
   
     ConstantReference getParent() {
@@ -522,7 +523,7 @@
     }
     
     GenericSignature *getGenericSignature() {
-      return nullptr;
+      return DC->getGenericSignatureOfContext();
     }
     
     bool isUniqueDescriptor() {
@@ -1198,37 +1199,6 @@
     }
     return numFields;
   }
-  
-  /// Track the field types of a struct or class for reflection metadata
-  /// emission.
-  static void
-  addFieldTypes(IRGenModule &IGM, NominalTypeDecl *type,
-                NominalTypeDecl::StoredPropertyRange storedProperties) {
-    SmallVector<CanType, 4> types;
-    for (VarDecl *prop : storedProperties) {
-      auto propertyType = type->mapTypeIntoContext(prop->getInterfaceType())
-                              ->getCanonicalType();
-      types.push_back(propertyType);
-    }
-
-    IGM.addFieldTypes(types);
-  }
-  
-  /// Track the payload types of an enum for reflection metadata
-  /// emission.
-  static void addFieldTypes(IRGenModule &IGM,
-                            ArrayRef<EnumImplStrategy::Element> enumElements) {
-    SmallVector<CanType, 4> types;
-
-    for (auto &elt : enumElements) {
-      auto caseType = elt.decl->getParentEnum()->mapTypeIntoContext(
-        elt.decl->getArgumentInterfaceType())
-          ->getCanonicalType();
-      types.push_back(caseType);
-    }
-
-    IGM.addFieldTypes(types);
-  }
 
   class StructContextDescriptorBuilder
     : public TypeContextDescriptorBuilderBase<StructContextDescriptorBuilder,
@@ -1264,7 +1234,9 @@
       // uint32_t FieldOffsetVectorOffset;
       B.addInt32(FieldVectorOffset / IGM.getPointerSize());
 
-      addFieldTypes(IGM, getType(), properties);
+      // For any nominal type metadata required for reflection.
+      for (auto *prop : properties)
+        IGM.IRGen.noteUseOfTypeMetadata(prop->getValueInterfaceType());
     }
     
     uint16_t getKindSpecificFlags() {
@@ -1336,7 +1308,9 @@
       // uint32_t NumEmptyCases;
       B.addInt32(Strategy.getElementsWithNoPayload().size());
 
-      addFieldTypes(IGM, Strategy.getElementsWithPayload());
+      // For any nominal type metadata required for reflection.
+      for (auto elt : Strategy.getElementsWithPayload())
+        IGM.IRGen.noteUseOfTypeMetadata(elt.decl->getArgumentInterfaceType());
     }
     
     uint16_t getKindSpecificFlags() {
@@ -1646,7 +1620,9 @@
       // uint32_t FieldOffsetVectorOffset;
       B.addInt32(getFieldVectorOffset() / IGM.getPointerSize());
 
-      addFieldTypes(IGM, getType(), properties);
+      // For any nominal type metadata required for reflection.
+      for (auto *prop : properties)
+        IGM.IRGen.noteUseOfTypeMetadata(prop->getValueInterfaceType());
     }
   };
 } // end anonymous namespace
@@ -1772,10 +1748,6 @@
     [&]{ AnonymousContextDescriptorBuilder(*this, DC).emit(); });
 }
 
-void IRGenModule::addFieldTypes(ArrayRef<CanType> fieldTypes) {
-  IRGen.addFieldTypes(fieldTypes, this);
-}
-
 static void emitInitializeFieldOffsetVector(IRGenFunction &IGF,
                                             SILType T,
                                             llvm::Value *metadata,
diff --git a/lib/IRGen/IRGenModule.cpp b/lib/IRGen/IRGenModule.cpp
index 45b3542..6d18685 100644
--- a/lib/IRGen/IRGenModule.cpp
+++ b/lib/IRGen/IRGenModule.cpp
@@ -769,7 +769,7 @@
 }
 
 void IRGenerator::addLazyWitnessTable(const ProtocolConformance *Conf) {
-  if (SILWitnessTable *wt = SIL.lookUpWitnessTable(Conf)) {
+  if (auto *wt = SIL.lookUpWitnessTable(Conf, /*deserializeLazily=*/false)) {
     // Add it to the queue if it hasn't already been put there.
     if (canEmitWitnessTableLazily(wt) &&
         LazilyEmittedWitnessTables.insert(wt).second) {
diff --git a/lib/IRGen/IRGenModule.h b/lib/IRGen/IRGenModule.h
index f185002..f45794d 100644
--- a/lib/IRGen/IRGenModule.h
+++ b/lib/IRGen/IRGenModule.h
@@ -241,14 +241,6 @@
 
   llvm::SetVector<SILFunction*> DynamicReplacements;
 
-  struct FieldTypeMetadata {
-    IRGenModule *IGM;
-    std::vector<CanType> fieldTypes;
-  };
-
-  /// Field types we need to verify are present.
-  llvm::SmallVector<FieldTypeMetadata, 4> LazyFieldTypes;
-
   /// SIL functions that we need to emit lazily.
   llvm::SmallVector<SILFunction*, 4> LazyFunctionDefinitions;
 
@@ -367,6 +359,13 @@
     noteUseOfTypeGlobals(type, true, RequireMetadata);
   }
 
+  void noteUseOfTypeMetadata(Type type) {
+    type.visit([&](Type t) {
+      if (auto *nominal = t->getAnyNominal())
+        noteUseOfTypeMetadata(nominal);
+    });
+  }
+
   void noteUseOfTypeContextDescriptor(NominalTypeDecl *type,
                                       RequireMetadata_t requireMetadata) {
     noteUseOfTypeGlobals(type, false, requireMetadata);
@@ -386,9 +385,6 @@
   /// Adds \p Conf to LazyWitnessTables if it has not been added yet.
   void addLazyWitnessTable(const ProtocolConformance *Conf);
 
-  void addFieldTypes(ArrayRef<CanType> fieldTypes, IRGenModule *IGM) {
-    LazyFieldTypes.push_back({IGM, {fieldTypes.begin(), fieldTypes.end()}});
-  }
 
   void addClassForEagerInitialization(ClassDecl *ClassDecl);
 
@@ -846,7 +842,6 @@
   void addUsedGlobal(llvm::GlobalValue *global);
   void addCompilerUsedGlobal(llvm::GlobalValue *global);
   void addObjCClass(llvm::Constant *addr, bool nonlazy);
-  void addFieldTypes(ArrayRef<CanType> fieldTypes);
   void addProtocolConformance(ConformanceDescription &&conformance);
 
   llvm::Constant *emitSwiftProtocols();
diff --git a/lib/IRGen/LoadableByAddress.cpp b/lib/IRGen/LoadableByAddress.cpp
index bd18ddc..aa639e3 100644
--- a/lib/IRGen/LoadableByAddress.cpp
+++ b/lib/IRGen/LoadableByAddress.cpp
@@ -1037,7 +1037,7 @@
 
 static StoreOwnershipQualifier
 getStoreInitOwnership(StructLoweringState &pass, SILType type) {
-  if (!pass.F->hasQualifiedOwnership()) {
+  if (!pass.F->hasOwnership()) {
     return StoreOwnershipQualifier::Unqualified;
   } else if (type.isTrivial(pass.F->getModule())) {
     return StoreOwnershipQualifier::Trivial;
@@ -1517,7 +1517,7 @@
       ++II;
       loadBuilder.setInsertionPoint(II);
     }
-    if (!pass.F->hasQualifiedOwnership()) {
+    if (!pass.F->hasOwnership()) {
       load = loadBuilder.createLoad(applyInst->getLoc(), value,
                                     LoadOwnershipQualifier::Unqualified);
     } else {
@@ -1552,7 +1552,7 @@
   auto *applyOutlinedCopy =
       createOutlinedCopyCall(allocBuilder, value, allocInstr, pass);
 
-  if (!pass.F->hasQualifiedOwnership()) {
+  if (!pass.F->hasOwnership()) {
     loadCopy = allocBuilder.createLoad(applyOutlinedCopy->getLoc(), allocInstr,
                                        LoadOwnershipQualifier::Unqualified);
   } else {
@@ -1858,7 +1858,7 @@
       currStructExtractInst->getType().getAddressType());
   // Load the struct element then see if we can get rid of the load:
   LoadInst *loadArg = nullptr;
-  if (!pass.F->hasQualifiedOwnership()) {
+  if (!pass.F->hasOwnership()) {
     loadArg = builder.createLoad(newInstr->getLoc(), newInstr,
                                  LoadOwnershipQualifier::Unqualified);
   } else {
@@ -1914,7 +1914,7 @@
 
           // Load the enum addr then see if we can get rid of the load:
           LoadInst *loadArg = nullptr;
-          if (!pass.F->hasQualifiedOwnership()) {
+          if (!pass.F->hasOwnership()) {
             loadArg = argBuilder.createLoad(
                 newArg->getLoc(), newArg, LoadOwnershipQualifier::Unqualified);
           } else {
@@ -2458,7 +2458,7 @@
       if (oldValue->getType() != newValue->getType() &&
           !oldValue->getType().isAddress()) {
         LoadOwnershipQualifier ownership;
-        if (!F->hasQualifiedOwnership()) {
+        if (!F->hasOwnership()) {
           ownership = LoadOwnershipQualifier::Unqualified;
         } else if (newValue->getType().isTrivial(*getModule())) {
           ownership = LoadOwnershipQualifier::Trivial;
diff --git a/lib/Migrator/APIDiffMigratorPass.cpp b/lib/Migrator/APIDiffMigratorPass.cpp
index 31c8fcf..13a7e8a 100644
--- a/lib/Migrator/APIDiffMigratorPass.cpp
+++ b/lib/Migrator/APIDiffMigratorPass.cpp
@@ -1404,6 +1404,19 @@
         D->walk(Removal);
       }
     }
+
+    // Handle property overriding migration.
+    if (auto *VD = dyn_cast<VarDecl>(D)) {
+      for (auto *Item: getRelatedDiffItems(VD)) {
+        if (auto *CD = dyn_cast<CommonDiffItem>(Item)) {
+          // If the overriden property has been renamed, we should rename
+          // this property decl as well.
+          if (CD->isRename() && VD->getNameLoc().isValid()) {
+            Editor.replaceToken(VD->getNameLoc(), CD->getNewName());
+          }
+        }
+      }
+    }
     return true;
   }
 };
diff --git a/lib/Migrator/CMakeLists.txt b/lib/Migrator/CMakeLists.txt
index 1b28f1f..c7ad2c7 100644
--- a/lib/Migrator/CMakeLists.txt
+++ b/lib/Migrator/CMakeLists.txt
@@ -4,6 +4,11 @@
   tvos4.json
   watchos4.json
   overlay4.json
+  macos42.json
+  ios42.json
+  tvos42.json
+  watchos42.json
+  overlay42.json
 )
 set(SWIFTLIB_DIR
     "${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib/swift")
diff --git a/lib/Migrator/Migrator.cpp b/lib/Migrator/Migrator.cpp
index afa0696..d324289 100644
--- a/lib/Migrator/Migrator.cpp
+++ b/lib/Migrator/Migrator.cpp
@@ -59,7 +59,11 @@
   // Phase 2: Syntactic Transformations
   // Don't run these passes if we're already in newest Swift version.
   if (EffectiveVersion != CurrentVersion) {
-    auto FailedSyntacticPasses = M.performSyntacticPasses();
+    SyntacticPassOptions Opts;
+
+    // Type of optional try changes since Swift 5.
+    Opts.RunOptionalTryMigration = !EffectiveVersion.isVersionAtLeast(5);
+    auto FailedSyntacticPasses = M.performSyntacticPasses(Opts);
     if (FailedSyntacticPasses) {
       return true;
     }
@@ -173,7 +177,7 @@
   return Instance;
 }
 
-bool Migrator::performSyntacticPasses() {
+bool Migrator::performSyntacticPasses(SyntacticPassOptions Opts) {
   clang::FileSystemOptions ClangFileSystemOptions;
   clang::FileManager ClangFileManager { ClangFileSystemOptions };
 
@@ -197,8 +201,10 @@
 
   runAPIDiffMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
                          getMigratorOptions());
-  runOptionalTryMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
-                        getMigratorOptions());
+  if (Opts.RunOptionalTryMigration) {
+    runOptionalTryMigratorPass(Editor, StartInstance->getPrimarySourceFile(),
+                               getMigratorOptions());
+  }
 
   Edits.commit(Editor.getEdits());
 
diff --git a/lib/Migrator/ios42.json b/lib/Migrator/ios42.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/lib/Migrator/ios42.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/lib/Migrator/macos42.json b/lib/Migrator/macos42.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/lib/Migrator/macos42.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/lib/Migrator/overlay4.json b/lib/Migrator/overlay4.json
index c5475de..d5fb336 100644
--- a/lib/Migrator/overlay4.json
+++ b/lib/Migrator/overlay4.json
@@ -1320,5 +1320,16 @@
     "DiffItemKind": "SpecialCaseDiffItem",
     "Usr": "s:5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF",
     "SpecialCaseId": "UIApplicationMain"
-  }
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:SlsSQ7ElementRpzrlE5index2of5IndexQzSgAB_tF",
+    "LeftComment": "index",
+    "RightUsr": "",
+    "RightComment": "firstIndex",
+    "ModuleName": "Swift"
+  },
 ]
diff --git a/lib/Migrator/overlay42.json b/lib/Migrator/overlay42.json
new file mode 100644
index 0000000..cc6d339
--- /dev/null
+++ b/lib/Migrator/overlay42.json
@@ -0,0 +1,13 @@
+[
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:SlsSQ7ElementRpzrlE5index2of5IndexQzSgAB_tF",
+    "LeftComment": "index",
+    "RightUsr": "",
+    "RightComment": "firstIndex",
+    "ModuleName": "Swift"
+  },
+]
diff --git a/lib/Migrator/tvos42.json b/lib/Migrator/tvos42.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/lib/Migrator/tvos42.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/lib/Migrator/watchos42.json b/lib/Migrator/watchos42.json
new file mode 100644
index 0000000..0637a08
--- /dev/null
+++ b/lib/Migrator/watchos42.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp
index 09d779c..85d78f6 100644
--- a/lib/Parse/Parser.cpp
+++ b/lib/Parse/Parser.cpp
@@ -1098,6 +1098,16 @@
   delete &Impl;
 }
 
+void ParserUnit::parse() {
+  auto &P = getParser();
+  bool Done = false;
+  while (!Done) {
+    P.parseTopLevel();
+    Done = P.Tok.is(tok::eof);
+  }
+  P.finalizeSyntaxTree();
+}
+
 Parser &ParserUnit::getParser() {
   return *Impl.TheParser;
 }
diff --git a/lib/ParseSIL/ParseSIL.cpp b/lib/ParseSIL/ParseSIL.cpp
index 3090892..43fe6b2 100644
--- a/lib/ParseSIL/ParseSIL.cpp
+++ b/lib/ParseSIL/ParseSIL.cpp
@@ -942,6 +942,7 @@
 static bool parseDeclSILOptional(bool *isTransparent,
                                  IsSerialized_t *isSerialized,
                                  bool *isCanonical,
+                                 bool *hasOwnershipSSA,
                                  IsThunk_t *isThunk,
                                  IsDynamicallyReplaceable_t *isDynamic,
                                  SILFunction **dynamicallyReplacedFunction,
@@ -976,6 +977,8 @@
       *isSerialized = IsSerializable;
     else if (isCanonical && SP.P.Tok.getText() == "canonical")
       *isCanonical = true;
+    else if (hasOwnershipSSA && SP.P.Tok.getText() == "ossa")
+      *hasOwnershipSSA = true;
     else if (isThunk && SP.P.Tok.getText() == "thunk")
       *isThunk = IsThunk;
     else if (isThunk && SP.P.Tok.getText() == "signature_optimized_thunk")
@@ -5148,9 +5151,7 @@
 
         // If SILOwnership is enabled and we are not assuming that we are
         // parsing unqualified SIL, look for printed value ownership kinds.
-        if (!F->getModule()
-                 .getOptions()
-                 .AssumeUnqualifiedOwnershipWhenParsing &&
+        if (F->hasOwnership() &&
             parseSILOwnership(OwnershipKind))
           return true;
 
@@ -5179,13 +5180,7 @@
   F->getBlocks().remove(BB);
   F->getBlocks().push_back(BB);
 
-  bool AssumeUnqualifiedOwnershipWhenParsing =
-    F->getModule().getOptions().AssumeUnqualifiedOwnershipWhenParsing;
-  if (AssumeUnqualifiedOwnershipWhenParsing) {
-    F->setUnqualifiedOwnership();
-  }
   B.setInsertionPoint(BB);
-  B.setHasOwnership(F->hasQualifiedOwnership());
   do {
     if (parseSILInstruction(B))
       return true;
@@ -5193,7 +5188,7 @@
     // Qualification. For more details, see the comment on the
     // FunctionOwnershipEvaluator class.
     SILInstruction *ParsedInst = &*BB->rbegin();
-    if (!AssumeUnqualifiedOwnershipWhenParsing &&
+    if (BB->getParent()->hasOwnership() &&
         !OwnershipEvaluator.evaluate(ParsedInst)) {
       P.diagnose(ParsedInst->getLoc().getSourceLoc(),
                  diag::found_unqualified_instruction_in_qualified_function,
@@ -5228,6 +5223,7 @@
   IsSerialized_t isSerialized = IsNotSerialized;
   bool isCanonical = false;
   IsDynamicallyReplaceable_t isDynamic = IsNotDynamic;
+  bool hasOwnershipSSA = false;
   IsThunk_t isThunk = IsNotThunk;
   bool isGlobalInit = false, isWeakLinked = false;
   bool isWithoutActuallyEscapingThunk = false;
@@ -5240,12 +5236,12 @@
   SILFunction *DynamicallyReplacedFunction = nullptr;
   Identifier objCReplacementFor;
   if (parseSILLinkage(FnLinkage, P) ||
-      parseDeclSILOptional(&isTransparent, &isSerialized, &isCanonical,
-                           &isThunk, &isDynamic, &DynamicallyReplacedFunction,
-                           &objCReplacementFor, &isGlobalInit, &inlineStrategy,
-                           &optimizationMode, nullptr, &isWeakLinked,
-                           &isWithoutActuallyEscapingThunk, &Semantics,
-                           &SpecAttrs, &ClangDecl, &MRK, FunctionState, M) ||
+      parseDeclSILOptional(
+          &isTransparent, &isSerialized, &isCanonical, &hasOwnershipSSA,
+          &isThunk, &isDynamic, &DynamicallyReplacedFunction,
+          &objCReplacementFor, &isGlobalInit, &inlineStrategy, &optimizationMode, nullptr,
+          &isWeakLinked, &isWithoutActuallyEscapingThunk, &Semantics,
+          &SpecAttrs, &ClangDecl, &MRK, FunctionState, M) ||
       P.parseToken(tok::at_sign, diag::expected_sil_function_name) ||
       P.parseIdentifier(FnName, FnNameLoc, diag::expected_sil_function_name) ||
       P.parseToken(tok::colon, diag::expected_sil_type))
@@ -5269,6 +5265,8 @@
     FunctionState.F->setTransparent(IsTransparent_t(isTransparent));
     FunctionState.F->setSerialized(IsSerialized_t(isSerialized));
     FunctionState.F->setWasDeserializedCanonical(isCanonical);
+    if (!hasOwnershipSSA)
+      FunctionState.F->setOwnershipEliminated();
     FunctionState.F->setThunk(IsThunk_t(isThunk));
     FunctionState.F->setIsDynamic(isDynamic);
     FunctionState.F->setDynamicallyReplacedFunction(
@@ -5313,7 +5311,7 @@
       // Parse the basic block list.
       FunctionState.OwnershipEvaluator.reset(FunctionState.F);
       SILOpenedArchetypesTracker OpenedArchetypesTracker(FunctionState.F);
-      SILBuilder B(*FunctionState.F, /*isParsing*/ true);
+      SILBuilder B(*FunctionState.F);
       // Track the archetypes just like SILGen. This
       // is required for adding typedef operands to instructions.
       B.setOpenedArchetypesTracker(&OpenedArchetypesTracker);
@@ -5457,9 +5455,8 @@
   SILParser State(P);
   if (parseSILLinkage(GlobalLinkage, P) ||
       parseDeclSILOptional(nullptr, &isSerialized, nullptr, nullptr, nullptr,
-                           nullptr, nullptr, nullptr, nullptr, nullptr, &isLet,
                            nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-                           State, M) ||
+                           &isLet, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, State, M) ||
       P.parseToken(tok::at_sign, diag::expected_sil_value_name) ||
       P.parseIdentifier(GlobalName, NameLoc, diag::expected_sil_value_name) ||
       P.parseToken(tok::colon, diag::expected_sil_type))
@@ -5507,8 +5504,7 @@
   IsSerialized_t Serialized = IsNotSerialized;
   if (parseDeclSILOptional(nullptr, &Serialized, nullptr, nullptr, nullptr,
                            nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-                           SP, M))
+                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, SP, M))
     return true;
   
   ValueDecl *VD;
@@ -5576,7 +5572,7 @@
   IsSerialized_t Serialized = IsNotSerialized;
   if (parseDeclSILOptional(nullptr, &Serialized, nullptr, nullptr, nullptr,
                            nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
                            VTableState, M))
     return true;
 
@@ -6112,7 +6108,7 @@
   IsSerialized_t isSerialized = IsNotSerialized;
   if (parseDeclSILOptional(nullptr, &isSerialized, nullptr, nullptr, nullptr,
                            nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
-                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
+                           nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr,
                            WitnessState, M))
     return true;
 
@@ -6188,6 +6184,8 @@
 
   if (!wt)
     wt = SILWitnessTable::create(M, *Linkage, theConformance);
+  else
+    wt->setLinkage(*Linkage);
   wt->convertToDefinition(witnessEntries, conditionalConformances,
                           isSerialized);
   BodyScope.reset();
diff --git a/lib/PrintAsObjC/PrintAsObjC.cpp b/lib/PrintAsObjC/PrintAsObjC.cpp
index 1096b86..0a2e514 100644
--- a/lib/PrintAsObjC/PrintAsObjC.cpp
+++ b/lib/PrintAsObjC/PrintAsObjC.cpp
@@ -137,7 +137,7 @@
 using DelayedMemberSet = llvm::SmallSetVector<const ValueDecl *, 32>;
 
 class ObjCPrinter : private DeclVisitor<ObjCPrinter>,
-                    private TypeVisitor<ObjCPrinter, void, 
+                    private TypeVisitor<ObjCPrinter, void,
                                         Optional<OptionalTypeKind>>
 {
   friend ASTVisitor;
@@ -528,7 +528,7 @@
     return sel.getNumArgs() == 0 &&
            sel.getSelectorPieces().front().str() == "init";
   }
-                                          
+  
   void printAbstractFunctionAsMethod(AbstractFunctionDecl *AFD,
                                      bool isClassMethod,
                                      bool isNSUIntegerSubscript = false) {
@@ -553,7 +553,7 @@
     auto resultTy = getForeignResultType(AFD, methodTy, errorConvention);
 
     // Constructors and methods returning DynamicSelf return
-    // instancetype.    
+    // instancetype.
     if (isa<ConstructorDecl>(AFD) ||
         (isa<FuncDecl>(AFD) && cast<FuncDecl>(AFD)->hasDynamicSelf())) {
       if (errorConvention && errorConvention->stripsResultOptionality()) {
@@ -776,9 +776,8 @@
   };
 
   /// Returns \c true if anything was printed.
-  bool printAvailability(
-      const Decl *D,
-      PrintLeadingSpace printLeadingSpace = PrintLeadingSpace::Yes) {
+  bool printAvailability(const Decl *D, PrintLeadingSpace printLeadingSpace =
+                                            PrintLeadingSpace::Yes) {
     bool hasPrintedAnything = false;
     auto maybePrintLeadingSpace = [&] {
       if (printLeadingSpace == PrintLeadingSpace::Yes || hasPrintedAnything)
@@ -788,7 +787,8 @@
 
     for (auto AvAttr : D->getAttrs().getAttributes<AvailableAttr>()) {
       if (AvAttr->Platform == PlatformKind::none) {
-        if (AvAttr->PlatformAgnostic == PlatformAgnosticAvailabilityKind::Unavailable) {
+        if (AvAttr->PlatformAgnostic ==
+            PlatformAgnosticAvailabilityKind::Unavailable) {
           // Availability for *
           if (!AvAttr->Rename.empty() && isa<ValueDecl>(D)) {
             // rename
@@ -833,11 +833,10 @@
       }
 
       // Availability for a specific platform
-      if (!AvAttr->Introduced.hasValue()
-          && !AvAttr->Deprecated.hasValue()
-          && !AvAttr->Obsoleted.hasValue()
-          && !AvAttr->isUnconditionallyDeprecated()
-          && !AvAttr->isUnconditionallyUnavailable()) {
+      if (!AvAttr->Introduced.hasValue() && !AvAttr->Deprecated.hasValue() &&
+          !AvAttr->Obsoleted.hasValue() &&
+          !AvAttr->isUnconditionallyDeprecated() &&
+          !AvAttr->isUnconditionallyUnavailable()) {
         continue;
       }
 
@@ -912,43 +911,75 @@
     }
     return hasPrintedAnything;
   }
-    
-  void printRenameForDecl(const AvailableAttr *AvAttr, const ValueDecl *D,
-                          bool includeQuotes) {
-    assert(!AvAttr->Rename.empty());
-    
-    auto renamedParsedDeclName = parseDeclName(AvAttr->Rename);
-    auto renamedDeclName = renamedParsedDeclName.formDeclName(D->getASTContext());
-    
+
+  const ValueDecl *getRenameDecl(const ValueDecl *D,
+                                 const ParsedDeclName renamedParsedDeclName) {
     auto declContext = D->getDeclContext();
-    const ValueDecl *renamedDecl = nullptr;
-    
+    ASTContext &astContext = D->getASTContext();
+    auto renamedDeclName = renamedParsedDeclName.formDeclName(astContext);
+
     if (isa<ClassDecl>(D) || isa<ProtocolDecl>(D)) {
+      if (!renamedParsedDeclName.ContextName.empty()) {
+        return nullptr;
+      }
       UnqualifiedLookup lookup(renamedDeclName.getBaseIdentifier(),
-                               declContext->getModuleScopeContext(),
-                               nullptr,
+                               declContext->getModuleScopeContext(), nullptr,
                                SourceLoc(),
                                UnqualifiedLookup::Flags::TypeLookup);
-      renamedDecl = lookup.getSingleTypeResult();
+      return lookup.getSingleTypeResult();
+    }
+
+    TypeDecl *typeDecl = declContext->getSelfNominalTypeDecl();
+
+    const ValueDecl *renamedDecl = nullptr;
+    SmallVector<ValueDecl *, 4> lookupResults;
+    declContext->lookupQualified(typeDecl->getDeclaredInterfaceType(),
+                                 renamedDeclName, NL_QualifiedDefault, nullptr,
+                                 lookupResults);
+
+    if (lookupResults.size() == 1) {
+      auto candidate = lookupResults[0];
+      if (!shouldInclude(candidate))
+        return nullptr;
+      if (candidate->getKind() != D->getKind() ||
+          (candidate->isInstanceMember() !=
+           cast<ValueDecl>(D)->isInstanceMember()))
+        return nullptr;
+
+      renamedDecl = candidate;
     } else {
-      SmallVector<ValueDecl *, 4> lookupResults;
-      declContext->lookupQualified(
-        declContext->getSelfNominalTypeDecl(),
-        renamedDeclName, NL_QualifiedDefault, lookupResults);
       for (auto candidate : lookupResults) {
         if (!shouldInclude(candidate))
           continue;
-        
+
         if (candidate->getKind() != D->getKind() ||
             (candidate->isInstanceMember() !=
              cast<ValueDecl>(D)->isInstanceMember()))
           continue;
-        
-        if (isa<FuncDecl>(candidate) &&
-            (cast<FuncDecl>(candidate)->getParameters()->size() !=
-             cast<FuncDecl>(D)->getParameters()->size()))
-          continue;
-        
+
+        if (isa<AbstractFunctionDecl>(candidate)) {
+          auto cParams = cast<AbstractFunctionDecl>(candidate)->getParameters();
+          auto dParams = cast<AbstractFunctionDecl>(D)->getParameters();
+
+          if (cParams->size() != dParams->size())
+            continue;
+
+          bool hasSameParameterTypes = true;
+          for (auto index : indices(*cParams)) {
+            auto cParamsType = cParams->get(index)->getType();
+            auto dParamsType = dParams->get(index)->getType();
+            if (!cParamsType->matchesParameter(dParamsType,
+                                               TypeMatchOptions())) {
+              hasSameParameterTypes = false;
+              break;
+            }
+          }
+
+          if (!hasSameParameterTypes) {
+            continue;
+          }
+        }
+
         if (renamedDecl) {
           // If we found a duplicated candidate then we would silently fail.
           renamedDecl = nullptr;
@@ -957,11 +988,20 @@
         renamedDecl = candidate;
       }
     }
-    
+    return renamedDecl;
+  }
+
+  void printRenameForDecl(const AvailableAttr *AvAttr, const ValueDecl *D,
+                          bool includeQuotes) {
+    assert(!AvAttr->Rename.empty());
+
+    const ValueDecl *renamedDecl =
+        getRenameDecl(D, parseDeclName(AvAttr->Rename));
+
     if (renamedDecl) {
       SmallString<128> scratch;
-      auto renamedObjCRuntimeName = renamedDecl->getObjCRuntimeName()
-        ->getString(scratch);
+      auto renamedObjCRuntimeName =
+          renamedDecl->getObjCRuntimeName()->getString(scratch);
       printEncodedString(renamedObjCRuntimeName, includeQuotes);
     } else {
       printEncodedString(AvAttr->Rename, includeQuotes);
@@ -1476,9 +1516,9 @@
       MAP(UnsafeMutableRawPointer, "void *", true);
 
       Identifier ID_ObjectiveC = ctx.Id_ObjectiveC;
-      specialNames[{ID_ObjectiveC, ctx.getIdentifier("ObjCBool")}] 
+      specialNames[{ID_ObjectiveC, ctx.getIdentifier("ObjCBool")}]
         = { "BOOL", false};
-      specialNames[{ID_ObjectiveC, ctx.getIdentifier("Selector")}] 
+      specialNames[{ID_ObjectiveC, ctx.getIdentifier("Selector")}]
         = { "SEL", true };
       specialNames[{ID_ObjectiveC,
                     ctx.getIdentifier(
@@ -1605,7 +1645,7 @@
     os << clangDecl->getKindName() << " ";
   }
 
-  void visitStructType(StructType *ST, 
+  void visitStructType(StructType *ST,
                        Optional<OptionalTypeKind> optionalKind) {
     const StructDecl *SD = ST->getStructOrBoundGenericStruct();
 
@@ -1829,7 +1869,7 @@
     visitExistentialType(PT, optionalKind, /*isMetatype=*/false);
   }
 
-  void visitProtocolCompositionType(ProtocolCompositionType *PCT, 
+  void visitProtocolCompositionType(ProtocolCompositionType *PCT,
                                     Optional<OptionalTypeKind> optionalKind) {
     visitExistentialType(PCT, optionalKind, /*isMetatype=*/false);
   }
@@ -1840,7 +1880,7 @@
     visitExistentialType(instanceTy, optionalKind, /*isMetatype=*/true);
   }
 
-  void visitMetatypeType(MetatypeType *MT, 
+  void visitMetatypeType(MetatypeType *MT,
                          Optional<OptionalTypeKind> optionalKind) {
     Type instanceTy = MT->getInstanceType();
     if (auto classTy = instanceTy->getAs<ClassType>()) {
@@ -1875,7 +1915,7 @@
     os << cast<clang::ObjCTypeParamDecl>(decl->getClangDecl())->getName();
     printNullability(optionalKind);
   }
-                      
+    
   void printFunctionType(FunctionType *FT, char pointerSigil,
                          Optional<OptionalTypeKind> optionalKind) {
     visitPart(FT->getResult(), OTK_None);
@@ -1884,7 +1924,7 @@
     openFunctionTypes.push_back(FT);
   }
 
-  void visitFunctionType(FunctionType *FT, 
+  void visitFunctionType(FunctionType *FT,
                          Optional<OptionalTypeKind> optionalKind) {
     switch (FT->getRepresentation()) {
     case AnyFunctionType::Representation::Thin:
@@ -1928,18 +1968,18 @@
     visitPart(PT->getSinglyDesugaredType(), optionalKind);
   }
 
-  void visitSyntaxSugarType(SyntaxSugarType *SST, 
+  void visitSyntaxSugarType(SyntaxSugarType *SST,
                             Optional<OptionalTypeKind> optionalKind) {
     visitPart(SST->getSinglyDesugaredType(), optionalKind);
   }
 
-  void visitDynamicSelfType(DynamicSelfType *DST, 
+  void visitDynamicSelfType(DynamicSelfType *DST,
                             Optional<OptionalTypeKind> optionalKind) {
     printNullability(optionalKind, NullabilityPrintKind::ContextSensitive);
     os << "instancetype";
   }
 
-  void visitReferenceStorageType(ReferenceStorageType *RST, 
+  void visitReferenceStorageType(ReferenceStorageType *RST,
                                  Optional<OptionalTypeKind> optionalKind) {
     visitPart(RST->getReferentType(), optionalKind);
   }
@@ -1977,7 +2017,7 @@
   /// finishFunctionType()). If only a part of a type is being printed, use
   /// visitPart().
 public:
-  void print(Type ty, Optional<OptionalTypeKind> optionalKind, 
+  void print(Type ty, Optional<OptionalTypeKind> optionalKind,
              Identifier name = Identifier(),
              IsFunctionParam_t isFuncParam = IsNotFunctionParam) {
     PrettyStackTraceType trace(M.getASTContext(), "printing", ty);
@@ -2829,9 +2869,9 @@
       // FIXME: This will end up taking linear time.
       auto lhsMembers = cast<ExtensionDecl>(*lhs)->getMembers();
       auto rhsMembers = cast<ExtensionDecl>(*rhs)->getMembers();
-      unsigned numLHSMembers = std::distance(lhsMembers.begin(), 
+      unsigned numLHSMembers = std::distance(lhsMembers.begin(),
                                              lhsMembers.end());
-      unsigned numRHSMembers = std::distance(rhsMembers.begin(), 
+      unsigned numRHSMembers = std::distance(rhsMembers.begin(),
                                              rhsMembers.end());
       if (numLHSMembers != numRHSMembers)
         return numLHSMembers < numRHSMembers ? Descending : Ascending;
diff --git a/lib/SIL/InstructionUtils.cpp b/lib/SIL/InstructionUtils.cpp
index 9319610..e0495a8 100644
--- a/lib/SIL/InstructionUtils.cpp
+++ b/lib/SIL/InstructionUtils.cpp
@@ -539,7 +539,7 @@
   case OwnershipQualifiedKind::Unqualified: {
     // If we already know that the function has unqualified ownership, just
     // return early.
-    if (!F.get()->hasQualifiedOwnership())
+    if (!F.get()->hasOwnership())
       return true;
 
     // Ok, so we know at this point that we have qualified ownership. If we have
@@ -551,7 +551,7 @@
     // Otherwise, set the function to have unqualified ownership. This will
     // ensure that no more Qualified instructions can be added to the given
     // function.
-    F.get()->setUnqualifiedOwnership();
+    F.get()->setOwnershipEliminated();
     return true;
   }
   case OwnershipQualifiedKind::Qualified: {
@@ -559,7 +559,7 @@
     // have unqualified ownership, then we know that we have already seen an
     // unqualified ownership instruction. This means the function has both
     // qualified and unqualified instructions. =><=.
-    if (!F.get()->hasQualifiedOwnership())
+    if (!F.get()->hasOwnership())
       return false;
 
     // Ok, at this point we know that we are still qualified. Since functions
diff --git a/lib/SIL/Linker.cpp b/lib/SIL/Linker.cpp
index ee67081..187593d 100644
--- a/lib/SIL/Linker.cpp
+++ b/lib/SIL/Linker.cpp
@@ -200,7 +200,7 @@
 
 void SILLinkerVisitor::visitProtocolConformance(
     ProtocolConformanceRef ref, const Optional<SILDeclRef> &Member) {
-  // If an abstract protocol conformance was passed in, just return false.
+  // If an abstract protocol conformance was passed in, do nothing.
   if (ref.isAbstract())
     return;
   
@@ -211,31 +211,16 @@
   
   if (!VisitedConformances.insert(C).second)
     return;
-  
-  SILWitnessTable *WT = Mod.lookUpWitnessTable(C, true);
 
-  // If we don't find any witness table for the conformance, bail and return
-  // false.
-  if (!WT) {
-    Mod.createWitnessTableDeclaration(
-        C, getLinkageForProtocolConformance(
-               C->getRootNormalConformance(), NotForDefinition));
-
-    // Adding the declaration may allow us to now deserialize the body.
-    // Force the body if we must deserialize this witness table.
-    if (mustDeserialize) {
-      WT = Mod.lookUpWitnessTable(C, true);
-      assert(WT && WT->isDefinition()
-             && "unable to deserialize witness table when we must?!");
-    } else {
-      return;
-    }
-  }
+  auto *WT = Mod.lookUpWitnessTable(C, mustDeserialize);
 
   // If the looked up witness table is a declaration, there is nothing we can
-  // do here. Just bail and return false.
-  if (WT->isDeclaration())
+  // do here.
+  if (WT == nullptr || WT->isDeclaration()) {
+    assert(!mustDeserialize &&
+           "unable to deserialize witness table when we must?!");
     return;
+  }
 
   auto maybeVisitRelatedConformance = [&](ProtocolConformanceRef c) {
     // Formally all conformances referenced by a used conformance are used.
diff --git a/lib/SIL/MemAccessUtils.cpp b/lib/SIL/MemAccessUtils.cpp
index 1b4346e..3d61455 100644
--- a/lib/SIL/MemAccessUtils.cpp
+++ b/lib/SIL/MemAccessUtils.cpp
@@ -140,22 +140,10 @@
 
 const char *AccessedStorage::getKindName(AccessedStorage::Kind k) {
   switch (k) {
-  case Box:
-    return "Box";
-  case Stack:
-    return "Stack";
-  case Nested:
-    return "Nested";
-  case Unidentified:
-    return "Unidentified";
-  case Argument:
-    return "Argument";
-  case Yield:
-    return "Yield";
-  case Global:
-    return "Global";
-  case Class:
-    return "Class";
+#define ACCESSED_STORAGE(NAME)                                                 \
+  case AccessedStorage::NAME:                                                  \
+    return #NAME;
+#include "swift/SIL/AccessedStorage.def"
   }
   llvm_unreachable("unhandled kind");
 }
diff --git a/lib/SIL/SILBuilder.cpp b/lib/SIL/SILBuilder.cpp
index f1ac73c..b4b68d7 100644
--- a/lib/SIL/SILBuilder.cpp
+++ b/lib/SIL/SILBuilder.cpp
@@ -24,7 +24,7 @@
 SILBuilder::SILBuilder(SILGlobalVariable *GlobVar,
                        SmallVectorImpl<SILInstruction *> *InsertedInstrs)
     : TempContext(GlobVar->getModule(), InsertedInstrs), C(TempContext),
-      F(nullptr), hasOwnership(false) {
+      F(nullptr) {
   setInsertionPoint(&GlobVar->StaticInitializerBlock);
 }
 
@@ -514,7 +514,7 @@
   }
 
   // Otherwise, we want to destructure add the destructure and return.
-  if (getFunction().hasQualifiedOwnership()) {
+  if (getFunction().hasOwnership()) {
     auto *DI = emitDestructureValueOperation(Loc, V);
     copy(DI->getResults(), std::back_inserter(Results));
     return;
diff --git a/lib/SIL/SILConstants.cpp b/lib/SIL/SILConstants.cpp
index 5ff9c9f..2666f45 100644
--- a/lib/SIL/SILConstants.cpp
+++ b/lib/SIL/SILConstants.cpp
@@ -37,6 +37,9 @@
 void SymbolicValue::print(llvm::raw_ostream &os, unsigned indent) const {
   os.indent(indent);
   switch (representationKind) {
+  case RK_UninitMemory:
+    os << "uninit\n";
+    return;
   case RK_Unknown: {
     os << "unknown(" << (int)getUnknownReason() << "): ";
     getUnknownNode()->dump();
@@ -76,6 +79,16 @@
       return;
     }
   }
+  case RK_DirectAddress:
+  case RK_DerivedAddress: {
+    SmallVector<unsigned, 4> accessPath;
+    SymbolicValueMemoryObject *memObject = getAddressValue(accessPath);
+    os << "Address[" << memObject->getType() << "] ";
+    interleave(accessPath.begin(), accessPath.end(),
+               [&](unsigned idx) { os << idx; }, [&]() { os << ", "; });
+    os << "\n";
+    break;
+  }
   }
 }
 
@@ -85,6 +98,8 @@
 /// multiple forms for efficiency, but provide a simpler interface to clients.
 SymbolicValue::Kind SymbolicValue::getKind() const {
   switch (representationKind) {
+  case RK_UninitMemory:
+    return UninitMemory;
   case RK_Unknown:
     return Unknown;
   case RK_Metatype:
@@ -96,6 +111,9 @@
   case RK_Integer:
   case RK_IntegerInline:
     return Integer;
+  case RK_DirectAddress:
+  case RK_DerivedAddress:
+    return Address;
   }
 }
 
@@ -105,6 +123,7 @@
 SymbolicValue::cloneInto(ASTContext &astContext) const {
   auto thisRK = representationKind;
   switch (thisRK) {
+  case RK_UninitMemory:
   case RK_Unknown:
   case RK_Metatype:
   case RK_Function:
@@ -120,7 +139,28 @@
       results.push_back(elt.cloneInto(astContext));
     return getAggregate(results, astContext);
   }
+  case RK_DirectAddress:
+  case RK_DerivedAddress: {
+    SmallVector<unsigned, 4> accessPath;
+    auto *memObject = getAddressValue(accessPath);
+    auto *newMemObject = SymbolicValueMemoryObject::create(
+        memObject->getType(), memObject->getValue(), astContext);
+    return getAddress(newMemObject, accessPath, astContext);
   }
+  }
+}
+
+//===----------------------------------------------------------------------===//
+// SymbolicValueMemoryObject implementation
+//===----------------------------------------------------------------------===//
+
+SymbolicValueMemoryObject *
+SymbolicValueMemoryObject::create(Type type, SymbolicValue value,
+                                  ASTContext &astContext) {
+  auto *result = astContext.Allocate(sizeof(SymbolicValueMemoryObject),
+                                     alignof(SymbolicValueMemoryObject));
+  new (result) SymbolicValueMemoryObject(type, value);
+  return (SymbolicValueMemoryObject *)result;
 }
 
 //===----------------------------------------------------------------------===//
@@ -225,7 +265,7 @@
                                       ASTContext &astContext) {
     auto byteSize =
         UnknownSymbolicValue::totalSizeToAlloc<SourceLoc>(elements.size());
-    auto rawMem = astContext.Allocate(byteSize, alignof(UnknownSymbolicValue));
+    auto *rawMem = astContext.Allocate(byteSize, alignof(UnknownSymbolicValue));
 
     // Placement-new the value inside the memory we just allocated.
     auto value = ::new (rawMem) UnknownSymbolicValue(
@@ -280,6 +320,91 @@
 }
 
 //===----------------------------------------------------------------------===//
+// Addresses
+//===----------------------------------------------------------------------===//
+
+namespace swift {
+
+/// This is the representation of a derived address.  A derived address refers
+/// to a memory object along with an access path that drills into it.
+struct DerivedAddressValue final
+    : private llvm::TrailingObjects<DerivedAddressValue, unsigned> {
+  friend class llvm::TrailingObjects<DerivedAddressValue, unsigned>;
+
+  SymbolicValueMemoryObject *memoryObject;
+
+  /// This is the number of indices in the derived address.
+  const unsigned numElements;
+
+  static DerivedAddressValue *create(SymbolicValueMemoryObject *memoryObject,
+                                     ArrayRef<unsigned> elements,
+                                     ASTContext &astContext) {
+    auto byteSize =
+        DerivedAddressValue::totalSizeToAlloc<unsigned>(elements.size());
+    auto *rawMem = astContext.Allocate(byteSize, alignof(DerivedAddressValue));
+
+    //  Placement initialize the object.
+    auto dav =
+        ::new (rawMem) DerivedAddressValue(memoryObject, elements.size());
+    std::uninitialized_copy(elements.begin(), elements.end(),
+                            dav->getTrailingObjects<unsigned>());
+    return dav;
+  }
+
+  /// Return the access path for this derived address, which is an array of
+  /// indices drilling into the memory object.
+  ArrayRef<unsigned> getElements() const {
+    return {getTrailingObjects<unsigned>(), numElements};
+  }
+
+  // This is used by the llvm::TrailingObjects base class.
+  size_t numTrailingObjects(OverloadToken<unsigned>) const {
+    return numElements;
+  }
+
+private:
+  DerivedAddressValue() = delete;
+  DerivedAddressValue(const DerivedAddressValue &) = delete;
+  DerivedAddressValue(SymbolicValueMemoryObject *memoryObject,
+                      unsigned numElements)
+      : memoryObject(memoryObject), numElements(numElements) {}
+};
+} // end namespace swift
+
+/// Return a symbolic value that represents the address of a memory object
+/// indexed by a path.
+SymbolicValue SymbolicValue::getAddress(SymbolicValueMemoryObject *memoryObject,
+                                        ArrayRef<unsigned> indices,
+                                        ASTContext &astContext) {
+  if (indices.empty())
+    return getAddress(memoryObject);
+
+  auto dav = DerivedAddressValue::create(memoryObject, indices, astContext);
+  SymbolicValue result;
+  result.representationKind = RK_DerivedAddress;
+  result.value.derivedAddress = dav;
+  return result;
+}
+
+/// Return the memory object of this reference along with any access path
+/// indices involved.
+SymbolicValueMemoryObject *
+SymbolicValue::getAddressValue(SmallVectorImpl<unsigned> &accessPath) const {
+  assert(getKind() == Address);
+
+  accessPath.clear();
+  if (representationKind == RK_DirectAddress)
+    return value.directAddress;
+  assert(representationKind == RK_DerivedAddress);
+
+  auto *dav = value.derivedAddress;
+
+  // The first entry is the object ID, the rest are indices in the accessPath.
+  accessPath.assign(dav->getElements().begin(), dav->getElements().end());
+  return dav->memoryObject;
+}
+
+//===----------------------------------------------------------------------===//
 // Higher level code
 //===----------------------------------------------------------------------===//
 
diff --git a/lib/SIL/SILFunctionType.cpp b/lib/SIL/SILFunctionType.cpp
index 64254fb..5d14830 100644
--- a/lib/SIL/SILFunctionType.cpp
+++ b/lib/SIL/SILFunctionType.cpp
@@ -2713,7 +2713,7 @@
   // Build the curried function type.
   auto inner =
     CanFunctionType::get(llvm::makeArrayRef(bridgedParams),
-                         bridgedResultType);
+                         bridgedResultType, innerExtInfo);
 
   auto curried =
     CanAnyFunctionType::get(genericSig, {selfParam}, inner, extInfo);
diff --git a/lib/SIL/SILInstructions.cpp b/lib/SIL/SILInstructions.cpp
index 3ac4137..fa3045d 100644
--- a/lib/SIL/SILInstructions.cpp
+++ b/lib/SIL/SILInstructions.cpp
@@ -312,16 +312,6 @@
   return getLoc().getAsASTNode<VarDecl>();
 }
 
-static void declareWitnessTable(SILModule &Mod,
-                                ProtocolConformanceRef conformanceRef) {
-  if (conformanceRef.isAbstract()) return;
-  auto C = conformanceRef.getConcrete();
-  if (!Mod.lookUpWitnessTable(C, false))
-    Mod.createWitnessTableDeclaration(C,
-        getLinkageForProtocolConformance(C->getRootNormalConformance(),
-                                         NotForDefinition));
-}
-
 AllocExistentialBoxInst *AllocExistentialBoxInst::create(
     SILDebugLocation Loc, SILType ExistentialType, CanType ConcreteType,
     ArrayRef<ProtocolConformanceRef> Conformances,
@@ -333,8 +323,6 @@
   SILModule &Mod = F->getModule();
   auto Size = totalSizeToAlloc<swift::Operand>(TypeDependentOperands.size());
   auto Buffer = Mod.allocateInst(Size, alignof(AllocExistentialBoxInst));
-  for (ProtocolConformanceRef C : Conformances)
-    declareWitnessTable(Mod, C);
   return ::new (Buffer) AllocExistentialBoxInst(Loc,
                                                 ExistentialType,
                                                 ConcreteType,
@@ -1633,7 +1621,6 @@
   auto Size = totalSizeToAlloc<swift::Operand>(TypeDependentOperands.size());
   auto Buffer = Mod.allocateInst(Size, alignof(WitnessMethodInst));
 
-  declareWitnessTable(Mod, Conformance);
   return ::new (Buffer) WitnessMethodInst(Loc, LookupType, Conformance, Member,
                                           Ty, TypeDependentOperands);
 }
@@ -1667,8 +1654,6 @@
       totalSizeToAlloc<swift::Operand>(1 + TypeDependentOperands.size());
   void *Buffer = Mod.allocateInst(size,
                                   alignof(InitExistentialAddrInst));
-  for (ProtocolConformanceRef C : Conformances)
-    declareWitnessTable(Mod, C);
   return ::new (Buffer) InitExistentialAddrInst(Loc, Existential,
                                                 TypeDependentOperands,
                                                 ConcreteType,
@@ -1688,9 +1673,6 @@
       totalSizeToAlloc<swift::Operand>(1 + TypeDependentOperands.size());
 
   void *Buffer = Mod.allocateInst(size, alignof(InitExistentialRefInst));
-  for (ProtocolConformanceRef C : Conformances)
-    declareWitnessTable(Mod, C);
-
   return ::new (Buffer)
       InitExistentialValueInst(Loc, ExistentialType, ConcreteType, Instance,
                                 TypeDependentOperands, Conformances);
@@ -1711,9 +1693,6 @@
 
   void *Buffer = Mod.allocateInst(size,
                                   alignof(InitExistentialRefInst));
-  for (ProtocolConformanceRef C : Conformances)
-    declareWitnessTable(Mod, C);
-
   return ::new (Buffer) InitExistentialRefInst(Loc, ExistentialType,
                                                ConcreteType,
                                                Instance,
@@ -1746,9 +1725,6 @@
       1 + TypeDependentOperands.size(), conformances.size());
 
   void *buffer = M.allocateInst(size, alignof(InitExistentialMetatypeInst));
-  for (ProtocolConformanceRef conformance : conformances)
-    declareWitnessTable(M, conformance);
-
   return ::new (buffer) InitExistentialMetatypeInst(
       Loc, existentialMetatypeType, metatype,
       TypeDependentOperands, conformances);
diff --git a/lib/SIL/SILModule.cpp b/lib/SIL/SILModule.cpp
index ee8da6f..d3f298f 100644
--- a/lib/SIL/SILModule.cpp
+++ b/lib/SIL/SILModule.cpp
@@ -144,19 +144,6 @@
 }
 
 SILWitnessTable *
-SILModule::createWitnessTableDeclaration(ProtocolConformance *C,
-                                         SILLinkage linkage) {
-  // If we are passed in a null conformance (a valid value), just return nullptr
-  // since we cannot map a witness table to it.
-  if (!C)
-    return nullptr;
-
-  // Extract the root conformance.
-  auto rootC = C->getRootConformance();
-  return SILWitnessTable::create(*this, linkage, rootC);
-}
-
-SILWitnessTable *
 SILModule::lookUpWitnessTable(ProtocolConformanceRef C,
                               bool deserializeLazily) {
   // If we have an abstract conformance passed in (a legal value), just return
@@ -172,6 +159,8 @@
                               bool deserializeLazily) {
   assert(C && "null conformance passed to lookUpWitnessTable");
 
+  SILWitnessTable *wtable;
+
   auto rootC = C->getRootConformance();
   // Attempt to lookup the witness table from the table.
   auto found = WitnessTableMap.find(rootC);
@@ -189,17 +178,25 @@
              "Found witness table that is not"
              " in the witness table lookup cache.");
 #endif
-    return nullptr;
+
+    // If we don't have a witness table and we're not going to try
+    // deserializing it, do not create a declaration.
+    if (!deserializeLazily)
+      return nullptr;
+
+    auto linkage = getLinkageForProtocolConformance(rootC, NotForDefinition);
+    wtable = SILWitnessTable::create(*this, linkage,
+                                 const_cast<RootProtocolConformance *>(rootC));
+  } else {
+    wtable = found->second;
+    assert(wtable != nullptr && "Should never map a conformance to a null witness"
+                            " table.");
+
+    // If we have a definition, return it.
+    if (wtable->isDefinition())
+      return wtable;
   }
 
-  SILWitnessTable *wtable = found->second;
-  assert(wtable != nullptr && "Should never map a conformance to a null witness"
-                          " table.");
-
-  // If we have a definition, return it.
-  if (wtable->isDefinition())
-    return wtable;
-
   // If the module is at or past the Lowered stage, then we can't do any
   // further deserialization, since pre-IRGen SIL lowering changes the types
   // of definitions to make them incompatible with canonical serialized SIL.
diff --git a/lib/SIL/SILOwnershipVerifier.cpp b/lib/SIL/SILOwnershipVerifier.cpp
index 1ee998d..54087b3 100644
--- a/lib/SIL/SILOwnershipVerifier.cpp
+++ b/lib/SIL/SILOwnershipVerifier.cpp
@@ -637,7 +637,7 @@
 
   // If the given function has unqualified ownership or we have been asked by
   // the user not to verify this function, there is nothing to verify.
-  if (!getFunction()->hasQualifiedOwnership() ||
+  if (!getFunction()->hasOwnership() ||
       !getFunction()->shouldVerifyOwnership())
     return;
 
@@ -701,7 +701,7 @@
 
   // If the given function has unqualified ownership or we have been asked by
   // the user not to verify this function, there is nothing to verify.
-  if (!f->hasQualifiedOwnership() || !f->shouldVerifyOwnership())
+  if (!f->hasOwnership() || !f->shouldVerifyOwnership())
     return;
 
   ErrorBehaviorKind errorBehavior;
@@ -737,7 +737,7 @@
 
   // If the given function has unqualified ownership, there is nothing further
   // to verify.
-  if (!f->hasQualifiedOwnership())
+  if (!f->hasOwnership())
     return false;
 
   ErrorBehaviorKind errorBehavior(ErrorBehaviorKind::ReturnFalse);
diff --git a/lib/SIL/SILPrinter.cpp b/lib/SIL/SILPrinter.cpp
index d753f74..2b53424 100644
--- a/lib/SIL/SILPrinter.cpp
+++ b/lib/SIL/SILPrinter.cpp
@@ -561,7 +561,7 @@
 
     // If SIL ownership is enabled and the given function has not had ownership
     // stripped out, print out ownership of SILArguments.
-    if (BB->getParent()->hasQualifiedOwnership()) {
+    if (BB->getParent()->hasOwnership()) {
       *this << getIDAndTypeAndOwnership(Args[0]);
       for (SILArgument *Arg : Args.drop_front()) {
         *this << ", " << getIDAndTypeAndOwnership(Arg);
@@ -2345,6 +2345,11 @@
   if (WasDeserializedCanonical && getModule().getStage() == SILStage::Raw)
     OS << "[canonical] ";
 
+  // If this function is not an external declaration /and/ is in ownership ssa
+  // form, print [ossa].
+  if (!isExternalDeclaration() && hasOwnership())
+    OS << "[ossa] ";
+
   printName(OS);
   OS << " : $";
   
diff --git a/lib/SIL/SILVerifier.cpp b/lib/SIL/SILVerifier.cpp
index 391e46a..6798e44 100644
--- a/lib/SIL/SILVerifier.cpp
+++ b/lib/SIL/SILVerifier.cpp
@@ -703,7 +703,7 @@
     assert(F && "Expected value base with parent function");
     // If we do not have qualified ownership, then do not verify value base
     // ownership.
-    if (!F->hasQualifiedOwnership())
+    if (!F->hasOwnership())
       return;
     SILValue(V).verifyOwnership(F->getModule(), &DEBlocks);
   }
@@ -1515,12 +1515,12 @@
     case LoadOwnershipQualifier::Unqualified:
       // We should not see loads with unqualified ownership when SILOwnership is
       // enabled.
-      require(!F.hasQualifiedOwnership(),
+      require(!F.hasOwnership(),
               "Load with unqualified ownership in a qualified function");
       break;
     case LoadOwnershipQualifier::Copy:
     case LoadOwnershipQualifier::Take:
-      require(F.hasQualifiedOwnership(),
+      require(F.hasOwnership(),
               "Load with qualified ownership in an unqualified function");
       // TODO: Could probably make this a bit stricter.
       require(!LI->getType().isTrivial(LI->getModule()),
@@ -1528,7 +1528,7 @@
               "types");
       break;
     case LoadOwnershipQualifier::Trivial:
-      require(F.hasQualifiedOwnership(),
+      require(F.hasOwnership(),
               "Load with qualified ownership in an unqualified function");
       require(LI->getType().isTrivial(LI->getModule()),
               "A load with trivial ownership must load a trivial type");
@@ -1538,7 +1538,7 @@
 
   void checkLoadBorrowInst(LoadBorrowInst *LBI) {
     require(
-        F.hasQualifiedOwnership(),
+        F.hasOwnership(),
         "Inst with qualified ownership in a function that is not qualified");
     require(LBI->getType().isObject(), "Result of load must be an object");
     require(!fnConv.useLoweredAddresses()
@@ -1552,7 +1552,7 @@
 
   void checkEndBorrowInst(EndBorrowInst *EBI) {
     require(
-        F.hasQualifiedOwnership(),
+        F.hasOwnership(),
         "Inst with qualified ownership in a function that is not qualified");
   }
 
@@ -1672,13 +1672,13 @@
     case StoreOwnershipQualifier::Unqualified:
       // We should not see loads with unqualified ownership when SILOwnership is
       // enabled.
-      require(!F.hasQualifiedOwnership(),
+      require(!F.hasOwnership(),
               "Qualified store in function with unqualified ownership?!");
       break;
     case StoreOwnershipQualifier::Init:
     case StoreOwnershipQualifier::Assign:
       require(
-          F.hasQualifiedOwnership(),
+          F.hasOwnership(),
           "Inst with qualified ownership in a function that is not qualified");
       // TODO: Could probably make this a bit stricter.
       require(!SI->getSrc()->getType().isTrivial(SI->getModule()),
@@ -1687,7 +1687,7 @@
       break;
     case StoreOwnershipQualifier::Trivial: {
       require(
-          F.hasQualifiedOwnership(),
+          F.hasOwnership(),
           "Inst with qualified ownership in a function that is not qualified");
       SILValue Src = SI->getSrc();
       require(Src->getType().isTrivial(SI->getModule()) ||
@@ -1771,26 +1771,26 @@
   void checkStrongRetain##Name##Inst(StrongRetain##Name##Inst *RI) { \
     requireObjectType(Name##StorageType, RI->getOperand(), \
                       "Operand of strong_retain_" #name); \
-    require(!F.hasQualifiedOwnership(), "strong_retain_" #name " is only in " \
+    require(!F.hasOwnership(), "strong_retain_" #name " is only in " \
                                         "functions with unqualified " \
                                         "ownership"); \
   } \
   void check##Name##RetainInst(Name##RetainInst *RI) { \
     requireObjectType(Name##StorageType, RI->getOperand(), \
                       "Operand of " #name "_retain"); \
-    require(!F.hasQualifiedOwnership(), \
+    require(!F.hasOwnership(), \
             #name "_retain is only in functions with unqualified ownership"); \
   } \
   void check##Name##ReleaseInst(Name##ReleaseInst *RI) { \
     requireObjectType(Name##StorageType, RI->getOperand(), \
                       "Operand of " #name "_release"); \
-    require(!F.hasQualifiedOwnership(), \
+    require(!F.hasOwnership(), \
             #name "_release is only in functions with unqualified ownership"); \
   } \
   void checkCopy##Name##ValueInst(Copy##Name##ValueInst *I) { \
     requireObjectType(Name##StorageType, I->getOperand(), \
                       "Operand of " #name "_retain"); \
-    require(F.hasQualifiedOwnership(), \
+    require(F.hasOwnership(), \
             "copy_" #name "_value is only valid in functions with qualified " \
             "ownership"); \
   }
@@ -1802,7 +1802,7 @@
                                 "Operand of strong_retain_" #name); \
     require(ty->isLoadable(ResilienceExpansion::Maximal), \
           "strong_retain_" #name " requires '" #name "' type to be loadable"); \
-    require(!F.hasQualifiedOwnership(), "strong_retain_" #name " is only in " \
+    require(!F.hasOwnership(), "strong_retain_" #name " is only in " \
                                         "functions with unqualified " \
                                         "ownership"); \
   } \
@@ -1811,7 +1811,7 @@
                                 "Operand of " #name "_retain"); \
     require(ty->isLoadable(ResilienceExpansion::Maximal), \
             #name "_retain requires '" #name "' type to be loadable"); \
-    require(!F.hasQualifiedOwnership(), \
+    require(!F.hasOwnership(), \
             #name "_retain is only in functions with unqualified ownership"); \
   } \
   void check##Name##ReleaseInst(Name##ReleaseInst *RI) { \
@@ -1819,7 +1819,7 @@
                                 "Operand of " #name "_release"); \
     require(ty->isLoadable(ResilienceExpansion::Maximal), \
             #name "_release requires '" #name "' type to be loadable"); \
-    require(!F.hasQualifiedOwnership(), \
+    require(!F.hasOwnership(), \
             #name "_release is only in functions with unqualified ownership"); \
   } \
   void checkCopy##Name##ValueInst(Copy##Name##ValueInst *I) { \
@@ -1891,21 +1891,21 @@
   void checkRetainValueInst(RetainValueInst *I) {
     require(I->getOperand()->getType().isObject(),
             "Source value should be an object value");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "retain_value is only in functions with unqualified ownership");
   }
 
   void checkRetainValueAddrInst(RetainValueAddrInst *I) {
     require(I->getOperand()->getType().isAddress(),
             "Source value should be an address value");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "retain_value is only in functions with unqualified ownership");
   }
 
   void checkCopyValueInst(CopyValueInst *I) {
     require(I->getOperand()->getType().isObject(),
             "Source value should be an object value");
-    require(!fnConv.useLoweredAddresses() || F.hasQualifiedOwnership(),
+    require(!fnConv.useLoweredAddresses() || F.hasOwnership(),
             "copy_value is only valid in functions with qualified "
             "ownership");
   }
@@ -1913,7 +1913,7 @@
   void checkDestroyValueInst(DestroyValueInst *I) {
     require(I->getOperand()->getType().isObject(),
             "Source value should be an object value");
-    require(!fnConv.useLoweredAddresses() || F.hasQualifiedOwnership(),
+    require(!fnConv.useLoweredAddresses() || F.hasOwnership(),
             "destroy_value is only valid in functions with qualified "
             "ownership");
   }
@@ -1921,14 +1921,14 @@
   void checkReleaseValueInst(ReleaseValueInst *I) {
     require(I->getOperand()->getType().isObject(),
             "Source value should be an object value");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "release_value is only in functions with unqualified ownership");
   }
 
   void checkReleaseValueAddrInst(ReleaseValueAddrInst *I) {
     require(I->getOperand()->getType().isAddress(),
             "Source value should be an address value");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "release_value is only in functions with unqualified ownership");
   }
 
@@ -2215,12 +2215,12 @@
 
   void checkStrongRetainInst(StrongRetainInst *RI) {
     requireReferenceValue(RI->getOperand(), "Operand of strong_retain");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "strong_retain is only in functions with unqualified ownership");
   }
   void checkStrongReleaseInst(StrongReleaseInst *RI) {
     requireReferenceValue(RI->getOperand(), "Operand of release");
-    require(!F.hasQualifiedOwnership(),
+    require(!F.hasOwnership(),
             "strong_release is only in functions with unqualified ownership");
   }
 
@@ -2493,8 +2493,6 @@
       auto conformance = AMI->getConformance().getConcrete();
       require(conformance->getType()->isEqual(AMI->getLookupType()),
               "concrete type lookup requires conformance that matches type");
-      require(AMI->getModule().lookUpWitnessTable(conformance, false),
-              "Could not find witness table for conformance");
     }
 
     require(AMI->getMember().requiresNewWitnessTableEntry(),
@@ -3204,13 +3202,6 @@
       require(conformances[i].getRequirement() == protocols[i]->getDecl(),
               "init_existential instruction must have conformances in "
               "proper order");
-
-      if (conformances[i].isConcrete()) {
-        auto conformance = conformances[i].getConcrete();
-        require(F.getModule().lookUpWitnessTable(conformance, false),
-                "Could not find witness table for conformance.");
-
-      }
     }
   }
 
@@ -3322,7 +3313,7 @@
                 CBI->getCastType(),
             "success dest block argument of checked_cast_br must match type of "
             "cast");
-    require(F.hasQualifiedOwnership() || CBI->getFailureBB()->args_empty(),
+    require(F.hasOwnership() || CBI->getFailureBB()->args_empty(),
             "failure dest of checked_cast_br in unqualified ownership sil must "
             "take no arguments");
 #if 0
@@ -3349,7 +3340,7 @@
                 CBI->getCastType(),
             "success dest block argument of checked_cast_value_br must match "
             "type of cast");
-    require(F.hasQualifiedOwnership() || CBI->getFailureBB()->args_empty(),
+    require(F.hasOwnership() || CBI->getFailureBB()->args_empty(),
             "failure dest of checked_cast_value_br in unqualified ownership "
             "sil must take no arguments");
   }
@@ -3897,7 +3888,7 @@
       // The destination BB can take the argument payload, if any, as a BB
       // arguments, or it can ignore it and take no arguments.
       if (elt->hasAssociatedValues()) {
-        if (isSILOwnershipEnabled() && F.hasQualifiedOwnership()) {
+        if (isSILOwnershipEnabled() && F.hasOwnership()) {
           require(dest->getArguments().size() == 1,
                   "switch_enum destination for case w/ args must take 1 "
                   "argument");
@@ -3939,14 +3930,14 @@
       // an @owned original version of the enum.
       //
       // When SIL ownership is disabled, we no longer support this.
-      if (isSILOwnershipEnabled() && F.hasQualifiedOwnership()) {
+      if (isSILOwnershipEnabled() && F.hasOwnership()) {
         require(SOI->getDefaultBB()->getNumArguments() == 1,
                 "Switch enum default block should have one argument");
         require(SOI->getDefaultBB()->getArgument(0)->getType() ==
                     SOI->getOperand()->getType(),
                 "Switch enum default block should have one argument that is "
                 "the same as the input type");
-      } else if (!F.hasQualifiedOwnership()) {
+      } else if (!F.hasOwnership()) {
         require(SOI->getDefaultBB()->args_empty(),
                 "switch_enum default destination must take no arguments");
       }
@@ -4322,7 +4313,7 @@
       }
 
       // If we do not have qualified ownership, do not check ownership.
-      if (!F.hasQualifiedOwnership()) {
+      if (!F.hasOwnership()) {
         return;
       }
 
@@ -4613,7 +4604,7 @@
       // have non-trivial arguments.
       //
       // FIXME: it would be far simpler to ban all critical edges in general.
-      if (!F->hasQualifiedOwnership())
+      if (!F->hasOwnership())
         continue;
 
       if (isCriticalEdgePred(CBI, CondBranchInst::TrueIdx)) {
diff --git a/lib/SIL/TypeLowering.cpp b/lib/SIL/TypeLowering.cpp
index b688413..72fe4b2 100644
--- a/lib/SIL/TypeLowering.cpp
+++ b/lib/SIL/TypeLowering.cpp
@@ -561,7 +561,7 @@
 
     void emitStore(SILBuilder &B, SILLocation loc, SILValue value,
                    SILValue addr, StoreOwnershipQualifier qual) const override {
-      if (B.getFunction().hasQualifiedOwnership()) {
+      if (B.getFunction().hasOwnership()) {
         B.createStore(loc, value, addr, StoreOwnershipQualifier::Trivial);
         return;
       }
@@ -570,7 +570,7 @@
 
     SILValue emitLoad(SILBuilder &B, SILLocation loc, SILValue addr,
                       LoadOwnershipQualifier qual) const override {
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createLoad(loc, addr, LoadOwnershipQualifier::Trivial);
       return B.createLoad(loc, addr, LoadOwnershipQualifier::Unqualified);
     }
@@ -638,7 +638,7 @@
 
     void emitStore(SILBuilder &B, SILLocation loc, SILValue value,
                    SILValue addr, StoreOwnershipQualifier qual) const override {
-      if (B.getFunction().hasQualifiedOwnership()) {
+      if (B.getFunction().hasOwnership()) {
         B.createStore(loc, value, addr, qual);
         return;
       }
@@ -662,7 +662,7 @@
 
     SILValue emitLoad(SILBuilder &B, SILLocation loc, SILValue addr,
                       LoadOwnershipQualifier qual) const override {
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createLoad(loc, addr, qual);
 
       SILValue loadValue =
@@ -760,7 +760,7 @@
 
     SILValue emitCopyValue(SILBuilder &B, SILLocation loc,
                            SILValue value) const override {
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createCopyValue(loc, value);
       B.createRetainValue(loc, value, B.getDefaultAtomicity());
       return value;
@@ -793,7 +793,7 @@
 
     void emitDestroyValue(SILBuilder &B, SILLocation loc,
                           SILValue aggValue) const override {
-      if (B.getFunction().hasQualifiedOwnership()) {
+      if (B.getFunction().hasOwnership()) {
         B.createDestroyValue(loc, aggValue);
         return;
       }
@@ -898,7 +898,7 @@
 
     SILValue emitCopyValue(SILBuilder &B, SILLocation loc,
                            SILValue value) const override {
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createCopyValue(loc, value);
       B.createRetainValue(loc, value, B.getDefaultAtomicity());
       return value;
@@ -907,7 +907,7 @@
     SILValue emitLoweredCopyValue(SILBuilder &B, SILLocation loc,
                                   SILValue value,
                                   TypeExpansionKind style) const override {
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createCopyValue(loc, value);
       B.createRetainValue(loc, value, B.getDefaultAtomicity());
       return value;
@@ -915,7 +915,7 @@
 
     void emitDestroyValue(SILBuilder &B, SILLocation loc,
                           SILValue value) const override {
-      if (B.getFunction().hasQualifiedOwnership()) {
+      if (B.getFunction().hasOwnership()) {
         B.createDestroyValue(loc, value);
         return;
       }
@@ -961,7 +961,7 @@
           isa<PreviousDynamicFunctionRefInst>(value))
         return value;
 
-      if (B.getFunction().hasQualifiedOwnership())
+      if (B.getFunction().hasOwnership())
         return B.createCopyValue(loc, value);
 
       B.createStrongRetain(loc, value, B.getDefaultAtomicity());
@@ -970,7 +970,7 @@
 
     void emitDestroyValue(SILBuilder &B, SILLocation loc,
                           SILValue value) const override {
-      if (B.getFunction().hasQualifiedOwnership()) {
+      if (B.getFunction().hasOwnership()) {
         B.createDestroyValue(loc, value);
         return;
       }
@@ -987,14 +987,14 @@
                                  IsReferenceCounted) {} \
     SILValue emitCopyValue(SILBuilder &B, SILLocation loc, \
                            SILValue value) const override { \
-      if (B.getFunction().hasQualifiedOwnership()) \
+      if (B.getFunction().hasOwnership()) \
         return B.createCopyValue(loc, value); \
       B.create##Name##Retain(loc, value, B.getDefaultAtomicity()); \
       return value; \
     } \
     void emitDestroyValue(SILBuilder &B, SILLocation loc, \
                           SILValue value) const override { \
-      if (B.getFunction().hasQualifiedOwnership()) { \
+      if (B.getFunction().hasOwnership()) { \
         B.createDestroyValue(loc, value); \
         return; \
       } \
diff --git a/lib/SILGen/RValue.cpp b/lib/SILGen/RValue.cpp
index bc8948d..1653004 100644
--- a/lib/SILGen/RValue.cpp
+++ b/lib/SILGen/RValue.cpp
@@ -318,13 +318,8 @@
                 KIND == ImplodeKind::Copy, "Not handled by init");
   bool isInit = (KIND == ImplodeKind::Forward);
 
-  // First, unwrap one-element tuples, since we cannot lower them.
-  auto tupleType = dyn_cast<TupleType>(type);
-  if (tupleType && tupleType->getNumElements() == 1)
-    type = tupleType.getElementType(0);
-
   // If the element has non-tuple type, just serve it up to the initialization.
-  tupleType = dyn_cast<TupleType>(type);
+  auto tupleType = dyn_cast<TupleType>(type);
   if (!tupleType) {
     // We take the first value.
     ManagedValue result = values[0];
diff --git a/lib/SILGen/SILGenDecl.cpp b/lib/SILGen/SILGenDecl.cpp
index e56ba53..6c6eee7 100644
--- a/lib/SILGen/SILGenDecl.cpp
+++ b/lib/SILGen/SILGenDecl.cpp
@@ -696,9 +696,12 @@
        getUnmanagedValue();
   }
 
+  assert(testBool->getType().getASTType()->isBool());
+  auto i1Value = SGF.emitUnwrapIntegerResult(loc, testBool);
+
   SILBasicBlock *contBB = SGF.B.splitBlockForFallthrough();
   auto falseBB = SGF.Cleanups.emitBlockForCleanups(getFailureDest(), loc);
-  SGF.B.createCondBranch(loc, testBool, contBB, falseBB);
+  SGF.B.createCondBranch(loc, i1Value, contBB, falseBB);
 
   SGF.B.setInsertionPoint(contBB);
 }
@@ -995,13 +998,7 @@
   assert(isInit && "Only initialization is supported for refutable patterns");
 
   // Extract the i1 from the Bool struct.
-  StructDecl *BoolStruct = cast<StructDecl>(SGF.getASTContext().getBoolDecl());
-  auto Members = BoolStruct->lookupDirect(SGF.getASTContext().Id_value_);
-  assert(Members.size() == 1 &&
-         "Bool should have only one property with name '_value'");
-  auto Member = dyn_cast<VarDecl>(Members[0]);
-  assert(Member &&"Bool should have a property with name '_value' of type Int1");
-  auto *i1Val = SGF.B.createStructExtract(loc, value.forward(SGF), Member);
+  auto i1Value = SGF.emitUnwrapIntegerResult(loc, value.forward(SGF));
 
   // Branch on the boolean based on whether we're testing for true or false.
   SILBasicBlock *trueBB = SGF.B.splitBlockForFallthrough();
@@ -1010,7 +1007,7 @@
 
   if (!pattern->getValue())
     std::swap(trueBB, falseBB);
-  SGF.B.createCondBranch(loc, i1Val, trueBB, falseBB);
+  SGF.B.createCondBranch(loc, i1Value, trueBB, falseBB);
   SGF.B.setInsertionPoint(contBB);
 }
 
@@ -1264,6 +1261,7 @@
       // Evaluate the condition as an i1 value (guaranteed by Sema).
       FullExpr Scope(Cleanups, CleanupLocation(expr));
       booleanTestValue = emitRValue(expr).forwardAsSingleValue(*this, expr);
+      booleanTestValue = emitUnwrapIntegerResult(expr, booleanTestValue);
       booleanTestLoc = expr;
       break;
     }
diff --git a/lib/SILGen/SILGenExpr.cpp b/lib/SILGen/SILGenExpr.cpp
index 1700891..2cc12d0 100644
--- a/lib/SILGen/SILGenExpr.cpp
+++ b/lib/SILGen/SILGenExpr.cpp
@@ -4283,9 +4283,6 @@
 
     // If the destination is a tuple, recursively destructure.
     void visitTupleExpr(TupleExpr *E) {
-      auto *TTy = E->getType()->castTo<TupleType>();
-      assert(TTy->hasLValueType() || TTy->isVoid());
-      (void)TTy;
       for (auto &elt : E->getElements()) {
         visit(elt);
       }
@@ -4398,7 +4395,6 @@
 
   // Handle tuple destinations by destructuring them if present.
   CanType destType = dest->getType()->getCanonicalType();
-  assert(!destType->isMaterializable() || destType->isVoid());
 
   // But avoid this in the common case.
   if (!isa<TupleType>(destType)) {
diff --git a/lib/SILGen/SILGenForeignError.cpp b/lib/SILGen/SILGenForeignError.cpp
index 5d16487..067338b 100644
--- a/lib/SILGen/SILGenForeignError.cpp
+++ b/lib/SILGen/SILGenForeignError.cpp
@@ -281,25 +281,6 @@
   emitThrow(loc, error);
 }
 
-/// Unwrap a value of a wrapped integer type to get at the juicy
-/// Builtin.IntegerN value within.
-static SILValue emitUnwrapIntegerResult(SILGenFunction &SGF,
-                                        SILLocation loc,
-                                        SILValue value) {
-  // This is a loop because we want to handle types that wrap integer types,
-  // like ObjCBool (which may be Bool or Int8).
-  while (!value->getType().is<BuiltinIntegerType>()) {
-    auto structDecl = value->getType().getStructOrBoundGenericStruct();
-    assert(structDecl && "value for error result wasn't of struct type!");
-    assert(std::next(structDecl->getStoredProperties().begin())
-             == structDecl->getStoredProperties().end());
-    auto property = *structDecl->getStoredProperties().begin();
-    value = SGF.B.createStructExtract(loc, value, property);
-  }
-
-  return value;
-}
-
 /// Perform a foreign error check by testing whether the call result is zero.
 /// The call result is otherwise ignored.
 static void
@@ -312,7 +293,7 @@
   }
 
   SILValue resultValue =
-    emitUnwrapIntegerResult(SGF, loc, result.getUnmanagedValue());
+    SGF.emitUnwrapIntegerResult(loc, result.getUnmanagedValue());
   auto resultType = resultValue->getType().getASTType();
 
   if (!resultType->isBuiltinIntegerType(1)) {
diff --git a/lib/SILGen/SILGenFunction.cpp b/lib/SILGen/SILGenFunction.cpp
index 28f7590..e4ef770 100644
--- a/lib/SILGen/SILGenFunction.cpp
+++ b/lib/SILGen/SILGenFunction.cpp
@@ -687,3 +687,19 @@
     return SP->getPGOParent(Node);
   return None;
 }
+
+SILValue SILGenFunction::emitUnwrapIntegerResult(SILLocation loc,
+                                                 SILValue value) {
+  // This is a loop because we want to handle types that wrap integer types,
+  // like ObjCBool (which may be Bool or Int8).
+  while (!value->getType().is<BuiltinIntegerType>()) {
+    auto structDecl = value->getType().getStructOrBoundGenericStruct();
+    assert(structDecl && "value for error result wasn't of struct type!");
+    assert(std::next(structDecl->getStoredProperties().begin())
+           == structDecl->getStoredProperties().end());
+    auto property = *structDecl->getStoredProperties().begin();
+    value = B.createStructExtract(loc, value, property);
+  }
+
+  return value;
+}
diff --git a/lib/SILGen/SILGenFunction.h b/lib/SILGen/SILGenFunction.h
index 1cdcaeb..233cfac 100644
--- a/lib/SILGen/SILGenFunction.h
+++ b/lib/SILGen/SILGenFunction.h
@@ -1343,6 +1343,8 @@
                                            SILValue semanticValue,
                                            SILType storageType);
 
+  SILValue emitUnwrapIntegerResult(SILLocation loc, SILValue value);
+  
   /// Load an r-value out of the given address. This does not handle
   /// reabstraction or bridging. If that is needed, use the other emit load
   /// entry point.
diff --git a/lib/SILGen/SILGenPattern.cpp b/lib/SILGen/SILGenPattern.cpp
index d38c136..209981b 100644
--- a/lib/SILGen/SILGenPattern.cpp
+++ b/lib/SILGen/SILGenPattern.cpp
@@ -1210,7 +1210,9 @@
     testBool = SGF.emitRValueAsSingleValue(guard).getUnmanagedValue();
   }
 
-  SGF.B.createCondBranch(loc, testBool, trueBB, falseBB);
+  // Extract the i1 from the Bool struct.
+  auto i1Value = SGF.emitUnwrapIntegerResult(loc, testBool);
+  SGF.B.createCondBranch(loc, i1Value, trueBB, falseBB);
 
   SGF.B.setInsertionPoint(falseBB);
   failure(loc);
@@ -2250,15 +2252,8 @@
   SILValue srcValue = src.getFinalManagedValue().forward(SGF);
 
   // Extract the i1 from the Bool struct.
-  StructDecl *BoolStruct = cast<StructDecl>(Context.getBoolDecl());
-  auto Members = BoolStruct->lookupDirect(Context.Id_value_);
-  assert(Members.size() == 1 &&
-         "Bool should have only one property with name '_value'");
-  auto Member = dyn_cast<VarDecl>(Members[0]);
-  assert(Member &&"Bool should have a property with name '_value' of type Int1");
-  auto *ETI = SGF.B.createStructExtract(loc, srcValue, Member);
-
-  SGF.B.createSwitchValue(loc, SILValue(ETI), defaultBB, caseBBs);
+  auto i1Value = SGF.emitUnwrapIntegerResult(loc, srcValue);
+  SGF.B.createSwitchValue(loc, i1Value, defaultBB, caseBBs);
 
   // Okay, now emit all the cases.
   for (unsigned i = 0, e = caseInfos.size(); i != e; ++i) {
diff --git a/lib/SILGen/SILGenStmt.cpp b/lib/SILGen/SILGenStmt.cpp
index 1ff751e..b38fb2d 100644
--- a/lib/SILGen/SILGenStmt.cpp
+++ b/lib/SILGen/SILGenStmt.cpp
@@ -232,15 +232,14 @@
   assert(B.hasValidInsertionPoint() &&
          "emitting condition at unreachable point");
 
-  // Sema forces conditions to have Builtin.i1 type, which guarantees this.
+  // Sema forces conditions to have Bool type, which guarantees this.
   SILValue V;
   {
     FullExpr Scope(Cleanups, CleanupLocation(E));
     V = emitRValue(E).forwardAsSingleValue(*this, E);
   }
-  assert(V->getType().castTo<BuiltinIntegerType>()->isFixedWidth(1));
-
-  return emitCondition(V, E, invertValue, contArgs, NumTrueTaken,
+  auto i1Value = emitUnwrapIntegerResult(E, V);
+  return emitCondition(i1Value, E, invertValue, contArgs, NumTrueTaken,
                        NumFalseTaken);
 }
 
@@ -525,8 +524,8 @@
         SGF.emitRValueAsSingleValue(stmt->getCondition()).getUnmanagedValue();
   }
 
-  // Sema forces conditions to have Builtin.i1 type.
-  assert(condition->getType().castTo<BuiltinIntegerType>()->isFixedWidth(1));
+  // Extract the i1 from the Bool struct.
+  auto i1Value = SGF.emitUnwrapIntegerResult(stmt, condition);
 
   SILValue message = SGF.B.createStringLiteral(
       stmt, stmt->getMessage(), StringLiteralInst::Encoding::UTF8);
@@ -534,7 +533,7 @@
   auto resultType = SGF.getASTContext().TheEmptyTupleType;
   SGF.B.createBuiltin(
       stmt, SGF.getASTContext().getIdentifier("poundAssert"),
-      SGF.getLoweredType(resultType), {}, {condition, message});
+      SGF.getLoweredType(resultType), {}, {i1Value, message});
 }
 
 namespace {
diff --git a/lib/SILOptimizer/Analysis/ARCAnalysis.cpp b/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
index b63c6ed..33ac9b6 100644
--- a/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
+++ b/lib/SILOptimizer/Analysis/ARCAnalysis.cpp
@@ -1055,7 +1055,7 @@
 
     // Try to speed up the trivial case of single release/dealloc.
     if (isa<StrongReleaseInst>(User) || isa<DeallocBoxInst>(User) ||
-        isa<DestroyValueInst>(User)) {
+        isa<DestroyValueInst>(User) || isa<ReleaseValueInst>(User)) {
       if (!seenRelease)
         OneRelease = User;
       else
diff --git a/lib/SILOptimizer/FunctionSignatureTransforms/ExistentialTransform.cpp b/lib/SILOptimizer/FunctionSignatureTransforms/ExistentialTransform.cpp
index 7e23285..2ac1c14 100644
--- a/lib/SILOptimizer/FunctionSignatureTransforms/ExistentialTransform.cpp
+++ b/lib/SILOptimizer/FunctionSignatureTransforms/ExistentialTransform.cpp
@@ -510,8 +510,8 @@
     NewF->addSemanticsAttr(Attr);
 
   /// Set Unqualified ownership, if any.
-  if (!F->hasQualifiedOwnership()) {
-    NewF->setUnqualifiedOwnership();
+  if (!F->hasOwnership()) {
+    NewF->setOwnershipEliminated();
   }
 
   /// Step 1a: Populate the body of NewF.
diff --git a/lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp b/lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp
index a8e27f2..0112bde 100644
--- a/lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp
+++ b/lib/SILOptimizer/FunctionSignatureTransforms/FunctionSignatureOpts.cpp
@@ -506,8 +506,8 @@
       /*classSubclassScope=*/SubclassScope::NotApplicable,
       F->getInlineStrategy(), F->getEffectsKind(), nullptr, F->getDebugScope());
   SILFunction *NewF = TransformDescriptor.OptimizedFunction.get();
-  if (!F->hasQualifiedOwnership()) {
-    NewF->setUnqualifiedOwnership();
+  if (!F->hasOwnership()) {
+    NewF->setOwnershipEliminated();
   }
 
   if (F->isSpecialization()) {
diff --git a/lib/SILOptimizer/IPO/CapturePromotion.cpp b/lib/SILOptimizer/IPO/CapturePromotion.cpp
index 3453954..2e62fe1 100644
--- a/lib/SILOptimizer/IPO/CapturePromotion.cpp
+++ b/lib/SILOptimizer/IPO/CapturePromotion.cpp
@@ -440,8 +440,8 @@
       Orig->getEffectsKind(), Orig, Orig->getDebugScope());
   for (auto &Attr : Orig->getSemanticsAttrs())
     Fn->addSemanticsAttr(Attr);
-  if (!Orig->hasQualifiedOwnership()) {
-    Fn->setUnqualifiedOwnership();
+  if (!Orig->hasOwnership()) {
+    Fn->setOwnershipEliminated();
   }
   return Fn;
 }
@@ -482,7 +482,7 @@
     // If SIL ownership is enabled, we need to perform a borrow here if we have
     // a non-trivial value. We know that our value is not written to and it does
     // not escape. The use of a borrow enforces this.
-    if (Cloned->hasQualifiedOwnership() &&
+    if (Cloned->hasOwnership() &&
         MappedValue.getOwnershipKind() != ValueOwnershipKind::Any) {
       SILLocation Loc(const_cast<ValueDecl *>((*I)->getDecl()));
       MappedValue = getBuilder().createBeginBorrow(Loc, MappedValue);
@@ -536,7 +536,7 @@
 void
 ClosureCloner::visitStrongReleaseInst(StrongReleaseInst *Inst) {
   assert(
-      !Inst->getFunction()->hasQualifiedOwnership() &&
+      !Inst->getFunction()->hasOwnership() &&
       "Should not see strong release in a function with qualified ownership");
   SILValue Operand = Inst->getOperand();
   if (auto *A = dyn_cast<SILArgument>(Operand)) {
@@ -574,7 +574,7 @@
 
       // If ownership is enabled, then we must emit a begin_borrow for any
       // non-trivial value.
-      if (F.hasQualifiedOwnership() &&
+      if (F.hasOwnership() &&
           Value.getOwnershipKind() != ValueOwnershipKind::Any) {
         auto *BBI = cast<BeginBorrowInst>(Value);
         Value = BBI->getOperand();
@@ -634,7 +634,7 @@
 /// The two relevant cases are a direct load from a promoted address argument or
 /// a load of a struct_element_addr of a promoted address argument.
 void ClosureCloner::visitLoadBorrowInst(LoadBorrowInst *LI) {
-  assert(LI->getFunction()->hasQualifiedOwnership() &&
+  assert(LI->getFunction()->hasOwnership() &&
          "We should only see a load borrow in ownership qualified SIL");
   if (SILValue Val = getProjectBoxMappedVal(LI->getOperand())) {
     // Loads of the address argument get eliminated completely; the uses of
@@ -664,7 +664,7 @@
     // behaviors depending on the type of load. Specifically, if we have a
     // load [copy], then we need to add a copy_value here. If we have a take
     // or trivial, we just propagate the value through.
-    if (LI->getFunction()->hasQualifiedOwnership()
+    if (LI->getFunction()->hasOwnership()
         && LI->getOwnershipQualifier() == LoadOwnershipQualifier::Copy) {
       Val = getBuilder().createCopyValue(LI->getLoc(), Val);
     }
@@ -682,7 +682,7 @@
     // Loads of a struct_element_addr of an argument get replaced with a
     // struct_extract of the new passed in value. The value should be borrowed
     // already, so we can just extract the value.
-    assert(!getBuilder().getFunction().hasQualifiedOwnership() ||
+    assert(!getBuilder().getFunction().hasOwnership() ||
            Val.getOwnershipKind().isCompatibleWith(ValueOwnershipKind::Guaranteed));
     Val = getBuilder().emitStructExtract(LI->getLoc(), Val, SEAI->getField(),
                                          LI->getType());
@@ -690,7 +690,7 @@
     // If we were performing a load [copy], then we need to a perform a copy
     // here since when cloning, we do not eliminate the destroy on the copied
     // value.
-    if (LI->getFunction()->hasQualifiedOwnership()
+    if (LI->getFunction()->hasOwnership()
         && LI->getOwnershipQualifier() == LoadOwnershipQualifier::Copy) {
       Val = getBuilder().createCopyValue(LI->getLoc(), Val);
     }
diff --git a/lib/SILOptimizer/IPO/CapturePropagation.cpp b/lib/SILOptimizer/IPO/CapturePropagation.cpp
index 0536192..6c1cdd6 100644
--- a/lib/SILOptimizer/IPO/CapturePropagation.cpp
+++ b/lib/SILOptimizer/IPO/CapturePropagation.cpp
@@ -265,8 +265,8 @@
       OrigF->getEntryCount(), OrigF->isThunk(), OrigF->getClassSubclassScope(),
       OrigF->getInlineStrategy(), OrigF->getEffectsKind(),
       /*InsertBefore*/ OrigF, OrigF->getDebugScope());
-  if (!OrigF->hasQualifiedOwnership()) {
-    NewF->setUnqualifiedOwnership();
+  if (!OrigF->hasOwnership()) {
+    NewF->setOwnershipEliminated();
   }
   LLVM_DEBUG(llvm::dbgs() << "  Specialize callee as ";
              NewF->printName(llvm::dbgs());
diff --git a/lib/SILOptimizer/IPO/ClosureSpecializer.cpp b/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
index d84b4bf..c1e3fb7 100644
--- a/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
+++ b/lib/SILOptimizer/IPO/ClosureSpecializer.cpp
@@ -664,8 +664,8 @@
       /*classSubclassScope=*/SubclassScope::NotApplicable,
       ClosureUser->getInlineStrategy(), ClosureUser->getEffectsKind(),
       ClosureUser, ClosureUser->getDebugScope());
-  if (!ClosureUser->hasQualifiedOwnership()) {
-    Fn->setUnqualifiedOwnership();
+  if (!ClosureUser->hasOwnership()) {
+    Fn->setOwnershipEliminated();
   }
   for (auto &Attr : ClosureUser->getSemanticsAttrs())
     Fn->addSemanticsAttr(Attr);
diff --git a/lib/SILOptimizer/IPO/GlobalOpt.cpp b/lib/SILOptimizer/IPO/GlobalOpt.cpp
index a7fc6a0..ebc0d6f 100644
--- a/lib/SILOptimizer/IPO/GlobalOpt.cpp
+++ b/lib/SILOptimizer/IPO/GlobalOpt.cpp
@@ -303,8 +303,8 @@
                                           varDecl);
 
   GetterF->setDebugScope(Store->getFunction()->getDebugScope());
-  if (!Store->getFunction()->hasQualifiedOwnership())
-    GetterF->setUnqualifiedOwnership();
+  if (!Store->getFunction()->hasOwnership())
+    GetterF->setOwnershipEliminated();
   auto *EntryBB = GetterF->createBasicBlock();
 
   // Copy instructions into GetterF
@@ -545,8 +545,8 @@
                                           InitF->getModule(),
                                           InitF->getLocation(),
                                           varDecl);
-  if (!InitF->hasQualifiedOwnership())
-    GetterF->setUnqualifiedOwnership();
+  if (!InitF->hasOwnership())
+    GetterF->setOwnershipEliminated();
 
   // Copy InitF into GetterF, including the entry arguments.
   SILFunctionCloner Cloner(GetterF);
diff --git a/lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp b/lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp
index 93f3322..8f7c044 100644
--- a/lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp
+++ b/lib/SILOptimizer/Mandatory/SemanticARCOpts.cpp
@@ -13,8 +13,10 @@
 #define DEBUG_TYPE "sil-semantic-arc-opts"
 #include "swift/Basic/STLExtras.h"
 #include "swift/SIL/BasicBlockUtils.h"
+#include "swift/SIL/MemAccessUtils.h"
 #include "swift/SIL/OwnershipUtils.h"
 #include "swift/SIL/SILArgument.h"
+#include "swift/SIL/SILBuilder.h"
 #include "swift/SIL/SILInstruction.h"
 #include "swift/SIL/SILVisitor.h"
 #include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
@@ -27,11 +29,17 @@
 using namespace swift;
 
 STATISTIC(NumEliminatedInsts, "number of removed instructions");
+STATISTIC(NumLoadCopyConvertedToLoadBorrow,
+          "number of load_copy converted to load_borrow");
 
 //===----------------------------------------------------------------------===//
 //                                  Utility
 //===----------------------------------------------------------------------===//
 
+/// Return true if v only has invalidating uses that are destroy_value.
+///
+/// Semantically this implies that a value is never passed off as +1 to memory
+/// or another function implying it can be used everywhere at +0.
 static bool isConsumed(SILValue v,
                        SmallVectorImpl<DestroyValueInst *> &destroys) {
   assert(v.getOwnershipKind() == ValueOwnershipKind::Owned);
@@ -75,6 +83,7 @@
   bool visitSILInstruction(SILInstruction *i) { return false; }
   bool visitCopyValueInst(CopyValueInst *cvi);
   bool visitBeginBorrowInst(BeginBorrowInst *bbi);
+  bool visitLoadInst(LoadInst *li);
 };
 
 } // end anonymous namespace
@@ -246,6 +255,116 @@
 }
 
 //===----------------------------------------------------------------------===//
+//                         load [copy] Optimizations
+//===----------------------------------------------------------------------===//
+
+/// A flow insensitive analysis that tells the load [copy] analysis if the
+/// storage has 0, 1, >1 writes to it.
+///
+/// In the case of 0 writes, we return CanOptimizeLoadCopyResult::Always.
+///
+/// In the case of 1 write, we return OnlyIfStorageIsLocal. We are taking
+/// advantage of definite initialization implying that an alloc_stack must be
+/// written to once before any loads from the memory location. Thus if we are
+/// local and see 1 write, we can still change to load_borrow if all other uses
+/// check out.
+///
+/// If there is 2+ writes, we can not optimize = (.
+namespace {
+
+struct CanOptimizeLoadCopyFromAccessVisitor
+    : AccessedStorageVisitor<CanOptimizeLoadCopyFromAccessVisitor, bool> {
+  SILFunction &f;
+
+  CanOptimizeLoadCopyFromAccessVisitor(SILFunction &f) : f(f) {}
+
+  // Stubs
+  bool visitBox(const AccessedStorage &boxStorage) { return false; }
+  bool visitStack(const AccessedStorage &stackStorage) { return false; }
+  bool visitGlobal(const AccessedStorage &globalStorage) { return false; }
+  bool visitClass(const AccessedStorage &classStorage) { return false; }
+  bool visitYield(const AccessedStorage &yieldStorage) { return false; }
+  bool visitUnidentified(const AccessedStorage &unidentifiedStorage) {
+    return false;
+  }
+  bool visitNested(const AccessedStorage &nested) {
+    llvm_unreachable("Visitor should never see nested since we lookup our "
+                     "address storage using lookup non nested");
+  }
+
+  bool visitArgument(const AccessedStorage &argumentStorage);
+};
+
+} // namespace
+
+bool CanOptimizeLoadCopyFromAccessVisitor::visitArgument(
+    const AccessedStorage &storage) {
+  auto *arg = cast<SILFunctionArgument>(storage.getArgument(&f));
+
+  // Then check if we have an in_guaranteed argument. In this case, we can
+  // always optimize load [copy] from this.
+  if (arg->hasConvention(SILArgumentConvention::Indirect_In_Guaranteed))
+    return true;
+
+  // For now just return false.
+  return false;
+}
+
+static bool isWrittenTo(SILFunction &f, SILValue value) {
+  // Then find our accessed storage. If we can not find anything, be
+  // conservative and assume that the value is written to.
+  const auto &storage = findAccessedStorageNonNested(value);
+  if (!storage)
+    return false;
+
+  // Then see if we ever write to this address in a flow insensitive
+  // way (ignoring stores that are obviously the only initializer to
+  // memory). We have to do this since load_borrow assumes that the
+  // underlying memory is never written to.
+  return !CanOptimizeLoadCopyFromAccessVisitor(f).visit(storage);
+}
+
+// Convert a load [copy] from unique storage [read] that has all uses that can
+// accept a guaranteed parameter to a load_borrow.
+bool SemanticARCOptVisitor::visitLoadInst(LoadInst *li) {
+  if (li->getOwnershipQualifier() != LoadOwnershipQualifier::Copy)
+    return false;
+
+  // Ok, we have our load [copy]. Make sure its value is never
+  // consumed. If it is consumed, we need to pass off a +1 value, so
+  // bail.
+  //
+  // FIXME: We should consider if it is worth promoting a load [copy]
+  // -> load_borrow if we can put a copy_value on a cold path and thus
+  // eliminate RR traffic on a hot path.
+  SmallVector<DestroyValueInst *, 32> destroyValues;
+  if (isConsumed(li, destroyValues))
+    return false;
+
+  // Then check if our address is ever written to. If it is, then we
+  // can not use the load_borrow.
+  if (isWrittenTo(*li->getFunction(), li->getOperand()))
+    return false;
+
+  // Ok, we can perform our optimization. Convert the load [copy] into a
+  // load_borrow.
+  auto *lbi =
+      SILBuilderWithScope(li).createLoadBorrow(li->getLoc(), li->getOperand());
+  while (!destroyValues.empty()) {
+    auto *dvi = destroyValues.pop_back_val();
+    SILBuilderWithScope(dvi).createEndBorrow(dvi->getLoc(), lbi);
+    dvi->eraseFromParent();
+    ++NumEliminatedInsts;
+  }
+
+  li->replaceAllUsesWith(lbi);
+  li->eraseFromParent();
+  ++NumEliminatedInsts;
+  ++NumLoadCopyConvertedToLoadBorrow;
+  return true;
+}
+
+//===----------------------------------------------------------------------===//
 //                            Top Level Entrypoint
 //===----------------------------------------------------------------------===//
 
diff --git a/lib/SILOptimizer/PassManager/PassPipeline.cpp b/lib/SILOptimizer/PassManager/PassPipeline.cpp
index 0b545d3..f0a51e2 100644
--- a/lib/SILOptimizer/PassManager/PassPipeline.cpp
+++ b/lib/SILOptimizer/PassManager/PassPipeline.cpp
@@ -92,7 +92,14 @@
   P.addAllocBoxToStack();
   P.addNoReturnFolding();
   addDefiniteInitialization(P);
-  if (Options.EnableMandatorySemanticARCOpts) {
+  // Only run semantic arc opts if we are optimizing and if mandatory semantic
+  // arc opts is explicitly enabled.
+  //
+  // NOTE: Eventually this pass will be split into a mandatory/more aggressive
+  // pass. This will happen when OSSA is no longer eliminated before the
+  // optimizer pipeline is run implying we can put a pass that requires OSSA
+  // there.
+  if (Options.EnableMandatorySemanticARCOpts && Options.shouldOptimize()) {
     P.addSemanticARCOpts();
   }
   P.addClosureLifetimeFixup();
diff --git a/lib/SILOptimizer/SILCombiner/SILCombiner.h b/lib/SILOptimizer/SILCombiner/SILCombiner.h
index 1559153..34ba6e6 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombiner.h
+++ b/lib/SILOptimizer/SILCombiner/SILCombiner.h
@@ -295,6 +295,22 @@
 private:
   FullApplySite rewriteApplyCallee(FullApplySite apply, SILValue callee);
 
+  // Build concrete existential information using findInitExistential.
+  Optional<ConcreteExistentialInfo>
+  buildConcreteExistentialInfo(Operand &ArgOperand);
+
+  // Build concrete existential information using SoleConformingType.
+  Optional<ConcreteExistentialInfo>
+  buildConcreteExistentialInfoFromSoleConformingType(Operand &ArgOperand);
+
+  // Common utility function to build concrete existential information for all
+  // arguments of an apply instruction.
+  void buildConcreteExistentialInfos(
+      FullApplySite Apply,
+      llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> &CEIs,
+      SILBuilderContext &BuilderCtx,
+      SILOpenedArchetypesTracker &OpenedArchetypesTracker);
+
   bool canReplaceArg(FullApplySite Apply, const ConcreteExistentialInfo &CEI,
                      unsigned ArgIdx);
   SILInstruction *createApplyWithConcreteType(
diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
index bea8eff..55e15ad 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
@@ -615,91 +615,129 @@
     eraseInstFromFunction(*WMI);
 }
 
-//  This function propagates concrete type of existential self argument using
+//  This function determines concrete type of existential self argument using
 //  ProtocolConformanceAnalysis. The concrete type of self can be a class,
 //  struct, or an enum. It replaces the witness_method instruction
 //  with one that has a concrete type, allowing other optimizations to
 //  devirtualize it later.
-SILInstruction *
-SILCombiner::propagateSoleConformingType(FullApplySite Apply,
-                                         WitnessMethodInst *WMI) {
-  // If WMI has concrete conformance, it can be optimized.
-  if (WMI->getConformance().isConcrete())
-    return nullptr;
+Optional<ConcreteExistentialInfo>
+SILCombiner::buildConcreteExistentialInfoFromSoleConformingType(
+    Operand &ArgOperand) {
+  SILInstruction *AI = ArgOperand.getUser();
+  SILModule &M = AI->getModule();
 
-  // If the lookup type is an opened existential type,
-  // it cannot be made concrete.
-  if (!WMI->getLookupType()->isOpenedExistential())
-    return nullptr;
+  // SoleConformingType is only applicable in whole-module compilation.
+  if (!M.isWholeModule())
+    return None;
 
-  // If the witness method mutates self, we cannot replace self.
-  if (Apply.getOrigCalleeType()->getSelfParameter().isIndirectMutating())
-    return nullptr;
+  // Determine the protocol.
+  ProtocolDecl *PD = nullptr;
+  WitnessMethodInst *WMI = nullptr;
+  FullApplySite FAS = FullApplySite::isa(AI);
+  if (FAS && (WMI = dyn_cast<WitnessMethodInst>(FAS.getCallee())) &&
+      (FAS.getSelfArgumentOperand().get()  == ArgOperand.get())) {
+    // If the witness method mutates self, we cannot replace self.
+    if (FAS.getOrigCalleeType()->getSelfParameter().isIndirectMutating())
+      return None;
+    PD = WMI->getLookupProtocol();
+  } else {
+    auto ArgType = ArgOperand.get()->getType();
+    auto SwiftArgType = ArgType.getASTType();
+    if (!ArgType.isExistentialType() || ArgType.isAnyObject() ||
+        SwiftArgType->isAny())
+      return None;
+    PD = dyn_cast<ProtocolDecl>(SwiftArgType->getAnyNominal());
+  }
 
-  // Only applicable in whole-module compilation.
-  if (!Apply.getModule().isWholeModule())
-    return nullptr;
-
-  auto *PD = WMI->getLookupProtocol();
+  if (!PD)
+    return None;
 
   // Determine the sole conforming type.
   auto *NTD = PCA->findSoleConformingType(PD);
   if (!NTD)
-    return nullptr;
+    return None;
 
   // Sole conforming class should not be open access or have any derived class.
   ClassDecl *CD;
   if ((CD = dyn_cast<ClassDecl>(NTD)) &&
       (CD->getEffectiveAccess() == AccessLevel::Open ||
        CHA->hasKnownDirectSubclasses(CD))) {
-    return nullptr;
+    return None;
   }
 
   // Create SIL type for the concrete type.
   auto ElementType = NTD->getDeclaredType();
   auto ConcreteType = ElementType->getCanonicalType();
-  auto &M = Builder.getModule();
 
   /// Determine OpenedArchetypeDef and SubstituionMap.
-  ConcreteExistentialInfo CEI(Apply.getSelfArgumentOperand(), ConcreteType, PD);
-  if (!CEI.isValid())
-    return nullptr;
+  ConcreteExistentialInfo SoleCEI(ArgOperand, ConcreteType, PD);
+  if (!SoleCEI.isValid())
+    return None;
 
-  if (!CEI.InitExistential) {
+  /// Determine the CEI.ConcreteValue.
+  if (!SoleCEI.InitExistential) {
     // Create SIL type for the concrete type.
     SILType ConcreteSILType = M.Types.getLoweredType(ConcreteType);
 
     // Prepare the code by adding UncheckedCast instructions that cast opened
     // existentials to concrete types. Set the ConcreteValue of CEI.
-    if (auto *OER = dyn_cast<OpenExistentialRefInst>(CEI.OpenedArchetypeDef)) {
+    if (auto *OER =
+            dyn_cast<OpenExistentialRefInst>(SoleCEI.OpenedArchetypeDef)) {
       auto *URCI =
           Builder.createUncheckedRefCast(OER->getLoc(), OER, ConcreteSILType);
-      CEI.ConcreteValue = URCI;
-    } else if (auto *OEA =
-                   dyn_cast<OpenExistentialAddrInst>(CEI.OpenedArchetypeDef)) {
+      SoleCEI.ConcreteValue = URCI;
+    } else if (auto *OEA = dyn_cast<OpenExistentialAddrInst>(
+                   SoleCEI.OpenedArchetypeDef)) {
       auto *UACI = Builder.createUncheckedAddrCast(
           OEA->getLoc(), OEA, ConcreteSILType.getAddressType());
-      CEI.ConcreteValue = UACI;
+      SoleCEI.ConcreteValue = UACI;
     } else {
-      llvm_unreachable(
-          "Unhandled Argument Type in propagateSoleConformingType");
+      return None;
     }
   }
+  return SoleCEI;
+}
+// This function builds a ConcreteExistentialInfo by first following the data
+// flow chain from the ArgOperand. Otherwise, we check if the operand is of
+// protocol type that conforms to a single concrete type.
+Optional<ConcreteExistentialInfo>
+SILCombiner::buildConcreteExistentialInfo(Operand &ArgOperand) {
+  // Build a ConcreteExistentialInfo usfollowing the data flow chain of the
+  // ArgOperand until the init_existential.
+  ConcreteExistentialInfo CEI(ArgOperand);
+  if (CEI.isValid())
+    return CEI;
+  // Use SoleConformingType information.
+  return buildConcreteExistentialInfoFromSoleConformingType(ArgOperand);
+}
 
-  assert(CEI.ConcreteValue);
+// Build ConcreteExistentialInfo for every existential argument of an Apply
+// instruction including Self.
+void SILCombiner::buildConcreteExistentialInfos(
+    FullApplySite Apply,
+    llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> &CEIs,
+    SILBuilderContext &BuilderCtx,
+    SILOpenedArchetypesTracker &OpenedArchetypesTracker) {
+  for (unsigned ArgIdx = 0; ArgIdx < Apply.getNumArguments(); ArgIdx++) {
+    auto ArgASTType = Apply.getArgument(ArgIdx)->getType().getASTType();
+    if (!ArgASTType->hasArchetype())
+      continue;
 
-  /// Replace the old WitnessMethod with a new one that has concrete type and
-  /// conformance.
-  SILBuilderContext BuilderCtx(M, Builder.getTrackingList());
-  replaceWitnessMethodInst(WMI, BuilderCtx, ConcreteType,
-                           *(CEI.ExistentialSubs.getConformances().begin()));
-  // Construct the map for Self to be used for createApplyWithConcreteType.
-  llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> CEIs;
-  CEIs.insert(std::pair<unsigned, ConcreteExistentialInfo>(
-      Apply.getCalleeArgIndex(Apply.getSelfArgumentOperand()), CEI));
-  /// Create the new apply instruction using the concrete type.
-  auto *NewAI = createApplyWithConcreteType(Apply, CEIs, BuilderCtx);
-  return NewAI;
+    auto OptionalCEI =
+        buildConcreteExistentialInfo(Apply.getArgumentOperands()[ArgIdx]);
+    if (!OptionalCEI.hasValue())
+      continue;
+    auto CEI = OptionalCEI.getValue();
+    assert(CEI.isValid());
+    CEIs.try_emplace(ArgIdx, CEI);
+
+    if (CEI.ConcreteType->isOpenedExistential()) {
+      // Temporarily record this opened existential def in this local
+      // BuilderContext before rewriting the witness method.
+      OpenedArchetypesTracker.addOpenedArchetypeDef(
+          cast<ArchetypeType>(CEI.ConcreteType), CEI.ConcreteTypeDef);
+    }
+  }
 }
 
 /// Given an Apply and an argument value produced by InitExistentialAddrInst,
@@ -940,26 +978,35 @@
   if (!WMI->getLookupType()->isOpenedExistential())
     return nullptr;
 
-  // Try to derive the concrete type of self and the related conformance by
-  // searching for a preceding init_existential.
-  const ConcreteExistentialInfo CEI(Apply.getSelfArgumentOperand());
-  if (!CEI.isValid())
+  // Try to derive the concrete type and the related conformance of self and
+  // other existential arguments by searching either for a preceding
+  // init_existential or looking up sole conforming type.
+  SILBuilderContext BuilderCtx(Builder.getModule(), Builder.getTrackingList());
+  SILOpenedArchetypesTracker OpenedArchetypesTracker(&Builder.getFunction());
+  BuilderCtx.setOpenedArchetypesTracker(&OpenedArchetypesTracker);
+  llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> CEIs;
+  buildConcreteExistentialInfos(Apply, CEIs, BuilderCtx,
+                                OpenedArchetypesTracker);
+
+  // Bail, if no argument has a concrete existential to propagate.
+  if (CEIs.empty())
     return nullptr;
+  auto SelfCEIIt =
+      CEIs.find(Apply.getCalleeArgIndex(Apply.getSelfArgumentOperand()));
+
+  // If no SelfCEI is found, then just update the Apply with new CEIs for
+  // other arguments.
+  if (SelfCEIIt == CEIs.end())
+    return createApplyWithConcreteType(Apply, CEIs, BuilderCtx);
+
+  auto &SelfCEI = SelfCEIIt->second;
+  assert(SelfCEI.isValid());
 
   // Get the conformance of the init_existential type, which is passed as the
   // self argument, on the witness' protocol.
   ProtocolConformanceRef SelfConformance =
-      *CEI.lookupExistentialConformance(WMI->getLookupProtocol());
+      *SelfCEI.lookupExistentialConformance(WMI->getLookupProtocol());
 
-  SILBuilderContext BuilderCtx(Builder.getModule(), Builder.getTrackingList());
-  SILOpenedArchetypesTracker OpenedArchetypesTracker(&Builder.getFunction());
-  BuilderCtx.setOpenedArchetypesTracker(&OpenedArchetypesTracker);
-  if (CEI.ConcreteType->isOpenedExistential()) {
-    // Temporarily record this opened existential def in this local
-    // BuilderContext before rewriting the witness method.
-    OpenedArchetypesTracker.addOpenedArchetypeDef(
-        cast<ArchetypeType>(CEI.ConcreteType), CEI.ConcreteTypeDef);
-  }
   // Propagate the concrete type into a callee-operand, which is a
   // witness_method instruction. It's ok to rewrite the witness method in terms
   // of a concrete type without rewriting the apply itself. In fact, doing so
@@ -973,15 +1020,12 @@
   // are stuck:
   // We will re-create the same instruction and re-populate the worklist
   // with it.
-  if (CEI.ConcreteType != WMI->getLookupType() ||
+  if (SelfCEI.ConcreteType != WMI->getLookupType() ||
       SelfConformance != WMI->getConformance()) {
-    replaceWitnessMethodInst(WMI, BuilderCtx, CEI.ConcreteType,
+    replaceWitnessMethodInst(WMI, BuilderCtx, SelfCEI.ConcreteType,
                              SelfConformance);
   }
-  // Construct the map for Self to be used for createApplyWithConcreteType.
-  llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> CEIs;
-  CEIs.insert(std::pair<unsigned, ConcreteExistentialInfo>(
-      Apply.getCalleeArgIndex(Apply.getSelfArgumentOperand()), CEI));
+
   // Try to rewrite the apply.
   return createApplyWithConcreteType(Apply, CEIs, BuilderCtx);
 }
@@ -1002,27 +1046,16 @@
   if (!Apply.hasSubstitutions())
     return nullptr;
 
+  // Try to derive the concrete type and the related conformance of self and
+  // other existential arguments by searching either for a preceding
+  // init_existential or looking up sole conforming type.
+  llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> CEIs;
   SILBuilderContext BuilderCtx(Builder.getModule(), Builder.getTrackingList());
   SILOpenedArchetypesTracker OpenedArchetypesTracker(&Builder.getFunction());
   BuilderCtx.setOpenedArchetypesTracker(&OpenedArchetypesTracker);
-  llvm::SmallDenseMap<unsigned, ConcreteExistentialInfo> CEIs;
-  for (unsigned ArgIdx = 0; ArgIdx < Apply.getNumArguments(); ArgIdx++) {
-    auto ArgASTType = Apply.getArgument(ArgIdx)->getType().getASTType();
-    if (!ArgASTType->hasArchetype())
-      continue;
-    const ConcreteExistentialInfo CEI(Apply.getArgumentOperands()[ArgIdx]);
-    if (!CEI.isValid())
-      continue;
+  buildConcreteExistentialInfos(Apply, CEIs, BuilderCtx,
+                                OpenedArchetypesTracker);
 
-    CEIs.insert(std::pair<unsigned, ConcreteExistentialInfo>(ArgIdx, CEI));
-
-    if (CEI.ConcreteType->isOpenedExistential()) {
-      // Temporarily record this opened existential def in this local
-      // BuilderContext before rewriting the witness method.
-      OpenedArchetypesTracker.addOpenedArchetypeDef(
-          cast<ArchetypeType>(CEI.ConcreteType), CEI.ConcreteTypeDef);
-    }
-  }
   // Bail, if no argument has a concrete existential to propagate.
   if (CEIs.empty())
     return nullptr;
@@ -1248,13 +1281,9 @@
   // (apply (witness_method)) -> propagate information about
   // a concrete type from init_existential_addr or init_existential_ref.
   if (auto *WMI = dyn_cast<WitnessMethodInst>(AI->getCallee())) {
-    if (!propagateConcreteTypeOfInitExistential(AI, WMI)) {
-      if (auto *WitnessMethod = dyn_cast<WitnessMethodInst>(AI->getCallee())) {
-        // Propagate concrete type from ProtocolConformanceAnalysis.
-        propagateSoleConformingType(AI, WitnessMethod);
-      }
+    if (propagateConcreteTypeOfInitExistential(AI, WMI)) {
+      return nullptr;
     }
-    return nullptr;
   }
 
   // (apply (function_ref method_from_protocol_extension)) ->
@@ -1375,13 +1404,9 @@
   // (apply (witness_method)) -> propagate information about
   // a concrete type from init_existential_addr or init_existential_ref.
   if (auto *WMI = dyn_cast<WitnessMethodInst>(AI->getCallee())) {
-    if (!propagateConcreteTypeOfInitExistential(AI, WMI)) {
-      if (auto *WitnessMethod = dyn_cast<WitnessMethodInst>(AI->getCallee())) {
-        // Propagate concrete type from ProtocolConformanceAnalysis.
-        propagateSoleConformingType(AI, WitnessMethod);
-      }
+    if (propagateConcreteTypeOfInitExistential(AI, WMI)) {
+      return nullptr;
     }
-    return nullptr;
   }
 
   // (apply (function_ref method_from_protocol_extension)) ->
diff --git a/lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp b/lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp
index 64d2141..d231d6b 100644
--- a/lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp
+++ b/lib/SILOptimizer/SILCombiner/SILCombinerCastVisitors.cpp
@@ -289,16 +289,19 @@
 SILInstruction *
 SILCombiner::
 visitUnconditionalCheckedCastAddrInst(UnconditionalCheckedCastAddrInst *UCCAI) {
-  CastOpt.optimizeUnconditionalCheckedCastAddrInst(UCCAI);
+  if (CastOpt.optimizeUnconditionalCheckedCastAddrInst(UCCAI))
+    MadeChange = true;
+
   return nullptr;
 }
 
 SILInstruction *
 SILCombiner::
 visitUnconditionalCheckedCastInst(UnconditionalCheckedCastInst *UCCI) {
-  if (CastOpt.optimizeUnconditionalCheckedCastInst(UCCI))
+  if (CastOpt.optimizeUnconditionalCheckedCastInst(UCCI)) {
+    MadeChange = true;
     return nullptr;
-
+  }
   // FIXME: rename from RemoveCondFails to RemoveRuntimeAsserts.
   if (RemoveCondFails) {
     auto LoweredTargetType = UCCI->getType();
@@ -388,32 +391,6 @@
   return nullptr;
 }
 
-/// Helper function for simplifying conversions between
-/// thick and objc metatypes.
-static SILInstruction *
-visitMetatypeConversionInst(SILBuilder &Builder, ConversionInst *MCI,
-                            MetatypeRepresentation Representation) {
-  SILValue Op = MCI->getOperand(0);
-  // Instruction has a proper target type already.
-  SILType Ty = MCI->getType();
-  auto MetatypeTy = Op->getType().getAs<AnyMetatypeType>();
-
-  if (MetatypeTy->getRepresentation() != Representation)
-    return nullptr;
-
-  if (isa<MetatypeInst>(Op))
-    return Builder.createMetatype(MCI->getLoc(), Ty);
-
-  if (auto *VMI = dyn_cast<ValueMetatypeInst>(Op))
-    return Builder.createValueMetatype(MCI->getLoc(), Ty, VMI->getOperand());
-
-  if (auto *EMI = dyn_cast<ExistentialMetatypeInst>(Op))
-    return Builder.createExistentialMetatype(MCI->getLoc(), Ty,
-                                             EMI->getOperand());
-
-  return nullptr;
-}
-
 SILInstruction *
 SILCombiner::visitThickToObjCMetatypeInst(ThickToObjCMetatypeInst *TTOCMI) {
   // Perform the following transformations:
@@ -425,8 +402,10 @@
   //
   // (thick_to_objc_metatype (existential_metatype @thick)) ->
   // (existential_metatype @objc_metatype)
-  return visitMetatypeConversionInst(Builder, TTOCMI,
-                                     MetatypeRepresentation::Thick);
+  if (CastOpt.optimizeMetatypeConversion(TTOCMI, MetatypeRepresentation::Thick))
+    MadeChange = true;
+
+  return nullptr;
 }
 
 SILInstruction *
@@ -440,20 +419,26 @@
   //
   // (objc_to_thick_metatype (existential_metatype @objc_metatype)) ->
   // (existential_metatype @thick)
-  return visitMetatypeConversionInst(Builder, OCTTMI,
-                                     MetatypeRepresentation::ObjC);
+  if (CastOpt.optimizeMetatypeConversion(OCTTMI, MetatypeRepresentation::ObjC))
+    MadeChange = true;
+
+  return nullptr;
 }
 
 SILInstruction *
 SILCombiner::visitCheckedCastBranchInst(CheckedCastBranchInst *CBI) {
-  CastOpt.optimizeCheckedCastBranchInst(CBI);
+  if (CastOpt.optimizeCheckedCastBranchInst(CBI))
+    MadeChange = true;
+
   return nullptr;
 }
 
 SILInstruction *
 SILCombiner::
 visitCheckedCastAddrBranchInst(CheckedCastAddrBranchInst *CCABI) {
-  CastOpt.optimizeCheckedCastAddrBranchInst(CCABI);
+  if (CastOpt.optimizeCheckedCastAddrBranchInst(CCABI))
+    MadeChange = true;
+
   return nullptr;
 }
 
diff --git a/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp b/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
index 93ce0d6..92060e2 100644
--- a/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
+++ b/lib/SILOptimizer/Transforms/AllocBoxToStack.cpp
@@ -615,8 +615,8 @@
   for (auto &Attr : Orig->getSemanticsAttrs()) {
     Fn->addSemanticsAttr(Attr);
   }
-  if (!Orig->hasQualifiedOwnership()) {
-    Fn->setUnqualifiedOwnership();
+  if (!Orig->hasOwnership()) {
+    Fn->setOwnershipEliminated();
   }
   return Fn;
 }
diff --git a/lib/SILOptimizer/Transforms/CopyPropagation.cpp b/lib/SILOptimizer/Transforms/CopyPropagation.cpp
index 837a0b2..72fd3d8 100644
--- a/lib/SILOptimizer/Transforms/CopyPropagation.cpp
+++ b/lib/SILOptimizer/Transforms/CopyPropagation.cpp
@@ -879,7 +879,7 @@
                           << "\n");
 
   // This algorithm fundamentally assumes ownership.
-  if (!getFunction()->hasQualifiedOwnership())
+  if (!getFunction()->hasOwnership())
     return;
 
   // Step 1. Find all copied defs.
diff --git a/lib/SILOptimizer/Transforms/Outliner.cpp b/lib/SILOptimizer/Transforms/Outliner.cpp
index 3c8c439..92bb830 100644
--- a/lib/SILOptimizer/Transforms/Outliner.cpp
+++ b/lib/SILOptimizer/Transforms/Outliner.cpp
@@ -378,8 +378,8 @@
     return std::make_pair(nullptr, std::prev(StartBB->end()));
   }
 
-  if (!OutlinedEntryBB->getParent()->hasQualifiedOwnership())
-    Fun->setUnqualifiedOwnership();
+  if (!OutlinedEntryBB->getParent()->hasOwnership())
+    Fun->setOwnershipEliminated();
 
   Fun->setInlineStrategy(NoInline);
 
@@ -977,8 +977,8 @@
     return std::make_pair(Fun, I);
   }
 
-  if (!ObjCMethod->getFunction()->hasQualifiedOwnership())
-    Fun->setUnqualifiedOwnership();
+  if (!ObjCMethod->getFunction()->hasOwnership())
+    Fun->setOwnershipEliminated();
 
   Fun->setInlineStrategy(NoInline);
 
diff --git a/lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp b/lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp
index fe7bc4f..71c7801 100644
--- a/lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp
+++ b/lib/SILOptimizer/Transforms/OwnershipModelEliminator.cpp
@@ -298,7 +298,7 @@
         continue;
 
       // Set F to have unqualified ownership.
-      F.setUnqualifiedOwnership();
+      F.setOwnershipEliminated();
 
       bool MadeChange = false;
       SILBuilder B(F);
diff --git a/lib/SILOptimizer/Utils/CastOptimizer.cpp b/lib/SILOptimizer/Utils/CastOptimizer.cpp
index e63f5ba..0d2dfe5 100644
--- a/lib/SILOptimizer/Utils/CastOptimizer.cpp
+++ b/lib/SILOptimizer/Utils/CastOptimizer.cpp
@@ -1575,3 +1575,40 @@
 
   return nullptr;
 }
+
+/// Simplify conversions between thick and objc metatypes.
+SILInstruction *CastOptimizer::optimizeMetatypeConversion(
+    ConversionInst *MCI, MetatypeRepresentation Representation) {
+  SILValue Op = MCI->getOperand(0);
+  // Instruction has a proper target type already.
+  SILType Ty = MCI->getType();
+  auto MetatypeTy = Op->getType().getAs<AnyMetatypeType>();
+
+  if (MetatypeTy->getRepresentation() != Representation)
+    return nullptr;
+
+  // Rematerialize the incoming metatype instruction with the outgoing type.
+  auto replaceCast = [&](SingleValueInstruction *NewCast) {
+    assert(Ty.getAs<AnyMetatypeType>()->getRepresentation()
+           == NewCast->getType().getAs<AnyMetatypeType>()->getRepresentation());
+    MCI->replaceAllUsesWith(NewCast);
+    EraseInstAction(MCI);
+    return NewCast;
+  };
+  if (auto *MI = dyn_cast<MetatypeInst>(Op)) {
+    return replaceCast(
+        SILBuilderWithScope(MCI).createMetatype(MCI->getLoc(), Ty));
+  }
+  // For metatype instructions that require an operand, generate the new
+  // metatype at the same position as the original to avoid extending the
+  // lifetime of `Op` past its destroy.
+  if (auto *VMI = dyn_cast<ValueMetatypeInst>(Op)) {
+    return replaceCast(SILBuilderWithScope(VMI).createValueMetatype(
+        MCI->getLoc(), Ty, VMI->getOperand()));
+  }
+  if (auto *EMI = dyn_cast<ExistentialMetatypeInst>(Op)) {
+    return replaceCast(SILBuilderWithScope(EMI).createExistentialMetatype(
+        MCI->getLoc(), Ty, EMI->getOperand()));
+  }
+  return nullptr;
+}
diff --git a/lib/SILOptimizer/Utils/ConstExpr.cpp b/lib/SILOptimizer/Utils/ConstExpr.cpp
index 0b4de9a..aa900c4 100644
--- a/lib/SILOptimizer/Utils/ConstExpr.cpp
+++ b/lib/SILOptimizer/Utils/ConstExpr.cpp
@@ -69,7 +69,8 @@
   unsigned &numInstEvaluated;
 
   /// This is a state of previously analyzed values, maintained and filled in
-  /// by getConstantValue.  This does not hold SIL address values.
+  /// by getConstantValue.  This does not hold the memory referred to by SIL
+  /// addresses.
   llvm::DenseMap<SILValue, SymbolicValue> calculatedValues;
 
 public:
@@ -80,13 +81,21 @@
         numInstEvaluated(numInstEvaluated) {}
 
   void setValue(SILValue value, SymbolicValue symVal) {
-    // TODO(constexpr patch): Uncomment this assertion once Address kinds have
-    // been added.
-    // assert(symVal.getKind() != SymbolicValue::Address &&
-    //        "calculatedValues does not hold addresses");
     calculatedValues.insert({value, symVal});
   }
 
+  /// Invariant: Before the call, `calculatedValues` must not contain `addr`
+  /// as a key.
+  SymbolicValue createMemoryObject(SILValue addr, SymbolicValue initialValue) {
+    assert(!calculatedValues.count(addr));
+    auto type = substituteGenericParamsAndSimpify(addr->getType().getASTType());
+    auto *memObject = SymbolicValueMemoryObject::create(
+        type, initialValue, evaluator.getASTContext());
+    auto result = SymbolicValue::getAddress(memObject);
+    setValue(addr, result);
+    return result;
+  }
+
   /// Return the SymbolicValue for the specified SIL value, lazily computing
   /// it if needed.
   SymbolicValue getConstantValue(SILValue value);
@@ -96,9 +105,9 @@
   /// statements.
   llvm::Optional<SymbolicValue> evaluateFlowSensitive(SILInstruction *inst);
 
-  Type simplifyType(Type ty);
-  CanType simplifyType(CanType ty) {
-    return simplifyType(Type(ty))->getCanonicalType();
+  Type substituteGenericParamsAndSimpify(Type ty);
+  CanType substituteGenericParamsAndSimpify(CanType ty) {
+    return substituteGenericParamsAndSimpify(Type(ty))->getCanonicalType();
   }
   SymbolicValue computeConstantValue(SILValue value);
   SymbolicValue computeConstantValueBuiltin(BuiltinInst *inst);
@@ -108,12 +117,16 @@
   llvm::Optional<SymbolicValue> computeOpaqueCallResult(ApplyInst *apply,
                                                         SILFunction *callee);
 
+  SymbolicValue getConstAddrAndLoadResult(SILValue addr);
+  SymbolicValue loadAddrValue(SILValue addr, SymbolicValue addrVal);
+  llvm::Optional<SymbolicValue> computeFSStore(SymbolicValue storedCst,
+                                               SILValue dest);
 };
 } // end anonymous namespace
 
 /// Simplify the specified type based on knowledge of substitutions if we have
 /// any.
-Type ConstExprFunctionState::simplifyType(Type ty) {
+Type ConstExprFunctionState::substituteGenericParamsAndSimpify(Type ty) {
   return substitutionMap.empty() ? ty : ty.subst(substitutionMap);
 }
 
@@ -133,7 +146,8 @@
   // types.
   if (auto *mti = dyn_cast<MetatypeInst>(value)) {
     auto metatype = mti->getType().castTo<MetatypeType>();
-    auto type = simplifyType(metatype->getInstanceType())->getCanonicalType();
+    auto type = substituteGenericParamsAndSimpify(metatype->getInstanceType())
+        ->getCanonicalType();
     return SymbolicValue::getMetatype(type);
   }
 
@@ -174,6 +188,39 @@
     return SymbolicValue::getAggregate(elts, evaluator.getASTContext());
   }
 
+  // If this is a struct or tuple element addressor, compute a more derived
+  // address.
+  if (isa<StructElementAddrInst>(value) || isa<TupleElementAddrInst>(value)) {
+    auto inst = cast<SingleValueInstruction>(value);
+    auto baseAddr = getConstantValue(inst->getOperand(0));
+    if (!baseAddr.isConstant())
+      return baseAddr;
+
+    SmallVector<unsigned, 4> accessPath;
+    auto *memObject = baseAddr.getAddressValue(accessPath);
+
+    // Add our index onto the next of the list.
+    unsigned index;
+    if (auto sea = dyn_cast<StructElementAddrInst>(inst))
+      index = sea->getFieldNo();
+    else
+      index = cast<TupleElementAddrInst>(inst)->getFieldNo();
+    accessPath.push_back(index);
+    return SymbolicValue::getAddress(memObject, accessPath,
+                                     evaluator.getASTContext());
+  }
+
+  // If this is a load, then we either have computed the value of the memory
+  // already (when analyzing the body of a function in a flow-sensitive
+  // fashion), or this is the indirect result of a call.  Either way, we ask for
+  // the value of the pointer.  In the former case, this will be the latest
+  // value of the memory.  In the latter case, the call must be the only
+  // store to the address so that the memory object can be computed by
+  // recursively processing the allocation and call instructions in a
+  // demand-driven fashion.
+  if (auto li = dyn_cast<LoadInst>(value))
+    return getConstAddrAndLoadResult(li->getOperand());
+
   if (auto *builtin = dyn_cast<BuiltinInst>(value))
     return computeConstantValueBuiltin(builtin);
 
@@ -188,6 +235,10 @@
     return calculatedValues[apply];
   }
 
+  // This instruction is a marker that returns its first operand.
+  if (auto *bai = dyn_cast<BeginAccessInst>(value))
+    return getConstantValue(bai->getOperand());
+
   LLVM_DEBUG(llvm::dbgs() << "ConstExpr Unknown simple: " << *value << "\n");
 
   // Otherwise, we don't know how to handle this.
@@ -521,6 +572,143 @@
   return result;
 }
 
+/// Given an aggregate value like {{1, 2}, 3} and an access path like [0,1], and
+/// a new element like 4, return the aggregate value with the indexed element
+/// replaced with the new element, producing {{1, 4}, 3} in this case.
+/// If `writeOnlyOnce` is true, and the target aggregate element to update
+/// already has a constant value, fail on the update.
+///
+/// This returns true on failure and false on success.
+///
+static bool updateIndexedElement(SymbolicValue &aggregate,
+                                 ArrayRef<unsigned> indices,
+                                 SymbolicValue newElement, Type type,
+                                 bool writeOnlyOnce,
+                                 ASTContext &astContext) {
+  // We're done if we've run out of indices.
+  if (indices.empty()) {
+    aggregate = newElement;
+    return false;
+  }
+
+  // If we have an uninit memory, then scalarize it into an aggregate to
+  // continue.  This happens when memory objects are initialized piecewise.
+  if (aggregate.getKind() == SymbolicValue::UninitMemory) {
+    unsigned numMembers;
+    // We need to have either a struct or a tuple type.
+    if (auto *decl = type->getStructOrBoundGenericStruct()) {
+      numMembers = std::distance(decl->getStoredProperties().begin(),
+                                 decl->getStoredProperties().end());
+    } else if (auto tuple = type->getAs<TupleType>()) {
+      numMembers = tuple->getNumElements();
+    } else {
+      return true;
+    }
+
+    SmallVector<SymbolicValue, 4> newElts(numMembers,
+                                          SymbolicValue::getUninitMemory());
+    aggregate = SymbolicValue::getAggregate(newElts, astContext);
+  }
+
+  unsigned elementNo = indices.front();
+
+  // If we have a non-aggregate then fail.
+  if (aggregate.getKind() != SymbolicValue::Aggregate)
+    return true;
+
+  ArrayRef<SymbolicValue> oldElts;
+  Type eltType;
+
+  // We need to have a struct or a tuple type.
+  oldElts = aggregate.getAggregateValue();
+
+  if (auto *decl = type->getStructOrBoundGenericStruct()) {
+    auto it = decl->getStoredProperties().begin();
+    std::advance(it, elementNo);
+    eltType = (*it)->getType();
+  } else if (auto tuple = type->getAs<TupleType>()) {
+    assert(elementNo < tuple->getNumElements() && "invalid index");
+    eltType = tuple->getElement(elementNo).getType();
+  } else {
+    return true;
+  }
+
+  if (writeOnlyOnce &&
+      oldElts[elementNo].getKind() != SymbolicValue::UninitMemory) {
+    // Cannot overwrite an existing constant.
+    return true;
+  }
+
+  // Update the indexed element of the aggregate.
+  SmallVector<SymbolicValue, 4> newElts(oldElts.begin(), oldElts.end());
+  if (updateIndexedElement(newElts[elementNo], indices.drop_front(), newElement,
+                           eltType, writeOnlyOnce, astContext))
+    return true;
+
+  aggregate = SymbolicValue::getAggregate(newElts, astContext);
+  return false;
+}
+
+/// Given the operand to a load, resolve it to a constant if possible.
+SymbolicValue ConstExprFunctionState::getConstAddrAndLoadResult(SILValue addr) {
+  auto addrVal = getConstantValue(addr);
+  if (!addrVal.isConstant())
+    return addrVal;
+
+  return loadAddrValue(addr, addrVal);
+}
+
+/// Load and return the underlying (const) object whose address is given by
+/// `addrVal`. On error, return a message based on `addr`.
+SymbolicValue ConstExprFunctionState::loadAddrValue(SILValue addr,
+                                                    SymbolicValue addrVal) {
+  SmallVector<unsigned, 4> accessPath;
+  auto *memoryObject = addrVal.getAddressValue(accessPath);
+
+  // If this is a derived address, then we are digging into an aggregate
+  // value.
+  auto objectVal = memoryObject->getValue();
+
+  // Try digging through the aggregate to get to our value.
+  unsigned idx = 0, end = accessPath.size();
+  while (idx != end && objectVal.getKind() == SymbolicValue::Aggregate) {
+    objectVal = objectVal.getAggregateValue()[accessPath[idx]];
+    ++idx;
+  }
+
+  // If we successfully indexed down to our value, then we're done.
+  if (idx == end)
+    return objectVal;
+
+  // If the memory object had a reason, return it.
+  if (objectVal.isUnknown())
+    return objectVal;
+
+  // Otherwise, return a generic failure.
+  return evaluator.getUnknown(addr, UnknownReason::Default);
+}
+
+/// Evaluate a flow sensitive store to the specified pointer address.
+llvm::Optional<SymbolicValue>
+ConstExprFunctionState::computeFSStore(SymbolicValue storedCst, SILValue dest) {
+  // Only update existing memory locations that we're tracking.
+  auto it = calculatedValues.find(dest);
+  if (it == calculatedValues.end() || !it->second.isConstant())
+    return evaluator.getUnknown(dest, UnknownReason::Default);
+
+  SmallVector<unsigned, 4> accessPath;
+  auto *memoryObject = it->second.getAddressValue(accessPath);
+  auto objectVal = memoryObject->getValue();
+  auto objectType = memoryObject->getType();
+
+  if (updateIndexedElement(objectVal, accessPath, storedCst, objectType,
+                           /*writeOnlyOnce*/ false, evaluator.getASTContext()))
+    return evaluator.getUnknown(dest, UnknownReason::Default);
+
+  memoryObject->setValue(objectVal);
+  return None;
+}
+
 /// Evaluate the specified instruction in a flow sensitive way, for use by
 /// the constexpr function evaluator.  This does not handle control flow
 /// statements.  This returns None on success, and an Unknown SymbolicValue with
@@ -537,6 +725,19 @@
       isa<StrongReleaseInst>(inst))
     return None;
 
+  // If this is a special flow-sensitive instruction like a stack allocation,
+  // store, copy_addr, etc, we handle it specially here.
+  if (auto asi = dyn_cast<AllocStackInst>(inst)) {
+    createMemoryObject(asi, SymbolicValue::getUninitMemory());
+    return None;
+  }
+
+  // If this is a deallocation of a memory object that we are tracking, then
+  // don't do anything.  The memory is allocated in a BumpPtrAllocator so there
+  // is no useful way to free it.
+  if (isa<DeallocStackInst>(inst))
+    return None;
+
   if (isa<CondFailInst>(inst)) {
     auto failed = getConstantValue(inst->getOperand(0));
     if (failed.getKind() == SymbolicValue::Integer) {
@@ -551,6 +752,23 @@
   if (auto apply = dyn_cast<ApplyInst>(inst))
     return computeCallResult(apply);
 
+  if (isa<StoreInst>(inst)) {
+    auto stored = getConstantValue(inst->getOperand(0));
+    if (!stored.isConstant())
+      return stored;
+
+    return computeFSStore(stored, inst->getOperand(1));
+  }
+
+  // Copy addr is a load + store combination.
+  if (auto *copy = dyn_cast<CopyAddrInst>(inst)) {
+    auto value = getConstAddrAndLoadResult(copy->getOperand(0));
+    if (!value.isConstant())
+      return value;
+
+    return computeFSStore(value, copy->getOperand(1));
+  }
+
   // If the instruction produces normal results, try constant folding it.
   // If this fails, then we fail.
   if (inst->getNumResults() != 0) {
diff --git a/lib/SILOptimizer/Utils/Devirtualize.cpp b/lib/SILOptimizer/Utils/Devirtualize.cpp
index 728ada3..f026857 100644
--- a/lib/SILOptimizer/Utils/Devirtualize.cpp
+++ b/lib/SILOptimizer/Utils/Devirtualize.cpp
@@ -883,9 +883,10 @@
       witnessThunkSig);
 }
 
-static SubstitutionMap
-getWitnessMethodSubstitutions(SILModule &Module, ApplySite AI, SILFunction *F,
-                              ProtocolConformanceRef CRef) {
+SubstitutionMap
+swift::getWitnessMethodSubstitutions(SILModule &Module, ApplySite AI,
+                                     SILFunction *F,
+                                     ProtocolConformanceRef CRef) {
   auto witnessFnTy = F->getLoweredFunctionType();
   assert(witnessFnTy->getRepresentation() ==
          SILFunctionTypeRepresentation::WitnessMethod);
@@ -901,9 +902,9 @@
       == CRef.getRequirement());
   auto *classWitness = witnessFnTy->getWitnessMethodClass(*mod);
 
-  return getWitnessMethodSubstitutions(
-      mod, CRef, requirementSig, witnessThunkSig,
-      origSubs, isDefaultWitness, classWitness);
+  return ::getWitnessMethodSubstitutions(mod, CRef, requirementSig,
+                                         witnessThunkSig, origSubs,
+                                         isDefaultWitness, classWitness);
 }
 
 /// Generate a new apply of a function_ref to replace an apply of a
diff --git a/lib/SILOptimizer/Utils/GenericCloner.cpp b/lib/SILOptimizer/Utils/GenericCloner.cpp
index 51b6765..fa73b56 100644
--- a/lib/SILOptimizer/Utils/GenericCloner.cpp
+++ b/lib/SILOptimizer/Utils/GenericCloner.cpp
@@ -50,8 +50,8 @@
   for (auto &Attr : Orig->getSemanticsAttrs()) {
     NewF->addSemanticsAttr(Attr);
   }
-  if (!Orig->hasQualifiedOwnership()) {
-    NewF->setUnqualifiedOwnership();
+  if (!Orig->hasOwnership()) {
+    NewF->setOwnershipEliminated();
   }
   return NewF;
 }
diff --git a/lib/SILOptimizer/Utils/Generics.cpp b/lib/SILOptimizer/Utils/Generics.cpp
index 3c89a75..a94fc8f 100644
--- a/lib/SILOptimizer/Utils/Generics.cpp
+++ b/lib/SILOptimizer/Utils/Generics.cpp
@@ -364,11 +364,18 @@
 // ReabstractionInfo
 // =============================================================================
 
-static bool shouldNotSpecializeCallee(SILFunction *Callee,
-                                      SubstitutionMap Subs = {}) {
+static bool shouldNotSpecialize(SILFunction *Callee, SILFunction *Caller,
+                                SubstitutionMap Subs = {}) {
   if (Callee->hasSemanticsAttr("optimize.sil.specialize.generic.never"))
     return true;
 
+  if (Caller &&
+      Caller->getEffectiveOptimizationMode() == OptimizationMode::ForSize &&
+      Callee->hasSemanticsAttr("optimize.sil.specialize.generic.size.never")) {
+    return true;
+  }
+
+
   if (Subs.hasAnySubstitutableParams() &&
       Callee->hasSemanticsAttr("optimize.sil.specialize.generic.partial.never"))
     return true;
@@ -383,7 +390,7 @@
 bool ReabstractionInfo::prepareAndCheck(ApplySite Apply, SILFunction *Callee,
                                         SubstitutionMap ParamSubs,
                                         OptRemark::Emitter *ORE) {
-  if (shouldNotSpecializeCallee(Callee))
+  if (shouldNotSpecialize(Callee, Apply ? Apply.getFunction() : nullptr))
     return false;
 
   SpecializedGenericEnv = nullptr;
@@ -489,7 +496,7 @@
       return false;
 
     // Bail if the callee should not be partially specialized.
-    if (shouldNotSpecializeCallee(Callee, ParamSubs))
+    if (shouldNotSpecialize(Callee, Apply.getFunction(), ParamSubs))
       return false;
   }
 
@@ -1763,7 +1770,7 @@
 /// This constructor is used when processing @_specialize.
 ReabstractionInfo::ReabstractionInfo(SILFunction *Callee,
                                      ArrayRef<Requirement> Requirements) {
-  if (shouldNotSpecializeCallee(Callee))
+  if (shouldNotSpecialize(Callee, nullptr))
     return;
 
   // Perform some sanity checks for the requirements.
@@ -1867,7 +1874,7 @@
           SpecializedF->getGenericEnvironment()) ||
          (!SpecializedF->getLoweredFunctionType()->isPolymorphic() &&
           !SpecializedF->getGenericEnvironment()));
-  assert(!SpecializedF->hasQualifiedOwnership());
+  assert(!SpecializedF->hasOwnership());
   // Check if this specialization should be linked for prespecialization.
   linkSpecialization(M, SpecializedF);
   // Store the meta-information about how this specialization was created.
@@ -2120,8 +2127,8 @@
   // inline qualified into unqualified functions /or/ have the
   // OwnershipModelEliminator run as part of the normal compilation pipeline
   // (which we are not doing yet).
-  if (!SpecializedFunc->hasQualifiedOwnership()) {
-    Thunk->setUnqualifiedOwnership();
+  if (!SpecializedFunc->hasOwnership()) {
+    Thunk->setOwnershipEliminated();
   }
 
   if (!SILModuleConventions(M).useLoweredAddresses()) {
@@ -2281,7 +2288,7 @@
   if (F->isSerialized() && !RefF->hasValidLinkageForFragileInline())
       return;
 
-  if (shouldNotSpecializeCallee(RefF))
+  if (shouldNotSpecialize(RefF, F))
     return;
 
   // If the caller and callee are both fragile, preserve the fragility when
@@ -2358,7 +2365,7 @@
                             << SpecializedF->getName() << "\n"
                             << "Specialized function type: "
                             << SpecializedF->getLoweredFunctionType() << "\n");
-    assert(!SpecializedF->hasQualifiedOwnership());
+    assert(!SpecializedF->hasOwnership());
     NewFunctions.push_back(SpecializedF);
   }
 
diff --git a/lib/SILOptimizer/Utils/Local.cpp b/lib/SILOptimizer/Utils/Local.cpp
index 8fe5fd0..12e0dbf 100644
--- a/lib/SILOptimizer/Utils/Local.cpp
+++ b/lib/SILOptimizer/Utils/Local.cpp
@@ -1039,7 +1039,7 @@
   // possible for that value.
 
   // If we have qualified ownership, we should just emit a destroy value.
-  if (Arg->getFunction()->hasQualifiedOwnership()) {
+  if (Arg->getFunction()->hasOwnership()) {
     Callbacks.CreatedNewInst(Builder.createDestroyValue(Loc, Arg));
     return;
   }
diff --git a/lib/SILOptimizer/Utils/SILInliner.cpp b/lib/SILOptimizer/Utils/SILInliner.cpp
index 4260db6..62b124b 100644
--- a/lib/SILOptimizer/Utils/SILInliner.cpp
+++ b/lib/SILOptimizer/Utils/SILInliner.cpp
@@ -593,7 +593,7 @@
 
 SILValue SILInlineCloner::borrowFunctionArgument(SILValue callArg,
                                                  FullApplySite AI) {
-  if (!AI.getFunction()->hasQualifiedOwnership()
+  if (!AI.getFunction()->hasOwnership()
       || callArg.getOwnershipKind() != ValueOwnershipKind::Owned) {
     return callArg;
   }
diff --git a/lib/Sema/CSApply.cpp b/lib/Sema/CSApply.cpp
index b1f54ff..e0a8311 100644
--- a/lib/Sema/CSApply.cpp
+++ b/lib/Sema/CSApply.cpp
@@ -381,14 +381,15 @@
   // Build and type check the string literal index value to the specific
   // string type expected by the subscript.
   Expr *nameExpr = new (ctx) StringLiteralExpr(name, loc, /*implicit*/true);
+  (void)cs.TC.typeCheckExpression(nameExpr, dc);
+  cs.cacheExprTypes(nameExpr);
 
   // Build a tuple so that the argument has a label.
   Expr *tuple = TupleExpr::create(ctx, loc, nameExpr, ctx.Id_dynamicMember,
                                   loc, loc, /*hasTrailingClosure*/false,
                                   /*implicit*/true);
-  (void)cs.TC.typeCheckExpression(tuple, dc, TypeLoc::withoutLoc(ty),
-                                  CTP_CallArgument);
-  cs.cacheExprTypes(tuple);
+  cs.setType(tuple, ty);
+  tuple->setType(ty);
   return tuple;
 }
 
@@ -430,16 +431,12 @@
     /// \param sources The sources of each of the elements to be used in the
     /// resulting tuple, as provided by \c computeTupleShuffle.
     ///
-    /// \param variadicArgs The source indices that are mapped to the variadic
-    /// parameter of the resulting tuple, as provided by \c computeTupleShuffle.
-    ///
     /// \param typeFromPattern Optionally, the caller can specify the pattern
     /// from where the toType is derived, so that we can deliver better fixit.
     Expr *coerceTupleToTuple(Expr *expr, TupleType *fromTuple,
                              TupleType *toTuple,
                              ConstraintLocatorBuilder locator,
-                             SmallVectorImpl<int> &sources,
-                             SmallVectorImpl<unsigned> &variadicArgs,
+                             SmallVectorImpl<unsigned> &sources,
                              Optional<Pattern*> typeFromPattern = None);
 
     /// Coerce a subclass, class-constrained archetype, class-constrained
@@ -2802,32 +2799,19 @@
         return simplifyExprType(expr);
       }
       
-      Type subExprType = cs.getType(expr->getSubExpr());
-      Type targetType = simplifyType(subExprType);
-      
-      // If the subexpression is not optional, wrap it in
-      // an InjectIntoOptionalExpr. Then use the type of the
-      // subexpression as the type of the 'try?' expr
-      bool subExprIsOptional = (bool) subExprType->getOptionalObjectType();
-      
-      if (!subExprIsOptional) {
-        targetType = OptionalType::get(targetType);
-        auto subExpr = coerceToType(expr->getSubExpr(), targetType,
-                                    cs.getConstraintLocator(expr));
-        if (!subExpr) return nullptr;
-        expr->setSubExpr(subExpr);
-      }
-      
-      cs.setType(expr, targetType);
+      Type exprType = simplifyType(cs.getType(expr));
+
+      auto subExpr = coerceToType(expr->getSubExpr(), exprType,
+                                  cs.getConstraintLocator(expr));
+      if (!subExpr) return nullptr;
+      expr->setSubExpr(subExpr);
+
+      cs.setType(expr, exprType);
       return expr;
     }
 
     Expr *visitParenExpr(ParenExpr *expr) {
-      auto &ctx = cs.getASTContext();
-      auto pty = cs.getType(expr->getSubExpr());
-      cs.setType(expr, ParenType::get(ctx, pty->getInOutObjectType(),
-                                      ParameterTypeFlags().withInOut(pty->is<InOutType>())));
-      return expr;
+      return simplifyExprType(expr);
     }
 
     Expr *visitTupleExpr(TupleExpr *expr) {
@@ -3159,10 +3143,7 @@
       auto resultTy = simplifyType(cs.getType(expr));
       cs.setType(expr, resultTy);
 
-      // Convert the condition to a logic value.
-      auto cond
-        = solution.convertBooleanTypeToBuiltinI1(expr->getCondExpr(),
-                                                 cs.getConstraintLocator(expr));
+      auto cond = cs.coerceToRValue(expr->getCondExpr());
       expr->setCondExpr(cond);
 
       // Coerce the then/else branches to the common type.
@@ -3901,8 +3882,9 @@
     }
 
     Expr *visitLazyInitializerExpr(LazyInitializerExpr *expr) {
-      simplifyExprType(expr);
-      assert(expr->getType()->isEqual(expr->getSubExpr()->getType()));
+      // Since `LazyInitializerExpr` should always have a type set,
+      // there is no need to do anything here.
+      assert(cs.getType(expr)->isEqual(expr->getSubExpr()->getType()));
       return expr;
     }
     
@@ -4419,13 +4401,17 @@
             auto loc = origComponent.getLoc();
             auto fieldName =
                 foundDecl->choice.getName().getBaseIdentifier().str();
-            auto index = buildDynamicMemberLookupIndexExpr(fieldName, indexType,
-                                                           loc, dc, cs);
-            
+
+            Expr *nameExpr = new (ctx) StringLiteralExpr(fieldName, loc,
+                                                         /*implicit*/true);
+            (void)cs.TC.typeCheckExpression(nameExpr, dc);
+            cs.cacheExprTypes(nameExpr);
+
             origComponent = KeyPathExpr::Component::
-              forUnresolvedSubscript(ctx, loc, index, {}, loc, loc,
-                                     /*trailingClosure*/nullptr);
-            cs.setType(origComponent.getIndexExpr(), index->getType());
+              forUnresolvedSubscript(ctx, loc,
+                                     {nameExpr}, {ctx.Id_dynamicMember}, {loc},
+                                     loc, /*trailingClosure*/nullptr);
+            cs.setType(origComponent.getIndexExpr(), indexType);
           }
 
           auto subscriptType =
@@ -5065,8 +5051,7 @@
 Expr *ExprRewriter::coerceTupleToTuple(Expr *expr, TupleType *fromTuple,
                                        TupleType *toTuple,
                                        ConstraintLocatorBuilder locator,
-                                       SmallVectorImpl<int> &sources,
-                                       SmallVectorImpl<unsigned> &variadicArgs,
+                                       SmallVectorImpl<unsigned> &sources,
                                        Optional<Pattern*> typeFromPattern){
   auto &tc = cs.getTypeChecker();
 
@@ -5081,14 +5066,11 @@
                                  fromTuple->getElements().size());
 
   for (unsigned i = 0, n = toTuple->getNumElements(); i != n; ++i) {
-    assert(sources[i] != TupleShuffleExpr::DefaultInitialize &&
-           sources[i] != TupleShuffleExpr::Variadic);
-
     const auto &toElt = toTuple->getElement(i);
     auto toEltType = toElt.getType();
 
     // If the source and destination index are different, we'll be shuffling.
-    if ((unsigned)sources[i] != i) {
+    if (sources[i] != i) {
       anythingShuffled = true;
     }
 
@@ -5165,11 +5147,22 @@
 
     return expr;
   }
-  
+
+  // computeTupleShuffle() produces an array of unsigned (since it can only
+  // contain tuple element indices). However TupleShuffleExpr is also used
+  // for call argument lists which can contain special things like default
+  // arguments and variadics; those are presented by negative integers.
+  //
+  // FIXME: Design and implement a new AST where argument lists are
+  // separate from rvalue tuple conversions.
+  ArrayRef<unsigned> sourcesRef = sources;
+  ArrayRef<int> sourcesCast((const int *) sourcesRef.data(),
+                            sourcesRef.size());
+
   // Create the tuple shuffle.
   return
     cs.cacheType(TupleShuffleExpr::create(tc.Context,
-                                          expr, sources,
+                                          expr, sourcesCast,
                                           TupleShuffleExpr::TupleToTuple,
                                           ConcreteDeclRef(), {}, Type(), {},
                                           toSugarType));
@@ -5310,15 +5303,12 @@
   if (auto tupleType = fromType->getAs<TupleType>()) {
     if (tupleType->hasLValueType()) {
       auto toTuple = tupleType->getRValueType()->castTo<TupleType>();
-      SmallVector<int, 4> sources;
-      SmallVector<unsigned, 4> variadicArgs;
-      bool failed = computeTupleShuffle(tupleType, toTuple,
-                                        sources, variadicArgs);
+      SmallVector<unsigned, 4> sources;
+      bool failed = computeTupleShuffle(tupleType, toTuple, sources);
       assert(!failed && "Couldn't convert tuple to tuple?");
       (void)failed;
 
-      coerceTupleToTuple(expr, tupleType, toTuple, locator, sources,
-                         variadicArgs);
+      coerceTupleToTuple(expr, tupleType, toTuple, locator, sources);
     }
   }
 
@@ -6547,11 +6537,10 @@
   if (auto toTuple = toType->getAs<TupleType>()) {
     // Coerce from a tuple to a tuple.
     if (auto fromTuple = fromType->getAs<TupleType>()) {
-      SmallVector<int, 4> sources;
-      SmallVector<unsigned, 4> variadicArgs;
-      if (!computeTupleShuffle(fromTuple, toTuple, sources, variadicArgs)) {
+      SmallVector<unsigned, 4> sources;
+      if (!computeTupleShuffle(fromTuple, toTuple, sources)) {
         return coerceTupleToTuple(expr, fromTuple, toTuple,
-                                  locator, sources, variadicArgs);
+                                  locator, sources);
       }
     }
   }
@@ -8019,81 +8008,6 @@
   return result;
 }
 
-Expr *
-Solution::convertBooleanTypeToBuiltinI1(Expr *expr,
-                                        ConstraintLocator *locator) const {
-  auto &cs = getConstraintSystem();
-
-  // Load lvalues here.
-  expr = cs.coerceToRValue(expr);
-
-  auto &tc = cs.getTypeChecker();
-  auto &ctx = tc.Context;
-
-  auto type = cs.getType(expr);
-
-  // We allow UnresolvedType <c $T for all $T, so we might end up here
-  // in diagnostics. Just bail out.
-  if (type->is<UnresolvedType>())
-    return expr;
-
-  // Look for the builtin name. If we don't have it, we need to call the
-  // general name via the witness table.
-  NameLookupOptions lookupOptions = defaultMemberLookupOptions;
-  if (isa<AbstractFunctionDecl>(cs.DC))
-    lookupOptions |= NameLookupFlags::KnownPrivate;
-  auto members = tc.lookupMember(cs.DC, type,
-                                 tc.Context.Id_getBuiltinLogicValue,
-                                 lookupOptions);
-
-  // Find the builtin method.
-  if (members.size() != 1) {
-    tc.diagnose(expr->getLoc(), diag::broken_bool);
-    return expr;
-  }
-  auto *builtinMethod = dyn_cast<FuncDecl>(members[0].getValueDecl());
-  if (!builtinMethod) {
-    tc.diagnose(expr->getLoc(), diag::broken_bool);
-    return expr;
-  }
-
-  // The method is not generic, so there are no substitutions.
-  tc.validateDeclForNameLookup(builtinMethod);
-  auto builtinMethodType = builtinMethod->getInterfaceType()
-    ->castTo<FunctionType>();
-
-  // Form an unbound reference to the builtin method.
-  auto *declRef = new (ctx) DeclRefExpr(builtinMethod,
-                                        DeclNameLoc(expr->getLoc()),
-                                        /*Implicit=*/true);
-  declRef->setFunctionRefKind(FunctionRefKind::DoubleApply);
-  cs.setType(declRef, builtinMethodType);
-
-  auto getType = [&](const Expr *E) -> Type {
-    return cs.getType(E);
-  };
-
-  // Apply 'self' to get the method value.
-  auto *methodRef = new (ctx) DotSyntaxCallExpr(declRef,
-                                                SourceLoc(),
-                                                expr);
-  cs.setType(methodRef, builtinMethodType->getResult());
-
-  // Apply the empty argument list to get the final result.
-  auto *result = CallExpr::createImplicit(ctx, methodRef,
-                                          { }, { }, getType);
-  cs.setType(result, builtinMethodType->getResult()
-                  ->castTo<FunctionType>()->getResult());
-  cs.setType(result->getArg(), ctx.TheEmptyTupleType);
-
-  if (!cs.getType(result)->isBuiltinIntegerType(1)) {
-    tc.diagnose(expr->getLoc(), diag::broken_bool);
-    return result;
-  }
-
-  return result;
-}
-
 Expr *Solution::convertOptionalToBool(Expr *expr,
                                       ConstraintLocator *locator) const {
   auto &cs = getConstraintSystem();
diff --git a/lib/Sema/CSDiag.cpp b/lib/Sema/CSDiag.cpp
index 162b5d6..590bf2d 100644
--- a/lib/Sema/CSDiag.cpp
+++ b/lib/Sema/CSDiag.cpp
@@ -423,6 +423,27 @@
                                         const CalleeCandidateInfo &candidates,
                                             TCCOptions options = TCCOptions());
 
+  void getPossibleTypesOfExpressionWithoutApplying(
+      Expr *&expr, DeclContext *dc, SmallPtrSetImpl<TypeBase *> &types,
+      FreeTypeVariableBinding allowFreeTypeVariables =
+          FreeTypeVariableBinding::Disallow,
+      ExprTypeCheckListener *listener = nullptr) {
+    CS.TC.getPossibleTypesOfExpressionWithoutApplying(
+        expr, dc, types, allowFreeTypeVariables, listener);
+    CS.cacheExprTypes(expr);
+  }
+
+  Type getTypeOfExpressionWithoutApplying(
+      Expr *&expr, DeclContext *dc, ConcreteDeclRef &referencedDecl,
+      FreeTypeVariableBinding allowFreeTypeVariables =
+          FreeTypeVariableBinding::Disallow,
+      ExprTypeCheckListener *listener = nullptr) {
+    auto type = CS.TC.getTypeOfExpressionWithoutApplying(expr, dc, referencedDecl,
+                                                         allowFreeTypeVariables, listener);
+    CS.cacheExprTypes(expr);
+    return type;
+  }
+
   /// Diagnose common failures due to applications of an argument list to an
   /// ApplyExpr or SubscriptExpr.
   bool diagnoseParameterErrors(CalleeCandidateInfo &CCI,
@@ -452,6 +473,10 @@
                                               Type contextualType,
                                               ContextualTypePurpose CTP);
 
+  bool diagnoseImplicitSelfErrors(Expr *fnExpr, Expr *argExpr,
+                                  CalleeCandidateInfo &CCI,
+                                  ArrayRef<Identifier> argLabels);
+
 private:
   /// Validate potential contextual type for type-checking one of the
   /// sub-expressions, usually correct/valid types are the ones which
@@ -1503,13 +1528,12 @@
         FromElts.push_back({ voidTy, fromTT->getElement(i).getName() });
       auto TEType = TupleType::get(FromElts, CS.getASTContext());
 
-      SmallVector<int, 4> sources;
-      SmallVector<unsigned, 4> variadicArgs;
+      SmallVector<unsigned, 4> sources;
       
       // If the shuffle conversion is invalid (e.g. incorrect element labels),
       // then we have a type error.
       if (computeTupleShuffle(TEType->castTo<TupleType>()->getElements(),
-                              toTT->getElements(), sources, variadicArgs)) {
+                              toTT->getElements(), sources)) {
         diagnose(anchor->getLoc(), diag::tuple_types_not_convertible,
                  fromTT, toTT)
         .highlight(anchor->getSourceRange());
@@ -1852,7 +1876,7 @@
       (isa<OverloadedDeclRefExpr>(subExpr->getValueProvidingExpr()))) {
     return subExpr;
   }
-  
+
   // Save any existing type data of the subexpr tree, and reset it to null in
   // prep for re-type-checking the tree.  If things fail, we can revert the
   // types back to their original state.
@@ -1896,9 +1920,12 @@
   // holding on to an expression containing open existential types but
   // no OpenExistentialExpr, which breaks invariants enforced by the
   // ASTChecker.
-  if (isa<OpenExistentialExpr>(subExpr))
-    eraseOpenedExistentials(CS, subExpr);
-  
+  // Another reason why we need to do this is because diagnostics might pick
+  // constraint anchor for re-typechecking which would only have opaque value
+  // expression and not enclosing open existential, which is going to trip up
+  // sanitizer.
+  eraseOpenedExistentials(CS, subExpr);
+
   // If recursive type checking failed, then an error was emitted.  Return
   // null to indicate this to the caller.
   if (!resultTy)
@@ -3194,10 +3221,9 @@
   return result;
 }
 
-static bool diagnoseImplicitSelfErrors(Expr *fnExpr, Expr *argExpr,
-                                       CalleeCandidateInfo &CCI,
-                                       ArrayRef<Identifier> argLabels,
-                                       ConstraintSystem &CS) {
+bool FailureDiagnosis::diagnoseImplicitSelfErrors(
+    Expr *fnExpr, Expr *argExpr, CalleeCandidateInfo &CCI,
+    ArrayRef<Identifier> argLabels) {
   // If candidate list is empty it means that problem is somewhere else,
   // since we need to have candidates which might be shadowing other funcs.
   if (CCI.empty() || !CCI[0].getDecl())
@@ -3251,8 +3277,7 @@
     for (unsigned i = 0, e = argTuple->getNumElements(); i < e; ++i) {
       ConcreteDeclRef ref = nullptr;
       auto *el = argTuple->getElement(i);
-      auto typeResult =
-        TC.getTypeOfExpressionWithoutApplying(el, CS.DC, ref);
+      auto typeResult = getTypeOfExpressionWithoutApplying(el, CS.DC, ref);
       if (!typeResult)
         return false;
       auto flags = ParameterTypeFlags().withInOut(typeResult->is<InOutType>());
@@ -4226,7 +4251,7 @@
   }
 
   // Try to diagnose errors related to the use of implicit self reference.
-  if (diagnoseImplicitSelfErrors(fnExpr, argExpr, CCI, argLabels, CS))
+  if (diagnoseImplicitSelfErrors(fnExpr, argExpr, CCI, argLabels))
     return true;
 
   if (diagnoseInstanceMethodAsCurriedMemberOnType(CCI, fnExpr, argExpr))
@@ -4368,7 +4393,7 @@
         ConcreteDeclRef decl = nullptr;
         message = diag::cannot_subscript_with_index;
 
-        if (CS.TC.getTypeOfExpressionWithoutApplying(expr, CS.DC, decl))
+        if (getTypeOfExpressionWithoutApplying(expr, CS.DC, decl))
           return false;
 
         // If we are down to a single candidate but with an unresolved
@@ -4932,7 +4957,7 @@
   if (currentType->hasTypeVariable() || currentType->hasUnresolvedType()) {
     auto contextualType = CS.getContextualType();
     CallResultListener listener(contextualType);
-    CS.TC.getPossibleTypesOfExpressionWithoutApplying(
+    getPossibleTypesOfExpressionWithoutApplying(
         fnExpr, CS.DC, possibleTypes, FreeTypeVariableBinding::UnresolvedType,
         &listener);
 
@@ -5037,9 +5062,9 @@
   auto &TC = CS.TC;
   auto *DC = CS.DC;
 
-  auto typeCheckExpr = [](TypeChecker &TC, Expr *expr, DeclContext *DC,
-                          SmallPtrSetImpl<TypeBase *> &types) {
-    TC.getPossibleTypesOfExpressionWithoutApplying(
+  auto typeCheckExpr = [&](TypeChecker &TC, Expr *expr, DeclContext *DC,
+                           SmallPtrSetImpl<TypeBase *> &types) {
+    getPossibleTypesOfExpressionWithoutApplying(
         expr, DC, types, FreeTypeVariableBinding::Disallow);
   };
 
@@ -5165,14 +5190,14 @@
 // unresolved result let's not re-typecheck the function expression,
 // because it might produce unrelated diagnostics due to lack of
 // contextual information.
-static bool shouldTypeCheckFunctionExpr(TypeChecker &TC, DeclContext *DC,
+static bool shouldTypeCheckFunctionExpr(FailureDiagnosis &FD, DeclContext *DC,
                                         Expr *fnExpr) {
   if (!isa<UnresolvedDotExpr>(fnExpr))
     return true;
 
   SmallPtrSet<TypeBase *, 4> fnTypes;
-  TC.getPossibleTypesOfExpressionWithoutApplying(fnExpr, DC, fnTypes,
-                                       FreeTypeVariableBinding::UnresolvedType);
+  FD.getPossibleTypesOfExpressionWithoutApplying(
+      fnExpr, DC, fnTypes, FreeTypeVariableBinding::UnresolvedType);
 
   if (fnTypes.size() == 1) {
     // Some member types depend on the arguments to produce a result type,
@@ -5232,7 +5257,7 @@
   auto *fnExpr = callExpr->getFn();
   auto originalFnType = CS.getType(callExpr->getFn());
 
-  if (shouldTypeCheckFunctionExpr(CS.TC, CS.DC, fnExpr)) {
+  if (shouldTypeCheckFunctionExpr(*this, CS.DC, fnExpr)) {
 
     // If we are misusing a subscript, diagnose that and provide a fixit.
     // We diagnose this here to have enough context to offer an appropriate fixit.
@@ -5269,7 +5294,7 @@
     fnExpr = callExpr->getFn();
 
     SmallPtrSet<TypeBase *, 4> types;
-    CS.TC.getPossibleTypesOfExpressionWithoutApplying(fnExpr, CS.DC, types);
+    getPossibleTypesOfExpressionWithoutApplying(fnExpr, CS.DC, types);
 
     auto isFunctionType = [getFuncType](Type type) -> bool {
       return type && getFuncType(type)->is<AnyFunctionType>();
@@ -5309,7 +5334,7 @@
              "unexpected declaration reference");
 
       ConcreteDeclRef decl = nullptr;
-      Type type = CS.TC.getTypeOfExpressionWithoutApplying(
+      Type type = getTypeOfExpressionWithoutApplying(
           fnExpr, CS.DC, decl, FreeTypeVariableBinding::UnresolvedType,
           &listener);
 
@@ -5893,7 +5918,7 @@
     ExprTypeSaverAndEraser eraser(srcExpr);
 
     ConcreteDeclRef ref = nullptr;
-    auto type = CS.TC.getTypeOfExpressionWithoutApplying(srcExpr, CS.DC, ref);
+    auto type = getTypeOfExpressionWithoutApplying(srcExpr, CS.DC, ref);
 
     if (type && !type->isEqual(contextualType))
       return diagnoseContextualConversionError(
@@ -6391,7 +6416,7 @@
       // diagnose situations where contextual type expected one result
       // type but actual closure produces a different one without explicitly
       // declaring it (e.g. by using anonymous parameters).
-      auto type = CS.TC.getTypeOfExpressionWithoutApplying(
+      auto type = getTypeOfExpressionWithoutApplying(
           closure, CS.DC, decl, FreeTypeVariableBinding::Disallow);
 
       if (type && resultTypeProcessor(type, expectedResultType))
@@ -6900,7 +6925,7 @@
     KeyPathListener listener(klass, parentType, rootType);
     ConcreteDeclRef concreteDecl;
 
-    auto derivedType = CS.TC.getTypeOfExpressionWithoutApplying(
+    auto derivedType = getTypeOfExpressionWithoutApplying(
         expr, CS.DC, concreteDecl, FreeTypeVariableBinding::Disallow,
         &listener);
 
@@ -7587,27 +7612,18 @@
   if (!TEType->is<TupleType>())
     return visitExpr(TE);
 
-  SmallVector<int, 4> sources;
-  SmallVector<unsigned, 4> variadicArgs;
+  SmallVector<unsigned, 4> sources;
   
   // If the shuffle is invalid, then there is a type error.  We could diagnose
   // it specifically here, but the general logic does a fine job so we let it
   // do it.
   if (computeTupleShuffle(TEType->castTo<TupleType>()->getElements(),
-                          contextualTT->getElements(), sources, variadicArgs))
+                          contextualTT->getElements(), sources))
     return visitExpr(TE);
 
   // If we got a correct shuffle, we can perform the analysis of all of
   // the input elements, with their expected types.
   for (unsigned i = 0, e = sources.size(); i != e; ++i) {
-    // If the value is taken from a default argument, ignore it.
-    if (sources[i] == TupleShuffleExpr::DefaultInitialize ||
-        sources[i] == TupleShuffleExpr::Variadic ||
-        sources[i] == TupleShuffleExpr::CallerDefaultInitialize)
-      continue;
-    
-    assert(sources[i] >= 0 && "Unknown sources index");
-    
     // Otherwise, it must match the corresponding expected argument type.
     unsigned inArgNo = sources[i];
 
@@ -7636,27 +7652,6 @@
     }
   }
   
-  if (!variadicArgs.empty()) {
-    Type varargsTy;
-    for (auto &elt : contextualTT->getElements()) {
-      if (elt.isVararg()) {
-        varargsTy = elt.getVarargBaseTy();
-        break;
-      }
-    }
-
-    assert(varargsTy);
-
-    for (unsigned i = 0, e = variadicArgs.size(); i != e; ++i) {
-      unsigned inArgNo = variadicArgs[i];
-
-      auto expr = typeCheckChildIndependently(
-          TE->getElement(inArgNo), varargsTy, CS.getContextualTypePurpose());
-      // If there was an error type checking this argument, then we're done.
-      if (!expr) return true;
-    }
-  }
-  
   return false;
 }
 
@@ -8043,7 +8038,7 @@
       // successfully type-checked its type cleanup is going to be disabled
       // (we are allowing unresolved types), and as a side-effect it might
       // also be transformed e.g. OverloadedDeclRefExpr -> DeclRefExpr.
-      auto type = CS.TC.getTypeOfExpressionWithoutApplying(
+      auto type = getTypeOfExpressionWithoutApplying(
           resultExpr, CS.DC, decl, FreeTypeVariableBinding::UnresolvedType);
       if (type)
         resultType = type;
diff --git a/lib/Sema/CSGen.cpp b/lib/Sema/CSGen.cpp
index 77f1579..0afe8c0 100644
--- a/lib/Sema/CSGen.cpp
+++ b/lib/Sema/CSGen.cpp
@@ -2918,7 +2918,9 @@
     }
 
     Type visitLazyInitializerExpr(LazyInitializerExpr *expr) {
-      return expr->getType();
+      auto type = expr->getType();
+      assert(type && "LazyInitializerExpr should always have type set");
+      return type;
     }
 
     Type visitEditorPlaceholderExpr(EditorPlaceholderExpr *E) {
@@ -3313,22 +3315,6 @@
           continue;
         }
 
-        // Strip off 'Bool' to 'Builtin.Int1' conversion. Otherwise, we'll have
-        // to handle multiple ways of type-checking.
-        if (expr->isImplicit()) {
-          if (auto call = dyn_cast<CallExpr>(expr)) {
-            if (auto DSCE = dyn_cast<DotSyntaxCallExpr>(call->getFn())) {
-              auto RefD = DSCE->getFn()->getReferencedDecl().getDecl();
-              if (RefD->getBaseName() == TC.Context.Id_getBuiltinLogicValue &&
-                  RefD->getDeclContext()->getSelfNominalTypeDecl() ==
-                      TC.Context.getBoolDecl()) {
-                expr = DSCE->getBase();
-                continue;
-              }
-            }
-          }
-        }
-
         // Remove any semantic expression injected by typechecking.
         if (auto CE = dyn_cast<CollectionExpr>(expr)) {
           CE->setSemanticExpr(nullptr);
@@ -3366,6 +3352,20 @@
       assert(!isa<ImplicitConversionExpr>(expr) &&
              "ImplicitConversionExpr should be eliminated in walkToExprPre");
 
+      auto buildMemberRef = [&](Type memberType, Expr *base, SourceLoc dotLoc,
+                                ConcreteDeclRef member, DeclNameLoc memberLoc,
+                                bool implicit) -> Expr * {
+        auto *memberRef = new (TC.Context)
+            MemberRefExpr(base, dotLoc, member, memberLoc, implicit);
+
+        if (memberType) {
+          memberRef->setType(memberType);
+          return CS.cacheType(memberRef);
+        }
+
+        return memberRef;
+      };
+
       // A DotSyntaxCallExpr is a member reference that has already been
       // type-checked down to a call; turn it back into an overloaded
       // member reference expression.
@@ -3375,21 +3375,23 @@
                                                        memberLoc);
         if (memberAndFunctionRef.first) {
           assert(!isa<ImplicitConversionExpr>(dotCall->getBase()));
-          return new (TC.Context) MemberRefExpr(dotCall->getBase(),
-                                                dotCall->getDotLoc(),
-                                                memberAndFunctionRef.first,
-                                                memberLoc, expr->isImplicit());
+          return buildMemberRef(dotCall->getType(),
+                                dotCall->getBase(),
+                                dotCall->getDotLoc(),
+                                memberAndFunctionRef.first,
+                                memberLoc, expr->isImplicit());
         }
       }
 
       if (auto *dynamicMember = dyn_cast<DynamicMemberRefExpr>(expr)) {
         if (auto memberRef = dynamicMember->getMember()) {
           assert(!isa<ImplicitConversionExpr>(dynamicMember->getBase()));
-          return new (TC.Context) MemberRefExpr(dynamicMember->getBase(),
-                                                dynamicMember->getDotLoc(),
-                                                memberRef,
-                                                dynamicMember->getNameLoc(),
-                                                expr->isImplicit());
+          return buildMemberRef(dynamicMember->getType(),
+                                dynamicMember->getBase(),
+                                dynamicMember->getDotLoc(),
+                                memberRef,
+                                dynamicMember->getNameLoc(),
+                                expr->isImplicit());
         }
       }
 
@@ -3403,10 +3405,11 @@
                                                        memberLoc);
         if (memberAndFunctionRef.first) {
           assert(!isa<ImplicitConversionExpr>(dotIgnored->getLHS()));
-          return new (TC.Context) MemberRefExpr(dotIgnored->getLHS(),
-                                                dotIgnored->getDotLoc(),
-                                                memberAndFunctionRef.first,
-                                                memberLoc, expr->isImplicit());
+          return buildMemberRef(dotIgnored->getType(),
+                                dotIgnored->getLHS(),
+                                dotIgnored->getDotLoc(),
+                                memberAndFunctionRef.first,
+                                memberLoc, expr->isImplicit());
         }
       }
       return expr;
diff --git a/lib/Sema/CSRanking.cpp b/lib/Sema/CSRanking.cpp
index 66bdc3d..1bf2045 100644
--- a/lib/Sema/CSRanking.cpp
+++ b/lib/Sema/CSRanking.cpp
@@ -1133,17 +1133,6 @@
     // The systems are not considered equivalent.
     identical = false;
 
-    // If one type is convertible to of the other, but not vice-versa.
-    type1Better = tc.isConvertibleTo(type1, type2, cs.DC);
-    type2Better = tc.isConvertibleTo(type2, type1, cs.DC);
-    if (type1Better || type2Better) {
-      if (type1Better)
-        ++score1;
-      if (type2Better)
-        ++score2;
-      continue;
-    }
-
     // A concrete type is better than an archetype.
     // FIXME: Total hack.
     if (type1->is<ArchetypeType>() != type2->is<ArchetypeType>()) {
diff --git a/lib/Sema/CSSimplify.cpp b/lib/Sema/CSSimplify.cpp
index 226d559..8a3cdfb 100644
--- a/lib/Sema/CSSimplify.cpp
+++ b/lib/Sema/CSSimplify.cpp
@@ -997,29 +997,12 @@
   }
 
   // Compute the element shuffles for conversions.
-  SmallVector<int, 16> sources;
-  SmallVector<unsigned, 4> variadicArguments;
-  if (computeTupleShuffle(tuple1, tuple2, sources, variadicArguments))
+  SmallVector<unsigned, 16> sources;
+  if (computeTupleShuffle(tuple1, tuple2, sources))
     return getTypeMatchFailure(locator);
 
   // Check each of the elements.
-  bool hasVariadic = false;
-  unsigned variadicIdx = sources.size();
   for (unsigned idx2 = 0, n = sources.size(); idx2 != n; ++idx2) {
-    // Default-initialization always allowed for conversions.
-    if (sources[idx2] == TupleShuffleExpr::DefaultInitialize) {
-      continue;
-    }
-
-    // Variadic arguments handled below.
-    if (sources[idx2] == TupleShuffleExpr::Variadic) {
-      assert(!hasVariadic && "Multiple variadic parameters");
-      hasVariadic = true;
-      variadicIdx = idx2;
-      continue;
-    }
-
-    assert(sources[idx2] >= 0);
     unsigned idx1 = sources[idx2];
 
     // Match up the types.
@@ -1032,21 +1015,6 @@
       return result;
   }
 
-  // If we have variadic arguments to check, do so now.
-  if (hasVariadic) {
-    const auto &elt2 = tuple2->getElements()[variadicIdx];
-    auto eltType2 = elt2.getVarargBaseTy();
-
-    for (unsigned idx1 : variadicArguments) {
-      auto result = matchTypes(tuple1->getElementType(idx1), eltType2, subKind,
-                         subflags,
-                         locator.withPathElement(
-                                        LocatorPathElt::getTupleElement(idx1)));
-      if (result.isFailure())
-        return result;
-    }
-  }
-
   return getTypeMatchSuccess();
 }
 
@@ -1173,6 +1141,17 @@
             !params[0].isVariadic());
   };
 
+  auto canImplodeParams = [&](ArrayRef<AnyFunctionType::Param> params) {
+    if (params.size() == 1)
+      return false;
+
+    for (auto param : params)
+      if (param.isVariadic() || param.isInOut())
+        return false;
+
+    return true;
+  };
+
   auto implodeParams = [&](SmallVectorImpl<AnyFunctionType::Param> &params) {
     auto input = AnyFunctionType::composeInput(getASTContext(), params,
                                                /*canonicalVararg=*/false);
@@ -1193,21 +1172,18 @@
 
     if (last != path.rend()) {
       if (last->getKind() == ConstraintLocator::ApplyArgToParam) {
-        if (isSingleParam(func2Params)) {
-          if (!isSingleParam(func1Params)) {
-            implodeParams(func1Params);
-          }
-        } else if (getASTContext().isSwiftVersionAtLeast(4)
-                   && !getASTContext().isSwiftVersionAtLeast(5)
-                   && !isSingleParam(func2Params)) {
+        if (isSingleParam(func2Params) &&
+            canImplodeParams(func1Params)) {
+          implodeParams(func1Params);
+        } else if (!getASTContext().isSwiftVersionAtLeast(5) &&
+                   isSingleParam(func1Params) &&
+                   canImplodeParams(func2Params)) {
           auto *simplified = locator.trySimplifyToExpr();
           // We somehow let tuple unsplatting function conversions
           // through in some cases in Swift 4, so let's let that
           // continue to work, but only for Swift 4.
           if (simplified && isa<DeclRefExpr>(simplified)) {
-            if (isSingleParam(func1Params)) {
-              implodeParams(func2Params);
-            }
+            implodeParams(func2Params);
           }
         }
       }
diff --git a/lib/Sema/CSSolver.cpp b/lib/Sema/CSSolver.cpp
index 5328269..9ac7e15 100644
--- a/lib/Sema/CSSolver.cpp
+++ b/lib/Sema/CSSolver.cpp
@@ -251,8 +251,7 @@
   while (!ActiveConstraints.empty()) {
     // Grab the next constraint from the worklist.
     auto *constraint = &ActiveConstraints.front();
-    ActiveConstraints.pop_front();
-    assert(constraint->isActive() && "Worklist constraint is not active?");
+    deactivateConstraint(constraint);
 
     // Simplify this constraint.
     switch (simplifyConstraint(*constraint)) {
@@ -269,36 +268,21 @@
         log << ")\n";
       }
 
-      if (solverState)
-        solverState->retireConstraint(constraint);
-
-      CG.removeConstraint(constraint);
+      retireConstraint(constraint);
       break;
 
     case SolutionKind::Solved:
-      if (solverState) {
+      if (solverState)
         ++solverState->NumSimplifiedConstraints;
-
-        // This constraint has already been solved; retire it.
-        solverState->retireConstraint(constraint);
-      }
-
-      // Remove the constraint from the constraint graph.
-      CG.removeConstraint(constraint);
+      retireConstraint(constraint);
       break;
 
     case SolutionKind::Unsolved:
       if (solverState)
         ++solverState->NumUnsimplifiedConstraints;
-
-      InactiveConstraints.push_back(constraint);
       break;
     }
 
-    // This constraint is not active. We delay this operation until
-    // after simplification to avoid re-insertion.
-    constraint->setActive(false);
-
     // Check whether a constraint failed. If so, we're done.
     if (failedConstraint && !ContinueAfterFailures) {
       return true;
@@ -388,10 +372,7 @@
 #endif
 
     // Transfer the constraint to "active" set.
-    CS.ActiveConstraints.splice(CS.ActiveConstraints.end(),
-                                CS.InactiveConstraints, constraint);
-
-    constraint->setActive(true);
+    CS.activateConstraint(constraint);
   }
 
   // Restore debugging state.
@@ -1670,11 +1651,18 @@
   size_t nextType = 0;
   for (auto argType : argInfo.getTypes()) {
     auto *nominal = argType->getAnyNominal();
-    for (size_t i = nextType + 1; i < nominalTypes.size(); ++i) {
+    for (size_t i = nextType; i < nominalTypes.size(); ++i) {
       if (nominal == nominalTypes[i]) {
         std::swap(nominalTypes[nextType], nominalTypes[i]);
         ++nextType;
         break;
+      } else if (auto *protoDecl = dyn_cast<ProtocolDecl>(nominalTypes[i])) {
+        if (TC.conformsToProtocol(argType, protoDecl, DC,
+                                  ConformanceCheckFlags::InExpression)) {
+          std::swap(nominalTypes[nextType], nominalTypes[i]);
+          ++nextType;
+          break;
+        }
       }
     }
   }
@@ -1723,6 +1711,10 @@
     auto *parentDC = funcDecl->getParent();
     auto *parentDecl = parentDC->getSelfNominalTypeDecl();
 
+    // Skip anything not defined in a nominal type.
+    if (!parentDecl)
+      return false;
+
     for (auto designatedTypeIndex : indices(designatedNominalTypes)) {
       auto *designatedNominal =
         designatedNominalTypes[designatedTypeIndex];
@@ -1807,7 +1799,6 @@
 
   SmallVector<unsigned, 4> disabled;
   SmallVector<unsigned, 4> unavailable;
-  SmallVector<unsigned, 4> globalScope;
 
   // First collect disabled constraints.
   forEachChoice(Choices, [&](unsigned index, Constraint *constraint) -> bool {
@@ -1831,20 +1822,6 @@
     });
   }
 
-  // Collect everything at the global scope.
-  forEachChoice(Choices, [&](unsigned index, Constraint *constraint) -> bool {
-    auto *decl = constraint->getOverloadChoice().getDecl();
-    auto *funcDecl = cast<FuncDecl>(decl);
-
-    // Skip anything defined within a type.
-    auto *parentDecl = funcDecl->getParent()->getAsDecl();
-    if (parentDecl)
-      return false;
-
-    globalScope.push_back(index);
-    return true;
-  });
-
   // Local function to create the next partition based on the options
   // passed in.
   PartitionAppendCallback appendPartition =
@@ -1857,9 +1834,6 @@
 
   partitionForDesignatedTypes(Choices, forEachChoice, appendPartition);
 
-  // Add all the things defined at global scope.
-  appendPartition(globalScope);
-
   SmallVector<unsigned, 4> everythingElse;
   // Gather the remaining options.
   forEachChoice(Choices, [&](unsigned index, Constraint *constraint) -> bool {
diff --git a/lib/Sema/CodeSynthesis.cpp b/lib/Sema/CodeSynthesis.cpp
index d233e13..bbf6387 100644
--- a/lib/Sema/CodeSynthesis.cpp
+++ b/lib/Sema/CodeSynthesis.cpp
@@ -1294,7 +1294,9 @@
   // FIXME: we should really have stronger invariants than this.  Leaving it
   // unwrapped may expose both expressions to naive walkers
   if (wasInitializerChecked) {
+    auto initType = InitValue->getType();
     InitValue = new (Ctx) LazyInitializerExpr(InitValue);
+    InitValue->setType(initType);
   }
 
   Pattern *Tmp2PBDPattern = new (Ctx) NamedPattern(Tmp2VD, /*implicit*/true);
diff --git a/lib/Sema/ConstraintSystem.cpp b/lib/Sema/ConstraintSystem.cpp
index c546f1e..23cd757 100644
--- a/lib/Sema/ConstraintSystem.cpp
+++ b/lib/Sema/ConstraintSystem.cpp
@@ -227,11 +227,8 @@
       [](Constraint *constraint) { return !constraint->isActive(); });
 
   // Add any constraints that aren't already active to the worklist.
-  for (auto constraint : inactiveConstraints) {
-    ActiveConstraints.splice(ActiveConstraints.end(), InactiveConstraints,
-                             constraint);
-    constraint->setActive(true);
-  }
+  for (auto *constraint : inactiveConstraints)
+    activateConstraint(constraint);
 }
 
 /// Retrieve a dynamic result signature for the given declaration.
diff --git a/lib/Sema/ConstraintSystem.h b/lib/Sema/ConstraintSystem.h
index c2f8881..96b7c12 100644
--- a/lib/Sema/ConstraintSystem.h
+++ b/lib/Sema/ConstraintSystem.h
@@ -636,19 +636,6 @@
                      bool ignoreTopLevelInjection = false,
                      Optional<Pattern*> typeFromPattern = None) const;
 
-  /// Convert the given expression to a logic value.
-  ///
-  /// This operation cannot fail.
-  ///
-  /// \param expr The expression to coerce. The type of this expression
-  /// must conform to the LogicValue protocol.
-  ///
-  /// \param locator Locator used to describe the location of this expression.
-  ///
-  /// \returns the expression converted to a logic value (Builtin i1).
-  Expr *convertBooleanTypeToBuiltinI1(Expr *expr,
-                                      ConstraintLocator *locator) const;
-
   /// Convert the given optional-producing expression to a Bool
   /// indicating whether the optional has a value.
   ///
@@ -1996,6 +1983,28 @@
       solverState->retireConstraint(constraint);
   }
 
+  /// Transfer given constraint from to active list
+  /// for solver to attempt its simplification.
+  void activateConstraint(Constraint *constraint) {
+    assert(!constraint->isActive() && "Constraint is already active");
+    ActiveConstraints.splice(ActiveConstraints.end(), InactiveConstraints,
+                             constraint);
+    constraint->setActive(true);
+  }
+
+  void deactivateConstraint(Constraint *constraint) {
+    assert(constraint->isActive() && "Constraint is already inactive");
+    InactiveConstraints.splice(InactiveConstraints.end(),
+                               ActiveConstraints, constraint);
+    constraint->setActive(false);
+  }
+
+  void retireConstraint(Constraint *constraint) {
+    if (constraint->isActive())
+      deactivateConstraint(constraint);
+    removeInactiveConstraint(constraint);
+  }
+
   /// Retrieve the list of inactive constraints.
   ConstraintList &getConstraints() { return InactiveConstraints; }
 
@@ -3309,25 +3318,17 @@
 /// \param sources Will be populated with information about the source of each
 /// of the elements for the result tuple. The indices into this array are the
 /// indices of the tuple type we're converting to, while the values are
-/// either one of the \c TupleShuffleExpr constants or are an index into the
-/// source tuple.
-///
-/// \param variadicArgs Will be populated with all of the variadic arguments
-/// that will be placed into the variadic tuple element (i.e., at the index
-/// \c where \c consumed[i] is \c TupleShuffleExpr::Variadic). The values
-/// are indices into the source tuple.
+/// an index into the source tuple.
 ///
 /// \returns true if no tuple conversion is possible, false otherwise.
 bool computeTupleShuffle(ArrayRef<TupleTypeElt> fromTuple,
                          ArrayRef<TupleTypeElt> toTuple,
-                         SmallVectorImpl<int> &sources,
-                         SmallVectorImpl<unsigned> &variadicArgs);
+                         SmallVectorImpl<unsigned> &sources);
 static inline bool computeTupleShuffle(TupleType *fromTuple,
                                        TupleType *toTuple,
-                                       SmallVectorImpl<int> &sources,
-                                       SmallVectorImpl<unsigned> &variadicArgs){
+                                       SmallVectorImpl<unsigned> &sources){
   return computeTupleShuffle(fromTuple->getElements(), toTuple->getElements(),
-                             sources, variadicArgs);
+                             sources);
 }
 
 /// Describes the arguments to which a parameter binds.
diff --git a/lib/Sema/DerivedConformanceEquatableHashable.cpp b/lib/Sema/DerivedConformanceEquatableHashable.cpp
index e260056..9846d3e 100644
--- a/lib/Sema/DerivedConformanceEquatableHashable.cpp
+++ b/lib/Sema/DerivedConformanceEquatableHashable.cpp
@@ -1176,7 +1176,7 @@
       // The hashValue failure will produce a diagnostic elsewhere.
       return nullptr;
     }
-    if (hashValueDecl && hashValueDecl->isImplicit()) {
+    if (hashValueDecl->isImplicit()) {
       // Neither hashValue nor hash(into:) is explicitly defined; we need to do
       // a full Hashable derivation.
       
@@ -1210,8 +1210,11 @@
         llvm_unreachable("Attempt to derive Hashable for a type other "
                          "than a struct or enum");      
     } else {
-      // We can always derive hash(into:) if hashValue has an explicit
-      // implementation.
+      // hashValue has an explicit implementation, but hash(into:) doesn't.
+      // Emit a deprecation warning, then derive hash(into:) in terms of
+      // hashValue.
+      TC.diagnose(hashValueDecl->getLoc(), diag::hashvalue_implementation,
+                  Nominal->getDeclaredType());
       return deriveHashable_hashInto(*this,
                                      &deriveBodyHashable_compat_hashInto);
     }
diff --git a/lib/Sema/MiscDiagnostics.cpp b/lib/Sema/MiscDiagnostics.cpp
index 2f45401..225761e 100644
--- a/lib/Sema/MiscDiagnostics.cpp
+++ b/lib/Sema/MiscDiagnostics.cpp
@@ -203,10 +203,6 @@
       while (auto Conv = dyn_cast<ImplicitConversionExpr>(Base))
         Base = Conv->getSubExpr();
 
-      // Record call arguments.
-      if (auto Call = dyn_cast<CallExpr>(Base))
-        CallArgs.insert(Call->getArg());
-
       if (auto *DRE = dyn_cast<DeclRefExpr>(Base)) {
         // Verify metatype uses.
         if (isa<TypeDecl>(DRE->getDecl())) {
@@ -235,7 +231,14 @@
       if (isa<TypeExpr>(Base))
         checkUseOfMetaTypeName(Base);
 
+      if (auto *TSE = dyn_cast<TupleShuffleExpr>(E)) {
+        if (CallArgs.count(TSE))
+          CallArgs.insert(TSE->getSubExpr());
+      }
+
       if (auto *SE = dyn_cast<SubscriptExpr>(E)) {
+        CallArgs.insert(SE->getIndex());
+
         // Implicit InOutExpr's are allowed in the base of a subscript expr.
         if (auto *IOE = dyn_cast<InOutExpr>(SE->getBase()))
           if (IOE->isImplicit())
@@ -248,6 +251,13 @@
         });
       }
 
+      if (auto *KPE = dyn_cast<KeyPathExpr>(E)) {
+        for (auto Comp : KPE->getComponents()) {
+          if (auto *Arg = Comp.getIndexExpr())
+            CallArgs.insert(Arg);
+        }
+      }
+
       if (auto *AE = dyn_cast<CollectionExpr>(E)) {
         visitCollectionElements(AE, [&](unsigned argIndex, Expr *arg) {
           arg = lookThroughArgument(arg);
@@ -266,6 +276,9 @@
       // Check function calls, looking through implicit conversions on the
       // function and inspecting the arguments directly.
       if (auto *Call = dyn_cast<ApplyExpr>(E)) {
+        // Record call arguments.
+        CallArgs.insert(Call->getArg());
+
         // Warn about surprising implicit optional promotions.
         checkOptionalPromotions(Call);
         
@@ -381,6 +394,18 @@
         }
       }
 
+      // Diagnose single-element tuple expressions.
+      if (auto *tupleExpr = dyn_cast<TupleExpr>(E)) {
+        if (!CallArgs.count(tupleExpr)) {
+          if (tupleExpr->getNumElements() == 1) {
+            TC.diagnose(tupleExpr->getElementNameLoc(0),
+                        diag::tuple_single_element)
+              .fixItRemoveChars(tupleExpr->getElementNameLoc(0),
+                                tupleExpr->getElement(0)->getStartLoc());
+          }
+        }
+      }
+
       return { true, E };
     }
 
diff --git a/lib/Sema/TypeCheckAttr.cpp b/lib/Sema/TypeCheckAttr.cpp
index 5577763..2cdb2c0 100644
--- a/lib/Sema/TypeCheckAttr.cpp
+++ b/lib/Sema/TypeCheckAttr.cpp
@@ -2036,8 +2036,9 @@
                              replacement->getModuleScopeContext(), nullptr,
                              attr->getLocation());
     if (lookup.isSuccess()) {
-      for (auto entry : lookup.Results)
+      for (auto entry : lookup.Results) {
         results.push_back(entry.getValueDecl());
+      }
     }
     return;
   }
@@ -2051,6 +2052,28 @@
       {typeCtx}, replacedDeclName, NL_QualifiedDefault, results);
 }
 
+/// Remove any argument labels from the interface type of the given value that
+/// are extraneous from the type system's point of view, producing the
+/// type to compare against for the purposes of dynamic replacement.
+static Type getDynamicComparisonType(ValueDecl *value) {
+  unsigned numArgumentLabels = 0;
+
+  if (isa<AbstractFunctionDecl>(value)) {
+    ++numArgumentLabels;
+
+    if (value->getDeclContext()->isTypeContext())
+      ++numArgumentLabels;
+  } else if (isa<SubscriptDecl>(value)) {
+    ++numArgumentLabels;
+  }
+
+  auto interfaceType = value->getInterfaceType();
+  if (!interfaceType)
+    return ErrorType::get(value->getASTContext());
+
+  return interfaceType->removeArgumentLabels(numArgumentLabels);
+}
+
 static FuncDecl *findReplacedAccessor(DeclName replacedVarName,
                                       AccessorDecl *replacement,
                                       DynamicReplacementAttr *attr,
@@ -2060,13 +2083,47 @@
   SmallVector<ValueDecl *, 4> results;
   lookupReplacedDecl(replacedVarName, attr, replacement, results);
 
+  // Filter out any accessors that won't work.
+  if (!results.empty()) {
+    auto replacementStorage = replacement->getStorage();
+    TC.validateDecl(replacementStorage);
+    Type replacementStorageType = getDynamicComparisonType(replacementStorage);
+    results.erase(std::remove_if(results.begin(), results.end(),
+        [&](ValueDecl *result) {
+          // Check for static/instance mismatch.
+          if (result->isStatic() != replacementStorage->isStatic())
+            return true;
+
+          // Check for type mismatch.
+          TC.validateDecl(result);
+          auto resultType = getDynamicComparisonType(result);
+          if (!resultType->isEqual(replacementStorageType)) {
+            return true;
+          }
+
+          return false;
+        }),
+        results.end());
+  }
+
   if (results.empty()) {
     TC.diagnose(attr->getLocation(),
                 diag::dynamic_replacement_accessor_not_found, replacedVarName);
     attr->setInvalid();
     return nullptr;
   }
-  assert(results.size() == 1 && "Should only have on var or fun");
+
+  if (results.size() > 1) {
+    TC.diagnose(attr->getLocation(),
+                diag::dynamic_replacement_accessor_ambiguous, replacedVarName);
+    for (auto result : results) {
+      TC.diagnose(result,
+                  diag::dynamic_replacement_accessor_ambiguous_candidate,
+                  result->getModuleContext()->getFullName());
+    }
+    attr->setInvalid();
+    return nullptr;
+  }
 
   assert(!isa<FuncDecl>(results[0]));
   TC.validateDecl(results[0]);
@@ -2117,6 +2174,10 @@
   lookupReplacedDecl(replacedFunctionName, attr, replacement, results);
 
   for (auto *result : results) {
+    // Check for static/instance mismatch.
+    if (result->isStatic() != replacement->isStatic())
+      continue;
+
     TC.validateDecl(result);
     if (result->getInterfaceType()->getCanonicalType()->matches(
             replacement->getInterfaceType()->getCanonicalType(),
diff --git a/lib/Sema/TypeCheckConstraints.cpp b/lib/Sema/TypeCheckConstraints.cpp
index a67a5aa..7c9a114 100644
--- a/lib/Sema/TypeCheckConstraints.cpp
+++ b/lib/Sema/TypeCheckConstraints.cpp
@@ -100,13 +100,11 @@
 
 bool constraints::computeTupleShuffle(ArrayRef<TupleTypeElt> fromTuple,
                                       ArrayRef<TupleTypeElt> toTuple,
-                                      SmallVectorImpl<int> &sources,
-                                      SmallVectorImpl<unsigned> &variadicArgs) {
-  const int unassigned = -3;
+                                      SmallVectorImpl<unsigned> &sources) {
+  const unsigned unassigned = -1;
   
   SmallVector<bool, 4> consumed(fromTuple.size(), false);
   sources.clear();
-  variadicArgs.clear();
   sources.assign(toTuple.size(), unassigned);
 
   // Match up any named elements.
@@ -150,35 +148,14 @@
     if (sources[i] != unassigned)
       continue;
 
-    const auto &elt2 = toTuple[i];
-
-    // Variadic tuple elements match the rest of the input elements.
-    if (elt2.isVararg()) {
-      // Collect the remaining (unnamed) inputs.
-      while (fromNext != fromLast) {
-        // Labeled elements can't be adopted into varargs even if
-        // they're non-mandatory.  There isn't a really strong reason
-        // for this, though.
-        if (fromTuple[fromNext].hasName())
-          return true;
-
-        variadicArgs.push_back(fromNext);
-        consumed[fromNext] = true;
-        skipToNextAvailableInput();
-      }
-      sources[i] = TupleShuffleExpr::Variadic;
-      
-      // Keep looking at subsequent arguments.  Non-variadic arguments may
-      // follow the variadic one.
-      continue;
-    }
-
     // If there aren't any more inputs, we are done.
     if (fromNext == fromLast) {
       return true;
     }
 
     // Otherwise, assign this input to the next output element.
+    const auto &elt2 = toTuple[i];
+    assert(!elt2.isVararg());
 
     // Fail if the input element is named and we're trying to match it with
     // something with a different label.
@@ -2722,10 +2699,9 @@
 }
 
 bool TypeChecker::typeCheckCondition(Expr *&expr, DeclContext *dc) {
-  // If this expression is already typechecked and has an i1 type, then it has
-  // already got its conversion from Boolean back to i1.  Just re-typecheck
-  // it.
-  if (expr->getType() && expr->getType()->isBuiltinIntegerType(1)) {
+  // If this expression is already typechecked and has type Bool, then just
+  // re-typecheck it.
+  if (expr->getType() && expr->getType()->isBool()) {
     auto resultTy = typeCheckExpression(expr, dc);
     return !resultTy;
   }
@@ -2751,19 +2727,6 @@
                        cs.getConstraintLocator(expr));
       return false;
     }
-
-    // Convert the result to a Builtin.i1.
-    Expr *appliedSolution(constraints::Solution &solution,
-                          Expr *expr) override {
-      auto &cs = solution.getConstraintSystem();
-
-      auto converted =
-        solution.convertBooleanTypeToBuiltinI1(expr,
-                                             cs.getConstraintLocator(OrigExpr));
-      cs.setExprTypes(converted);
-      return converted;
-    }
-    
   };
 
   ConditionListener listener;
diff --git a/lib/Sema/TypeCheckDecl.cpp b/lib/Sema/TypeCheckDecl.cpp
index 308bf5e..b3b40fd 100644
--- a/lib/Sema/TypeCheckDecl.cpp
+++ b/lib/Sema/TypeCheckDecl.cpp
@@ -3197,7 +3197,11 @@
 
 /// Validate the underlying type of the given typealias.
 static void validateTypealiasType(TypeChecker &tc, TypeAliasDecl *typeAlias) {
-  TypeResolutionOptions options(TypeResolverContext::TypeAliasDecl);
+  TypeResolutionOptions options(
+    (typeAlias->getGenericParams() ?
+     TypeResolverContext::GenericTypeAliasDecl :
+     TypeResolverContext::TypeAliasDecl));
+
   if (!typeAlias->getDeclContext()->isCascadingContextForLookup(
         /*functionsAreNonCascading*/true)) {
      options |= TypeResolutionFlags::KnownNonCascadingDependency;
@@ -4198,7 +4202,10 @@
         if (typealias->isBeingValidated()) return;
 
         auto helper = [&] {
-          TypeResolutionOptions options(TypeResolverContext::TypeAliasDecl);
+          TypeResolutionOptions options(
+            (typealias->getGenericParams() ?
+             TypeResolverContext::GenericTypeAliasDecl :
+             TypeResolverContext::TypeAliasDecl));
           if (validateType(typealias->getUnderlyingTypeLoc(),
                            TypeResolution::forStructural(typealias), options)) {
             typealias->setInvalid();
@@ -4476,26 +4483,21 @@
 
 /// Form the interface type of an extension from the raw type and the
 /// extension's list of generic parameters.
-static Type formExtensionInterfaceType(TypeChecker &tc, ExtensionDecl *ext,
-                                       Type type,
-                                       GenericParamList *genericParams,
-                                       bool &mustInferRequirements) {
+static Type formExtensionInterfaceType(
+                         TypeChecker &tc, ExtensionDecl *ext,
+                         Type type,
+                         GenericParamList *genericParams,
+                         SmallVectorImpl<std::pair<Type, Type>> &sameTypeReqs,
+                         bool &mustInferRequirements) {
   if (type->is<ErrorType>())
     return type;
 
   // Find the nominal type declaration and its parent type.
-  Type parentType;
-  GenericTypeDecl *genericDecl;
-  if (auto unbound = type->getAs<UnboundGenericType>()) {
-    parentType = unbound->getParent();
-    genericDecl = unbound->getDecl();
-  } else {
-    if (type->is<ProtocolCompositionType>())
-      type = type->getCanonicalType();
-    auto nominalType = type->castTo<NominalType>();
-    parentType = nominalType->getParent();
-    genericDecl = nominalType->getDecl();
-  }
+  if (type->is<ProtocolCompositionType>())
+    type = type->getCanonicalType();
+
+  Type parentType = type->getNominalParent();
+  GenericTypeDecl *genericDecl = type->getAnyGeneric();
 
   // Reconstruct the parent, if there is one.
   if (parentType) {
@@ -4505,7 +4507,7 @@
                                  : genericParams;
     parentType =
       formExtensionInterfaceType(tc, ext, parentType, parentGenericParams,
-                                 mustInferRequirements);
+                                 sameTypeReqs, mustInferRequirements);
   }
 
   // Find the nominal type.
@@ -4523,9 +4525,20 @@
     resultType = NominalType::get(nominal, parentType,
                                   nominal->getASTContext());
   } else {
+    auto currentBoundType = type->getAs<BoundGenericType>();
+
     // Form the bound generic type with the type parameters provided.
+    unsigned gpIndex = 0;
     for (auto gp : *genericParams) {
-      genericArgs.push_back(gp->getDeclaredInterfaceType());
+      SWIFT_DEFER { ++gpIndex; };
+
+      auto gpType = gp->getDeclaredInterfaceType();
+      genericArgs.push_back(gpType);
+
+      if (currentBoundType) {
+        sameTypeReqs.push_back({gpType,
+                                currentBoundType->getGenericArgs()[gpIndex]});
+      }
     }
 
     resultType = BoundGenericType::get(nominal, parentType, genericArgs);
@@ -4562,8 +4575,9 @@
 
   // Form the interface type of the extension.
   bool mustInferRequirements = false;
+  SmallVector<std::pair<Type, Type>, 4> sameTypeReqs;
   Type extInterfaceType =
-    formExtensionInterfaceType(tc, ext, type, genericParams,
+    formExtensionInterfaceType(tc, ext, type, genericParams, sameTypeReqs,
                                mustInferRequirements);
 
   // Local function used to infer requirements from the extended type.
@@ -4575,6 +4589,13 @@
                               extInterfaceType,
                               nullptr,
                               source);
+
+    for (const auto &sameTypeReq : sameTypeReqs) {
+      builder.addRequirement(
+        Requirement(RequirementKind::SameType, sameTypeReq.first,
+                    sameTypeReq.second),
+        source, ext->getModuleContext());
+    }
   };
 
   // Validate the generic type signature.
@@ -4582,11 +4603,20 @@
                                          ext->getDeclContext(), nullptr,
                                          /*allowConcreteGenericParams=*/true,
                                          ext, inferExtendedTypeReqs,
-                                         mustInferRequirements);
+                                         (mustInferRequirements ||
+                                            !sameTypeReqs.empty()));
 
   return { env, extInterfaceType };
 }
 
+static bool isNonGenericTypeAliasType(Type type) {
+  // A non-generic typealias can extend a specialized type.
+  if (auto *aliasType = dyn_cast<NameAliasType>(type.getPointer()))
+    return aliasType->getDecl()->getGenericContextDepth() == (unsigned)-1;
+
+  return false;
+}
+
 static void validateExtendedType(ExtensionDecl *ext, TypeChecker &tc) {
   // If we didn't parse a type, fill in an error type and bail out.
   if (!ext->getExtendedTypeLoc().getTypeRepr()) {
@@ -4630,20 +4660,22 @@
     return;
   }
 
-  // Cannot extend a bound generic type.
-  if (extendedType->isSpecialized()) {
-    tc.diagnose(ext->getLoc(), diag::extension_specialization,
-             extendedType->getAnyNominal()->getName())
+  // Cannot extend function types, tuple types, etc.
+  if (!extendedType->getAnyNominal()) {
+    tc.diagnose(ext->getLoc(), diag::non_nominal_extension, extendedType)
       .highlight(ext->getExtendedTypeLoc().getSourceRange());
     ext->setInvalid();
     ext->getExtendedTypeLoc().setInvalidType(tc.Context);
     return;
   }
 
-  // Cannot extend function types, tuple types, etc.
-  if (!extendedType->getAnyNominal()) {
-    tc.diagnose(ext->getLoc(), diag::non_nominal_extension, extendedType)
-      .highlight(ext->getExtendedTypeLoc().getSourceRange());
+  // Cannot extend a bound generic type, unless it's referenced via a
+  // non-generic typealias type.
+  if (extendedType->isSpecialized() &&
+      !isNonGenericTypeAliasType(extendedType)) {
+    tc.diagnose(ext->getLoc(), diag::extension_specialization,
+                extendedType->getAnyNominal()->getName())
+    .highlight(ext->getExtendedTypeLoc().getSourceRange());
     ext->setInvalid();
     ext->getExtendedTypeLoc().setInvalidType(tc.Context);
     return;
diff --git a/lib/Sema/TypeCheckGeneric.cpp b/lib/Sema/TypeCheckGeneric.cpp
index 5c731e2..f059850 100644
--- a/lib/Sema/TypeCheckGeneric.cpp
+++ b/lib/Sema/TypeCheckGeneric.cpp
@@ -710,11 +710,11 @@
     if (recursivelyVisitGenericParams) {
       visitOuterToInner(genericParams,
                         [&](GenericParamList *gpList) {
-      auto genericParamsDC = gpList->begin()[0]->getDeclContext();
-      TypeResolution structuralResolution =
-        TypeResolution::forStructural(genericParamsDC);
-        checkGenericParamList(*this, &builder, gpList, nullptr,
-                              structuralResolution);
+        auto genericParamsDC = gpList->begin()[0]->getDeclContext();
+        TypeResolution structuralResolution =
+          TypeResolution::forStructural(genericParamsDC);
+          checkGenericParamList(*this, &builder, gpList, nullptr,
+                                structuralResolution);
       });
     } else {
       auto genericParamsDC = genericParams->begin()[0]->getDeclContext();
diff --git a/lib/Sema/TypeCheckPattern.cpp b/lib/Sema/TypeCheckPattern.cpp
index cfddd4d..ea0c11d 100644
--- a/lib/Sema/TypeCheckPattern.cpp
+++ b/lib/Sema/TypeCheckPattern.cpp
@@ -723,6 +723,7 @@
   if (auto ty = decl->getTypeLoc().getType())
     return ty->hasError();
 
+  auto origContext = options.getContext();
   options.setContext(None);
 
   // If the element is a variadic parameter, resolve the parameter type as if
@@ -764,6 +765,12 @@
       hadError = true;
     }
     TL.setType(Ty);
+
+    // Disallow variadic parameters in enum elements.
+    if (!hadError && origContext == TypeResolverContext::EnumElementDecl) {
+      TC.diagnose(decl->getStartLoc(), diag::enum_element_ellipsis);
+      hadError = true;
+    }
   }
 
   if (hadError)
diff --git a/lib/Sema/TypeCheckProtocol.cpp b/lib/Sema/TypeCheckProtocol.cpp
index 52aaa3c..b5616e7 100644
--- a/lib/Sema/TypeCheckProtocol.cpp
+++ b/lib/Sema/TypeCheckProtocol.cpp
@@ -2624,6 +2624,12 @@
     Options.SkipAttributes = true;
     Options.FunctionDefinitions = true;
     Options.PrintAccessorBodiesInProtocols = true;
+
+    // FIXME: Once we support move-only types, remove this if the
+    //        conforming type is move-only. Until then, don't suggest printing
+    //        __consuming on a protocol requirement.
+    Options.ExcludeAttrList.push_back(DAK_Consuming);
+
     Options.FunctionBody = [&](const ValueDecl *VD, ASTPrinter &Printer) {
       Printer << " {";
       Printer.printNewline();
diff --git a/lib/Sema/TypeCheckStmt.cpp b/lib/Sema/TypeCheckStmt.cpp
index a47afb2..79de281 100644
--- a/lib/Sema/TypeCheckStmt.cpp
+++ b/lib/Sema/TypeCheckStmt.cpp
@@ -471,6 +471,8 @@
       tryDiagnoseUnnecessaryCastOverOptionSet(TC.Context, E, ResultTy,
                                               DC->getParentModule());
     }
+    while (auto ICE = dyn_cast<ImplicitConversionExpr>(E))
+      E = ICE->getSubExpr();
     if (auto DRE = dyn_cast<DeclRefExpr>(E))
       if (auto FD = dyn_cast<FuncDecl>(DRE->getDecl()))
         TC.addEscapingFunctionAsReturnValue(FD, RS);
diff --git a/lib/Sema/TypeCheckSwitchStmt.cpp b/lib/Sema/TypeCheckSwitchStmt.cpp
index 4d1b9b7..b09f129 100644
--- a/lib/Sema/TypeCheckSwitchStmt.cpp
+++ b/lib/Sema/TypeCheckSwitchStmt.cpp
@@ -115,11 +115,6 @@
       Identifier Head;
       std::forward_list<Space> Spaces;
 
-      // NB: This constant is arbitrary.  Anecdotally, the Space Engine is
-      // capable of efficiently handling Spaces of around size 200, but it would
-      // potentially push an enormous fixit on the user.
-      static const size_t MAX_SPACE_SIZE = 128;
-
       size_t computeSize(TypeChecker &TC, const DeclContext *DC,
                          SmallPtrSetImpl<TypeBase *> &cache) const {
         switch (getKind()) {
@@ -250,10 +245,6 @@
         return computeSize(TC, DC, cache);
       }
 
-      static size_t getMaximumSize() {
-        return MAX_SPACE_SIZE;
-      }
-
       bool isEmpty() const { return getKind() == SpaceKind::Empty; }
 
       bool isAllowedButNotRequired() const {
@@ -895,103 +886,6 @@
       }
     }
 
-    /// Estimate how big is the search space that exhaustivity
-    /// checker needs to cover, based on the total space and information
-    /// from the `switch` statement itself. Some of the easy situations
-    /// like `case .foo(let bar)` don't really contribute to the complexity
-    /// of the search so their sub-space sizes could be excluded from
-    /// consideration.
-    ///
-    /// \param total The total space to check.
-    /// \param covered The space covered by the `case` statements in the switch.
-    ///
-    /// \returns The size of the search space exhastivity checker has to check.
-    size_t estimateSearchSpaceSize(const Space &total, const Space &covered) {
-      switch (PairSwitch(total.getKind(), covered.getKind())) {
-      PAIRCASE(SpaceKind::Type, SpaceKind::Type): {
-        return total.getType()->isEqual(covered.getType())
-                    ? 0
-                    : total.getSize(TC, DC);
-      }
-      PAIRCASE(SpaceKind::Type, SpaceKind::Disjunct):
-      PAIRCASE(SpaceKind::Type, SpaceKind::Constructor): {
-        if (!Space::canDecompose(total.getType(), DC))
-          break;
-
-        auto decomposition = Space::decompose(TC, DC, total.getType());
-        return estimateSearchSpaceSize(decomposition, covered);
-      }
-
-      PAIRCASE(SpaceKind::Disjunct, SpaceKind::Disjunct):
-      PAIRCASE(SpaceKind::Disjunct, SpaceKind::Constructor): {
-        auto &spaces = total.getSpaces();
-        return std::accumulate(spaces.begin(), spaces.end(), 0,
-                               [&](size_t totalSize, const Space &space) {
-                                 return totalSize + estimateSearchSpaceSize(
-                                                        space, covered);
-                               });
-      }
-
-      // Search space size computation is not commutative, because it
-      // tries to check if space on right-hand side is covering any
-      // portion of the "total" space on the left.
-      PAIRCASE(SpaceKind::Constructor, SpaceKind::Disjunct): {
-        for (const auto &space : covered.getSpaces()) {
-          // enum E { case foo }
-          // func bar(_ lhs: E, _ rhs: E) {
-          //   switch (lhs, rhs) {
-          //     case (_, _): break
-          // }
-          if (total == space)
-            return 0;
-
-          if (!space.isSubspace(total, TC, DC))
-            continue;
-
-          if (estimateSearchSpaceSize(total, space) == 0)
-            return 0;
-        }
-        break;
-      }
-
-      PAIRCASE(SpaceKind::Constructor, SpaceKind::Constructor): {
-        if (total.getHead() != covered.getHead())
-          break;
-
-        auto &lhs = total.getSpaces();
-        auto &rhs = covered.getSpaces();
-
-        if (std::distance(lhs.begin(), lhs.end()) !=
-            std::distance(rhs.begin(), rhs.end()))
-          return total.getSize(TC, DC);
-
-        auto i = lhs.begin();
-        auto j = rhs.begin();
-
-        size_t totalSize = 0;
-        for (; i != lhs.end() && j != rhs.end(); ++i, ++j) {
-          // The only light-weight checking we can do
-          // is when sub-spaces on both sides are types
-          // otherwise we'd have to decompose, which
-          // is too heavy, so let's just return total
-          // space size if such situation is detected.
-          if (i->getKind() != SpaceKind::Type ||
-              j->getKind() != SpaceKind::Type)
-            return total.getSize(TC, DC);
-
-          totalSize += estimateSearchSpaceSize(*i, *j);
-        }
-
-        return totalSize;
-      }
-
-      default:
-        break;
-      }
-
-      return total.getSize(TC, DC);
-    }
-
     void checkExhaustiveness(bool limitedChecking) {
       // If the type of the scrutinee is uninhabited, we're already dead.
       // Allow any well-typed patterns through.
@@ -1008,7 +902,6 @@
         return;
       }
 
-      bool sawRedundantPattern = false;
       const CaseStmt *unknownCase = nullptr;
       SmallVector<Space, 4> spaces;
       for (auto *caseBlock : Switch->getCases()) {
@@ -1032,8 +925,6 @@
 
           if (!projection.isEmpty() &&
               projection.isSubspace(Space::forDisjunct(spaces), TC, DC)) {
-            sawRedundantPattern |= true;
-
             TC.diagnose(caseItem.getStartLoc(),
                           diag::redundant_particular_case)
               .highlight(caseItem.getSourceRange());
@@ -1058,18 +949,11 @@
       Space totalSpace = Space::forType(subjectType, Identifier());
       Space coveredSpace = Space::forDisjunct(spaces);
 
-      const size_t searchSpaceSizeEstimate =
-          estimateSearchSpaceSize(totalSpace, coveredSpace);
-      if (searchSpaceSizeEstimate > Space::getMaximumSize()) {
-        diagnoseCannotCheck(sawRedundantPattern, totalSpace, coveredSpace,
-                            unknownCase);
-        return;
-      }
       unsigned minusCount = 0;
       auto diff = totalSpace.minus(coveredSpace, TC, DC, &minusCount);
       if (!diff) {
-        diagnoseCannotCheck(sawRedundantPattern, totalSpace, coveredSpace,
-                            unknownCase);
+        diagnoseMissingCases(RequiresDefault::SpaceTooLarge, Space(),
+                             unknownCase);
         return;
       }
       
@@ -1115,26 +999,7 @@
       UncoveredSwitch,
       SpaceTooLarge,
     };
-    
-    void diagnoseCannotCheck(const bool sawRedundantPattern,
-                             const Space &totalSpace,
-                             const Space &coveredSpace,
-                             const CaseStmt *unknownCase) {
-      // Because the space is large or the check is too slow,
-      // we have to extend the size
-      // heuristic to compensate for actually exhaustively pattern matching
-      // over enormous spaces.  In this case, if the covered space covers
-      // as much as the total space, and there were no duplicates, then we
-      // can assume the user did the right thing and that they don't need
-      // a 'default' to be inserted.
-      // FIXME: Do something sensible for non-frozen enums.
-      if (!sawRedundantPattern &&
-          coveredSpace.getSize(TC, DC) >= totalSpace.getSize(TC, DC))
-        return;
-      diagnoseMissingCases(RequiresDefault::SpaceTooLarge, Space(),
-                           unknownCase);
-    }
-    
+
     void diagnoseMissingCases(RequiresDefault defaultReason, Space uncovered,
                               const CaseStmt *unknownCase = nullptr) {
       SourceLoc startLoc = Switch->getStartLoc();
diff --git a/lib/Sema/TypeCheckType.cpp b/lib/Sema/TypeCheckType.cpp
index 9f5f9e9..8da591f 100644
--- a/lib/Sema/TypeCheckType.cpp
+++ b/lib/Sema/TypeCheckType.cpp
@@ -78,6 +78,10 @@
   return result;
 }
 
+ASTContext &TypeResolution::getASTContext() const {
+  return dc->getASTContext();
+}
+
 GenericSignatureBuilder *TypeResolution::getGenericSignatureBuilder() const {
   assert(stage == TypeResolutionStage::Interface);
   if (!complete.builder) {
@@ -2914,6 +2918,7 @@
   case TypeResolverContext::EnumElementDecl:
   case TypeResolverContext::EnumPatternPayload:
   case TypeResolverContext::TypeAliasDecl:
+  case TypeResolverContext::GenericTypeAliasDecl:
   case TypeResolverContext::GenericRequirement:
   case TypeResolverContext::ImmediateOptionalTypeArgument:
   case TypeResolverContext::InExpression:
diff --git a/lib/Sema/TypeCheckType.h b/lib/Sema/TypeCheckType.h
index ac3faf6..451c721 100644
--- a/lib/Sema/TypeCheckType.h
+++ b/lib/Sema/TypeCheckType.h
@@ -16,11 +16,19 @@
 #ifndef SWIFT_SEMA_TYPE_CHECK_TYPE_H
 #define SWIFT_SEMA_TYPE_CHECK_TYPE_H
 
+#include "swift/AST/Type.h"
 #include "swift/AST/TypeResolutionStage.h"
 #include "llvm/ADT/None.h"
 
 namespace swift {
 
+class ASTContext;
+class TypeRepr;
+class ComponentIdentTypeRepr;
+class GenericEnvironment;
+class GenericSignature;
+class GenericSignatureBuilder;
+
 /// Flags that describe the context of type checking a pattern or
 /// type.
 enum class TypeResolutionFlags : uint16_t {
@@ -118,9 +126,12 @@
   /// Whether this is the payload subpattern of an enum pattern.
   EnumPatternPayload,
 
-  /// Whether we are checking the underlying type of a typealias.
+  /// Whether we are checking the underlying type of a non-generic typealias.
   TypeAliasDecl,
 
+  /// Whether we are checking the underlying type of a generic typealias.
+  GenericTypeAliasDecl,
+
   /// Whether we are in a requirement of a generic declaration
   GenericRequirement,
 
@@ -207,6 +218,7 @@
     case Context::EnumElementDecl:
     case Context::EnumPatternPayload:
     case Context::TypeAliasDecl:
+    case Context::GenericTypeAliasDecl:
     case Context::GenericRequirement:
     case Context::ImmediateOptionalTypeArgument:
     case Context::AbstractFunctionDecl:
@@ -314,7 +326,7 @@
                                       GenericEnvironment *genericEnv);
 
   /// Retrieve the ASTContext in which this resolution occurs.
-  ASTContext &getASTContext() const { return dc->getASTContext(); }
+  ASTContext &getASTContext() const;
 
   /// Retrieve the declaration context in which type resolution will be
   /// performed.
diff --git a/lib/Serialization/DeserializeSIL.cpp b/lib/Serialization/DeserializeSIL.cpp
index 95d9c2e..8f6abea 100644
--- a/lib/Serialization/DeserializeSIL.cpp
+++ b/lib/Serialization/DeserializeSIL.cpp
@@ -662,7 +662,7 @@
   }
 
   if (!hasQualifiedOwnership)
-    fn->setUnqualifiedOwnership();
+    fn->setOwnershipEliminated();
 
   NumDeserializedFunc++;
 
diff --git a/lib/Serialization/Serialization.cpp b/lib/Serialization/Serialization.cpp
index 5dbc206..3f6cfda 100644
--- a/lib/Serialization/Serialization.cpp
+++ b/lib/Serialization/Serialization.cpp
@@ -1345,9 +1345,15 @@
 void Serializer::writeInlinableBodyTextIfNeeded(
   const AbstractFunctionDecl *AFD) {
   using namespace decls_block;
+  // Only serialize the text for an inlinable function body if we're emitting
+  // a partial module. It's not needed in the final module file, but it's
+  // needed in partial modules so you can emit a parseable interface after
+  // merging them.
+  if (!SF) return;
 
   if (AFD->getResilienceExpansion() != swift::ResilienceExpansion::Minimal)
     return;
+
   if (!AFD->hasInlinableBodyText()) return;
   SmallString<128> scratch;
   auto body = AFD->getInlinableBodyText(scratch);
diff --git a/lib/Serialization/SerializeSIL.cpp b/lib/Serialization/SerializeSIL.cpp
index 9b19d4f..a60842c 100644
--- a/lib/Serialization/SerializeSIL.cpp
+++ b/lib/Serialization/SerializeSIL.cpp
@@ -401,7 +401,7 @@
       (unsigned)F.isThunk(), (unsigned)F.isWithoutActuallyEscapingThunk(),
       (unsigned)F.isGlobalInit(), (unsigned)F.getInlineStrategy(),
       (unsigned)F.getOptimizationMode(), (unsigned)F.getEffectsKind(),
-      (unsigned)numSpecAttrs, (unsigned)F.hasQualifiedOwnership(),
+      (unsigned)numSpecAttrs, (unsigned)F.hasOwnership(),
       F.isWeakLinked(), (unsigned)F.isDynamicallyReplaceable(), FnID,
       replacedFunctionID, genericEnvID, clangNodeOwnerID, SemanticsIDs);
 
diff --git a/lib/TBDGen/TBDGen.cpp b/lib/TBDGen/TBDGen.cpp
index 91ce0c2..312266c 100644
--- a/lib/TBDGen/TBDGen.cpp
+++ b/lib/TBDGen/TBDGen.cpp
@@ -425,6 +425,43 @@
   return false;
 }
 
+#ifndef NDEBUG
+static bool isValidProtocolMemberForTBDGen(const Decl *D) {
+  switch (D->getKind()) {
+  case DeclKind::TypeAlias:
+  case DeclKind::AssociatedType:
+  case DeclKind::Var:
+  case DeclKind::Subscript:
+  case DeclKind::PatternBinding:
+  case DeclKind::Func:
+  case DeclKind::Accessor:
+  case DeclKind::Constructor:
+  case DeclKind::Destructor:
+  case DeclKind::IfConfig:
+  case DeclKind::PoundDiagnostic:
+    return true;
+  case DeclKind::Enum:
+  case DeclKind::Struct:
+  case DeclKind::Class:
+  case DeclKind::Protocol:
+  case DeclKind::GenericTypeParam:
+  case DeclKind::Module:
+  case DeclKind::Param:
+  case DeclKind::EnumElement:
+  case DeclKind::Extension:
+  case DeclKind::TopLevelCode:
+  case DeclKind::Import:
+  case DeclKind::PrecedenceGroup:
+  case DeclKind::MissingMember:
+  case DeclKind::EnumCase:
+  case DeclKind::InfixOperator:
+  case DeclKind::PrefixOperator:
+  case DeclKind::PostfixOperator:
+    return false;
+  }
+}
+#endif
+
 void TBDGenVisitor::visitProtocolDecl(ProtocolDecl *PD) {
   if (!PD->isObjC()) {
     addSymbol(LinkEntity::forProtocolDescriptor(PD));
@@ -479,11 +516,7 @@
   // (NB. anything within an active IfConfigDecls also appears outside). Let's
   // assert this fact:
   for (auto *member : PD->getMembers()) {
-    auto isExpectedKind =
-        isa<TypeAliasDecl>(member) || isa<AssociatedTypeDecl>(member) ||
-        isa<AbstractStorageDecl>(member) || isa<PatternBindingDecl>(member) ||
-        isa<AbstractFunctionDecl>(member) || isa<IfConfigDecl>(member);
-    assert(isExpectedKind &&
+    assert(isValidProtocolMemberForTBDGen(member) &&
            "unexpected member of protocol during TBD generation");
   }
 #endif
diff --git a/stdlib/private/CMakeLists.txt b/stdlib/private/CMakeLists.txt
index 8fe0bbd..d03a0ad 100644
--- a/stdlib/private/CMakeLists.txt
+++ b/stdlib/private/CMakeLists.txt
@@ -6,12 +6,16 @@
   # SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
   # SDK overlay. It can't be built separately from the SDK overlay.
   add_subdirectory(RuntimeUnittest)
-  add_subdirectory(StdlibUnittest)
   add_subdirectory(StdlibUnicodeUnittest)
   add_subdirectory(StdlibCollectionUnittest)
   add_subdirectory(SwiftPrivateLibcExtras)
   add_subdirectory(SwiftPrivateThreadExtras)
 
+  # NOTE(compnerd) this must come after SwiftPrivateLibcExtras and
+  # SwiftPrivateThreadExtras to ensure that the dependency targets are setup in
+  # the correct order for Windows.
+  add_subdirectory(StdlibUnittest)
+
   if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     add_subdirectory(StdlibUnittestFoundationExtras)
     if (SWIFT_INCLUDE_TESTS)
diff --git a/stdlib/private/StdlibUnittest/RaceTest.swift b/stdlib/private/StdlibUnittest/RaceTest.swift
index 2b8e940..a36e706 100644
--- a/stdlib/private/StdlibUnittest/RaceTest.swift
+++ b/stdlib/private/StdlibUnittest/RaceTest.swift
@@ -395,7 +395,7 @@
   var stopNow = _stdlib_AtomicInt(0)
 
   var trialBarrier: _stdlib_Barrier
-  var trialSpinBarrier: _stdlib_AtomicInt = _stdlib_AtomicInt()
+  var trialSpinBarrier = _stdlib_AtomicInt()
 
   var raceData: [RT.RaceData] = []
   var workerStates: [_RaceTestWorkerState<RT>] = []
diff --git a/stdlib/private/SwiftPrivate/AtomicInt.swift.gyb b/stdlib/private/SwiftPrivate/AtomicInt.swift.gyb
index bcc138a..1c58dca 100644
--- a/stdlib/private/SwiftPrivate/AtomicInt.swift.gyb
+++ b/stdlib/private/SwiftPrivate/AtomicInt.swift.gyb
@@ -12,6 +12,8 @@
 
 import Swift
 
+// This type intentionally shadows the stdlib one
+@available(swift, introduced: 5.0)
 public final class _stdlib_AtomicInt {
   internal var _value: Int
 
@@ -47,7 +49,7 @@
 
   public func compareExchange(expected: inout Int, desired: Int) -> Bool {
     var expectedVar = expected
-    let result = _stdlib_atomicCompareExchangeStrongInt(
+    let result = _swift_stdlib_atomicCompareExchangeStrongInt(
       object: _valuePtr,
       expected: &expectedVar,
       desired: desired)
@@ -56,74 +58,3 @@
   }
 }
 
-public func _swift_stdlib_atomicLoadInt(
-  object target: UnsafeMutablePointer<Int>) -> Int {
-#if arch(i386) || arch(arm)
-  let value = Builtin.atomicload_seqcst_Int32(target._rawValue)
-  return Int(value)
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  let value = Builtin.atomicload_seqcst_Int64(target._rawValue)
-  return Int(value)
-#endif
-}
-
-public func _swift_stdlib_atomicStoreInt(
-  object target: UnsafeMutablePointer<Int>,
-  desired: Int) {
-#if arch(i386) || arch(arm)
-  Builtin.atomicstore_seqcst_Int32(target._rawValue, desired._value)
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  Builtin.atomicstore_seqcst_Int64(target._rawValue, desired._value)
-#endif
-}
-
-public func _stdlib_atomicCompareExchangeStrongInt(
-  object target: UnsafeMutablePointer<Int>,
-  expected: UnsafeMutablePointer<Int>,
-  desired: Int) -> Bool {
-#if arch(i386) || arch(arm)
-  let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int32(
-    target._rawValue, expected.pointee._value, desired._value)
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int64(
-    target._rawValue, expected.pointee._value, desired._value)
-#endif
-  expected.pointee._value = oldValue
-  return Bool(won)
-}
-
-% for operation in ['Add', 'And', 'Or', 'Xor']:
-// Warning: no overflow checking.
-public func _swift_stdlib_atomicFetch${operation}Int(
-  object target: UnsafeMutablePointer<Int>,
-  operand: Int) -> Int {
-  let rawTarget = UnsafeMutableRawPointer(target)
-#if arch(i386) || arch(arm)
-  let value = _swift_stdlib_atomicFetch${operation}Int32(
-    object: rawTarget.assumingMemoryBound(to: Int32.self),
-    operand: Int32(operand))
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  let value = _swift_stdlib_atomicFetch${operation}Int64(
-    object: rawTarget.assumingMemoryBound(to: Int64.self),
-    operand: Int64(operand))
-#endif
-  return Int(value)
-}
-
-%   for bits in [ 32, 64 ]:
-
-// Warning: no overflow checking.
-public func _swift_stdlib_atomicFetch${operation}Int${bits}(
-  object target: UnsafeMutablePointer<Int${bits}>,
-  operand: Int${bits}) -> Int${bits} {
-
-  let value = Builtin.atomicrmw_${operation.lower()}_seqcst_Int${bits}(
-    target._rawValue, operand._value)
-
-  return Int${bits}(value)
-}
-
-%   end
-
-% end
-
diff --git a/stdlib/private/SwiftPrivate/CMakeLists.txt b/stdlib/private/SwiftPrivate/CMakeLists.txt
index 566f0db..30dc0f2 100644
--- a/stdlib/private/SwiftPrivate/CMakeLists.txt
+++ b/stdlib/private/SwiftPrivate/CMakeLists.txt
@@ -11,6 +11,7 @@
   IO.swift
   ShardedAtomicCounter.swift
 
+  SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT
   SWIFT_COMPILE_FLAGS ${swift_swiftprivate_compile_flags}
   INSTALL_IN_COMPONENT stdlib-experimental)
 
diff --git a/stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt b/stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
index f6cd1ef..e3355f0 100644
--- a/stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
+++ b/stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt
@@ -15,4 +15,5 @@
   SWIFT_MODULE_DEPENDS_FREEBSD Glibc
   SWIFT_MODULE_DEPENDS_CYGWIN Glibc
   SWIFT_MODULE_DEPENDS_HAIKU Glibc
+  SWIFT_MODULE_DEPENDS_WINDOWS MSVCRT WinSDK
   INSTALL_IN_COMPONENT stdlib-experimental)
diff --git a/stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift b/stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift
index a516fe7..25a1246 100644
--- a/stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift
+++ b/stdlib/private/SwiftPrivateLibcExtras/Subprocess.swift
@@ -15,11 +15,133 @@
 import Darwin
 #elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
 import Glibc
+#elseif os(Windows)
+import MSVCRT
+import WinSDK
 #endif
 
-
+internal func _signalToString(_ signal: Int) -> String {
+  switch CInt(signal) {
+  case SIGILL:  return "SIGILL"
+  case SIGABRT: return "SIGABRT"
+  case SIGFPE:  return "SIGFPE"
+  case SIGSEGV: return "SIGSEGV"
 #if !os(Windows)
-// posix_spawn is not available on Windows.
+  case SIGTRAP: return "SIGTRAP"
+  case SIGBUS:  return "SIGBUS"
+  case SIGSYS:  return "SIGSYS"
+#endif
+  default:      return "SIG???? (\(signal))"
+  }
+}
+
+public enum ProcessTerminationStatus : CustomStringConvertible {
+  case exit(Int)
+  case signal(Int)
+
+  public var description: String {
+    switch self {
+    case .exit(let status):
+      return "Exit(\(status))"
+    case .signal(let signal):
+      return "Signal(\(_signalToString(signal)))"
+    }
+  }
+}
+
+
+#if os(Windows)
+public func spawnChild(_ args: [String])
+    -> (process: HANDLE, stdin: HANDLE, stdout: HANDLE, stderr: HANDLE) {
+  var _stdin: (read: HANDLE?, write: HANDLE?)
+  var _stdout: (read: HANDLE?, write: HANDLE?)
+  var _stderr: (read: HANDLE?, write: HANDLE?)
+
+  var saAttributes: SECURITY_ATTRIBUTES = SECURITY_ATTRIBUTES()
+  saAttributes.nLength = DWORD(MemoryLayout<SECURITY_ATTRIBUTES>.size)
+  saAttributes.bInheritHandle = TRUE
+  saAttributes.lpSecurityDescriptor = nil
+
+  if CreatePipe(&_stdin.read, &_stdin.write, &saAttributes, 0) == FALSE {
+    fatalError("CreatePipe() failed")
+  }
+  if SetHandleInformation(_stdin.write, HANDLE_FLAG_INHERIT, 0) == FALSE {
+    fatalError("SetHandleInformation() failed")
+  }
+
+  if CreatePipe(&_stdout.read, &_stdout.write, &saAttributes, 0) == FALSE {
+    fatalError("CreatePipe() failed")
+  }
+  if SetHandleInformation(_stdout.read, HANDLE_FLAG_INHERIT, 0) == FALSE {
+    fatalError("SetHandleInformation() failed")
+  }
+
+  if CreatePipe(&_stderr.read, &_stderr.write, &saAttributes, 0) == FALSE {
+    fatalError("CreatePipe() failed")
+  }
+  if SetHandleInformation(_stderr.read, HANDLE_FLAG_INHERIT, 0) == FALSE {
+    fatalError("SetHandleInformation() failed")
+  }
+
+  var siStartupInfo: STARTUPINFOW = STARTUPINFOW()
+  siStartupInfo.cb = DWORD(MemoryLayout<STARTUPINFOW>.size)
+  siStartupInfo.hStdError = _stderr.write
+  siStartupInfo.hStdOutput = _stdout.write
+  siStartupInfo.hStdInput = _stdin.read
+  siStartupInfo.dwFlags |= STARTF_USESTDHANDLES
+
+  var piProcessInfo: PROCESS_INFORMATION = PROCESS_INFORMATION()
+
+  // TODO(compnerd): properly quote the command line being invoked here.  See
+  // https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
+  // for more details on how to properly quote the command line for Windows.
+  let command: String =
+      ([CommandLine.arguments[0]] + args).joined(separator: " ")
+  command.withCString(encodedAs: UTF16.self) { cString in
+    if CreateProcessW(nil, UnsafeMutablePointer<WCHAR>(mutating: cString),
+                      nil, nil, TRUE, 0, nil, nil,
+                      &siStartupInfo, &piProcessInfo) == FALSE {
+      let dwError: DWORD = GetLastError()
+      fatalError("CreateProcessW() failed \(dwError)")
+    }
+  }
+
+  if CloseHandle(_stdin.read) == FALSE {
+    fatalError("CloseHandle() failed")
+  }
+  if CloseHandle(_stdout.write) == FALSE {
+    fatalError("CloseHandle() failed")
+  }
+  if CloseHandle(_stderr.write) == FALSE {
+    fatalError("CloseHandle() failed")
+  }
+
+  // CloseHandle(piProcessInfo.hProcess)
+  CloseHandle(piProcessInfo.hThread)
+
+  return (piProcessInfo.hProcess,
+          _stdin.write ?? INVALID_HANDLE_VALUE,
+          _stdout.read ?? INVALID_HANDLE_VALUE,
+          _stderr.read ?? INVALID_HANDLE_VALUE)
+}
+
+public func waitProcess(_ process: HANDLE) -> ProcessTerminationStatus {
+  let result = WaitForSingleObject(process, INFINITE)
+  if result != WAIT_OBJECT_0 {
+    fatalError("WaitForSingleObject() failed")
+  }
+
+  var status: DWORD = 0
+  if GetExitCodeProcess(process, &status) == FALSE {
+    fatalError("GetExitCodeProcess() failed")
+  }
+
+  if status & DWORD(0x80000000) == DWORD(0x80000000) {
+    return .signal(Int(status))
+  }
+  return .exit(Int(status))
+}
+#else
 // posix_spawn is not available on Android.
 // posix_spawn is not available on Haiku.
 #if !os(Android) && !os(Haiku)
@@ -237,33 +359,6 @@
 #endif
 #endif
 
-internal func _signalToString(_ signal: Int) -> String {
-  switch CInt(signal) {
-  case SIGILL:  return "SIGILL"
-  case SIGTRAP: return "SIGTRAP"
-  case SIGABRT: return "SIGABRT"
-  case SIGFPE:  return "SIGFPE"
-  case SIGBUS:  return "SIGBUS"
-  case SIGSEGV: return "SIGSEGV"
-  case SIGSYS:  return "SIGSYS"
-  default:      return "SIG???? (\(signal))"
-  }
-}
-
-public enum ProcessTerminationStatus : CustomStringConvertible {
-  case exit(Int)
-  case signal(Int)
-
-  public var description: String {
-    switch self {
-    case .exit(let status):
-      return "Exit(\(status))"
-    case .signal(let signal):
-      return "Signal(\(_signalToString(signal)))"
-    }
-  }
-}
-
 public func posixWaitpid(_ pid: pid_t) -> ProcessTerminationStatus {
   var status: CInt = 0
 #if os(Cygwin)
diff --git a/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift b/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
index 5e3d39a..6fa2c06 100644
--- a/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
+++ b/stdlib/private/SwiftPrivateLibcExtras/SwiftPrivateLibcExtras.swift
@@ -16,12 +16,11 @@
 #elseif os(Linux) || os(FreeBSD) || os(PS4) || os(Android) || os(Cygwin) || os(Haiku)
 import Glibc
 #elseif os(Windows)
-import ucrt
+import MSVCRT
 #endif
 
-#if !os(Windows)
 public func _stdlib_mkstemps(_ template: inout String, _ suffixlen: CInt) -> CInt {
-#if os(Android) || os(Haiku)
+#if os(Android) || os(Haiku) || os(Windows)
   preconditionFailure("mkstemps doesn't work on your platform")
 #else
   var utf8CStr = template.utf8CString
@@ -35,8 +34,8 @@
   return fd
 #endif
 }
-#endif
 
+#if !os(Windows)
 public var _stdlib_FD_SETSIZE: CInt {
   return 1024
 }
@@ -85,7 +84,6 @@
   }
 }
 
-#if !os(Windows)
 public func _stdlib_select(
   _ readfds: inout _stdlib_fd_set, _ writefds: inout _stdlib_fd_set,
   _ errorfds: inout _stdlib_fd_set, _ timeout: UnsafeMutablePointer<timeval>?
@@ -135,6 +133,7 @@
 }
 
 
+#if !os(Windows)
 //
 // Functions missing in `Darwin` module.
 //
@@ -161,3 +160,5 @@
 public func WTERMSIG(_ status: CInt) -> CInt {
   return _WSTATUS(status)
 }
+#endif
+
diff --git a/stdlib/public/Darwin/Foundation/NSDictionary.swift b/stdlib/public/Darwin/Foundation/NSDictionary.swift
index 4d2ec75..2b5b58b 100644
--- a/stdlib/public/Darwin/Foundation/NSDictionary.swift
+++ b/stdlib/public/Darwin/Foundation/NSDictionary.swift
@@ -61,6 +61,140 @@
                          to: NSDictionary.self)
   }
 
+  /***
+  Precondition: `buffer` points to a region of memory bound to `AnyObject`,
+    with a capacity large enough to fit at least `index`+1 elements of type `T`
+  
+  _bridgeInitialize rebinds the `index`th `T` of `buffer` to `T`,
+    and initializes it to `value`
+
+  Note: *not* the `index`th element of `buffer`, since T and AnyObject may be
+  different sizes. e.g. if T is String (2 words) then given a buffer like so:
+
+  [object:AnyObject, object:AnyObject, uninitialized, uninitialized]
+
+  `_bridgeInitialize(1, of: buffer, to: buffer[1] as! T)` will leave it as:
+
+  [object:AnyObject, object:AnyObject, string:String]
+
+  and `_bridgeInitialize(0, of: buffer, to: buffer[0] as! T)` will then leave:
+
+  [string:String, string:String]
+
+  Doing this in reverse order as shown above is required if T and AnyObject are
+  different sizes. Here's what we get if instead of 1, 0 we did 0, 1:
+
+  [object:AnyObject, object:AnyObject, uninitialized, uninitialized]
+  [string:String, uninitialized, uninitialized]
+  <segfault trying to treat the second word of 'string' as an AnyObject>
+
+  Note: if you have retained any of the objects in `buffer`, you must release
+  them separately, _bridgeInitialize will overwrite them without releasing them
+  */
+  @inline(__always)
+  private static func _bridgeInitialize<T>(index:Int,
+    of buffer: UnsafePointer<AnyObject>, to value: T) {
+    let typedBase = UnsafeMutableRawPointer(mutating:
+                      buffer).assumingMemoryBound(to: T.self)
+    let rawTarget = UnsafeMutableRawPointer(mutating: typedBase + index)
+    rawTarget.initializeMemory(as: T.self, repeating: value, count: 1)
+  }
+
+  @inline(__always)
+  private static func _verbatimForceBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to: T.Type
+  ) {
+    //doesn't have to iterate in reverse because sizeof(T) == sizeof(AnyObject)
+    for i in 0..<count {
+      _bridgeInitialize(index: i, of: buffer, to: buffer[i] as! T)
+    }
+  }
+
+  @inline(__always)
+  private static func _verbatimBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to type: T.Type
+  ) -> Int {
+    var numUninitialized = count
+    while numUninitialized > 0 {
+      guard let bridged = buffer[numUninitialized - 1] as? T else {
+        return numUninitialized
+      }
+      numUninitialized -= 1
+      _bridgeInitialize(index: numUninitialized, of: buffer, to: bridged)
+    }
+    return numUninitialized
+  }
+
+  @inline(__always)
+  private static func _nonVerbatimForceBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to: T.Type
+  ) {
+    for i in (0..<count).reversed() {
+      let bridged = Swift._forceBridgeFromObjectiveC(buffer[i], T.self)
+      _bridgeInitialize(index: i, of: buffer, to: bridged)
+    }
+  }
+  
+  @inline(__always)
+  private static func _nonVerbatimBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to: T.Type
+  ) -> Int {
+    var numUninitialized = count
+    while numUninitialized > 0 {
+      guard let bridged = Swift._conditionallyBridgeFromObjectiveC(
+        buffer[numUninitialized - 1], T.self)
+        else {
+        return numUninitialized
+      }
+      numUninitialized -= 1
+      _bridgeInitialize(index: numUninitialized, of: buffer, to: bridged)
+    }
+    return numUninitialized
+  }
+
+  @inline(__always)
+  private static func _forceBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to: T.Type
+  ) {
+    if _isBridgedVerbatimToObjectiveC(T.self) {
+      _verbatimForceBridge(buffer, count: count, to: T.self)
+    } else {
+      _nonVerbatimForceBridge(buffer, count: count, to: T.self)
+    }
+  }
+  
+  @inline(__always)
+  private static func _conditionallyBridge<T>(
+    _ buffer: UnsafeMutablePointer<AnyObject>,
+    count: Int,
+    to: T.Type
+  ) -> Bool {
+    let numUninitialized:Int
+    if _isBridgedVerbatimToObjectiveC(T.self) {
+      numUninitialized = _verbatimBridge(buffer, count: count, to: T.self)
+    } else {
+      numUninitialized = _nonVerbatimBridge(buffer, count: count, to: T.self)
+    }
+    if numUninitialized == 0 {
+      return true
+    }
+    let numInitialized = count - numUninitialized
+    (UnsafeMutableRawPointer(mutating: buffer).assumingMemoryBound(to:
+      T.self) + numUninitialized).deinitialize(count: numInitialized)
+    return false
+  }
+
+  @_specialize(where Key == String, Value == Any)
   public static func _forceBridgeFromObjectiveC(
     _ d: NSDictionary,
     result: inout Dictionary?
@@ -73,53 +207,120 @@
 
     if _isBridgedVerbatimToObjectiveC(Key.self) &&
        _isBridgedVerbatimToObjectiveC(Value.self) {
+      //Lazily type-checked on access
       result = [Key : Value](_cocoaDictionary: d)
       return
     }
 
-    if Key.self == String.self {
+    let keyStride = MemoryLayout<Key>.stride
+    let valueStride = MemoryLayout<Value>.stride
+    let objectStride = MemoryLayout<AnyObject>.stride
+
+    //If Key or Value are smaller than AnyObject, a Dictionary with N elements
+    //doesn't have large enough backing stores to hold the objects to be bridged
+    //For now we just handle that case the slow way.
+    if keyStride < objectStride || valueStride < objectStride {
+      var builder = _DictionaryBuilder<Key, Value>(count: d.count)
+      d.enumerateKeysAndObjects({ (anyKey: Any, anyValue: Any, _) in
+        let anyObjectKey = anyKey as AnyObject
+        let anyObjectValue = anyValue as AnyObject
+        builder.add(
+            key: Swift._forceBridgeFromObjectiveC(anyObjectKey, Key.self),
+            value: Swift._forceBridgeFromObjectiveC(anyObjectValue, Value.self))
+      })
+      result = builder.take()
+    } else {
+      defer { _fixLifetime(d) }
+    
+      let numElems = d.count
+      
       // String and NSString have different concepts of equality, so
       // string-keyed NSDictionaries may generate key collisions when bridged
       // over to Swift. See rdar://problem/35995647
-      var dict = Dictionary(minimumCapacity: d.count)
-      d.enumerateKeysAndObjects({ (anyKey: Any, anyValue: Any, _) in
-        let key = Swift._forceBridgeFromObjectiveC(
-          anyKey as AnyObject, Key.self)
-        let value = Swift._forceBridgeFromObjectiveC(
-          anyValue as AnyObject, Value.self)
-        // FIXME: Log a warning if `dict` already had a value for `key`
-        dict[key] = value
-      })
-      result = dict
-      return
+      let handleDuplicates = (Key.self == String.self)
+      
+      result = Dictionary(_unsafeUninitializedCapacity: numElems,
+        allowingDuplicates: handleDuplicates) { (keys, vals, outCount) in
+        
+        let objectKeys = UnsafeMutableRawPointer(mutating:
+          keys.baseAddress!).assumingMemoryBound(to: AnyObject.self)
+        let objectVals = UnsafeMutableRawPointer(mutating:
+          vals.baseAddress!).assumingMemoryBound(to: AnyObject.self)
+
+        //This initializes the first N AnyObjects of the Dictionary buffers.
+        //Any unused buffer space is left uninitialized
+        //This is fixed up in-place as we bridge elements, by _bridgeInitialize
+        __NSDictionaryGetObjects(d, objectVals, objectKeys, numElems)
+
+        _forceBridge(objectKeys, count: numElems, to: Key.self)
+        _forceBridge(objectVals, count: numElems, to: Value.self)
+        
+        outCount = numElems
+      }
     }
-
-    // `Dictionary<Key, Value>` where either `Key` or `Value` is a value type
-    // may not be backed by an NSDictionary.
-    var builder = _DictionaryBuilder<Key, Value>(count: d.count)
-    d.enumerateKeysAndObjects({ (anyKey: Any, anyValue: Any, _) in
-      let anyObjectKey = anyKey as AnyObject
-      let anyObjectValue = anyValue as AnyObject
-      builder.add(
-          key: Swift._forceBridgeFromObjectiveC(anyObjectKey, Key.self),
-          value: Swift._forceBridgeFromObjectiveC(anyObjectValue, Value.self))
-    })
-    result = builder.take()
   }
-
+  
+  @_specialize(where Key == String, Value == Any)
   public static func _conditionallyBridgeFromObjectiveC(
     _ x: NSDictionary,
     result: inout Dictionary?
   ) -> Bool {
-    let anyDict = x as [NSObject : AnyObject]
-    if _isBridgedVerbatimToObjectiveC(Key.self) &&
-       _isBridgedVerbatimToObjectiveC(Value.self) {
-      result = Swift._dictionaryDownCastConditional(anyDict)
+
+    if let native = [Key : Value]._bridgeFromObjectiveCAdoptingNativeStorageOf(
+        x as AnyObject) {
+      result = native
+      return true
+    }
+
+    let keyStride = MemoryLayout<Key>.stride
+    let valueStride = MemoryLayout<Value>.stride
+    let objectStride = MemoryLayout<AnyObject>.stride
+
+    //If Key or Value are smaller than AnyObject, a Dictionary with N elements
+    //doesn't have large enough backing stores to hold the objects to be bridged
+    //For now we just handle that case the slow way.
+    if keyStride < objectStride || valueStride < objectStride {
+      result = x as [NSObject : AnyObject] as? Dictionary
       return result != nil
     }
 
-    result = anyDict as? Dictionary
-    return result != nil
+    defer { _fixLifetime(x) }
+    
+    let numElems = x.count
+    var success = true
+    
+    // String and NSString have different concepts of equality, so
+    // string-keyed NSDictionaries may generate key collisions when bridged
+    // over to Swift. See rdar://problem/35995647
+    let handleDuplicates = (Key.self == String.self)
+    
+    let tmpResult = Dictionary(_unsafeUninitializedCapacity: numElems,
+      allowingDuplicates: handleDuplicates) { (keys, vals, outCount) in
+      
+      let objectKeys = UnsafeMutableRawPointer(mutating:
+        keys.baseAddress!).assumingMemoryBound(to: AnyObject.self)
+      let objectVals = UnsafeMutableRawPointer(mutating:
+        vals.baseAddress!).assumingMemoryBound(to: AnyObject.self)
+
+      //This initializes the first N AnyObjects of the Dictionary buffers.
+      //Any unused buffer space is left uninitialized
+      //This is fixed up in-place as we bridge elements, by _bridgeInitialize
+      __NSDictionaryGetObjects(x, objectVals, objectKeys, numElems)
+
+      success = _conditionallyBridge(objectKeys, count: numElems, to: Key.self)
+      if success {
+        success = _conditionallyBridge(objectVals,
+                                       count: numElems, to: Value.self)
+        if !success {
+          (UnsafeMutableRawPointer(mutating: objectKeys).assumingMemoryBound(to:
+            Key.self)).deinitialize(count: numElems)
+        }
+      }
+      outCount = success ? numElems : 0
+    }
+    
+    result = success ? tmpResult : nil
+    return success
   }
 
   @_effects(readonly)
diff --git a/stdlib/public/Darwin/MediaPlayer/CMakeLists.txt b/stdlib/public/Darwin/MediaPlayer/CMakeLists.txt
index 4fd2c10..0efa5ae 100644
--- a/stdlib/public/Darwin/MediaPlayer/CMakeLists.txt
+++ b/stdlib/public/Darwin/MediaPlayer/CMakeLists.txt
@@ -8,7 +8,7 @@
   LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
   TARGET_SDKS IOS IOS_SIMULATOR
 
-  SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMedia Dispatch Foundation Metal ObjectiveC QuartzCore simd SIMDOperators UIKit os CoreData # auto-updated
+  SWIFT_MODULE_DEPENDS_IOS Darwin AVFoundation CoreAudio CoreFoundation CoreGraphics CoreImage CoreMedia Dispatch Foundation Metal ObjectiveC QuartzCore simd UIKit os CoreData # auto-updated
   FRAMEWORK_DEPENDS_WEAK MediaPlayer
 
   DEPLOYMENT_VERSION_IOS ${SWIFTLIB_DEPLOYMENT_VERSION_MEDIAPLAYER_IOS}
diff --git a/stdlib/public/Darwin/simd/Quaternion.swift.gyb b/stdlib/public/Darwin/simd/Quaternion.swift.gyb
index c20d44e..4ac5f95 100644
--- a/stdlib/public/Darwin/simd/Quaternion.swift.gyb
+++ b/stdlib/public/Darwin/simd/Quaternion.swift.gyb
@@ -14,7 +14,6 @@
 
 import Swift
 import Darwin
-import SIMDOperators
 @_exported import simd
 
 %for scalar in ['Float','Double']:
diff --git a/stdlib/public/Darwin/simd/simd.swift.gyb b/stdlib/public/Darwin/simd/simd.swift.gyb
index b805db8..340fbbe 100644
--- a/stdlib/public/Darwin/simd/simd.swift.gyb
+++ b/stdlib/public/Darwin/simd/simd.swift.gyb
@@ -14,7 +14,6 @@
 
 import Swift
 import Darwin
-@_exported import SIMDOperators
 @_exported import simd
 
 public extension SIMD {
diff --git a/stdlib/public/Platform/visualc.apinotes b/stdlib/public/Platform/visualc.apinotes
new file mode 100644
index 0000000..88632f3
--- /dev/null
+++ b/stdlib/public/Platform/visualc.apinotes
@@ -0,0 +1,7 @@
+---
+Name: VisualC
+Functions:
+- Name: _setjmp
+  Availability: nonswift
+  AvailabilityMsg: 'Functions that return more than once are unavailable in swift'
+
diff --git a/stdlib/public/Platform/winsdk.modulemap b/stdlib/public/Platform/winsdk.modulemap
index e398a81..e4d925b 100644
--- a/stdlib/public/Platform/winsdk.modulemap
+++ b/stdlib/public/Platform/winsdk.modulemap
@@ -12,12 +12,42 @@
 
 module WinSDK [system] [extern_c] {
   module core {
+    // api-ms-win-core-errhandling-l1-1-0.dll
+    module errhandling {
+      header "errhandlingapi.h"
+      export *
+    }
+
+    // api-ms-win-core-file-l1-1-0.dll
+    module file {
+      header "fileapi.h"
+      export *
+    }
+
     // api-ms-win-core-handle-l1-1-0.dll
     module handle {
       header "handleapi.h"
       export *
     }
 
+    // api-ms-win-core-interlocked-l1-1-0.dll
+    module interlocked {
+      header "interlockedapi.h"
+      export *
+    }
+
+    // api-ms-win-core-libloader-l1-1-0.dll
+    module libloader {
+      header "libloaderapi.h"
+      export *
+    }
+
+    // api-ms-win-core-namedpipe-l1-1-2-0.dll
+    module namedpipe {
+      header "namedpipeapi.h"
+      export *
+    }
+
     // api-ms-win-core-processthreads-l1-1-2.dll
     module processthreads {
       header "processthreadsapi.h"
@@ -29,6 +59,19 @@
       header "synchapi.h"
       export *
     }
+
+    // api-ms-win-core-sysinfo-l1-1-0.dll
+    module sysinfo {
+      header "sysinfoapi.h"
+      export *
+    }
+
+    // api-ms-win-core-timezone-l1-1-0.dll
+    module timezone {
+      header "timezoneapi.h"
+      export *
+    }
   }
+
 }
 
diff --git a/stdlib/public/SIMDOperators/Operators.swift b/stdlib/public/SIMDOperators/Operators.swift
index 797c100..68007d8 100644
--- a/stdlib/public/SIMDOperators/Operators.swift
+++ b/stdlib/public/SIMDOperators/Operators.swift
@@ -1,325 +1 @@
-//  Implementations of integer operations. These should eventually all
-//  be replaced with @_semantics to lower directly to vector IR nodes.
-public extension SIMD where Scalar : FixedWidthInteger {
-  @_transparent
-  var leadingZeroBitCount: Self {
-    var result = Self()
-    for i in indices { result[i] = Scalar(self[i].leadingZeroBitCount) }
-    return result
-  }
-  
-  @_transparent
-  var trailingZeroBitCount: Self {
-    var result = Self()
-    for i in indices { result[i] = Scalar(self[i].trailingZeroBitCount) }
-    return result
-  }
-  
-  @_transparent
-  var nonzeroBitCount: Self {
-    var result = Self()
-    for i in indices { result[i] = Scalar(self[i].nonzeroBitCount) }
-    return result
-  }
-  
-  @_transparent
-  static prefix func ~(rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = ~rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] & rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func ^(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] ^ rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func |(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] | rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &<<(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] &<< rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &>>(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] &>> rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &+(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] &+ rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &-(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] &- rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func &*(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] &* rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func /(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] / rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func %(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] % rhs[i] }
-    return result
-  }
-}
-
-//  Implementations of floating-point operations. These should eventually all
-//  be replaced with @_semantics to lower directly to vector IR nodes.
-public extension SIMD where Scalar : FloatingPoint {
-  @_transparent
-  static func +(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] + rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func -(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] - rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func *(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] * rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  static func /(lhs: Self, rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = lhs[i] / rhs[i] }
-    return result
-  }
-  
-  @_transparent
-  func addingProduct(_ lhs: Self, _ rhs: Self) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = self[i].addingProduct(lhs[i], rhs[i]) }
-    return result
-  }
-  
-  @_transparent
-  func squareRoot( ) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = self[i].squareRoot() }
-    return result
-  }
-  
-  @_transparent
-  func rounded(_ rule: FloatingPointRoundingRule) -> Self {
-    var result = Self()
-    for i in result.indices { result[i] = self[i].rounded(rule) }
-    return result
-  }
-}
-
-public extension SIMDMask {
-  @_transparent
-  static prefix func .!(rhs: SIMDMask) -> SIMDMask {
-    return SIMDMask(~rhs._storage)
-  }
-  
-  @_transparent
-  static func .&(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
-    return SIMDMask(lhs._storage & rhs._storage)
-  }
-  
-  @_transparent
-  static func .^(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
-    return SIMDMask(lhs._storage ^ rhs._storage)
-  }
-  
-  @_transparent
-  static func .|(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
-    return SIMDMask(lhs._storage | rhs._storage)
-  }
-}
-
-//  These operations should never need @_semantics; they should be trivial
-//  wrappers around the core operations defined above.
-public extension SIMD where Scalar : FixedWidthInteger {
-  @_transparent static func &(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) & rhs }
-  @_transparent static func ^(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) ^ rhs }
-  @_transparent static func |(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) | rhs }
-  @_transparent static func &<<(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &<< rhs }
-  @_transparent static func &>>(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &>> rhs }
-  @_transparent static func &+(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &+ rhs }
-  @_transparent static func &-(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &- rhs }
-  @_transparent static func &*(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &* rhs }
-  @_transparent static func /(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) / rhs }
-  @_transparent static func %(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) % rhs }
-  
-  @_transparent static func &(lhs: Self, rhs: Scalar) -> Self { return lhs & Self(repeating: rhs) }
-  @_transparent static func ^(lhs: Self, rhs: Scalar) -> Self { return lhs ^ Self(repeating: rhs) }
-  @_transparent static func |(lhs: Self, rhs: Scalar) -> Self { return lhs | Self(repeating: rhs) }
-  @_transparent static func &<<(lhs: Self, rhs: Scalar) -> Self { return lhs &<< Self(repeating: rhs) }
-  @_transparent static func &>>(lhs: Self, rhs: Scalar) -> Self { return lhs &>> Self(repeating: rhs) }
-  @_transparent static func &+(lhs: Self, rhs: Scalar) -> Self { return lhs &+ Self(repeating: rhs) }
-  @_transparent static func &-(lhs: Self, rhs: Scalar) -> Self { return lhs &- Self(repeating: rhs) }
-  @_transparent static func &*(lhs: Self, rhs: Scalar) -> Self { return lhs &* Self(repeating: rhs) }
-  @_transparent static func /(lhs: Self, rhs: Scalar) -> Self { return lhs / Self(repeating: rhs) }
-  @_transparent static func %(lhs: Self, rhs: Scalar) -> Self { return lhs % Self(repeating: rhs) }
-  
-  @_transparent static func &=(lhs: inout Self, rhs: Self) { lhs = lhs & rhs }
-  @_transparent static func ^=(lhs: inout Self, rhs: Self) { lhs = lhs ^ rhs }
-  @_transparent static func |=(lhs: inout Self, rhs: Self) { lhs = lhs | rhs }
-  @_transparent static func &<<=(lhs: inout Self, rhs: Self) { lhs = lhs &<< rhs }
-  @_transparent static func &>>=(lhs: inout Self, rhs: Self) { lhs = lhs &>> rhs }
-  @_transparent static func &+=(lhs: inout Self, rhs: Self) { lhs = lhs &+ rhs }
-  @_transparent static func &-=(lhs: inout Self, rhs: Self) { lhs = lhs &- rhs }
-  @_transparent static func &*=(lhs: inout Self, rhs: Self) { lhs = lhs &* rhs }
-  @_transparent static func /=(lhs: inout Self, rhs: Self) { lhs = lhs / rhs }
-  @_transparent static func %=(lhs: inout Self, rhs: Self) { lhs = lhs % rhs }
-  
-  @_transparent static func &=(lhs: inout Self, rhs: Scalar) { lhs = lhs & rhs }
-  @_transparent static func ^=(lhs: inout Self, rhs: Scalar) { lhs = lhs ^ rhs }
-  @_transparent static func |=(lhs: inout Self, rhs: Scalar) { lhs = lhs | rhs }
-  @_transparent static func &<<=(lhs: inout Self, rhs: Scalar) { lhs = lhs &<< rhs }
-  @_transparent static func &>>=(lhs: inout Self, rhs: Scalar) { lhs = lhs &>> rhs }
-  @_transparent static func &+=(lhs: inout Self, rhs: Scalar) { lhs = lhs &+ rhs }
-  @_transparent static func &-=(lhs: inout Self, rhs: Scalar) { lhs = lhs &- rhs }
-  @_transparent static func &*=(lhs: inout Self, rhs: Scalar) { lhs = lhs &* rhs }
-  @_transparent static func /=(lhs: inout Self, rhs: Scalar) { lhs = lhs / rhs }
-  @_transparent static func %=(lhs: inout Self, rhs: Scalar) { lhs = lhs % rhs }
-  
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
-  static func +(lhs: Self, rhs: Self) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
-  static func -(lhs: Self, rhs: Self) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
-  static func *(lhs: Self, rhs: Self) -> Self { fatalError() }
-  
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
-  static func +(lhs: Self, rhs: Scalar) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
-  static func -(lhs: Self, rhs: Scalar) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
-  static func *(lhs: Self, rhs: Scalar) -> Self { fatalError() }
-  
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
-  static func +(lhs: Scalar, rhs: Self) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
-  static func -(lhs: Scalar, rhs: Self) -> Self { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
-  static func *(lhs: Scalar, rhs: Self) -> Self { fatalError() }
-  
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+=' instead")
-  static func +=(lhs: inout Self, rhs: Self) { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-=' instead")
-  static func -=(lhs: inout Self, rhs: Self) { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead")
-  static func *=(lhs: inout Self, rhs: Self) { fatalError() }
-  
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+=' instead")
-  static func +=(lhs: inout Self, rhs: Scalar) { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-=' instead")
-  static func -=(lhs: inout Self, rhs: Scalar) { fatalError() }
-  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead")
-  static func *=(lhs: inout Self, rhs: Scalar) { fatalError() }
-}
-
-public extension SIMD where Scalar : FloatingPoint {
-  @_transparent static prefix func -(rhs: Self) -> Self { return 0 - rhs }
-  
-  @_transparent static func +(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) + rhs }
-  @_transparent static func -(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) - rhs }
-  @_transparent static func *(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) * rhs }
-  @_transparent static func /(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) / rhs }
-  
-  @_transparent static func +(lhs: Self, rhs: Scalar) -> Self { return lhs + Self(repeating: rhs) }
-  @_transparent static func -(lhs: Self, rhs: Scalar) -> Self { return lhs - Self(repeating: rhs) }
-  @_transparent static func *(lhs: Self, rhs: Scalar) -> Self { return lhs * Self(repeating: rhs) }
-  @_transparent static func /(lhs: Self, rhs: Scalar) -> Self { return lhs / Self(repeating: rhs) }
-  
-  @_transparent static func +=(lhs: inout Self, rhs: Self) { lhs = lhs + rhs }
-  @_transparent static func -=(lhs: inout Self, rhs: Self) { lhs = lhs - rhs }
-  @_transparent static func *=(lhs: inout Self, rhs: Self) { lhs = lhs * rhs }
-  @_transparent static func /=(lhs: inout Self, rhs: Self) { lhs = lhs / rhs }
-  
-  @_transparent static func +=(lhs: inout Self, rhs: Scalar) { lhs = lhs + rhs }
-  @_transparent static func -=(lhs: inout Self, rhs: Scalar) { lhs = lhs - rhs }
-  @_transparent static func *=(lhs: inout Self, rhs: Scalar) { lhs = lhs * rhs }
-  @_transparent static func /=(lhs: inout Self, rhs: Scalar) { lhs = lhs / rhs }
-  
-  @_transparent func addingProduct(_ lhs: Scalar, _ rhs: Self) -> Self {
-    return self.addingProduct(Self(repeating: lhs), rhs)
-  }
-  @_transparent func addingProduct(_ lhs: Self, _ rhs: Scalar) -> Self {
-    return self.addingProduct(lhs, Self(repeating: rhs))
-  }
-  @_transparent mutating func addProduct(_ lhs: Self, _ rhs: Self) {
-    self = self.addingProduct(lhs, rhs)
-  }
-  @_transparent mutating func addProduct(_ lhs: Scalar, _ rhs: Self) {
-    self = self.addingProduct(lhs, rhs)
-  }
-  @_transparent mutating func addProduct(_ lhs: Self, _ rhs: Scalar) {
-    self = self.addingProduct(lhs, rhs)
-  }
-  
-  @_transparent mutating func formSquareRoot( ) {
-    self = self.squareRoot()
-  }
-  
-  @_transparent mutating func round(_ rule: FloatingPointRoundingRule) {
-    self = self.rounded(rule)
-  }
-}
-
-public extension SIMDMask {
-  @_transparent static func .&(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .& rhs }
-  @_transparent static func .^(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .^ rhs }
-  @_transparent static func .|(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .| rhs }
-  
-  @_transparent static func .&(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .& SIMDMask(repeating: rhs) }
-  @_transparent static func .^(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .^ SIMDMask(repeating: rhs) }
-  @_transparent static func .|(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .| SIMDMask(repeating: rhs) }
-  
-  @_transparent static func .&=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .& rhs }
-  @_transparent static func .^=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .^ rhs }
-  @_transparent static func .|=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .| rhs }
-  
-  @_transparent static func .&=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .& rhs }
-  @_transparent static func .^=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .^ rhs }
-  @_transparent static func .|=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .| rhs }
-}
+// This file intentionally left blank.
diff --git a/stdlib/public/SwiftShims/System.h b/stdlib/public/SwiftShims/System.h
index 5a21f79..7571e91 100644
--- a/stdlib/public/SwiftShims/System.h
+++ b/stdlib/public/SwiftShims/System.h
@@ -142,10 +142,10 @@
 /// Darwin reserves the low 4GB of address space.
 #define SWIFT_ABI_DARWIN_ARM64_LEAST_VALID_POINTER 0x100000000ULL
 
-// TBI guarantees the top byte of pointers is unused.
+// TBI guarantees the top byte of pointers is unused, but ARMv8.5-A
+// claims the bottom four bits of that for memory tagging.
 // Heap objects are eight-byte aligned.
-#define SWIFT_ABI_ARM64_SWIFT_SPARE_BITS_MASK                                  \
-  SWIFT_ABI_DEFAULT_64BIT_SPARE_BITS_MASK
+#define SWIFT_ABI_ARM64_SWIFT_SPARE_BITS_MASK 0xF000000000000007ULL
 
 // Objective-C reserves just the high bit for tagged pointers.
 #define SWIFT_ABI_ARM64_OBJC_RESERVED_BITS_MASK 0x8000000000000000ULL
diff --git a/stdlib/public/Windows/WinSDK.swift b/stdlib/public/Windows/WinSDK.swift
index b38159b..a71cf3a 100644
--- a/stdlib/public/Windows/WinSDK.swift
+++ b/stdlib/public/Windows/WinSDK.swift
@@ -30,3 +30,6 @@
 // minwindef.h
 public let TRUE: BOOL = 1
 
+// handleapi.h
+public let INVALID_HANDLE_VALUE: HANDLE = HANDLE(bitPattern: -1)!
+
diff --git a/stdlib/public/core/AtomicInt.swift.gyb b/stdlib/public/core/AtomicInt.swift.gyb
new file mode 100644
index 0000000..17d3484
--- /dev/null
+++ b/stdlib/public/core/AtomicInt.swift.gyb
@@ -0,0 +1,138 @@
+//===----------------------------------------------------------------------===//
+//
+// This source file is part of the Swift.org open source project
+//
+// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
+// Licensed under Apache License v2.0 with Runtime Library Exception
+//
+// See https://swift.org/LICENSE.txt for license information
+// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
+//
+//===----------------------------------------------------------------------===//
+
+@available(swift, deprecated: 4.2, obsoleted: 5.0)
+public final class _stdlib_AtomicInt {
+  internal var _value: Int
+
+  internal var _valuePtr: UnsafeMutablePointer<Int> {
+    return _getUnsafePointerToStoredProperties(self).assumingMemoryBound(
+      to: Int.self)
+  }
+
+  public init(_ value: Int = 0) {
+    _value = value
+  }
+
+  public func store(_ desired: Int) {
+    return _swift_stdlib_atomicStoreInt(object: _valuePtr, desired: desired)
+  }
+
+  public func load() -> Int {
+    return _swift_stdlib_atomicLoadInt(object: _valuePtr)
+  }
+
+% for operation_name, operation in [ ('Add', '+'), ('And', '&'), ('Or', '|'), ('Xor', '^') ]:
+  @discardableResult
+  public func fetchAnd${operation_name}(_ operand: Int) -> Int {
+    return _swift_stdlib_atomicFetch${operation_name}Int(
+      object: _valuePtr,
+      operand: operand)
+  }
+
+  public func ${operation_name.lower()}AndFetch(_ operand: Int) -> Int {
+    return fetchAnd${operation_name}(operand) ${operation} operand
+  }
+% end
+
+  public func compareExchange(expected: inout Int, desired: Int) -> Bool {
+    var expectedVar = expected
+    let result = _swift_stdlib_atomicCompareExchangeStrongInt(
+      object: _valuePtr,
+      expected: &expectedVar,
+      desired: desired)
+    expected = expectedVar
+    return result
+  }
+}
+
+@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt
+internal func _swift_stdlib_atomicCompareExchangeStrongInt(
+  object target: UnsafeMutablePointer<Int>,
+  expected: UnsafeMutablePointer<Int>,
+  desired: Int) -> Bool {
+#if arch(i386) || arch(arm)
+  let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int32(
+    target._rawValue, expected.pointee._value, desired._value)
+#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
+  let (oldValue, won) = Builtin.cmpxchg_seqcst_seqcst_Int64(
+    target._rawValue, expected.pointee._value, desired._value)
+#endif
+  expected.pointee._value = oldValue
+  return Bool(won)
+}
+
+
+// FIXME: ideally it should not be here, at the very least not public, but
+// @usableFromInline internal to be used by SwiftPrivate._stdlib_AtomicInt
+public // Existing uses outside stdlib
+func _swift_stdlib_atomicLoadInt(
+  object target: UnsafeMutablePointer<Int>) -> Int {
+#if arch(i386) || arch(arm)
+  let value = Builtin.atomicload_seqcst_Int32(target._rawValue)
+  return Int(value)
+#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
+  let value = Builtin.atomicload_seqcst_Int64(target._rawValue)
+  return Int(value)
+#endif
+}
+
+@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt
+internal func _swift_stdlib_atomicStoreInt(
+  object target: UnsafeMutablePointer<Int>,
+  desired: Int) {
+#if arch(i386) || arch(arm)
+  Builtin.atomicstore_seqcst_Int32(target._rawValue, desired._value)
+#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
+  Builtin.atomicstore_seqcst_Int64(target._rawValue, desired._value)
+#endif
+}
+
+% for operation in ['Add', 'And', 'Or', 'Xor']:
+// Warning: no overflow checking.
+// FIXME: ideally it should not be here, at the very least not public, but
+// @usableFromInline internal to be used by SwiftPrivate._stdlib_AtomicInt
+public // Existing uses outside stdlib
+func _swift_stdlib_atomicFetch${operation}Int(
+  object target: UnsafeMutablePointer<Int>,
+  operand: Int) -> Int {
+  let rawTarget = UnsafeMutableRawPointer(target)
+#if arch(i386) || arch(arm)
+  let value = _swift_stdlib_atomicFetch${operation}Int32(
+    object: rawTarget.assumingMemoryBound(to: Int32.self),
+    operand: Int32(operand))
+#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
+  let value = _swift_stdlib_atomicFetch${operation}Int64(
+    object: rawTarget.assumingMemoryBound(to: Int64.self),
+    operand: Int64(operand))
+#endif
+  return Int(value)
+}
+
+%   for bits in [ 32, 64 ]:
+
+// Warning: no overflow checking.
+@usableFromInline // used by SwiftPrivate._stdlib_AtomicInt
+internal func _swift_stdlib_atomicFetch${operation}Int${bits}(
+  object target: UnsafeMutablePointer<Int${bits}>,
+  operand: Int${bits}) -> Int${bits} {
+
+  let value = Builtin.atomicrmw_${operation.lower()}_seqcst_Int${bits}(
+    target._rawValue, operand._value)
+
+  return Int${bits}(value)
+}
+
+%   end
+
+% end
+
diff --git a/stdlib/public/core/Bool.swift b/stdlib/public/core/Bool.swift
index 33b2e49..3754165 100644
--- a/stdlib/public/core/Bool.swift
+++ b/stdlib/public/core/Bool.swift
@@ -170,15 +170,6 @@
   }
 }
 
-extension Bool {
-  // This is a magic entry point known to the compiler.
-  @_transparent
-  public // COMPILER_INTRINSIC
-  func _getBuiltinLogicValue() -> Builtin.Int1 {
-    return _value
-  }
-}
-
 extension Bool : CustomStringConvertible {
   /// A textual representation of the Boolean value.
   @inlinable
diff --git a/stdlib/public/core/CMakeLists.txt b/stdlib/public/core/CMakeLists.txt
index 169941c..e0cc9f2 100644
--- a/stdlib/public/core/CMakeLists.txt
+++ b/stdlib/public/core/CMakeLists.txt
@@ -30,6 +30,7 @@
   ASCII.swift
   Assert.swift
   AssertCommon.swift
+  AtomicInt.swift.gyb
   BidirectionalCollection.swift
   Bitset.swift
   Bool.swift
@@ -283,6 +284,10 @@
    list(APPEND swift_core_private_link_libraries swiftImageInspectionShared)
 endif()
 
+if(SWIFT_PRIMARY_VARIANT_SDK STREQUAL Windows)
+  list(APPEND swift_core_private_link_libraries shell32)
+endif()
+
 add_swift_target_library(swiftCore
                   ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB IS_STDLIB_CORE
                     ${SWIFTLIB_SOURCES}
diff --git a/stdlib/public/core/Dictionary.swift b/stdlib/public/core/Dictionary.swift
index bdc5deb..298f8a8 100644
--- a/stdlib/public/core/Dictionary.swift
+++ b/stdlib/public/core/Dictionary.swift
@@ -782,7 +782,6 @@
   ///   otherwise, `nil`.
   @inlinable
   public subscript(key: Key) -> Value? {
-    @inline(__always)
     get {
       return _variant.lookup(key)
     }
@@ -819,6 +818,7 @@
   ///   dictionary. Each key in `elements` must be unique.
   @inlinable
   @_effects(readonly)
+  @_semantics("optimize.sil.specialize.generic.size.never")
   public init(dictionaryLiteral elements: (Key, Value)...) {
     let native = _NativeDictionary<Key, Value>(capacity: elements.count)
     for (key, value) in elements {
diff --git a/stdlib/public/core/DictionaryBuilder.swift b/stdlib/public/core/DictionaryBuilder.swift
index 68ec578..0178c92 100644
--- a/stdlib/public/core/DictionaryBuilder.swift
+++ b/stdlib/public/core/DictionaryBuilder.swift
@@ -42,3 +42,134 @@
     return Dictionary(_native: _target)
   }
 }
+
+extension Dictionary {
+  /// Creates a new dictionary with the specified capacity, then calls the given
+  /// closure to initialize its contents.
+  ///
+  /// Foundation uses this initializer to bridge the contents of an NSDictionary
+  /// instance without allocating a pair of intermediary buffers.  Pass the
+  /// required capacity and a closure that can intialize the dictionary's
+  /// elements. The closure must return `c`, the number of initialized elements
+  /// in both buffers, such that the elements in the range `0..<c` are
+  /// initialized and the elements in the range `c..<capacity` are
+  /// uninitialized.
+  ///
+  /// The resulting dictionary has a `count` less than or equal to `c`. The
+  /// actual count is less iff some of the initialized keys were duplicates.
+  /// (This cannot happen if `allowingDuplicates` is false.)
+  ///
+  /// The buffers passed to the closure are only valid for the duration of the
+  /// call.  After the closure returns, this initializer moves all initialized
+  /// elements into their correct buckets.
+  ///
+  /// - Parameters:
+  ///   - capacity: The capacity of the new dictionary.
+  ///   - allowingDuplicates: If false, then the caller guarantees that all keys
+  ///     are unique. This promise isn't verified -- if it turns out to be
+  ///     false, then the resulting dictionary won't be valid.
+  ///   - body: A closure that can initialize the dictionary's elements. This
+  ///     closure must return the count of the initialized elements, starting at
+  ///     the beginning of the buffer.
+  @inlinable
+  public // SPI(Foundation)
+  init(
+    _unsafeUninitializedCapacity capacity: Int,
+    allowingDuplicates: Bool,
+    initializingWith initializer: (
+      _ keys: UnsafeMutableBufferPointer<Key>,
+      _ values: UnsafeMutableBufferPointer<Value>,
+      _ initializedCount: inout Int
+    ) -> Void
+  ) {
+    self.init(_native: _NativeDictionary(
+        _unsafeUninitializedCapacity: capacity,
+        allowingDuplicates: allowingDuplicates,
+        initializingWith: initializer))
+  }
+}
+
+extension _NativeDictionary {
+  @inlinable
+  internal init(
+    _unsafeUninitializedCapacity capacity: Int,
+    allowingDuplicates: Bool,
+    initializingWith initializer: (
+      _ keys: UnsafeMutableBufferPointer<Key>,
+      _ values: UnsafeMutableBufferPointer<Value>,
+      _ initializedCount: inout Int
+    ) -> Void
+  ) {
+    self.init(capacity: capacity)
+    var initializedCount = 0
+    initializer(
+      UnsafeMutableBufferPointer(start: _keys, count: capacity),
+      UnsafeMutableBufferPointer(start: _values, count: capacity),
+      &initializedCount)
+    _precondition(count >= 0 && count <= capacity)
+    _storage._count = initializedCount
+
+    // Hash initialized elements and move each of them into their correct
+    // buckets.
+    //
+    // - We have some number of unprocessed elements at the start of the
+    //   key/value buffers -- buckets up to and including `bucket`. Everything
+    //   in this region is either unprocessed or in use. There are no
+    //   uninitialized entries in it.
+    //
+    // - Everything after `bucket` is either uninitialized or in use. This
+    //   region works exactly like regular dictionary storage.
+    //
+    // - "in use" is tracked by the bitmap in `hashTable`, the same way it would
+    //   be for a working Dictionary.
+    //
+    // Each iteration of the loop below processes an unprocessed element, and/or
+    // reduces the size of the unprocessed region, while ensuring the above
+    // invariants.
+    var bucket = _HashTable.Bucket(offset: initializedCount - 1)
+    while bucket.offset >= 0 {
+      if hashTable._isOccupied(bucket) {
+        // We've moved an element here in a previous iteration.
+        bucket.offset -= 1
+        continue
+      }
+      // Find the target bucket for this entry and mark it as in use.
+      let target: Bucket
+      if _isDebugAssertConfiguration() || allowingDuplicates {
+        let (b, found) = find(_keys[bucket.offset])
+        if found {
+          _internalInvariant(b != bucket)
+          _precondition(allowingDuplicates, "Duplicate keys found")
+          // Discard duplicate entry.
+          uncheckedDestroy(at: bucket)
+          _storage._count -= 1
+          bucket.offset -= 1
+          continue
+        }
+        hashTable.insert(b)
+        target = b
+      } else {
+        let hashValue = self.hashValue(for: _keys[bucket.offset])
+        target = hashTable.insertNew(hashValue: hashValue)
+      }
+
+      if target > bucket {
+        // The target is outside the unprocessed region.  We can simply move the
+        // entry, leaving behind an uninitialized bucket.
+        moveEntry(from: bucket, to: target)
+        // Restore invariants by lowering the region boundary.
+        bucket.offset -= 1
+      } else if target == bucket {
+        // Already in place.
+        bucket.offset -= 1
+      } else {
+        // The target bucket is also in the unprocessed region. Swap the current
+        // item into place, then try again with the swapped-in value, so that we
+        // don't lose it.
+        swapEntry(target, with: bucket)
+      }
+    }
+    // When there are no more unprocessed entries, we're left with a valid
+    // Dictionary.
+  }
+}
diff --git a/stdlib/public/core/DictionaryVariant.swift b/stdlib/public/core/DictionaryVariant.swift
index b4f85d3..3d9992d 100644
--- a/stdlib/public/core/DictionaryVariant.swift
+++ b/stdlib/public/core/DictionaryVariant.swift
@@ -382,6 +382,7 @@
   }
 
   @inlinable
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func remove(at index: Index) -> Element {
     // FIXME(performance): fuse data migration and element deletion into one
     // operation.
@@ -412,6 +413,7 @@
   }
 
   @inlinable
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func removeAll(keepingCapacity keepCapacity: Bool) {
     if !keepCapacity {
       self = .init(native: _NativeDictionary())
diff --git a/stdlib/public/core/GroupInfo.json b/stdlib/public/core/GroupInfo.json
index e68d52a..380cdfe 100644
--- a/stdlib/public/core/GroupInfo.json
+++ b/stdlib/public/core/GroupInfo.json
@@ -197,6 +197,7 @@
     "Bitset.swift"
   ],
   "Misc": [
+    "AtomicInt.swift",
     "ErrorType.swift",
     "InputStream.swift",
     "LifetimeManager.swift",
diff --git a/stdlib/public/core/HashTable.swift b/stdlib/public/core/HashTable.swift
index 198dc6b..3ad9f42 100644
--- a/stdlib/public/core/HashTable.swift
+++ b/stdlib/public/core/HashTable.swift
@@ -127,7 +127,6 @@
     @inlinable
     @inline(__always)
     internal init(offset: Int) {
-      _internalInvariant(offset >= 0)
       self.offset = offset
     }
 
diff --git a/stdlib/public/core/Hashable.swift b/stdlib/public/core/Hashable.swift
index ced695e..04e7c44 100644
--- a/stdlib/public/core/Hashable.swift
+++ b/stdlib/public/core/Hashable.swift
@@ -106,6 +106,9 @@
   ///
   /// Hash values are not guaranteed to be equal across different executions of
   /// your program. Do not save hash values to use during a future execution.
+  ///
+  /// - Important: `hashValue` is deprecated as a `Hashable` requirement. To
+  ///   conform to `Hashable`, implement the `hash(into:)` requirement instead.
   var hashValue: Int { get }
 
   /// Hashes the essential components of this value by feeding them into the
diff --git a/stdlib/public/core/NativeDictionary.swift b/stdlib/public/core/NativeDictionary.swift
index f0a9f91..f6abdaf 100644
--- a/stdlib/public/core/NativeDictionary.swift
+++ b/stdlib/public/core/NativeDictionary.swift
@@ -137,7 +137,7 @@
   @inline(__always)
   internal func uncheckedDestroy(at bucket: Bucket) {
     defer { _fixLifetime(self) }
-    _internalInvariant(hashTable.isOccupied(bucket))
+    _internalInvariant(hashTable.isValid(bucket))
     (_keys + bucket.offset).deinitialize(count: 1)
     (_values + bucket.offset).deinitialize(count: 1)
   }
@@ -202,6 +202,7 @@
   }
 
   @inlinable
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func copyAndResize(capacity: Int) {
     let capacity = Swift.max(capacity, self.capacity)
     let newStorage = _DictionaryStorage<Key, Value>.resize(
@@ -220,6 +221,7 @@
   }
 
   @inlinable
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func copy() {
     let newStorage = _DictionaryStorage<Key, Value>.copy(original: _storage)
     _internalInvariant(newStorage._scale == _storage._scale)
@@ -241,7 +243,7 @@
   /// Ensure storage of self is uniquely held and can hold at least `capacity`
   /// elements. Returns true iff contents were rehashed.
   @inlinable
-  @inline(__always)
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func ensureUnique(isUnique: Bool, capacity: Int) -> Bool {
     if _fastPath(capacity <= self.capacity && isUnique) {
       return false
@@ -490,7 +492,6 @@
   /// held, and with enough capacity for a single insertion (if the key isn't
   /// already in the dictionary.)
   @inlinable
-  @inline(__always)
   internal mutating func mutatingFind(
     _ key: Key,
     isUnique: Bool
@@ -619,16 +620,28 @@
   @inlinable
   @inline(__always)
   internal func moveEntry(from source: Bucket, to target: Bucket) {
+    _internalInvariant(hashTable.isValid(source))
+    _internalInvariant(hashTable.isValid(target))
     (_keys + target.offset)
       .moveInitialize(from: _keys + source.offset, count: 1)
     (_values + target.offset)
       .moveInitialize(from: _values + source.offset, count: 1)
   }
+
+  @inlinable
+  @inline(__always)
+  internal func swapEntry(_ left: Bucket, with right: Bucket) {
+    _internalInvariant(hashTable.isValid(left))
+    _internalInvariant(hashTable.isValid(right))
+    swap(&_keys[left.offset], &_keys[right.offset])
+    swap(&_values[left.offset], &_values[right.offset])
+  }
 }
 
 extension _NativeDictionary { // Deletion
   @inlinable
   @_effects(releasenone)
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal func _delete(at bucket: Bucket) {
     hashTable.delete(at: bucket, with: self)
     _storage._count -= 1
@@ -637,7 +650,7 @@
   }
 
   @inlinable
-  @inline(__always)
+  @_semantics("optimize.sil.specialize.generic.size.never")
   internal mutating func uncheckedRemove(
     at bucket: Bucket,
     isUnique: Bool
diff --git a/stdlib/public/core/Runtime.swift.gyb b/stdlib/public/core/Runtime.swift.gyb
index 1c06d78..41e9940 100644
--- a/stdlib/public/core/Runtime.swift.gyb
+++ b/stdlib/public/core/Runtime.swift.gyb
@@ -115,54 +115,6 @@
 }
 
 //===----------------------------------------------------------------------===//
-// These pieces are used in ThreadLocalStorage.swift in debug builds.
-// For tests, see similar functions from SwiftPrivate/AtomicInt.swift.gyb
-//===----------------------------------------------------------------------===//
-internal func _swift_stdlib_atomicLoadInt(
-  object target: UnsafeMutablePointer<Int>) -> Int {
-#if arch(i386) || arch(arm)
-  let value = Builtin.atomicload_seqcst_Int32(target._rawValue)
-  return Int(value)
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  let value = Builtin.atomicload_seqcst_Int64(target._rawValue)
-  return Int(value)
-#endif
-}
-
-% for bits in [ 32, 64 ]:
-
-// Warning: no overflow checking.
-internal func _swift_stdlib_atomicFetchAddInt${bits}(
-  object target: UnsafeMutablePointer<Int${bits}>,
-  operand: Int${bits}) -> Int${bits} {
-
-  let value = Builtin.atomicrmw_add_seqcst_Int${bits}(
-    target._rawValue, operand._value)
-
-  return Int${bits}(value)
-}
-
-% end
-
-// Warning: no overflow checking.
-internal func _swift_stdlib_atomicFetchAddInt(
-  object target: UnsafeMutablePointer<Int>,
-  operand: Int) -> Int {
-  let rawTarget = UnsafeMutableRawPointer(target)
-#if arch(i386) || arch(arm)
-  let value = _swift_stdlib_atomicFetchAddInt32(
-    object: rawTarget.assumingMemoryBound(to: Int32.self),
-    operand: Int32(operand))
-#elseif arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le) || arch(s390x)
-  let value = _swift_stdlib_atomicFetchAddInt64(
-    object: rawTarget.assumingMemoryBound(to: Int64.self),
-    operand: Int64(operand))
-#endif
-  return Int(value)
-}
-//===----------------------------------------------------------------------===//
-
-//===----------------------------------------------------------------------===//
 // Conversion of primitive types to `String`
 //===----------------------------------------------------------------------===//
 
diff --git a/stdlib/public/core/SIMDVector.swift b/stdlib/public/core/SIMDVector.swift
index 540796a..e1ccb42 100644
--- a/stdlib/public/core/SIMDVector.swift
+++ b/stdlib/public/core/SIMDVector.swift
@@ -326,3 +326,329 @@
     return SIMDMask.random(using: &g)
   }
 }
+
+//  Implementations of integer operations. These should eventually all
+//  be replaced with @_semantics to lower directly to vector IR nodes.
+public extension SIMD where Scalar : FixedWidthInteger {
+  @_transparent
+  var leadingZeroBitCount: Self {
+    var result = Self()
+    for i in indices { result[i] = Scalar(self[i].leadingZeroBitCount) }
+    return result
+  }
+  
+  @_transparent
+  var trailingZeroBitCount: Self {
+    var result = Self()
+    for i in indices { result[i] = Scalar(self[i].trailingZeroBitCount) }
+    return result
+  }
+  
+  @_transparent
+  var nonzeroBitCount: Self {
+    var result = Self()
+    for i in indices { result[i] = Scalar(self[i].nonzeroBitCount) }
+    return result
+  }
+  
+  @_transparent
+  static prefix func ~(rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = ~rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] & rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func ^(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] ^ rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func |(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] | rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &<<(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] &<< rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &>>(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] &>> rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &+(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] &+ rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &-(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] &- rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func &*(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] &* rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func /(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] / rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func %(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] % rhs[i] }
+    return result
+  }
+}
+
+//  Implementations of floating-point operations. These should eventually all
+//  be replaced with @_semantics to lower directly to vector IR nodes.
+public extension SIMD where Scalar : FloatingPoint {
+  @_transparent
+  static func +(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] + rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func -(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] - rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func *(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] * rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  static func /(lhs: Self, rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = lhs[i] / rhs[i] }
+    return result
+  }
+  
+  @_transparent
+  func addingProduct(_ lhs: Self, _ rhs: Self) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = self[i].addingProduct(lhs[i], rhs[i]) }
+    return result
+  }
+  
+  @_transparent
+  func squareRoot( ) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = self[i].squareRoot() }
+    return result
+  }
+  
+  @_transparent
+  func rounded(_ rule: FloatingPointRoundingRule) -> Self {
+    var result = Self()
+    for i in result.indices { result[i] = self[i].rounded(rule) }
+    return result
+  }
+}
+
+public extension SIMDMask {
+  @_transparent
+  static prefix func .!(rhs: SIMDMask) -> SIMDMask {
+    return SIMDMask(~rhs._storage)
+  }
+  
+  @_transparent
+  static func .&(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
+    return SIMDMask(lhs._storage & rhs._storage)
+  }
+  
+  @_transparent
+  static func .^(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
+    return SIMDMask(lhs._storage ^ rhs._storage)
+  }
+  
+  @_transparent
+  static func .|(lhs: SIMDMask, rhs: SIMDMask) -> SIMDMask {
+    return SIMDMask(lhs._storage | rhs._storage)
+  }
+}
+
+//  These operations should never need @_semantics; they should be trivial
+//  wrappers around the core operations defined above.
+public extension SIMD where Scalar : FixedWidthInteger {
+  @_transparent static func &(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) & rhs }
+  @_transparent static func ^(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) ^ rhs }
+  @_transparent static func |(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) | rhs }
+  @_transparent static func &<<(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &<< rhs }
+  @_transparent static func &>>(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &>> rhs }
+  @_transparent static func &+(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &+ rhs }
+  @_transparent static func &-(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &- rhs }
+  @_transparent static func &*(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) &* rhs }
+  @_transparent static func /(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) / rhs }
+  @_transparent static func %(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) % rhs }
+  
+  @_transparent static func &(lhs: Self, rhs: Scalar) -> Self { return lhs & Self(repeating: rhs) }
+  @_transparent static func ^(lhs: Self, rhs: Scalar) -> Self { return lhs ^ Self(repeating: rhs) }
+  @_transparent static func |(lhs: Self, rhs: Scalar) -> Self { return lhs | Self(repeating: rhs) }
+  @_transparent static func &<<(lhs: Self, rhs: Scalar) -> Self { return lhs &<< Self(repeating: rhs) }
+  @_transparent static func &>>(lhs: Self, rhs: Scalar) -> Self { return lhs &>> Self(repeating: rhs) }
+  @_transparent static func &+(lhs: Self, rhs: Scalar) -> Self { return lhs &+ Self(repeating: rhs) }
+  @_transparent static func &-(lhs: Self, rhs: Scalar) -> Self { return lhs &- Self(repeating: rhs) }
+  @_transparent static func &*(lhs: Self, rhs: Scalar) -> Self { return lhs &* Self(repeating: rhs) }
+  @_transparent static func /(lhs: Self, rhs: Scalar) -> Self { return lhs / Self(repeating: rhs) }
+  @_transparent static func %(lhs: Self, rhs: Scalar) -> Self { return lhs % Self(repeating: rhs) }
+  
+  @_transparent static func &=(lhs: inout Self, rhs: Self) { lhs = lhs & rhs }
+  @_transparent static func ^=(lhs: inout Self, rhs: Self) { lhs = lhs ^ rhs }
+  @_transparent static func |=(lhs: inout Self, rhs: Self) { lhs = lhs | rhs }
+  @_transparent static func &<<=(lhs: inout Self, rhs: Self) { lhs = lhs &<< rhs }
+  @_transparent static func &>>=(lhs: inout Self, rhs: Self) { lhs = lhs &>> rhs }
+  @_transparent static func &+=(lhs: inout Self, rhs: Self) { lhs = lhs &+ rhs }
+  @_transparent static func &-=(lhs: inout Self, rhs: Self) { lhs = lhs &- rhs }
+  @_transparent static func &*=(lhs: inout Self, rhs: Self) { lhs = lhs &* rhs }
+  @_transparent static func /=(lhs: inout Self, rhs: Self) { lhs = lhs / rhs }
+  @_transparent static func %=(lhs: inout Self, rhs: Self) { lhs = lhs % rhs }
+  
+  @_transparent static func &=(lhs: inout Self, rhs: Scalar) { lhs = lhs & rhs }
+  @_transparent static func ^=(lhs: inout Self, rhs: Scalar) { lhs = lhs ^ rhs }
+  @_transparent static func |=(lhs: inout Self, rhs: Scalar) { lhs = lhs | rhs }
+  @_transparent static func &<<=(lhs: inout Self, rhs: Scalar) { lhs = lhs &<< rhs }
+  @_transparent static func &>>=(lhs: inout Self, rhs: Scalar) { lhs = lhs &>> rhs }
+  @_transparent static func &+=(lhs: inout Self, rhs: Scalar) { lhs = lhs &+ rhs }
+  @_transparent static func &-=(lhs: inout Self, rhs: Scalar) { lhs = lhs &- rhs }
+  @_transparent static func &*=(lhs: inout Self, rhs: Scalar) { lhs = lhs &* rhs }
+  @_transparent static func /=(lhs: inout Self, rhs: Scalar) { lhs = lhs / rhs }
+  @_transparent static func %=(lhs: inout Self, rhs: Scalar) { lhs = lhs % rhs }
+  
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
+  static func +(lhs: Self, rhs: Self) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
+  static func -(lhs: Self, rhs: Self) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
+  static func *(lhs: Self, rhs: Self) -> Self { fatalError() }
+  
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
+  static func +(lhs: Self, rhs: Scalar) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
+  static func -(lhs: Self, rhs: Scalar) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
+  static func *(lhs: Self, rhs: Scalar) -> Self { fatalError() }
+  
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+' instead")
+  static func +(lhs: Scalar, rhs: Self) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-' instead")
+  static func -(lhs: Scalar, rhs: Self) -> Self { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*' instead")
+  static func *(lhs: Scalar, rhs: Self) -> Self { fatalError() }
+  
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+=' instead")
+  static func +=(lhs: inout Self, rhs: Self) { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-=' instead")
+  static func -=(lhs: inout Self, rhs: Self) { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead")
+  static func *=(lhs: inout Self, rhs: Self) { fatalError() }
+  
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&+=' instead")
+  static func +=(lhs: inout Self, rhs: Scalar) { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&-=' instead")
+  static func -=(lhs: inout Self, rhs: Scalar) { fatalError() }
+  @available(*, unavailable, message: "integer vector types do not support checked arithmetic; use the wrapping operator '&*=' instead")
+  static func *=(lhs: inout Self, rhs: Scalar) { fatalError() }
+}
+
+public extension SIMD where Scalar : FloatingPoint {
+  @_transparent static prefix func -(rhs: Self) -> Self { return 0 - rhs }
+  
+  @_transparent static func +(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) + rhs }
+  @_transparent static func -(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) - rhs }
+  @_transparent static func *(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) * rhs }
+  @_transparent static func /(lhs: Scalar, rhs: Self) -> Self { return Self(repeating: lhs) / rhs }
+  
+  @_transparent static func +(lhs: Self, rhs: Scalar) -> Self { return lhs + Self(repeating: rhs) }
+  @_transparent static func -(lhs: Self, rhs: Scalar) -> Self { return lhs - Self(repeating: rhs) }
+  @_transparent static func *(lhs: Self, rhs: Scalar) -> Self { return lhs * Self(repeating: rhs) }
+  @_transparent static func /(lhs: Self, rhs: Scalar) -> Self { return lhs / Self(repeating: rhs) }
+  
+  @_transparent static func +=(lhs: inout Self, rhs: Self) { lhs = lhs + rhs }
+  @_transparent static func -=(lhs: inout Self, rhs: Self) { lhs = lhs - rhs }
+  @_transparent static func *=(lhs: inout Self, rhs: Self) { lhs = lhs * rhs }
+  @_transparent static func /=(lhs: inout Self, rhs: Self) { lhs = lhs / rhs }
+  
+  @_transparent static func +=(lhs: inout Self, rhs: Scalar) { lhs = lhs + rhs }
+  @_transparent static func -=(lhs: inout Self, rhs: Scalar) { lhs = lhs - rhs }
+  @_transparent static func *=(lhs: inout Self, rhs: Scalar) { lhs = lhs * rhs }
+  @_transparent static func /=(lhs: inout Self, rhs: Scalar) { lhs = lhs / rhs }
+  
+  @_transparent func addingProduct(_ lhs: Scalar, _ rhs: Self) -> Self {
+    return self.addingProduct(Self(repeating: lhs), rhs)
+  }
+  @_transparent func addingProduct(_ lhs: Self, _ rhs: Scalar) -> Self {
+    return self.addingProduct(lhs, Self(repeating: rhs))
+  }
+  @_transparent mutating func addProduct(_ lhs: Self, _ rhs: Self) {
+    self = self.addingProduct(lhs, rhs)
+  }
+  @_transparent mutating func addProduct(_ lhs: Scalar, _ rhs: Self) {
+    self = self.addingProduct(lhs, rhs)
+  }
+  @_transparent mutating func addProduct(_ lhs: Self, _ rhs: Scalar) {
+    self = self.addingProduct(lhs, rhs)
+  }
+  
+  @_transparent mutating func formSquareRoot( ) {
+    self = self.squareRoot()
+  }
+  
+  @_transparent mutating func round(_ rule: FloatingPointRoundingRule) {
+    self = self.rounded(rule)
+  }
+}
+
+public extension SIMDMask {
+  @_transparent static func .&(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .& rhs }
+  @_transparent static func .^(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .^ rhs }
+  @_transparent static func .|(lhs: Bool, rhs: SIMDMask) -> SIMDMask { return SIMDMask(repeating: lhs) .| rhs }
+  
+  @_transparent static func .&(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .& SIMDMask(repeating: rhs) }
+  @_transparent static func .^(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .^ SIMDMask(repeating: rhs) }
+  @_transparent static func .|(lhs: SIMDMask, rhs: Bool) -> SIMDMask { return lhs .| SIMDMask(repeating: rhs) }
+  
+  @_transparent static func .&=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .& rhs }
+  @_transparent static func .^=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .^ rhs }
+  @_transparent static func .|=(lhs: inout SIMDMask, rhs: SIMDMask) { lhs = lhs .| rhs }
+  
+  @_transparent static func .&=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .& rhs }
+  @_transparent static func .^=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .^ rhs }
+  @_transparent static func .|=(lhs: inout SIMDMask, rhs: Bool) { lhs = lhs .| rhs }
+}
diff --git a/stdlib/public/core/SIMDVectorTypes.swift.gyb b/stdlib/public/core/SIMDVectorTypes.swift.gyb
index b5d91ce..a2ed3f5 100644
--- a/stdlib/public/core/SIMDVectorTypes.swift.gyb
+++ b/stdlib/public/core/SIMDVectorTypes.swift.gyb
@@ -109,6 +109,13 @@
   }
 }
 
+extension SIMD${n} : CustomDebugStringConvertible {
+  public var debugDescription: String {
+    return "SIMD${n}<\(Scalar.self)>(${', '.join(map(lambda c:
+                       '\\(self['+ str(c) + '])',
+                       xrange(n)))})"
+  }
+}
 
 public extension SIMD${n} where Scalar : BinaryFloatingPoint {
   @inlinable
diff --git a/stdlib/public/core/Set.swift b/stdlib/public/core/Set.swift
index b18b8a9..4326bf8 100644
--- a/stdlib/public/core/Set.swift
+++ b/stdlib/public/core/Set.swift
@@ -712,7 +712,8 @@
   @inlinable
   public func isSubset<S: Sequence>(of possibleSuperset: S) -> Bool
   where S.Element == Element {
-    // FIXME(performance): isEmpty fast path, here and elsewhere.
+    guard !isEmpty else { return true }
+    
     let other = Set(possibleSuperset)
     return isSubset(of: other)
   }
@@ -763,10 +764,12 @@
   @inlinable
   public func isSuperset<S: Sequence>(of possibleSubset: __owned S) -> Bool
     where S.Element == Element {
-    // FIXME(performance): Don't build a set; just ask if every element is in
-    // `self`.
-    let other = Set(possibleSubset)
-    return other.isSubset(of: self)
+    for member in possibleSubset {
+      if !contains(member) {
+        return false
+      }
+    }
+    return true
   }
 
   /// Returns a Boolean value that indicates whether the set is a strict
@@ -811,9 +814,7 @@
   @inlinable
   public func isDisjoint<S: Sequence>(with other: S) -> Bool
   where S.Element == Element {
-    // FIXME(performance): Don't need to build a set.
-    let otherSet = Set(other)
-    return isDisjoint(with: otherSet)
+    return _isDisjoint(with: other)
   }
 
   /// Returns a new set with the elements of both this set and the given
@@ -920,6 +921,10 @@
   @inlinable
   internal mutating func _subtract<S: Sequence>(_ other: S)
   where S.Element == Element {
+    // If self is empty we don't need to iterate over `other` because there's
+    // nothing to remove on self.
+    guard !isEmpty else { return }
+
     for item in other {
       remove(item)
     }
@@ -1121,8 +1126,16 @@
   ///   otherwise, `false`.
   @inlinable
   public func isDisjoint(with other: Set<Element>) -> Bool {
-    for member in self {
-      if other.contains(member) {
+    return _isDisjoint(with: other)
+  }
+    
+  @inlinable
+  internal func _isDisjoint<S: Sequence>(with other: S) -> Bool
+  where S.Element == Element {
+    guard !isEmpty else { return true }
+
+    for member in other {
+      if contains(member) {
         return false
       }
     }
diff --git a/stdlib/public/core/SmallString.swift b/stdlib/public/core/SmallString.swift
index b3910b9..32c10aa 100644
--- a/stdlib/public/core/SmallString.swift
+++ b/stdlib/public/core/SmallString.swift
@@ -72,18 +72,9 @@
     }
   }
 
-  @inlinable
-  internal var discriminator: _StringObject.Discriminator {
-    @inline(__always) get {
-      let value = _storage.1 &>> _StringObject.Nibbles.discriminatorShift
-      return _StringObject.Discriminator(UInt8(truncatingIfNeeded: value))
-    }
-    @inline(__always) set {
-      _storage.1 &= _StringObject.Nibbles.largeAddressMask
-      _storage.1 |= (
-        UInt64(truncatingIfNeeded: newValue._value)
-          &<< _StringObject.Nibbles.discriminatorShift)
-    }
+  @inlinable @inline(__always)
+  internal var rawDiscriminatedObject: UInt64 {
+    return _storage.1
   }
 
   @inlinable
@@ -96,7 +87,7 @@
   @inlinable
   internal var count: Int {
     @inline(__always) get {
-      return discriminator.smallCount
+      return _StringObject.getSmallCount(fromRaw: rawDiscriminatedObject)
     }
   }
 
@@ -108,27 +99,22 @@
   @inlinable
   internal var isASCII: Bool {
     @inline(__always) get {
-      return discriminator.smallIsASCII
+      return _StringObject.getSmallIsASCII(fromRaw: rawDiscriminatedObject)
     }
   }
 
   // Give raw, nul-terminated code units. This is only for limited internal
   // usage: it always clears the discriminator and count (in case it's full)
-  @inlinable
+  @inlinable @inline(__always)
   internal var zeroTerminatedRawCodeUnits: RawBitPattern {
-    @inline(__always) get {
-      return (
-        self._storage.0,
-        self._storage.1 & _StringObject.Nibbles.largeAddressMask)
-    }
+    let smallStringCodeUnitMask: UInt64 = 0x00FF_FFFF_FFFF_FFFF
+    return (self._storage.0, self._storage.1 & smallStringCodeUnitMask)
   }
 
-  @inlinable
   internal func computeIsASCII() -> Bool {
-    // TODO(String micro-performance): Evaluate other expressions, e.g. | first
     let asciiMask: UInt64 = 0x8080_8080_8080_8080
     let raw = zeroTerminatedRawCodeUnits
-    return (raw.0 & asciiMask == 0) && (raw.1 & asciiMask == 0)
+    return (raw.0 | raw.1) & asciiMask == 0
   }
 }
 
@@ -220,7 +206,7 @@
 
   // Overwrite stored code units, including uninitialized. `f` should return the
   // new count.
-  @inlinable @inline(__always)
+  @inline(__always)
   internal mutating func withMutableCapacity(
     _ f: (UnsafeMutableBufferPointer<UInt8>) throws -> Int
   ) rethrows {
@@ -231,14 +217,28 @@
       return try f(UnsafeMutableBufferPointer(
         start: ptr, count: _SmallString.capacity))
     }
-
     _internalInvariant(len <= _SmallString.capacity)
-    discriminator = .small(withCount: len, isASCII: self.computeIsASCII())
+
+    let (leading, trailing) = self.zeroTerminatedRawCodeUnits
+    self = _SmallString(leading: leading, trailing: trailing, count: len)
   }
 }
 
 // Creation
 extension _SmallString {
+  @inlinable @inline(__always)
+  internal init(leading: UInt64, trailing: UInt64, count: Int) {
+    _internalInvariant(count <= _SmallString.capacity)
+
+    let isASCII = (leading | trailing) & 0x8080_8080_8080_8080 == 0
+    let countAndDiscriminator = UInt64(truncatingIfNeeded: count) &<< 56
+                              | _StringObject.Nibbles.small(isASCII: isASCII)
+    _internalInvariant(trailing & countAndDiscriminator == 0)
+
+    self.init(raw: (leading, trailing | countAndDiscriminator))
+    _internalInvariant(self.count == count)
+  }
+
   // Direct from UTF-8
   @inlinable @inline(__always)
   internal init?(_ input: UnsafeBufferPointer<UInt8>) {
@@ -251,11 +251,7 @@
     let leading = _bytesToUInt64(ptr, Swift.min(input.count, 8))
     let trailing = count > 8 ? _bytesToUInt64(ptr + 8, count &- 8) : 0
 
-    let isASCII = (leading | trailing) & 0x8080_8080_8080_8080 == 0
-    let discriminator = _StringObject.Discriminator.small(
-      withCount: count,
-      isASCII: isASCII)
-    self.init(raw: (leading, trailing | discriminator.rawBits))
+    self.init(leading: leading, trailing: trailing, count: count)
   }
 
   @usableFromInline // @testable
@@ -273,13 +269,8 @@
     }
     _internalInvariant(writeIdx == totalCount)
 
-    let isASCII = base.isASCII && other.isASCII
-    let discriminator = _StringObject.Discriminator.small(
-      withCount: totalCount,
-      isASCII: isASCII)
-
     let (leading, trailing) = result.zeroTerminatedRawCodeUnits
-    self.init(raw: (leading, trailing | discriminator.rawBits))
+    self.init(leading: leading, trailing: trailing, count: totalCount)
   }
 }
 
diff --git a/stdlib/public/core/StringBridge.swift b/stdlib/public/core/StringBridge.swift
index c23f57f..1fc25c2 100644
--- a/stdlib/public/core/StringBridge.swift
+++ b/stdlib/public/core/StringBridge.swift
@@ -281,9 +281,13 @@
       }
     }
     if _guts._object.isImmortal {
+      // TODO: We'd rather emit a valid ObjC object statically than create a
+      // shared string class instance.
+      let gutsCountAndFlags = _guts._object._countAndFlags
       return _SharedStringStorage(
         immortal: _guts._object.fastUTF8.baseAddress!,
-        countAndFlags: _guts._object._countAndFlags)
+        countAndFlags: _StringObject.CountAndFlags(
+          sharedCount: _guts.count, isASCII: gutsCountAndFlags.isASCII))
     }
 
     _internalInvariant(_guts._object.hasObjCBridgeableObject,
diff --git a/stdlib/public/core/StringGuts.swift b/stdlib/public/core/StringGuts.swift
index 718d132..03aeb06 100644
--- a/stdlib/public/core/StringGuts.swift
+++ b/stdlib/public/core/StringGuts.swift
@@ -61,8 +61,7 @@
   }
 
   internal init(_ storage: _SharedStringStorage) {
-    // TODO(cleanup): We should probably pass whole perf flags struct around
-    self.init(_StringObject(storage, isASCII: false))
+    self.init(_StringObject(storage))
   }
 
   internal init(
@@ -109,18 +108,15 @@
     @inline(__always) get { return isFastUTF8 && _object.isASCII }
   }
 
-  @inlinable
-  internal var isNFC: Bool  {
-    @inline(__always) get { return _object.isNFC }
-  }
+  @inline(__always)
+  internal var isNFC: Bool { return _object.isNFC }
 
-  @inlinable
-  internal var isNFCFastUTF8: Bool  {
+  @inline(__always)
+  internal var isNFCFastUTF8: Bool {
     // TODO(String micro-performance): Consider a dedicated bit for this
-    @inline(__always) get { return _object.isNFC && isFastUTF8 }
+    return _object.isNFC && isFastUTF8
   }
 
-  @inlinable
   internal var hasNativeStorage: Bool { return _object.hasNativeStorage }
 
   internal var hasSharedStorage: Bool { return _object.hasSharedStorage }
diff --git a/stdlib/public/core/StringObject.swift b/stdlib/public/core/StringObject.swift
index eb2ea32..49b94f3 100644
--- a/stdlib/public/core/StringObject.swift
+++ b/stdlib/public/core/StringObject.swift
@@ -17,41 +17,37 @@
 
 // TODO(String docs): Word-level diagram
 
-@_fixed_layout @usableFromInline
-internal struct _StringObject {
-  /*
+/*
 
-  On 64-bit platforms, the discriminator is the most significant 8 bits of the
+  On 64-bit platforms, the discriminator is the most significant 4 bits of the
   bridge object.
 
-  ┌─────────────────────╥─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐
-  │ Form                ║  7  │  6  │  5  │  4  │  3  │  2  │  1  │  0  │
-  ╞═════════════════════╬═════╪═════╪═════╪═════╪═════╧═════╧═════╧═════╡
-  │ Immortal, Small     ║  1  │ASCII│  1  │  0  │      small count      │
-  ├─────────────────────╫─────┼─────┼─────┼─────┼─────┬─────┬─────┬─────┤
-  │ Immortal, Large     ║  1  │  0  │  0  │  0  │  0  │ TBD │ TBD │ TBD │
-  ╞═════════════════════╬═════╪═════╪═════╪═════╪═════╪═════╪═════╪═════╡
-  │ Native              ║  0  │  0  │  0  │  0  │  0  │ TBD │ TBD │ TBD │
-  ├─────────────────────╫─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-  │ Shared              ║  x  │  0  │  0  │  0  │  1  │ TBD │ TBD │ TBD │
-  ├─────────────────────╫─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-  │ Shared, Bridged     ║  0  │  1  │  0  │  0  │  1  │ TBD │ TBD │ TBD │
-  ╞═════════════════════╬═════╪═════╪═════╪═════╪═════╪═════╪═════╪═════╡
-  │ Foreign             ║  x  │  0  │  0  │  1  │  1  │ TBD │ TBD │ TBD │
-  ├─────────────────────╫─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
-  │ Foreign, Bridged    ║  0  │  1  │  0  │  1  │  1  │ TBD │ TBD │ TBD │
-  └─────────────────────╨─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
+  ┌─────────────────────╥─────┬─────┬─────┬─────┐
+  │ Form                ║ b63 │ b62 │ b61 │ b60 │
+  ╞═════════════════════╬═════╪═════╪═════╪═════╡
+  │ Immortal, Small     ║  1  │ASCII│  1  │  0  │
+  ├─────────────────────╫─────┼─────┼─────┼─────┤
+  │ Immortal, Large     ║  1  │  0  │  0  │  0  │
+  ╞═════════════════════╬═════╪═════╪═════╪═════╡
+  │ Native              ║  0  │  0  │  0  │  0  │
+  ├─────────────────────╫─────┼─────┼─────┼─────┤
+  │ Shared              ║  x  │  0  │  0  │  0  │
+  ├─────────────────────╫─────┼─────┼─────┼─────┤
+  │ Shared, Bridged     ║  0  │  1  │  0  │  0  │
+  ╞═════════════════════╬═════╪═════╪═════╪═════╡
+  │ Foreign             ║  x  │  0  │  0  │  1  │
+  ├─────────────────────╫─────┼─────┼─────┼─────┤
+  │ Foreign, Bridged    ║  0  │  1  │  0  │  1  │
+  └─────────────────────╨─────┴─────┴─────┴─────┘
 
-  b7: isImmortal: Should the Swift runtime skip ARC
+  b63: isImmortal: Should the Swift runtime skip ARC
     - Small strings are just values, always immortal
     - Large strings can sometimes be immortal, e.g. literals
-  b6: (large) isBridged / (small) isASCII
+  b62: (large) isBridged / (small) isASCII
     - For large strings, this means lazily-bridged NSString: perform ObjC ARC
     - Small strings repurpose this as a dedicated bit to remember ASCII-ness
-  b5: isSmall: Dedicated bit to denote small strings
-  b4: isForeign: aka isSlow, cannot provide access to contiguous UTF-8
-  b3: (large) not isTailAllocated: payload isn't a biased pointer
-    - Shared strings provide contiguous UTF-8 through extra level of indirection
+  b61: isSmall: Dedicated bit to denote small strings
+  b60: isForeign: aka isSlow, cannot provide access to contiguous UTF-8
 
   The canonical empty string is the zero-sized small string. It has a leading
   nibble of 1110, and all other bits are 0.
@@ -60,21 +56,25 @@
   can compile to a fused check-and-branch, even if that burns part of the
   encoding space.
 
-  On 32-bit platforms, we use an explicit discriminator with the same encoding
-  as above, except bit 7 is omitted from storage -- it is left free, to supply
-  extra inhabitants in the StringObject structure. The missing bit can be
-  recovered by looking at `_variant.isImmortal`.
+  On 32-bit platforms, we store an explicit discriminator (as a UInt8) with the
+  same encoding as above, placed in the high bits. E.g. `b62` above is in
+  `_discriminator`'s `b6`.
+*/
 
-  */
+@_fixed_layout @usableFromInline
+internal struct _StringObject {
+  // Namespace to hold magic numbers
+  @usableFromInline @_frozen
+  enum Nibbles {}
+
+  // Abstract the count and performance-flags containing word
   @_fixed_layout @usableFromInline
-  struct Discriminator {
+  struct CountAndFlags {
     @usableFromInline
-    internal var _value: UInt8
+    var _storage: UInt64
 
     @inlinable @inline(__always)
-    internal init(_ value: UInt8) {
-      self._value = value
-    }
+    internal init(zero: ()) { self._storage = 0 }
   }
 
 #if arch(i386) || arch(arm)
@@ -99,37 +99,6 @@
     }
   }
 
-  @_fixed_layout @usableFromInline
-  struct Flags {
-    @usableFromInline
-    internal var _value: UInt16
-
-    @inlinable @inline(__always)
-    init(_ value: UInt16) {
-      self._value = value
-    }
-  }
-
-  @_fixed_layout @usableFromInline
-  struct CountAndFlags {
-    @usableFromInline
-    internal var count: Int
-
-    @usableFromInline
-    internal var flags: Flags
-
-    @inlinable @inline(__always)
-    init(count: Int, flags: Flags) {
-      self.count = count
-      self.flags = flags
-    }
-
-    @inlinable @inline(__always)
-    internal func _invariantCheck() {
-      flags._invariantCheck()
-    }
-  }
-
   @usableFromInline
   internal var _count: Int
 
@@ -137,74 +106,63 @@
   internal var _variant: Variant
 
   @usableFromInline
-  internal var _discriminator: Discriminator
+  internal var _discriminator: UInt8
 
   @usableFromInline
-  internal var _flags: Flags
+  internal var _flags: UInt16
 
   @inlinable @inline(__always)
-  init(
-    count: Int,
-    variant: Variant,
-    discriminator: Discriminator,
-    flags: Flags
-  ) {
+  init(count: Int, variant: Variant, discriminator: UInt64, flags: UInt16) {
+    _internalInvariant(discriminator & 0xFF00_0000_0000_0000 == discriminator,
+      "only the top byte can carry the discriminator and small count")
+
     self._count = count
     self._variant = variant
-    self._discriminator = discriminator
+    self._discriminator = UInt8(truncatingIfNeeded: discriminator &>> 56)
     self._flags = flags
+    self._invariantCheck()
   }
 
-  @inlinable
-  internal var _countAndFlags: CountAndFlags {
-    @inline(__always) get {
-      return CountAndFlags(count: _count, flags: _flags)
-    }
+  @inlinable @inline(__always)
+  init(variant: Variant, discriminator: UInt64, countAndFlags: CountAndFlags) {
+    self.init(
+      count: countAndFlags.count,
+      variant: variant,
+      discriminator: discriminator,
+      flags: countAndFlags.flags)
+  }
+
+  @inlinable @inline(__always)
+  internal var _countAndFlagsBits: UInt64 {
+    let rawBits = UInt64(truncatingIfNeeded: _flags) &<< 48
+                | UInt64(truncatingIfNeeded: _count)
+    return rawBits
   }
 #else
-  // Abstract the count and performance-flags containing word
-  @_fixed_layout @usableFromInline
-  struct CountAndFlags {
-    @usableFromInline
-    var _storage: UInt
-
-    @inlinable @inline(__always)
-    internal init(zero: ()) { self._storage = 0 }
-  }
 
   //
-  // Laid out as (_countAndFlags, _object), which allows small string contents to
-  // naturally start on vector-alignment.
+  // Laid out as (_countAndFlags, _object), which allows small string contents
+  // to naturally start on vector-alignment.
   //
+
   @usableFromInline
-  internal var _countAndFlags: CountAndFlags
+  internal var _countAndFlagsBits: UInt64
 
   @usableFromInline
   internal var _object: Builtin.BridgeObject
 
   @inlinable @inline(__always)
   internal init(zero: ()) {
-    self._countAndFlags = CountAndFlags(zero:())
+    self._countAndFlagsBits = 0
     self._object = Builtin.valueToBridgeObject(UInt64(0)._value)
   }
+
 #endif
 
-  // Namespace to hold magic numbers
-  @usableFromInline @_frozen
-  enum Nibbles {}
-}
-
-extension _StringObject {
-  @inlinable
-  internal var discriminator: Discriminator {
-    @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _discriminator
-#else
-      let d = objectRawBits &>> Nibbles.discriminatorShift
-      return Discriminator(UInt8(truncatingIfNeeded: d))
-#endif
-    }
+  @inlinable @inline(__always)
+  internal var _countAndFlags: CountAndFlags {
+    _internalInvariant(!isSmall)
+    return CountAndFlags(rawUnchecked: _countAndFlagsBits)
   }
 }
 
@@ -220,9 +178,10 @@
   internal var rawBits: RawBitPattern {
     @inline(__always) get {
       let count = UInt64(truncatingIfNeeded: UInt(bitPattern: _count))
-      let payload = UInt64(truncatingIfNeeded: undiscriminatedObjectRawBits)
-      let flags = UInt64(truncatingIfNeeded: _flags._value)
-      let discr = UInt64(truncatingIfNeeded: _discriminator._value)
+      let payload = UInt64(truncatingIfNeeded: discriminatedObjectRawBits)
+                  & _StringObject.Nibbles.largeAddressMask
+      let flags = UInt64(truncatingIfNeeded: _flags)
+      let discr = UInt64(truncatingIfNeeded: _discriminator)
       if isSmall {
         // Rearrange small strings in a different way, compacting bytes into a
         // contiguous sequence. See comment on small string layout below.
@@ -234,7 +193,9 @@
 #else
   @inlinable
   internal var rawBits: RawBitPattern {
-    @inline(__always) get { return (_countAndFlags.rawBits, objectRawBits) }
+    @inline(__always) get {
+      return (_countAndFlagsBits, discriminatedObjectRawBits)
+    }
   }
 
   @inlinable @inline(__always)
@@ -242,7 +203,7 @@
     bridgeObject: Builtin.BridgeObject, countAndFlags: CountAndFlags
   ) {
     self._object = bridgeObject
-    self._countAndFlags = countAndFlags
+    self._countAndFlagsBits = countAndFlags._storage
     _invariantCheck()
   }
 
@@ -274,7 +235,7 @@
   @inlinable @inline(__always)
   internal init(rawUncheckedValue bits: RawBitPattern) {
     self.init(zero:())
-    self._countAndFlags = CountAndFlags(rawUnchecked: bits.0)
+    self._countAndFlagsBits = bits.0
     self._object = Builtin.valueToBridgeObject(bits.1._value)
     _internalInvariant(self.rawBits == bits)
   }
@@ -284,47 +245,42 @@
     self.init(rawUncheckedValue: bits)
     _invariantCheck()
   }
-
-  @inlinable @_transparent
-  internal var objectRawBits: UInt64 {
-    @inline(__always) get { return Builtin.reinterpretCast(_object) }
-  }
 #endif
-}
 
-extension _StringObject {
   @inlinable @_transparent
-  internal var undiscriminatedObjectRawBits: UInt {
-    @inline(__always) get {
+  internal var discriminatedObjectRawBits: UInt64 {
 #if arch(i386) || arch(arm)
-      switch _variant {
-      case .immortal(let bitPattern):
-        return bitPattern
-      case .native(let storage):
-        return Builtin.reinterpretCast(storage)
-      case .bridged(let object):
-        return Builtin.reinterpretCast(object)
-      }
-#else
-      return UInt(truncatingIfNeeded: objectRawBits & Nibbles.largeAddressMask)
-#endif
+    let low32: UInt
+    switch _variant {
+    case .immortal(let bitPattern):
+      low32 = bitPattern
+    case .native(let storage):
+      low32 = Builtin.reinterpretCast(storage)
+    case .bridged(let object):
+      low32 = Builtin.reinterpretCast(object)
     }
+
+    return UInt64(truncatingIfNeeded: _discriminator) &<< 56
+         | UInt64(truncatingIfNeeded: low32)
+#else
+    return Builtin.reinterpretCast(_object)
+#endif
   }
 }
 
-#if !(arch(i386) || arch(arm))
+// From/to raw bits for CountAndFlags
 extension _StringObject.CountAndFlags {
   @usableFromInline
   internal typealias RawBitPattern = UInt64
 
-  @inlinable
+  @inlinable @inline(__always)
   internal var rawBits: RawBitPattern {
-    @inline(__always) get { return UInt64(truncatingIfNeeded: _storage) }
+   return _storage
   }
 
   @inlinable @inline(__always)
   internal init(rawUnchecked bits: RawBitPattern) {
-    self._storage = UInt(truncatingIfNeeded: bits)
+    self._storage = bits
   }
 
   @inlinable @inline(__always)
@@ -333,27 +289,13 @@
     _invariantCheck()
   }
 }
-#endif
 
 /*
-
  Encoding is optimized for common fast creation. The canonical empty string,
  ASCII small strings, as well as most literals, have all consecutive 1s in their
  high nibble mask, and thus can all be encoded as a logical immediate operand
  on arm64.
-
- See docs for _StringOjbect.Discriminator for the layout of the high nibble
 */
-#if arch(i386) || arch(arm)
-extension _StringObject.Discriminator {
-  @inlinable
-  internal static var empty: _StringObject.Discriminator {
-    @inline(__always) get {
-      return _StringObject.Discriminator.small(withCount: 0, isASCII: true)
-    }
-  }
-}
-#else
 extension _StringObject.Nibbles {
   // The canonical empty sting is an empty small string
   @inlinable
@@ -361,7 +303,6 @@
     @inline(__always) get { return _StringObject.Nibbles.small(isASCII: true) }
   }
 }
-#endif
 
 /*
 
@@ -395,7 +336,7 @@
  └────────────┘
 
  ┌───────────────┬────────────┐
- │    b63:b56    │   b55:b0   │
+ │    b63:b60    │   b60:b0   │
  ├───────────────┼────────────┤
  │ discriminator │ objectAddr │
  └───────────────┴────────────┘
@@ -410,72 +351,14 @@
 */
 extension _StringObject.Nibbles {
   // Mask for address bits, i.e. non-discriminator and non-extra high bits
-  @inlinable
-  static internal var largeAddressMask: UInt64 {
-    @inline(__always) get {
-      return 0x00FF_FFFF_FFFF_FFFF
-    }
-  }
+  @inlinable @inline(__always)
+  static internal var largeAddressMask: UInt64 { return 0x0FFF_FFFF_FFFF_FFFF }
 
-  // Mask for discriminator bits
-  @inlinable
-  static internal var discriminatorMask: UInt64 {
-    @inline(__always) get {
-      return ~largeAddressMask
-    }
-  }
-
-  // Position of discriminator bits
-  @inlinable
-  static internal var discriminatorShift: Int {
-    @inline(__always) get {
-      return 56
-    }
-  }
+  // Mask for address bits, i.e. non-discriminator and non-extra high bits
+  @inlinable @inline(__always)
+  static internal var discriminatorMask: UInt64 { return ~largeAddressMask }
 }
 
-extension _StringObject.Discriminator {
-  // Discriminator for small strings
-  @inlinable @inline(__always)
-  internal static func small(
-    withCount count: Int,
-    isASCII: Bool
-  ) -> _StringObject.Discriminator {
-    _internalInvariant(count >= 0 && count <= _SmallString.capacity)
-    let c = UInt8(truncatingIfNeeded: count)
-    return _StringObject.Discriminator((isASCII ? 0xE0 : 0xA0) | c)
-  }
-
-#if arch(i386) || arch(arm)
-  // Discriminator for large, immortal, swift-native strings
-  @inlinable @inline(__always)
-  internal static func largeImmortal() -> _StringObject.Discriminator {
-    return _StringObject.Discriminator(0x80)
-  }
-
-  // Discriminator for large, mortal (i.e. managed), swift-native strings
-  @inlinable @inline(__always)
-  internal static func largeMortal() -> _StringObject.Discriminator {
-    return _StringObject.Discriminator(0x00)
-  }
-
-  // Discriminator for large, shared, mortal (i.e. managed), swift-native
-  // strings
-  @inlinable @inline(__always)
-  internal static func largeSharedMortal() -> _StringObject.Discriminator {
-    return _StringObject.Discriminator(0x08)
-  }
-
-  internal static func largeCocoa(
-    providesFastUTF8: Bool
-  ) -> _StringObject.Discriminator {
-    return _StringObject.Discriminator(providesFastUTF8 ? 0x48 : 0x58)
-  }
-#endif
-}
-
-#if !(arch(i386) || arch(arm))
-// FIXME: Can we just switch to using the Discriminator factories above?
 extension _StringObject.Nibbles {
   // Discriminator for small strings
   @inlinable @inline(__always)
@@ -502,94 +385,8 @@
     return 0x0000_0000_0000_0000
   }
 
-  // Discriminator for large, shared, mortal (i.e. managed), swift-native
-  // strings
-  @inlinable @inline(__always)
-  internal static func largeSharedMortal() -> UInt64 {
-    return 0x0800_0000_0000_0000
-  }
-
   internal static func largeCocoa(providesFastUTF8: Bool) -> UInt64 {
-    return providesFastUTF8 ? 0x4800_0000_0000_0000 : 0x5800_0000_0000_0000
-  }
-}
-#endif
-
-extension _StringObject.Discriminator {
-  @inlinable
-  internal var isImmortal: Bool {
-    @inline(__always) get {
-      return (_value & 0x80) != 0
-    }
-  }
-
-  @inlinable
-  internal var isSmall: Bool {
-    @inline(__always) get {
-      return (_value & 0x20) != 0
-    }
-  }
-
-  @inlinable
-  internal var smallIsASCII: Bool {
-    @inline(__always) get {
-      _internalInvariant(isSmall)
-      return (_value & 0x40) != 0
-    }
-  }
-
-  @inlinable
-  internal var smallCount: Int {
-    @inline(__always) get {
-      _internalInvariant(isSmall)
-      return Int(truncatingIfNeeded: _value & 0x0F)
-    }
-  }
-
-  @inlinable
-  internal var providesFastUTF8: Bool {
-    @inline(__always) get {
-      return (_value & 0x10) == 0
-    }
-  }
-
-  // Whether we are a mortal, native string
-  @inlinable
-  internal var hasNativeStorage: Bool {
-    @inline(__always) get {
-      return (_value & 0xF8) == 0
-    }
-  }
-
-  // Whether we are a mortal, shared string (managed by Swift runtime)
-  internal var hasSharedStorage: Bool {
-    @inline(__always) get {
-      return (_value & 0xF8) == 0x08
-    }
-  }
-
-  @inlinable
-  internal var largeFastIsNative: Bool {
-    @inline(__always) get {
-      _internalInvariant(!isSmall && providesFastUTF8)
-      return (_value & 0x08) == 0
-    }
-  }
-
-  // Whether this string is a lazily-bridged NSString, presupposing it is large
-  @inlinable
-  internal var largeIsCocoa: Bool {
-    @inline(__always) get {
-      _internalInvariant(!isSmall)
-      return (_value & 0x40) != 0
-    }
-  }
-}
-
-extension _StringObject.Discriminator {
-  @inlinable
-  internal var rawBits: UInt64 {
-    return UInt64(_value) &<< _StringObject.Nibbles.discriminatorShift
+    return providesFastUTF8 ? 0x4000_0000_0000_0000 : 0x5000_0000_0000_0000
   }
 }
 
@@ -608,11 +405,7 @@
   @inlinable
   internal var isImmortal: Bool {
     @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _variant.isImmortal
-#else
-      return (objectRawBits & 0x8000_0000_0000_0000) != 0
-#endif
+      return (discriminatedObjectRawBits & 0x8000_0000_0000_0000) != 0
     }
   }
 
@@ -624,11 +417,7 @@
   @inlinable
   internal var isSmall: Bool {
     @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _discriminator.isSmall
-#else
-      return (objectRawBits & 0x2000_0000_0000_0000) != 0
-#endif
+      return (discriminatedObjectRawBits & 0x2000_0000_0000_0000) != 0
     }
   }
 
@@ -644,11 +433,7 @@
   @inlinable
   internal var providesFastUTF8: Bool {
     @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _discriminator.providesFastUTF8
-#else
-      return (objectRawBits & 0x1000_0000_0000_0000) == 0
-#endif
+      return (discriminatedObjectRawBits & 0x1000_0000_0000_0000) == 0
     }
   }
 
@@ -657,63 +442,48 @@
     @inline(__always) get { return !providesFastUTF8 }
   }
 
-  // Whether we are a mortal, native string
-  @inlinable
+  // Whether we are native or shared, i.e. we have a backing class which
+  // conforms to `_AbstractStringStorage`
+  @inline(__always)
+  internal var hasStorage: Bool {
+    return (discriminatedObjectRawBits & 0xF000_0000_0000_0000) == 0
+  }
+
+  // Whether we are a mortal, native (tail-allocated) string
+  @inline(__always)
   internal var hasNativeStorage: Bool {
-    @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _discriminator.hasNativeStorage
-#else
-      return (objectRawBits & 0xF800_0000_0000_0000) == 0
-#endif
-    }
+    // b61 on the object means isSmall, and on countAndFlags means
+    // isNativelyStored. We just need to check that b61 is 0 on the object and 1
+    // on countAndFlags.
+    let bits = ~discriminatedObjectRawBits & self._countAndFlagsBits
+    let result = bits & 0x2000_0000_0000_0000 != 0
+    _internalInvariant(!result || hasStorage, "native storage needs storage")
+    return result
   }
 
   // Whether we are a mortal, shared string (managed by Swift runtime)
-  internal var hasSharedStorage: Bool {
-    @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _discriminator.hasSharedStorage
-#else
-      return (objectRawBits & 0xF800_0000_0000_0000)
-        == Nibbles.largeSharedMortal()
-#endif
-    }
-  }
+  internal var hasSharedStorage: Bool { return hasStorage && !hasNativeStorage }
 }
 
 // Queries conditional on being in a large or fast form.
 extension _StringObject {
-  // Whether this string is native, presupposing it is both large and fast
-  @inlinable
-  internal var largeFastIsNative: Bool {
-    @inline(__always) get {
-      _internalInvariant(isLarge && providesFastUTF8)
-#if arch(i386) || arch(arm)
-      return _discriminator.largeFastIsNative
-#else
-      return (objectRawBits & 0x0800_0000_0000_0000) == 0
-#endif
-    }
+  // Whether this string is native, i.e. tail-allocated and nul-terminated,
+  // presupposing it is both large and fast
+  @inlinable @inline(__always)
+  internal var largeFastIsTailAllocated: Bool {
+    _internalInvariant(isLarge && providesFastUTF8)
+    return _countAndFlags.isTailAllocated
   }
 
   // Whether this string is shared, presupposing it is both large and fast
-  @inlinable
-  internal var largeFastIsShared: Bool {
-    @inline(__always) get { return !largeFastIsNative }
-  }
+  @inline(__always)
+  internal var largeFastIsShared: Bool { return !largeFastIsTailAllocated }
 
   // Whether this string is a lazily-bridged NSString, presupposing it is large
-  @inlinable
+  @inline(__always)
   internal var largeIsCocoa: Bool {
-    @inline(__always) get {
-      _internalInvariant(isLarge)
-#if arch(i386) || arch(arm)
-      return _discriminator.largeIsCocoa
-#else
-      return (objectRawBits & 0x4000_0000_0000_0000) != 0
-#endif
-    }
+    _internalInvariant(isLarge)
+    return (discriminatedObjectRawBits & 0x4000_0000_0000_0000) != 0
   }
 }
 
@@ -746,60 +516,70 @@
 
  */
 extension _StringObject {
+#if arch(i386) || arch(arm)
+  @inlinable @inline(__always)
+  internal init(_ small: _SmallString) {
+    // On 32-bit, we need to unpack the small string.
+    let (word1, word2) = small.rawBits
+    let smallStringDiscriminatorAndCount: UInt64 = 0xFF00_0000_0000_0000
+
+    let leadingFour = Int(truncatingIfNeeded: word1)
+    let nextFour = UInt(truncatingIfNeeded: word1 &>> 32)
+    let smallDiscriminatorAndCount = word2 & smallStringDiscriminatorAndCount
+    let trailingTwo = UInt16(truncatingIfNeeded: word2)
+    self.init(
+      count: leadingFour,
+      variant: .immortal(nextFour),
+      discriminator: smallDiscriminatorAndCount,
+      flags: trailingTwo)
+    _internalInvariant(isSmall)
+  }
+#else
+  @inlinable @inline(__always)
+  internal init(_ small: _SmallString) {
+    self.init(rawValue: small.rawBits)
+    _internalInvariant(isSmall)
+  }
+#endif
+
+  @inlinable
+  internal static func getSmallCount(fromRaw x: UInt64) -> Int {
+    return Int(truncatingIfNeeded: (x & 0x0F00_0000_0000_0000) &>> 56)
+  }
+
   @inlinable
   internal var smallCount: Int {
     @inline(__always)
     get {
       _internalInvariant(isSmall)
-      return discriminator.smallCount
+      return _StringObject.getSmallCount(fromRaw: discriminatedObjectRawBits)
     }
   }
 
   @inlinable
+  internal static func getSmallIsASCII(fromRaw x: UInt64) -> Bool {
+    return x & 0x4000_0000_0000_0000 != 0
+  }
+  @inlinable
   internal var smallIsASCII: Bool {
     @inline(__always)
     get {
       _internalInvariant(isSmall)
-#if arch(i386) || arch(arm)
-      return _discriminator.smallIsASCII
-#else
-      return objectRawBits & 0x4000_0000_0000_0000 != 0
-#endif
+      return _StringObject.getSmallIsASCII(fromRaw: discriminatedObjectRawBits)
     }
   }
 
   @inlinable @inline(__always)
-  internal init(_ small: _SmallString) {
-#if arch(i386) || arch(arm)
-    let (word1, word2) = small.rawBits
-    let countBits = Int(truncatingIfNeeded: word1)
-    let variantBits = UInt(truncatingIfNeeded: word1 &>> 32)
-    let flagBits = UInt16(truncatingIfNeeded: word2)
-    let discriminatorBits = UInt8(truncatingIfNeeded: word2 &>> 56)
-    _internalInvariant(discriminatorBits & 0xA0 == 0xA0)
-    self.init(
-      count: countBits,
-      variant: .immortal(variantBits),
-      discriminator: Discriminator(discriminatorBits),
-      flags: Flags(flagBits)
-    )
-#else
-    self.init(rawValue: small.rawBits)
-#endif
-    _internalInvariant(isSmall)
-  }
-
-  @inlinable @inline(__always)
   internal init(empty:()) {
     // Canonical empty pattern: small zero-length string
 #if arch(i386) || arch(arm)
     self.init(
       count: 0,
       variant: .immortal(0),
-      discriminator: .empty,
-      flags: Flags(0))
+      discriminator: Nibbles.emptyString,
+      flags: 0)
 #else
-    self._countAndFlags = CountAndFlags(zero:())
+    self._countAndFlagsBits = 0
     self._object = Builtin.valueToBridgeObject(Nibbles.emptyString._value)
 #endif
     _internalInvariant(self.smallCount == 0)
@@ -820,102 +600,169 @@
  efficiently on this particular string, and the lower 48 are the code unit
  count (aka endIndex).
 
-┌─────────┬───────┬────────┬───────┐
-│   b63   │  b62  │ b61:48 │ b47:0 │
-├─────────┼───────┼────────┼───────┤
-│ isASCII │ isNFC │ TBD    │ count │
-└─────────┴───────┴────────┴───────┘
+┌─────────┬───────┬──────────────────┬─────────────────┬────────┬───────┐
+│   b63   │  b62  │       b61        │       b60       │ b59:48 │ b47:0 │
+├─────────┼───────┼──────────────────┼─────────────────┼────────┼───────┤
+│ isASCII │ isNFC │ isNativelyStored │ isTailAllocated │  TBD   │ count │
+└─────────┴───────┴──────────────────┴─────────────────┴────────┴───────┘
 
  isASCII: set when all code units are known to be ASCII, enabling:
    - Trivial Unicode scalars, they're just the code units
    - Trivial UTF-16 transcoding (just bit-extend)
    - Also, isASCII always implies isNFC
- isNFC: set when the contents are in normal form C, enable:
-   - Trivial lexicographical comparisons: just memcmp
+ isNFC: set when the contents are in normal form C
+   - Enables trivial lexicographical comparisons: just memcmp
+   - `isASCII` always implies `isNFC`, but not vice versa
+ isNativelyStored: set for native stored strings
+   - `largeAddressBits` holds an instance of `_StringStorage`.
+   - I.e. the start of the code units is at the stored address + `nativeBias`
+ isTailAllocated: start of the code units is at the stored address + `nativeBias`
+   - `isNativelyStored` always implies `isTailAllocated`, but not vice versa
+      (e.g. literals)
+ TBD: Reserved for future usage
+   - Setting a TBD bit to 1 must be semantically equivalent to 0
+   - I.e. it can only be used to "cache" fast-path information in the future
+ count: stores the number of code units, corresponds to `endIndex`.
 
- Allocation of more performance flags is TBD, un-used bits will be reserved for
- future use. Count stores the number of code units: corresponds to `endIndex`.
+ NOTE: isNativelyStored is *specifically* allocated to b61 to align with the
+ bit-position of isSmall on the BridgeObject. This allows us to check for
+ native storage without an extra branch guarding against smallness. See
+ `_StringObject.hasNativeStorage` for this usage.
 
 */
-#if arch(i386) || arch(arm)
-extension _StringObject.Flags {
-  @inlinable
-  internal var isASCII: Bool {
-    @inline(__always) get {
-      return _value & 0x8000 != 0
-    }
-  }
-
-  @inlinable
-  internal var isNFC: Bool {
-    @inline(__always) get {
-      return _value & 0x4000 != 0
-    }
-  }
-
-  @inlinable @inline(__always)
-  init(isASCII: Bool) {
-    // ASCII also entails NFC
-    self._value = isASCII ? 0xC000 : 0x0000
-  }
-
-  #if !INTERNAL_CHECKS_ENABLED
-  @inlinable @inline(__always) internal func _invariantCheck() {}
-  #else
-  @usableFromInline @inline(never) @_effects(releasenone)
-  internal func _invariantCheck() {
-    if isASCII {
-      _internalInvariant(isNFC)
-    }
-  }
-  #endif // INTERNAL_CHECKS_ENABLED
-}
-#else
 extension _StringObject.CountAndFlags {
   @inlinable @inline(__always)
-  internal init(count: Int) {
-    self.init(zero:())
-    self.count = count
-    _invariantCheck()
+  internal static var countMask: UInt64 { return 0x0000_FFFF_FFFF_FFFF }
+
+  @inlinable @inline(__always)
+  internal static var flagsMask: UInt64 { return ~countMask }
+
+  @inlinable @inline(__always)
+  internal static var isASCIIMask: UInt64 { return 0x8000_0000_0000_0000 }
+
+  @inlinable @inline(__always)
+  internal static var isNFCMask: UInt64 { return 0x4000_0000_0000_0000 }
+
+  @inlinable @inline(__always)
+  internal static var isNativelyStoredMask: UInt64 {
+    return 0x2000_0000_0000_0000
   }
 
   @inlinable @inline(__always)
-  internal init(count: Int, isASCII: Bool) {
-    self.init(zero:())
-    self.count = count
+  internal static var isTailAllocatedMask: UInt64 {
+    return 0x1000_0000_0000_0000
+  }
+
+  // General purpose bottom initializer
+  @inlinable @inline(__always)
+  internal init(
+    count: Int,
+    isASCII: Bool,
+    isNFC: Bool,
+    isNativelyStored: Bool,
+    isTailAllocated: Bool
+  ) {
+    var rawBits = UInt64(truncatingIfNeeded: count)
+    _internalInvariant(rawBits <= _StringObject.CountAndFlags.countMask)
+
     if isASCII {
-      // ASCII implies NFC
-      self._storage |= 0xC000_0000_0000_0000
+      _internalInvariant(isNFC)
+      rawBits |= _StringObject.CountAndFlags.isASCIIMask
     }
-    _invariantCheck()
+
+    if isNFC {
+      rawBits |= _StringObject.CountAndFlags.isNFCMask
+    }
+
+    if isNativelyStored {
+      _internalInvariant(isTailAllocated)
+      rawBits |= _StringObject.CountAndFlags.isNativelyStoredMask
+    }
+
+    if isTailAllocated {
+      rawBits |= _StringObject.CountAndFlags.isTailAllocatedMask
+    }
+
+    self.init(raw: rawBits)
+    _internalInvariant(count == self.count)
+    _internalInvariant(isASCII == self.isASCII)
+    _internalInvariant(isNFC == self.isNFC)
+    _internalInvariant(isNativelyStored == self.isNativelyStored)
+    _internalInvariant(isTailAllocated == self.isTailAllocated)
   }
 
-  @inlinable
-  internal var countMask: UInt {
-    @inline(__always) get {
-     return 0x0000_FFFF_FFFF_FFFF
-    }
+  @inlinable @inline(__always)
+  internal init(count: Int, flags: UInt16) {
+    // Currently, we only use top 4 flags
+    _internalInvariant(flags & 0xF000 == flags)
+
+    let rawBits = UInt64(truncatingIfNeeded: flags) &<< 48
+                | UInt64(truncatingIfNeeded: count)
+    self.init(raw: rawBits)
+    _internalInvariant(self.count == count && self.flags == flags)
   }
 
-  @inlinable
-  internal var flagsMask: UInt { @inline(__always) get { return ~countMask} }
+  //
+  // Specialized initializers
+  //
+  @inlinable @inline(__always)
+  internal init(immortalCount: Int, isASCII: Bool) {
+    self.init(
+      count: immortalCount,
+      isASCII: isASCII,
+      isNFC: isASCII,
+      isNativelyStored: false,
+      isTailAllocated: true)
+  }
+  @inline(__always)
+  internal init(mortalCount: Int, isASCII: Bool) {
+    self.init(
+      count: mortalCount,
+      isASCII: isASCII,
+      isNFC: isASCII,
+      isNativelyStored: true,
+      isTailAllocated: true)
+  }
+  @inline(__always)
+  internal init(sharedCount: Int, isASCII: Bool) {
+    self.init(
+      count: sharedCount,
+      isASCII: isASCII,
+      isNFC: isASCII,
+      isNativelyStored: false,
+      isTailAllocated: false)
+  }
 
-  @inlinable
+  //
+  // Queries and accessors
+  //
+
+  @inlinable @inline(__always)
   internal var count: Int {
-    @inline(__always) get { return Int(bitPattern: _storage & countMask) }
-    @inline(__always) set {
-      _internalInvariant(newValue <= countMask, "too large")
-      _storage = (_storage & flagsMask) | UInt(bitPattern: newValue)
-    }
+    return Int(
+      truncatingIfNeeded: _storage & _StringObject.CountAndFlags.countMask)
   }
 
-  @inlinable
-  internal var isASCII: Bool {
-    return 0 != _storage & 0x8000_0000_0000_0000
+  @inlinable @inline(__always)
+  internal var flags: UInt16 {
+    return UInt16(truncatingIfNeeded: _storage &>> 48)
   }
-  @inlinable
+
+  @inlinable @inline(__always)
+  internal var isASCII: Bool {
+    return 0 != _storage & _StringObject.CountAndFlags.isASCIIMask
+  }
+  @inlinable @inline(__always)
   internal var isNFC: Bool {
-    return 0 != _storage & 0x4000_0000_0000_0000
+    return 0 != _storage & _StringObject.CountAndFlags.isNFCMask
+  }
+  @inlinable @inline(__always)
+  internal var isNativelyStored: Bool {
+    return 0 != _storage & _StringObject.CountAndFlags.isNativelyStoredMask
+  }
+  @inlinable @inline(__always)
+  internal var isTailAllocated: Bool {
+    return 0 != _storage & _StringObject.CountAndFlags.isTailAllocatedMask
   }
 
   #if !INTERNAL_CHECKS_ENABLED
@@ -926,47 +773,34 @@
     if isASCII {
       _internalInvariant(isNFC)
     }
+    if isNativelyStored {
+      _internalInvariant(isTailAllocated)
+    }
   }
   #endif // INTERNAL_CHECKS_ENABLED
 }
-#endif
-
 
 // Extract
 extension _StringObject {
-  @inlinable
+  @inlinable @inline(__always)
   internal var largeCount: Int {
-    @inline(__always) get {
-      _internalInvariant(isLarge)
-#if arch(i386) || arch(arm)
-      return _count
-#else
-      return _countAndFlags.count
-#endif
-    }
-    @inline(__always) set {
-#if arch(i386) || arch(arm)
-      _count = newValue
-#else
-      _countAndFlags.count = newValue
-#endif
-      _internalInvariant(newValue == largeCount)
-      _invariantCheck()
-    }
+    _internalInvariant(isLarge)
+    return _countAndFlags.count
   }
 
   @inlinable
   internal var largeAddressBits: UInt {
     @inline(__always) get {
       _internalInvariant(isLarge)
-      return undiscriminatedObjectRawBits
+      return UInt(truncatingIfNeeded:
+        discriminatedObjectRawBits & Nibbles.largeAddressMask)
     }
   }
 
   @inlinable
   internal var nativeUTF8Start: UnsafePointer<UInt8> {
     @inline(__always) get {
-      _internalInvariant(largeFastIsNative)
+      _internalInvariant(largeFastIsTailAllocated)
       return UnsafePointer(
         bitPattern: largeAddressBits &+ _StringObject.nativeBias
       )._unsafelyUnwrappedUnchecked
@@ -976,7 +810,7 @@
   @inlinable
   internal var nativeUTF8: UnsafeBufferPointer<UInt8> {
     @inline(__always) get {
-      _internalInvariant(largeFastIsNative)
+      _internalInvariant(largeFastIsTailAllocated)
       return UnsafeBufferPointer(start: nativeUTF8Start, count: largeCount)
     }
   }
@@ -1065,42 +899,30 @@
   internal var isASCII: Bool {
     @inline(__always) get {
       if isSmall { return smallIsASCII }
-#if arch(i386) || arch(arm)
-      return _flags.isASCII
-#else
       return _countAndFlags.isASCII
-#endif
     }
   }
 
-  @inlinable
+  @inline(__always)
   internal var isNFC: Bool {
-    @inline(__always) get {
-      if isSmall {
-        // TODO(String performance): Worth implementing more sophisiticated
-        // check, or else performing normalization on- construction. For now,
-        // approximate it with isASCII
-        return smallIsASCII
-      }
-#if arch(i386) || arch(arm)
-      return _flags.isNFC
-#else
-      return _countAndFlags.isNFC
-#endif
+    if isSmall {
+      // TODO(String performance): Worth implementing more sophisiticated
+      // check, or else performing normalization on- construction. For now,
+      // approximate it with isASCII
+      return smallIsASCII
     }
+    return _countAndFlags.isNFC
   }
 
   // Get access to fast UTF-8 contents for large strings which provide it.
-  @inlinable
+  @inlinable @inline(__always)
   internal var fastUTF8: UnsafeBufferPointer<UInt8> {
-    @inline(__always) get {
-      _internalInvariant(self.isLarge && self.providesFastUTF8)
-      if _slowPath(self.largeFastIsShared) {
-        return sharedUTF8
-      }
-      return UnsafeBufferPointer(
-        start: self.nativeUTF8Start, count: self.largeCount)
+    _internalInvariant(self.isLarge && self.providesFastUTF8)
+    guard _fastPath(self.largeFastIsTailAllocated) else {
+      return sharedUTF8
     }
+    return UnsafeBufferPointer(
+      start: self.nativeUTF8Start, count: self.largeCount)
   }
 
   // Whether the object stored can be bridged directly as a NSString
@@ -1113,12 +935,10 @@
   }
 
   // Fetch the stored subclass of NSString for bridging
-  @inlinable
+  @inline(__always)
   internal var objCBridgeableObject: AnyObject {
-    @inline(__always) get {
-      _internalInvariant(hasObjCBridgeableObject)
-      return Builtin.reinterpretCast(largeAddressBits)
-    }
+    _internalInvariant(hasObjCBridgeableObject)
+    return Builtin.reinterpretCast(largeAddressBits)
   }
 
   // Whether the object provides fast UTF-8 contents that are nul-terminated
@@ -1133,7 +953,7 @@
     // inclusive. For now, we only know native strings and small strings (when
     // accessed) are. We could also know about some shared strings.
 
-    return largeFastIsNative
+    return largeFastIsTailAllocated
   }
 }
 
@@ -1141,18 +961,18 @@
 extension _StringObject {
   @inlinable @inline(__always)
   internal init(immortal bufPtr: UnsafeBufferPointer<UInt8>, isASCII: Bool) {
+    let countAndFlags = CountAndFlags(
+      immortalCount: bufPtr.count, isASCII: isASCII)
 #if arch(i386) || arch(arm)
     self.init(
-      count: bufPtr.count,
       variant: .immortal(start: bufPtr.baseAddress._unsafelyUnwrappedUnchecked),
-      discriminator: .largeImmortal(),
-      flags: Flags(isASCII: isASCII))
+      discriminator: Nibbles.largeImmortal(),
+      countAndFlags: countAndFlags)
 #else
     // We bias to align code paths for mortal and immortal strings
     let biasedAddress = UInt(
       bitPattern: bufPtr.baseAddress._unsafelyUnwrappedUnchecked
     ) &- _StringObject.nativeBias
-    let countAndFlags = CountAndFlags(count: bufPtr.count, isASCII: isASCII)
 
     self.init(
       pointerBits: UInt64(truncatingIfNeeded: biasedAddress),
@@ -1165,10 +985,9 @@
   internal init(_ storage: _StringStorage) {
 #if arch(i386) || arch(arm)
     self.init(
-      count: storage._count,
       variant: .native(storage),
-      discriminator: .largeMortal(),
-      flags: storage._flags)
+      discriminator: Nibbles.largeMortal(),
+      countAndFlags: storage._countAndFlags)
 #else
     self.init(
       object: storage,
@@ -1177,17 +996,16 @@
 #endif
   }
 
-  internal init(_ storage: _SharedStringStorage, isASCII: Bool) {
+  internal init(_ storage: _SharedStringStorage) {
 #if arch(i386) || arch(arm)
     self.init(
-      count: storage._count,
       variant: .native(storage),
-      discriminator: .largeSharedMortal(),
-      flags: storage._flags)
+      discriminator: Nibbles.largeMortal(),
+      countAndFlags: storage._countAndFlags)
 #else
     self.init(
       object: storage,
-      discriminator: Nibbles.largeSharedMortal(),
+      discriminator: Nibbles.largeMortal(),
       countAndFlags: storage._countAndFlags)
 #endif
   }
@@ -1195,15 +1013,14 @@
   internal init(
     cocoa: AnyObject, providesFastUTF8: Bool, isASCII: Bool, length: Int
   ) {
+    let countAndFlags = CountAndFlags(sharedCount: length, isASCII: isASCII)
+    let discriminator = Nibbles.largeCocoa(providesFastUTF8: providesFastUTF8)
 #if arch(i386) || arch(arm)
     self.init(
-      count: length,
       variant: .bridged(cocoa),
-      discriminator: .largeCocoa(providesFastUTF8: providesFastUTF8),
-      flags: Flags(isASCII: isASCII))
+      discriminator: discriminator,
+      countAndFlags: countAndFlags)
 #else
-    let countAndFlags = CountAndFlags(count: length, isASCII: isASCII)
-    let discriminator = Nibbles.largeCocoa(providesFastUTF8: providesFastUTF8)
     self.init(
       object: cocoa, discriminator: discriminator, countAndFlags: countAndFlags)
     _internalInvariant(self.largeAddressBits == Builtin.reinterpretCast(cocoa))
@@ -1228,6 +1045,15 @@
     _internalInvariant(MemoryLayout<_StringObject?>.size == 12)
     _internalInvariant(MemoryLayout<_StringObject?>.stride == 12)
     _internalInvariant(MemoryLayout<_StringObject?>.alignment == 4)
+
+    // Non-small-string discriminators are 4 high bits only. Small strings use
+    // the next 4 for count.
+    if isSmall {
+      _internalInvariant(_discriminator & 0xA0 == 0xA0)
+    } else {
+      _internalInvariant(_discriminator & 0x0F == 0)
+    }
+
     #else
     _internalInvariant(MemoryLayout<_StringObject>.size == 16)
 
@@ -1246,15 +1072,18 @@
     } else {
       _internalInvariant(isLarge)
       _internalInvariant(largeCount == count)
-      if providesFastUTF8 && largeFastIsNative {
+      if providesFastUTF8 && largeFastIsTailAllocated {
         _internalInvariant(!isSmall)
         _internalInvariant(!largeIsCocoa)
+        _internalInvariant(_countAndFlags.isTailAllocated)
 
         if isImmortal {
           _internalInvariant(!hasNativeStorage)
           _internalInvariant(!hasObjCBridgeableObject)
+          _internalInvariant(!_countAndFlags.isNativelyStored)
         } else {
           _internalInvariant(hasNativeStorage)
+          _internalInvariant(_countAndFlags.isNativelyStored)
           _internalInvariant(hasObjCBridgeableObject)
           _internalInvariant(nativeStorage.count == self.count)
         }
@@ -1262,13 +1091,19 @@
       if largeIsCocoa {
         _internalInvariant(hasObjCBridgeableObject)
         _internalInvariant(!isSmall)
+        _internalInvariant(!_countAndFlags.isNativelyStored)
+        _internalInvariant(!_countAndFlags.isTailAllocated)
         if isForeign {
-
         } else {
           _internalInvariant(largeFastIsShared)
         }
       }
+      if _countAndFlags.isNativelyStored {
+        let anyObj = Builtin.reinterpretCast(largeAddressBits) as AnyObject
+        _internalInvariant(anyObj is _StringStorage)
+      }
     }
+
     #if arch(i386) || arch(arm)
     switch _variant {
     case .immortal:
diff --git a/stdlib/public/core/StringStorage.swift b/stdlib/public/core/StringStorage.swift
index f454ca4..afb33ec 100644
--- a/stdlib/public/core/StringStorage.swift
+++ b/stdlib/public/core/StringStorage.swift
@@ -47,7 +47,7 @@
 
 // ObjC interfaces.
 #if _runtime(_ObjC)
-  
+
   @inline(__always)
   @_effects(releasenone)
   internal func _getCharacters(
@@ -57,7 +57,7 @@
                   "Range out of bounds")
     _precondition(aRange.location + aRange.length <= Int(count),
                   "Range out of bounds")
-    
+
     let range = Range(
       uncheckedBounds: (aRange.location, aRange.location+aRange.length))
     let str = asString
@@ -98,7 +98,7 @@
       return _cocoaCStringUsingEncodingTrampoline(self, encoding)
     }
   }
-  
+
   @_effects(readonly)
   internal func _nativeIsEqual<T:_AbstractStringStorage>(
     _ nativeOther: T
@@ -161,13 +161,10 @@
       return _cocoaStringCompare(self, other) == 0 ? 1 : 0
     }
   }
-  
+
 #endif //_runtime(_ObjC)
 }
 
-#if arch(i386) || arch(arm)
-private typealias Flags = _StringObject.Flags
-#endif
 private typealias CountAndFlags = _StringObject.CountAndFlags
 
 //
@@ -183,12 +180,15 @@
   // nul-terminator.
   internal var _realCapacity: Int
   internal var _count: Int
-  internal var _flags: _StringObject.Flags
+  internal var _flags: UInt16
   internal var _reserved: UInt16
 
-  internal var count: Int {
-    @inline(__always) get { return _count }
-    @inline(__always) set { _count = newValue }
+  @inline(__always)
+  internal var count: Int { return _count }
+
+  @inline(__always)
+  internal var _countAndFlags: _StringObject.CountAndFlags {
+    return CountAndFlags(count: _count, flags: _flags)
   }
 #else
   // The capacity of our allocation. Note that this includes the nul-terminator,
@@ -196,30 +196,20 @@
   internal var _realCapacityAndFlags: UInt64
   internal var _countAndFlags: _StringObject.CountAndFlags
 
-  internal var count: Int {
-    @inline(__always) get { return _countAndFlags.count }
-    @inline(__always) set { _countAndFlags.count = newValue }
-  }
+  @inline(__always)
+  internal var count: Int { return _countAndFlags.count }
 
   // The total allocated storage capacity. Note that this includes the required
   // nul-terminator.
+  @inline(__always)
   internal var _realCapacity: Int {
-    @inline(__always) get {
-      return Int(truncatingIfNeeded:
-        _realCapacityAndFlags & _StringObject.Nibbles.largeAddressMask)
-    }
+    return Int(truncatingIfNeeded:
+      _realCapacityAndFlags & CountAndFlags.countMask)
   }
 #endif
 
-  final internal var isASCII: Bool {
-    @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _flags.isASCII
-#else
-      return _countAndFlags.isASCII
-#endif
-    }
-  }
+  @inline(__always)
+  final internal var isASCII: Bool { return _countAndFlags.isASCII }
 
   final internal var asString: String {
     @_effects(readonly) @inline(__always) get {
@@ -228,7 +218,7 @@
   }
 
 #if _runtime(_ObjC)
-  
+
   @objc(length)
   final internal var length: Int {
     @_effects(readonly) @inline(__always) get {
@@ -271,7 +261,7 @@
     }
     return nil
   }
-  
+
   @objc(UTF8String)
   @_effects(readonly)
   final internal func _utf8String() -> UnsafePointer<UInt8>? {
@@ -283,7 +273,7 @@
   final internal func cString(encoding: UInt) -> UnsafePointer<UInt8>? {
     return _cString(encoding: encoding)
   }
-  
+
   @objc(getCString:maxLength:encoding:)
   @_effects(releasenone)
   final internal func getCString(
@@ -307,7 +297,7 @@
   final internal func isEqual(to other: AnyObject?) -> Int8 {
     return _isEqual(other)
   }
-  
+
   @objc(copyWithZone:)
   final internal func copy(with zone: _SwiftNSZone?) -> AnyObject {
     // While _StringStorage instances aren't immutable in general,
@@ -406,12 +396,8 @@
     capacity: Int,
     isASCII: Bool
   ) -> _StringStorage {
-#if arch(i386) || arch(arm)
-    let flags = Flags(isASCII: isASCII)
-    let countAndFlags = CountAndFlags(count: bufPtr.count, flags: flags)
-#else
-    let countAndFlags = CountAndFlags(count: bufPtr.count, isASCII: isASCII)
-#endif
+    let countAndFlags = CountAndFlags(
+      mortalCount: bufPtr.count, isASCII: isASCII)
     _internalInvariant(capacity >= bufPtr.count)
     let storage = _StringStorage.create(
       capacity: capacity, countAndFlags: countAndFlags)
@@ -432,19 +418,17 @@
 
 // Usage
 extension _StringStorage {
-  @inlinable
-  internal var mutableStart: UnsafeMutablePointer<UInt8> {
-    @inline(__always) get {
-      return UnsafeMutablePointer(Builtin.projectTailElems(self, UInt8.self))
-    }
+  @inline(__always)
+  private var mutableStart: UnsafeMutablePointer<UInt8> {
+    return UnsafeMutablePointer(Builtin.projectTailElems(self, UInt8.self))
   }
   private var mutableEnd: UnsafeMutablePointer<UInt8> {
     @inline(__always) get { return mutableStart + count }
   }
 
-  @inlinable
+  @inline(__always)
   internal var start: UnsafePointer<UInt8> {
-    @inline(__always) get { return UnsafePointer(mutableStart) }
+     return UnsafePointer(mutableStart)
   }
 
   private final var end: UnsafePointer<UInt8> {
@@ -507,17 +491,15 @@
     _internalInvariant(self._realCapacity > self.count, "no room for nul-terminator")
     _internalInvariant(self.terminator.pointee == 0, "not nul terminated")
 
-#if arch(i386) || arch(arm)
-    _flags._invariantCheck()
-#else
     _countAndFlags._invariantCheck()
-#endif
     if isASCII {
       _internalInvariant(_allASCII(self.codeUnits))
     }
     if let crumbs = _breadcrumbsAddress.pointee {
       crumbs._invariantCheck(for: self.asString)
     }
+    _internalInvariant(_countAndFlags.isNativelyStored)
+    _internalInvariant(_countAndFlags.isTailAllocated)
   }
   #endif // INTERNAL_CHECKS_ENABLED
 }
@@ -527,12 +509,13 @@
   // Perform common post-RRC adjustments and invariant enforcement.
   @_effects(releasenone)
   private func _postRRCAdjust(newCount: Int, newIsASCII: Bool) {
+    let countAndFlags = CountAndFlags(
+      mortalCount: newCount, isASCII: newIsASCII)
 #if arch(i386) || arch(arm)
-    self._count = newCount
-    self._flags = Flags(isASCII: newIsASCII)
+    self._count = countAndFlags.count
+    self._flags = countAndFlags.flags
 #else
-    self._countAndFlags = CountAndFlags(
-      count: newCount, isASCII: newIsASCII)
+    self._countAndFlags = countAndFlags
 #endif
     self.terminator.pointee = 0
 
@@ -671,13 +654,11 @@
 
 #if arch(i386) || arch(arm)
   internal var _count: Int
-  internal var _flags: _StringObject.Flags
+  internal var _flags: UInt16
 
-  @inlinable
+  @inline(__always)
   internal var _countAndFlags: _StringObject.CountAndFlags {
-    @inline(__always) get {
-      return CountAndFlags(count: _count, flags: _flags)
-    }
+    return CountAndFlags(count: _count, flags: _flags)
   }
 #else
   internal var _countAndFlags: _StringObject.CountAndFlags
@@ -685,15 +666,7 @@
 
   internal var _breadcrumbs: _StringBreadcrumbs? = nil
 
-  internal var count: Int {
-    @_effects(readonly) @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _count
-#else
-      return _countAndFlags.count
-#endif
-    }
-  }
+  internal var count: Int { return _countAndFlags.count }
 
   internal init(
     immortal ptr: UnsafePointer<UInt8>,
@@ -710,16 +683,9 @@
     super.init()
     self._invariantCheck()
   }
-  
-  final internal var isASCII: Bool {
-    @inline(__always) get {
-#if arch(i386) || arch(arm)
-      return _flags.isASCII
-#else
-      return _countAndFlags.isASCII
-#endif
-    }
-  }
+
+  @inline(__always)
+  final internal var isASCII: Bool { return _countAndFlags.isASCII }
 
   final internal var asString: String {
     @_effects(readonly) @inline(__always) get {
@@ -728,14 +694,14 @@
   }
 
 #if _runtime(_ObjC)
-  
+
   @objc(length)
   final internal var length: Int {
     @_effects(readonly) get {
       return asString.utf16.count // UTF16View special-cases ASCII for us.
     }
   }
-  
+
   @objc
   final internal var hash: UInt {
     @_effects(readonly) get {
@@ -745,14 +711,14 @@
       return _cocoaHashString(self)
     }
   }
-  
+
   @objc(characterAtIndex:)
   @_effects(readonly)
   final internal func character(at offset: Int) -> UInt16 {
     let str = asString
     return str.utf16[str._toUTF16Index(offset)]
   }
-  
+
   @objc(getCharacters:range:)
   @_effects(releasenone)
   final internal func getCharacters(
@@ -760,7 +726,7 @@
   ) {
     _getCharacters(buffer, aRange)
   }
-  
+
   @objc
   final internal var fastestEncoding: UInt {
     @_effects(readonly) get {
@@ -770,7 +736,7 @@
       return _cocoaUTF8Encoding
     }
   }
-  
+
   @objc(_fastCStringContents:)
   @_effects(readonly)
   final internal func _fastCStringContents(
@@ -781,7 +747,7 @@
     }
     return nil
   }
-  
+
   @objc(UTF8String)
   @_effects(readonly)
   final internal func _utf8String() -> UnsafePointer<UInt8>? {
@@ -793,7 +759,7 @@
   final internal func cString(encoding: UInt) -> UnsafePointer<UInt8>? {
     return _cString(encoding: encoding)
   }
-  
+
   @objc(getCString:maxLength:encoding:)
   @_effects(releasenone)
   final internal func getCString(
@@ -807,7 +773,7 @@
   final internal func isEqual(to other:AnyObject?) -> Int8 {
     return _isEqual(other)
   }
-  
+
   @objc(copyWithZone:)
   final internal func copy(with zone: _SwiftNSZone?) -> AnyObject {
     // While _StringStorage instances aren't immutable in general,
@@ -831,6 +797,8 @@
       crumbs._invariantCheck(for: self.asString)
     }
     _countAndFlags._invariantCheck()
+    _internalInvariant(!_countAndFlags.isNativelyStored)
+    _internalInvariant(!_countAndFlags.isTailAllocated)
   }
 #endif // INTERNAL_CHECKS_ENABLED
 }
diff --git a/stdlib/public/core/StringTesting.swift b/stdlib/public/core/StringTesting.swift
index 0fccea1..dee9f7b 100644
--- a/stdlib/public/core/StringTesting.swift
+++ b/stdlib/public/core/StringTesting.swift
@@ -60,13 +60,13 @@
 
     // TODO: shared native
     _internalInvariant(_object.providesFastUTF8)
-    _internalInvariant(_object.largeFastIsNative)
     if _object.isImmortal {
       result._form = ._immortal(
         address: UInt(bitPattern: _object.nativeUTF8Start))
       return result
     }
     if _object.hasNativeStorage {
+      _internalInvariant(_object.largeFastIsTailAllocated)
       result._form = ._native(object: _object.nativeStorage)
       return result
     }
diff --git a/stdlib/public/runtime/Demangle.cpp b/stdlib/public/runtime/Demangle.cpp
index 7b14ea3..91cb2f1 100644
--- a/stdlib/public/runtime/Demangle.cpp
+++ b/stdlib/public/runtime/Demangle.cpp
@@ -46,6 +46,9 @@
     [&](const ContextDescriptor *context) -> NodePointer {
       if (demangledGenerics.empty())
         return nullptr;
+
+      if (context->getKind() == ContextDescriptorKind::Anonymous)
+        return nullptr;
       
       auto generics = context->getGenericContext();
       if (!generics)
diff --git a/stdlib/public/runtime/MetadataLookup.cpp b/stdlib/public/runtime/MetadataLookup.cpp
index c677617..6f511cc 100644
--- a/stdlib/public/runtime/MetadataLookup.cpp
+++ b/stdlib/public/runtime/MetadataLookup.cpp
@@ -231,13 +231,13 @@
 /// Find the context descriptor for the type extended by the given extension.
 static const ContextDescriptor *
 _findExtendedTypeContextDescriptor(const ExtensionContextDescriptor *extension,
+                                   Demangler &demangler,
                                    Demangle::NodePointer *demangledNode
                                      = nullptr) {
   Demangle::NodePointer localNode;
   Demangle::NodePointer &node = demangledNode ? *demangledNode : localNode;
 
   auto mangledName = extension->getMangledExtendedContext();
-  auto demangler = getDemanglerForRuntimeTypeResolution();
   node = demangler.demangleType(mangledName);
   if (!node)
     return nullptr;
@@ -423,7 +423,7 @@
 
       Demangle::NodePointer extendedContextDemangled;
       auto extendedDescriptorFromDemangled =
-        _findExtendedTypeContextDescriptor(extension,
+        _findExtendedTypeContextDescriptor(extension, demangler,
                                            &extendedContextDemangled);
 
       // Determine whether the contexts match.
@@ -822,8 +822,10 @@
                                  std::vector<unsigned> &genericParamCounts) {
   // If we have an extension descriptor, extract the extended type and use
   // that.
+  auto demangler = getDemanglerForRuntimeTypeResolution();
   if (auto extension = dyn_cast<ExtensionContextDescriptor>(descriptor)) {
-    if (auto extendedType = _findExtendedTypeContextDescriptor(extension))
+    if (auto extendedType =
+            _findExtendedTypeContextDescriptor(extension, demangler))
       descriptor = extendedType;
   }
 
diff --git a/stdlib/public/runtime/SwiftObject.mm b/stdlib/public/runtime/SwiftObject.mm
index cfb589b..5ed874c 100644
--- a/stdlib/public/runtime/SwiftObject.mm
+++ b/stdlib/public/runtime/SwiftObject.mm
@@ -893,6 +893,9 @@
 
 UnownedReference *swift::swift_unknownObjectUnownedInit(UnownedReference *dest,
                                                         void *value) {
+  // Note that LLDB also needs to know about the memory layout of unowned
+  // references. The implementation here needs to be kept in sync with
+  // lldb_private::SwiftLanguagueRuntime.
   if (!value) {
     dest->Value = nullptr;
   } else if (isObjCForUnownedReference(value)) {
diff --git a/stdlib/public/stubs/CommandLine.cpp b/stdlib/public/stubs/CommandLine.cpp
index f206c50..88ae419 100644
--- a/stdlib/public/stubs/CommandLine.cpp
+++ b/stdlib/public/stubs/CommandLine.cpp
@@ -29,6 +29,12 @@
 #include "../SwiftShims/RuntimeStubs.h"
 #include "../SwiftShims/GlobalObjects.h"
 
+#if defined(_WIN32)
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#include <shellapi.h>
+#endif
+
 // Backing storage for overrides of `Swift.CommandLine.arguments`.
 static char **_swift_stdlib_ProcessOverrideUnsafeArgv = nullptr;
 static int _swift_stdlib_ProcessOverrideUnsafeArgc = 0;
@@ -101,8 +107,53 @@
     return _swift_stdlib_ProcessOverrideUnsafeArgv;
   }
 
-  *outArgLen = __argc;
-  return __argv;
+  *outArgLen = 0;
+
+
+  LPWSTR *szArgList;
+  int nArgs;
+  szArgList = CommandLineToArgvW(GetCommandLineW(), &nArgs);
+  if (szArgList == nullptr)
+    return nullptr;
+
+  std::vector<char *> argv;
+  for (int i = 0; i < nArgs; ++i) {
+    int szBufferSize = WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS,
+                                           szArgList[i], -1, nullptr, 0,
+                                           nullptr, nullptr);
+    if (szBufferSize == 0) {
+      for (char *arg : argv)
+        free(arg);
+      return nullptr;
+    }
+
+    char *buffer = static_cast<char *>(calloc(static_cast<size_t>(szBufferSize),
+                                              sizeof(char)));
+    if (buffer == nullptr) {
+      for (char *arg : argv)
+        free(arg);
+      return nullptr;
+    }
+
+    if (!WideCharToMultiByte(CP_UTF8, WC_ERR_INVALID_CHARS, szArgList[i], -1,
+                             buffer, szBufferSize, nullptr, nullptr)) {
+      for (char *arg : argv)
+        free(arg);
+      return nullptr;
+    }
+
+    argv.push_back(buffer);
+  }
+
+  LocalFree(szArgList);
+
+  char **args = static_cast<char **>(calloc(argv.size() + 1, sizeof(char *)));
+  std::copy(argv.begin(), argv.end(), args);
+  args[argv.size()] = nullptr;
+
+  assert(argv.size() < INT_MAX && "overflow");
+  *outArgLen = static_cast<int>(argv.size());
+  return args;
 }
 #elif defined(__FreeBSD__)
 #include <errno.h>
diff --git a/test/APINotes/versioned.swift b/test/APINotes/versioned.swift
index ac8684b..761467f 100644
--- a/test/APINotes/versioned.swift
+++ b/test/APINotes/versioned.swift
@@ -251,14 +251,14 @@
 #if !swift(>=5)
 
 func useSwift4Name(_: ImportantCStruct) {}
-// CHECK-SILGEN-4: sil hidden @$s9versioned13useSwift4NameyySo11SomeCStructVF
+// CHECK-SILGEN-4: sil hidden [ossa] @$s9versioned13useSwift4NameyySo11SomeCStructVF
 
 func useNewlyNested(_: InnerInSwift5) {}
-// CHECK-SILGEN-4: sil hidden @$s9versioned14useNewlyNestedyySo13InnerInSwift5VF
+// CHECK-SILGEN-4: sil hidden [ossa] @$s9versioned14useNewlyNestedyySo13InnerInSwift5VF
 #endif
 
 func useSwift5Name(_: VeryImportantCStruct) {}
-// CHECK-SILGEN: sil hidden @$s9versioned13useSwift5NameyySo11SomeCStructVF
+// CHECK-SILGEN: sil hidden [ossa] @$s9versioned13useSwift5NameyySo11SomeCStructVF
 
 
 
diff --git a/test/ClangImporter/availability_returns_twice-msvc.swift b/test/ClangImporter/availability_returns_twice-msvc.swift
new file mode 100644
index 0000000..36bee94
--- /dev/null
+++ b/test/ClangImporter/availability_returns_twice-msvc.swift
@@ -0,0 +1,11 @@
+// RUN: %target-typecheck-verify-swift
+// REQUIRES: OS=windows-msvc
+
+import MSVCRT
+typealias JumpBuffer = _JBTYPE
+
+func test_unavailable_returns_twice_function() {
+  var x: JumpBuffer
+  _ = _setjmp(&x) // expected-error {{'_setjmp' is unavailable in Swift: Functions that return more than once are unavailable in swift}}
+}
+
diff --git a/test/ClangImporter/availability_returns_twice.swift b/test/ClangImporter/availability_returns_twice.swift
index 05de4ea..4c4d39a 100644
--- a/test/ClangImporter/availability_returns_twice.swift
+++ b/test/ClangImporter/availability_returns_twice.swift
@@ -1,4 +1,5 @@
 // RUN: %target-typecheck-verify-swift
+// UNSUPPORTED: OS=windows-msvc
 
 #if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
   import Darwin
@@ -6,9 +7,6 @@
 #elseif os(Android) || os(Cygwin) || os(FreeBSD) || os(Linux)
   import Glibc
   typealias JumpBuffer = jmp_buf
-#elseif os(Windows)
-  import MSVCRT
-  typealias JumpBuffer = jmp_buf
 #endif
 
 func test_unavailable_returns_twice_function() {
diff --git a/test/ClangImporter/nullability_silgen.swift b/test/ClangImporter/nullability_silgen.swift
index 07271b9..5f57d4c 100644
--- a/test/ClangImporter/nullability_silgen.swift
+++ b/test/ClangImporter/nullability_silgen.swift
@@ -9,7 +9,7 @@
 import Foundation
 
 // null_resettable properties.
-// CHECK-LABEL: sil hidden @$s18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18nullability_silgen18testNullResettable{{[_0-9a-zA-Z]*}}F
 func testNullResettable(_ sc: SomeClass) {
   sc.defaultedProperty = nil
   sc.defaultedProperty = "hello"
diff --git a/test/ClangImporter/optional.swift b/test/ClangImporter/optional.swift
index 51c65da..eb7b649 100644
--- a/test/ClangImporter/optional.swift
+++ b/test/ClangImporter/optional.swift
@@ -12,7 +12,7 @@
   @objc func foo() -> String? {
     return ""
   }
-// CHECK-LABEL:    sil hidden [thunk] @$s8optional1AC3fooSSSgyFTo : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
+// CHECK-LABEL:    sil hidden [thunk] [ossa] @$s8optional1AC3fooSSSgyFTo : $@convention(objc_method) (A) -> @autoreleased Optional<NSString>
 // CHECK:    bb0([[SELF:%.*]] : @unowned $A):
 // CHECK:      [[SELF_COPY:%.*]] = copy_value [[SELF]]
 // CHECK:      [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -41,7 +41,7 @@
 // CHECK-NEXT: return [[T0]]
 
   @objc func bar(x x : String?) {}
-// CHECK-LABEL:    sil hidden [thunk] @$s8optional1AC3bar1xySSSg_tFTo : $@convention(objc_method) (Optional<NSString>, A) -> ()
+// CHECK-LABEL:    sil hidden [thunk] [ossa] @$s8optional1AC3bar1xySSSg_tFTo : $@convention(objc_method) (Optional<NSString>, A) -> ()
 // CHECK:    bb0([[ARG:%.*]] : @unowned $Optional<NSString>, [[SELF:%.*]] : @unowned $A):
 // CHECK:      [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:      [[SELF_COPY:%.*]] = copy_value [[SELF]]
diff --git a/test/ClangImporter/static_inline.swift b/test/ClangImporter/static_inline.swift
index d0d0022..f6e6e95 100644
--- a/test/ClangImporter/static_inline.swift
+++ b/test/ClangImporter/static_inline.swift
@@ -4,7 +4,7 @@
 
 // RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -emit-sil %S/Inputs/static_inline.swift -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h -o %t/static_inline.sil
 // RUN: %FileCheck < %t/static_inline.sil %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s
+// RUN: %target-swift-frontend -parse-as-library -module-name=static_inline -O -emit-ir %t/static_inline.sil -enable-objc-interop -import-objc-header %S/Inputs/static_inline.h | %FileCheck --check-prefix=CHECK-IR %s
 
 // CHECK: sil shared [serializable] [clang c_inline_func] @c_inline_func : $@convention(c) (Int32) -> Int32
 
diff --git a/test/Compatibility/attr_usableFromInline_protocol.swift b/test/Compatibility/attr_usableFromInline_protocol.swift
index 1b01305..4941d69 100644
--- a/test/Compatibility/attr_usableFromInline_protocol.swift
+++ b/test/Compatibility/attr_usableFromInline_protocol.swift
@@ -7,8 +7,8 @@
 }
 
 @usableFromInline struct UFIAdopter<T> : PublicProtoWithReqs {}
-// expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
-// expected-warning@-2 {{instance method 'foo()' should be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+// expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+// expected-warning@-2 {{instance method 'foo()' should be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
 extension UFIAdopter {
   typealias Assoc = Int
   // expected-note@-1 {{'Assoc' declared here}}
@@ -18,9 +18,9 @@
 
 @usableFromInline struct UFIAdopterAllInOne<T> : PublicProtoWithReqs {
   typealias Assoc = Int
-  // expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+  // expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
   func foo() {}
-  // expected-warning@-1 {{instance method 'foo()' should be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+  // expected-warning@-1 {{instance method 'foo()' should be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
 }
 
 internal struct InternalAdopter<T> : PublicProtoWithReqs {}
@@ -36,8 +36,8 @@
 }
 
 public struct PublicAdopter<T> : UFIProtoWithReqs {}
-// expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
-// expected-warning@-2 {{instance method 'foo()' should be declared '@usableFromInline' because because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
+// expected-warning@-1 {{type alias 'Assoc' should be declared '@usableFromInline' because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
+// expected-warning@-2 {{instance method 'foo()' should be declared '@usableFromInline' because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
 extension PublicAdopter {
   typealias Assoc = Int
   // expected-note@-1 {{'Assoc' declared here}}
diff --git a/test/Compatibility/exhaustive_switch.swift b/test/Compatibility/exhaustive_switch.swift
index dd987e2..189f965 100644
--- a/test/Compatibility/exhaustive_switch.swift
+++ b/test/Compatibility/exhaustive_switch.swift
@@ -441,8 +441,8 @@
 }
 
 func quiteBigEnough() -> Bool {
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
-  // expected-note@-1 {{do you want to add a default clause?}}
+  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{switch must be exhaustive}}
+  // expected-note@-1 132 {{add missing case:}}
   case (.case0, .case0): return true
   case (.case1, .case1): return true
   case (.case2, .case2): return true
@@ -457,8 +457,8 @@
   case (.case11, .case11): return true
   }
 
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
-  // expected-note@-1 {{do you want to add a default clause?}}
+  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{switch must be exhaustive}}
+  // expected-note@-1 {{add missing case: '(.case11, _)'}}
   case (.case0, _): return true
   case (.case1, _): return true
   case (.case2, _): return true
@@ -472,7 +472,8 @@
   case (.case10, _): return true
   }
 
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
+  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-warning {{switch must be exhaustive}}
+  // expected-note@-1 {{add missing case: '(.case11, _)'}}
   case (.case0, _): return true
   case (.case1, _): return true
   case (.case2, _): return true
@@ -484,7 +485,7 @@
   case (.case8, _): return true
   case (.case9, _): return true
   case (.case10, _): return true
-  @unknown default: return false // expected-note {{remove '@unknown' to handle remaining values}} {{3-12=}}
+  @unknown default: return false
   }
 
 
diff --git a/test/Compatibility/tuple_arguments_4.swift b/test/Compatibility/tuple_arguments_4.swift
index dfc7026..bb15989 100644
--- a/test/Compatibility/tuple_arguments_4.swift
+++ b/test/Compatibility/tuple_arguments_4.swift
@@ -1,7 +1,5 @@
 // RUN: %target-typecheck-verify-swift -swift-version 4
 
-// See test/Compatibility/tuple_arguments_3.swift for the Swift 3 behavior.
-
 func concrete(_ x: Int) {}
 func concreteLabeled(x: Int) {}
 func concreteTwo(_ x: Int, _ y: Int) {} // expected-note 5 {{'concreteTwo' declared here}}
@@ -1671,7 +1669,6 @@
   h() // expected-error {{missing argument for parameter #1 in call}}
 }
 
-
 // https://bugs.swift.org/browse/SR-7191
 class Mappable<T> {
   init(_: T) { }
@@ -1680,3 +1677,9 @@
 
 let x = Mappable(())
 _ = x.map { (_: Void) in return () }
+
+// https://bugs.swift.org/browse/SR-9470
+do {
+  func f(_: Int...) {}
+  let _ = [(1, 2, 3)].map(f) // expected-error {{cannot invoke 'map' with an argument list of type '((Int...) -> ())'}}
+}
\ No newline at end of file
diff --git a/test/Constraints/ranking.swift b/test/Constraints/ranking.swift
index 4376d9f..d78acc3 100644
--- a/test/Constraints/ranking.swift
+++ b/test/Constraints/ranking.swift
@@ -30,7 +30,7 @@
 func genericOptional<T>(_: T?) {}
 func genericNoOptional<T>(_: T) {}
 
-// CHECK-LABEL: sil hidden @$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking22propertyVersusFunctionyyAA1P_p_xtAaCRzlF
 func propertyVersusFunction<T : P>(_ p: P, _ t: T) {
   // CHECK: witness_method $@opened("{{.*}}") P, #P.p!getter.1
   let _ = p.p
@@ -149,7 +149,7 @@
 func f1(_ b: B) -> B { return b }
 
 func testDerived(b: B) {
-  // CHECK-LABEL: sil hidden @$s7ranking11testDerived1byAA1BC_tF
+  // CHECK-LABEL: sil hidden [ossa] @$s7ranking11testDerived1byAA1BC_tF
   // CHECK: function_ref @$s7ranking2f1yAA1BCADF
   // CHECK: function_ref @$s7ranking2f0yyxlF
   f0(f1(b))
@@ -191,7 +191,7 @@
 
 // Make sure we favour the class implementation over the protocol requirement.
 
-// CHECK-LABEL: sil hidden @$s7ranking32testGenericPropertyProtocolClassyyxAA1YCRbzAA1XRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking32testGenericPropertyProtocolClassyyxAA1YCRbzAA1XRzlF
 func testGenericPropertyProtocolClass<T : X & Y>(_ t: T) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -199,7 +199,7 @@
   _ = t[""]   // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking36testExistentialPropertyProtocolClassyyAA1X_AA1YCXcF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking36testExistentialPropertyProtocolClassyyAA1X_AA1YCXcF
 func testExistentialPropertyProtocolClass(_ t: X & Y) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -207,7 +207,7 @@
   _ = t[""]   // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking46testGenericPropertySubclassConstrainedProtocolyyxAA1ZRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking46testGenericPropertySubclassConstrainedProtocolyyxAA1ZRzlF
 func testGenericPropertySubclassConstrainedProtocol<T : Z>(_ t: T) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -215,7 +215,7 @@
   _ = t[""]   // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking50testExistentialPropertySubclassConstrainedProtocolyyAA1Z_pF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking50testExistentialPropertySubclassConstrainedProtocolyyAA1Z_pF
 func testExistentialPropertySubclassConstrainedProtocol(_ t: Z) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -223,7 +223,7 @@
   _ = t[""]   // CHECK: class_method {{%.*}} : $Y, #Y.subscript!getter.1
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySiGXcF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySiGXcF
 func testExistentialPropertyProtocolGenericClass(_ t: GenericClass<Int> & X) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $GenericClass<Int>, #GenericClass.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -231,7 +231,7 @@
   _ = t[""]   // CHECK: function_ref @$s7ranking12GenericClassCySiSScig
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySSGXcF
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking43testExistentialPropertyProtocolGenericClassyyAA1X_AA0fG0CySSGXcF
 func testExistentialPropertyProtocolGenericClass(_ t: GenericClass<String> & X) {
   _ = t.foo   // CHECK: class_method {{%.*}} : $GenericClass<String>, #GenericClass.foo!getter.1
   _ = t.bar   // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -240,7 +240,7 @@
 }
 
 extension X where Self : Y {
-  // CHECK-LABEL: sil hidden @$s7ranking1XPA2A1YCRbzrlE32testGenericPropertyProtocolClassyyxF
+  // CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A1YCRbzrlE32testGenericPropertyProtocolClassyyxF
   func testGenericPropertyProtocolClass(_ x: Self) {
     _ = self.foo   // CHECK: class_method {{%.*}} : $Y, #Y.foo!getter.1
     _ = self.bar   // CHECK: function_ref @$s7ranking1YC3barSivg
@@ -250,7 +250,7 @@
 }
 
 extension X where Self : GenericClass<Int> {
-  // CHECK-LABEL: sil hidden @$s7ranking1XPA2A12GenericClassCySiGRbzrlE04testb16PropertyProtocolbC0yyxF
+  // CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A12GenericClassCySiGRbzrlE04testb16PropertyProtocolbC0yyxF
   func testGenericPropertyProtocolGenericClass(_ x: Self) {
     _ = self.foo   // CHECK: class_method {{%.*}} : $GenericClass<Int>, #GenericClass.foo!getter.1
     _ = self.bar   // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -260,7 +260,7 @@
 }
 
 extension X where Self : GenericClass<String> {
-  // CHECK-LABEL: sil hidden @$s7ranking1XPA2A12GenericClassCySSGRbzrlE04testb16PropertyProtocolbC0yyxF
+  // CHECK-LABEL: sil hidden [ossa] @$s7ranking1XPA2A12GenericClassCySSGRbzrlE04testb16PropertyProtocolbC0yyxF
   func testGenericPropertyProtocolGenericClass(_ x: Self) {
     _ = self.foo   // CHECK: class_method {{%.*}} : $GenericClass<String>, #GenericClass.foo!getter.1
     _ = self.bar   // CHECK: function_ref @$s7ranking12GenericClassC3barxvg
@@ -274,7 +274,7 @@
 //--------------------------------------------------------------------
 
 struct UnsafePointerStruct {
-  // CHECK-LABEL: sil hidden @$s7ranking19UnsafePointerStructVyACSPyxGSgclufC : $@convention(method) <U> (Optional<UnsafePointer<U>>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
+  // CHECK-LABEL: sil hidden [ossa] @$s7ranking19UnsafePointerStructVyACSPyxGSgclufC : $@convention(method) <U> (Optional<UnsafePointer<U>>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
   init<U>(_ from: UnsafePointer<U>) {}
   init<U>(_ from: UnsafePointer<U>?) {
     // CHECK: function_ref @$s7ranking19UnsafePointerStructVyACSPyxGclufC : $@convention(method) <τ_0_0> (UnsafePointer<τ_0_0>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
@@ -282,7 +282,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s7ranking22useUnsafePointerStructyySPyxGlF : $@convention(thin) <U> (UnsafePointer<U>) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7ranking22useUnsafePointerStructyySPyxGlF : $@convention(thin) <U> (UnsafePointer<U>) -> ()
 func useUnsafePointerStruct<U>(_ ptr: UnsafePointer<U>) {
   // CHECK: function_ref @$s7ranking19UnsafePointerStructVyACSPyxGclufC : $@convention(method) <τ_0_0> (UnsafePointer<τ_0_0>, @thin UnsafePointerStruct.Type) -> UnsafePointerStruct
   let _: UnsafePointerStruct = UnsafePointerStruct(ptr)
diff --git a/test/Constraints/rdar46544601.swift b/test/Constraints/rdar46544601.swift
new file mode 100644
index 0000000..7002cde
--- /dev/null
+++ b/test/Constraints/rdar46544601.swift
@@ -0,0 +1,34 @@
+// RUN: %target-typecheck-verify-swift
+
+struct D {}
+
+class Future<T> {
+  func then<U>(_ fn: @escaping (T) -> Future<U>) -> Future<U> { fatalError() }
+  func thenThrowing<U>(_ fn: @escaping (T) throws -> U) -> Future<U> { fatalError() }
+  func whenFailure(_ fn: @escaping (Error) -> Void) {}
+
+  func and<U>(result: U) -> Future<(T,U)> { fatalError() }
+}
+
+protocol P {
+  func foo(arr: [D], data: ArraySlice<UInt8>) -> Future<D>
+  // expected-note@-1 {{found this candidate}}
+  func bar(root: D, from: P) -> Future<D>
+}
+
+extension P {
+  func foo(arr: [D] = [], data: [UInt8]) -> Future<D> { fatalError() }
+  // expected-note@-1 {{found this candidate}}
+}
+
+func crash(_ p: P, payload: [UInt8]) throws {
+  p.foo(data: payload).then { _ in
+    return Future<(D, [D])>()
+  }.then { (id, arr) in
+    p.foo(arr: arr, data: []).and(result: (id, arr))
+    // expected-error@-1 {{mbiguous reference to member 'foo(arr:data:)'}}
+  }.then { args0 in
+    let (parentID, args1) = args0
+    p.bar(root: parentID, from: p).and(args1)
+  }.whenFailure { _ in }
+}
diff --git a/test/Constraints/tuple.swift b/test/Constraints/tuple.swift
index 171c771..e3db589 100644
--- a/test/Constraints/tuple.swift
+++ b/test/Constraints/tuple.swift
@@ -56,7 +56,7 @@
 // Tuples with existentials
 var any : Any = ()
 any = (1, 2)
-any = (label: 4)
+any = (label: 4) // expected-error {{cannot create a single-element tuple with an element label}}
 
 // Scalars don't have .0/.1/etc
 i = j.0 // expected-error{{value of type 'Int' has no member '0'}}
@@ -153,7 +153,7 @@
   var a = a
   var b = b
   (a, b) = (b, a % b)  // expected-error {{binary operator '%' cannot be applied to two 'T' operands}}
-  // expected-note @-1 {{overloads for '%' exist with these partially matching parameter lists: (Int, Int), (Int16, Int16), (Int32, Int32), (Int64, Int64), (Int8, Int8), (UInt, UInt), (UInt16, UInt16), (UInt32, UInt32), (UInt64, UInt64), (UInt8, UInt8)}}
+  // expected-note @-1 {{overloads for '%' exist with these partially matching parameter lists: (Int, Int), (Int16, Int16), (Int32, Int32), (Int64, Int64), (Int8, Int8), (Self, Self.Scalar), (Self.Scalar, Self), (UInt, UInt), (UInt16, UInt16), (UInt32, UInt32), (UInt64, UInt64), (UInt8, UInt8)}}
 }
 
 // <rdar://problem/24210190>
@@ -252,3 +252,11 @@
   let y = ""
   return b ? (x, y) : nil
 }
+
+// Single element tuple expressions
+func singleElementTuple() {
+  let _ = (label: 123) // expected-error {{cannot create a single-element tuple with an element label}} {{12-19=}}
+  let _ = (label: 123).label // expected-error {{cannot create a single-element tuple with an element label}} {{12-19=}}
+  let _ = ((label: 123)) // expected-error {{cannot create a single-element tuple with an element label}} {{13-20=}}
+  let _ = ((label: 123)).label // expected-error {{cannot create a single-element tuple with an element label}} {{13-20=}}
+}
diff --git a/test/Constraints/tuple_arguments.swift b/test/Constraints/tuple_arguments.swift
index 2dfe694..4ad4c93 100644
--- a/test/Constraints/tuple_arguments.swift
+++ b/test/Constraints/tuple_arguments.swift
@@ -1671,3 +1671,18 @@
   func h(_: ()) {} // expected-note {{'h' declared here}}
   h() // expected-error {{missing argument for parameter #1 in call}}
 }
+
+// https://bugs.swift.org/browse/SR-7191
+class Mappable<T> {
+  init(_: T) { }
+  func map<U>(_ body: (T) -> U) -> U { fatalError() }
+}
+
+let x = Mappable(())
+_ = x.map { (_: Void) in return () }
+
+// https://bugs.swift.org/browse/SR-9470
+do {
+  func f(_: Int...) {}
+  let _ = [(1, 2, 3)].map(f) // expected-error {{cannot invoke 'map' with an argument list of type '((Int...) -> ())'}}
+}
\ No newline at end of file
diff --git a/test/DebugInfo/DumpDeclFromMangledName.swift b/test/DebugInfo/DumpDeclFromMangledName.swift
index 4ca202f..2a9bb70 100644
--- a/test/DebugInfo/DumpDeclFromMangledName.swift
+++ b/test/DebugInfo/DumpDeclFromMangledName.swift
@@ -16,12 +16,12 @@
 // RUN: not %lldb-moduleimport-test %t/DeclReconstr \
 // RUN:   --decl-from-mangled=patatino 2>&1 | \
 // RUN:   %FileCheck %s --check-prefix=INVALID-DECL
-// INVALID-DECL: patatino does not exists, exiting.
+// INVALID-DECL: patatino does not exist, exiting.
 
 // RUN: not %lldb-moduleimport-test %t/DeclReconstr \
 // RUN:   --type-from-mangled=patatino 2>&1 | \
 // RUN:   %FileCheck %s --check-prefix=INVALID-TYPE
-// INVALID-TYPE: patatino does not exists, exiting.
+// INVALID-TYPE: patatino does not exist, exiting.
 
 // RUN: %lldb-moduleimport-test %t/DeclReconstr \
 // RUN:   -decl-from-mangled=%t.input > %t.output 2>&1
diff --git a/test/DebugInfo/Imports.swift b/test/DebugInfo/Imports.swift
index e5e6c07..4b3d4d3 100644
--- a/test/DebugInfo/Imports.swift
+++ b/test/DebugInfo/Imports.swift
@@ -7,7 +7,7 @@
 
 // CHECK-DAG: ![[FOOMODULE:[0-9]+]] = !DIModule({{.*}}, name: "Foo", includePath: "{{.*}}test{{.*}}DebugInfo{{.*}}"
 // CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE:[0-9]+]], entity: ![[FOOMODULE]]
-// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "Imports.swift", directory: "{{.*}}test/DebugInfo")
+// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "Imports.swift", directory: "{{.*}}test{{/|\\5C}}DebugInfo")
 // CHECK-DAG: ![[SWIFTFILE:[0-9]+]] = !DIFile(filename: "Swift.swiftmodule"
 // CHECK-DAG: ![[SWIFTMODULE:[0-9]+]] = !DIModule({{.*}}, name: "Swift"
 // CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE]], entity: ![[SWIFTMODULE]]
diff --git a/test/DebugInfo/ImportsStdlib.swift b/test/DebugInfo/ImportsStdlib.swift
index 6835ee1..d7ef401 100644
--- a/test/DebugInfo/ImportsStdlib.swift
+++ b/test/DebugInfo/ImportsStdlib.swift
@@ -11,7 +11,7 @@
 
 // CHECK-DAG: ![[MODULE:[0-9]+]] = !DIModule({{.*}}, name: "NotTheStdlib", includePath: "{{.*}}test{{.*}}DebugInfo{{.*}}"
 // CHECK-DAG: !DIImportedEntity(tag: DW_TAG_imported_module, scope: ![[THISFILE:[0-9]+]], entity: ![[MODULE]]
-// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "ImportsStdlib.swift", directory: "{{.*}}test/DebugInfo")
+// CHECK-DAG: ![[THISFILE]] = !DIFile(filename: "ImportsStdlib.swift", directory: "{{.*}}test{{/|\\5C}}DebugInfo")
 
 // NEGATIVE-NOT: !DIFile(filename: "Swift.swiftmodule"
 // NEGATIVE-NOT: !DIModule({{.*}}, name: "Swift"
diff --git a/test/DebugInfo/basic.swift b/test/DebugInfo/basic.swift
index a8e6948..c1e60c4 100644
--- a/test/DebugInfo/basic.swift
+++ b/test/DebugInfo/basic.swift
@@ -19,18 +19,18 @@
 // CHECK-LINETABLES-NOT: DW_TAG_basic_type
 // --------------------------------------------------------------------
 // Now check that we do generate line+scope info with -g.
-// RUN: %target-swift-frontend %s -emit-ir -g -o - \
+// RUN: %target-swift-frontend %/s -emit-ir -g -o - \
 // RUN:   | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK
 // --------------------------------------------------------------------
 // Currently -gdwarf-types should give the same results as -g.
-// RUN: %target-swift-frontend %s -emit-ir -gdwarf-types -o - \
+// RUN: %target-swift-frontend %/s -emit-ir -gdwarf-types -o - \
 // RUN:   | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK
 // --------------------------------------------------------------------
 // Verify that -g -debug-info-format=dwarf gives the same results as -g.
-// RUN: %target-swift-frontend %s -emit-ir -g -debug-info-format=dwarf -o - \
+// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=dwarf -o - \
 // RUN:   | %FileCheck %s --check-prefixes CHECK,DWARF-CHECK
 // --------------------------------------------------------------------
-// RUN: %target-swift-frontend %s -emit-ir -g -debug-info-format=codeview -o - \
+// RUN: %target-swift-frontend %/s -emit-ir -g -debug-info-format=codeview -o - \
 // RUN:   | %FileCheck %s --check-prefixes CHECK,CV-CHECK
 // --------------------------------------------------------------------
 //
diff --git a/test/DebugInfo/compiler-flags-macosx.swift b/test/DebugInfo/compiler-flags-macosx.swift
index fe06ba9..fdda618 100644
--- a/test/DebugInfo/compiler-flags-macosx.swift
+++ b/test/DebugInfo/compiler-flags-macosx.swift
@@ -1,8 +1,9 @@
 // Check that the sdk and resource dirs end up in the debug info if we build for
 // a Darwin target and set the RC_DEBUG_OPTIONS environment variable. This
 // matches the behavior found in Clang.
+
 // RUN: %swiftc_driver %s -emit-ir -g -target x86_64-apple-macosx10.10 -parse-stdlib -module-name scratch -o - | %FileCheck %s
-// RUN: RC_DEBUG_OPTIONS=1 %swiftc_driver %s -emit-ir -g -target x86_64-apple-macosx10.10 -parse-stdlib -module-name scratch -o - | %FileCheck --check-prefix CHECK-VAR-SET %s
+// RUN: env RC_DEBUG_OPTIONS=1 %swiftc_driver %s -emit-ir -g -target x86_64-apple-macosx10.10 -parse-stdlib -module-name scratch -o - | %FileCheck --check-prefix CHECK-VAR-SET %s
 // CHECK:               !DICompileUnit({{.*}} producer: "{{(Apple )?Swift version [^"]+}}"
 // CHECK-NOT:                          flags: "
 // CHECK-VAR-SET:       !DICompileUnit({{.*}}producer: "{{(Apple )?Swift version [^"]+}}"
diff --git a/test/DebugInfo/compiler-flags.swift b/test/DebugInfo/compiler-flags.swift
index 167f8f8..83ca896 100644
--- a/test/DebugInfo/compiler-flags.swift
+++ b/test/DebugInfo/compiler-flags.swift
@@ -1,6 +1,7 @@
 // Check that the sdk and resource dirs end up in the debug info if we pass the
 // frontend flag. This tests the general functionality; we test the macosx
 // specific toolchain logic in compiler-flags-macosx.swift.
+
 // RUN: %target-swiftc_driver %s -emit-ir -debug-info-store-invocation -g -o - | %FileCheck %s
 // RUN: %target-swiftc_driver %s -emit-ir -debug-info-store-invocation -sdk "/Weird Location/SDK" -g -o - | %FileCheck --check-prefix CHECK-EXPLICIT %s
 // CHECK:          !DICompileUnit({{.*}}producer: "{{(Apple )?Swift version [^"]+}}"
@@ -15,6 +16,6 @@
 // CHECK-EXPLICIT-SAME:           -resource-dir 
 
 // Check that we don't write temporary file names in the debug info
-// RUN: TMPDIR=abc/def %target-swift-frontend %s -I abc/def/xyz -g -emit-ir -debug-info-store-invocation -o - | %FileCheck --check-prefix CHECK-TEMP %s
+// RUN: env TMPDIR=abc/def %target-swift-frontend %s -I abc/def/xyz -g -emit-ir -debug-info-store-invocation -o - | %FileCheck --check-prefix CHECK-TEMP %s
 // CHECK-TEMP: !DICompileUnit({{.*}} flags: "{{.*}} -I <temporary-file>
 
diff --git a/test/DebugInfo/debug_prefix_map.swift b/test/DebugInfo/debug_prefix_map.swift
index 3d3d9b0..8a3ce3f 100644
--- a/test/DebugInfo/debug_prefix_map.swift
+++ b/test/DebugInfo/debug_prefix_map.swift
@@ -1,4 +1,4 @@
-// RUN: %swiftc_driver -g -debug-prefix-map %S=/var/empty %s -emit-ir -o - | %FileCheck %s
+// RUN: %swiftc_driver -g -debug-prefix-map %/S=/var/empty %/s -emit-ir -o - | %FileCheck %s
 
 func square(_ n: Int) -> Int {
   return n * n
diff --git a/test/DebugInfo/inlinescopes.swift b/test/DebugInfo/inlinescopes.swift
index 44394d9..ead243f 100644
--- a/test/DebugInfo/inlinescopes.swift
+++ b/test/DebugInfo/inlinescopes.swift
@@ -5,7 +5,7 @@
 // RUN: %FileCheck %s < %t.ll
 // RUN: %FileCheck %s -check-prefix=TRANSPARENT-CHECK < %t.ll
 
-// CHECK: define{{( protected)?( signext)?}} i32 @main
+// CHECK: define{{( dllexport)?}}{{( protected)?( signext)?}} i32 @main
 // CHECK: call {{.*}}noinline{{.*}}, !dbg ![[CALL:.*]]
 // CHECK-DAG: ![[TOPLEVEL:.*]] = !DIFile(filename: "inlinescopes.swift"
 
diff --git a/test/DebugInfo/patternmatching.swift b/test/DebugInfo/patternmatching.swift
index dc6668b..be7c23b 100644
--- a/test/DebugInfo/patternmatching.swift
+++ b/test/DebugInfo/patternmatching.swift
@@ -15,9 +15,10 @@
 switch p {
     case (let x, let y) where
       // CHECK:   call {{.*}}double {{.*}}return_same{{.*}}, !dbg ![[LOC1:.*]]
-      // CHECK: br {{.*}}, label {{.*}}, label {{.*}}, !dbg ![[LOC1]]
+      // CHECK: br {{.*}}, label {{.*}}, label {{.*}}, !dbg ![[LOC2:.*]]
       // CHECK: call{{.*}}markUsed{{.*}}, !dbg ![[LOC3:.*]]
-      // CHECK: ![[LOC1]] = !DILocation(line: [[@LINE+1]],
+      // CHECK: ![[LOC1]] = !DILocation(line: [[@LINE+2]],
+      // CHECK: ![[LOC2]] = !DILocation(line: [[@LINE+1]],
                         return_same(x) == return_same(y):
       // CHECK: ![[LOC3]] = !DILocation(line: [[@LINE+1]],
       markUsed(x)
diff --git a/test/DebugInfo/prologue.swift b/test/DebugInfo/prologue.swift
index 75d07a7..4ff2fbe 100644
--- a/test/DebugInfo/prologue.swift
+++ b/test/DebugInfo/prologue.swift
@@ -12,4 +12,4 @@
 // prologue and the beginning of the function body.
 // CHECK-NOT: callq	*
 // CHECK: .loc	[[F]] [[@LINE-6]] {{.}}
-// CHECK: callq	{{.*}}builtinStringLiteral
+// CHECK: {{callq	.*builtinStringLiteral|movq __imp_.*builtinStringLiteral}}
diff --git a/test/DebugInfo/simple.sil b/test/DebugInfo/simple.sil
index b5cb8f9..22cbcd8 100644
--- a/test/DebugInfo/simple.sil
+++ b/test/DebugInfo/simple.sil
@@ -5,7 +5,7 @@
 import Builtin
 import Swift
 
-sil @square : $@convention(thin) (Int32) -> Int32 {
+sil [ossa] @square : $@convention(thin) (Int32) -> Int32 {
 bb0(%0 : $Int32):
   debug_value %0 : $Int32, let, name "x" // id: %1
   %3 = struct_extract %0 : $Int32, #Int32._value       // user: %6
diff --git a/test/DebugInfo/top_level_code.swift b/test/DebugInfo/top_level_code.swift
index e7dc26f..790f5df 100644
--- a/test/DebugInfo/top_level_code.swift
+++ b/test/DebugInfo/top_level_code.swift
@@ -1,13 +1,11 @@
 // RUN: %target-swift-frontend %s -S -g -o - | %FileCheck %s
 
-// XFAIL: linux
-
 func markUsed<T>(_ t: T) {}
-// CHECK: _main:
+// CHECK: {{_?}}main:
 // CHECK-NEXT: Lfunc_begin0:
 // Verify that the top-level function (main) begins at line 0 and then
 // proceeds to the first line.
-// CHECK: .loc    {{[0-9]}} 0 {{[0-9]}} 
+// CHECK: .loc    {{[0-9]}} 0 {{[0-9]}}
 // CHECK-NOT: Lfunc_end0:
 // CHECK: .loc    {{[0-9]}} [[@LINE+1]] {{[0-9]}} prologue_end
 var a = 1
diff --git a/test/DebugInfo/variables.swift b/test/DebugInfo/variables.swift
index f7cf018..791d000 100644
--- a/test/DebugInfo/variables.swift
+++ b/test/DebugInfo/variables.swift
@@ -4,6 +4,7 @@
 // RUN: %target-swift-frontend %s -g -S -o - | %FileCheck %s --check-prefix ASM-%target-object-format
 // ASM-macho: .section __DWARF,__debug_info
 // ASM-elf: .section .debug_info,"",{{[@%]}}progbits
+// ASM-coff: .section .debug_info,"dr"
 
 // Test variables-interpreter.swift runs this code with `swift -g -i`.
 // Test variables-repl.swift runs this code with `swift -g < variables.swift`.
diff --git a/test/Demangle/Inputs/manglings.txt b/test/Demangle/Inputs/manglings.txt
index 137a825..0f77ba8 100644
--- a/test/Demangle/Inputs/manglings.txt
+++ b/test/Demangle/Inputs/manglings.txt
@@ -301,7 +301,9 @@
 _T0So11CrappyColorVs16RawRepresentableSCMA ---> reflection metadata associated type descriptor __C.CrappyColor : Swift.RawRepresentable in __C_Synthesized
 $S28protocol_conformance_records15NativeValueTypeVAA8RuncibleAAMc ---> protocol conformance descriptor for protocol_conformance_records.NativeValueType : protocol_conformance_records.Runcible in protocol_conformance_records
 $SSC9SomeErrorLeVD ---> __C_Synthesized.related decl 'e' for SomeError
-$s20mangling_retroactive5test1yyAA2Z2V5InnerVy12RetroactiveB1XV_AG1YVAI0F1A1PAAyHCg_AkL1QAAyHCg0_GF ---> mangling_retroactive.test1(mangling_retroactive.Z2<RetroactiveB.X>.Inner<RetroactiveB.Y>) -> ()
+$s20mangling_retroactive5test0yyAA1ZVy12RetroactiveB1XVSiAE1YVAG0D1A1PAAyHCg_AiJ1QAAyHCg1_GF ---> mangling_retroactive.test0(mangling_retroactive.Z<RetroactiveB.X, Swift.Int, RetroactiveB.Y>) -> ()
+$s20mangling_retroactive5test0yyAA1ZVy12RetroactiveB1XVSiAE1YVAG0D1A1PHPyHCg_AiJ1QHPyHCg1_GF ---> mangling_retroactive.test0(mangling_retroactive.Z<RetroactiveB.X, Swift.Int, RetroactiveB.Y>) -> ()
+$s20mangling_retroactive5test0yyAA1ZVy12RetroactiveB1XVSiAE1YVAG0D1A1PHpyHCg_AiJ1QHpyHCg1_GF ---> mangling_retroactive.test0(mangling_retroactive.Z<RetroactiveB.X, Swift.Int, RetroactiveB.Y>) -> ()
 _T0LiteralAByxGxd_tcfC ---> _T0LiteralAByxGxd_tcfC
 _T0XZ ---> _T0XZ
 _TTSf0os___TFVs17_LegacyStringCore15_invariantCheckfT_T_ ---> function signature specialization <Arg[0] = Guaranteed To Owned and Exploded> of Swift._LegacyStringCore._invariantCheck() -> ()
diff --git a/test/FixCode/fixits-switch-nonfrozen.swift.result b/test/FixCode/fixits-switch-nonfrozen.swift.result
index 7ff6748..ec401d0 100644
--- a/test/FixCode/fixits-switch-nonfrozen.swift.result
+++ b/test/FixCode/fixits-switch-nonfrozen.swift.result
@@ -324,8 +324,270 @@
   case (.case9, .case9): return true
   case (.case10, .case10): return true
   case (.case11, .case11): return true
-  default:
-<#fatalError()#>
+  case (.case11, .case0):
+<#code#>
+case (.case11, .case1):
+<#code#>
+case (.case11, .case2):
+<#code#>
+case (.case11, .case3):
+<#code#>
+case (.case11, .case4):
+<#code#>
+case (.case11, .case5):
+<#code#>
+case (.case11, .case6):
+<#code#>
+case (.case11, .case7):
+<#code#>
+case (.case11, .case8):
+<#code#>
+case (.case11, .case9):
+<#code#>
+case (.case11, .case10):
+<#code#>
+case (.case10, .case0):
+<#code#>
+case (.case10, .case1):
+<#code#>
+case (.case10, .case2):
+<#code#>
+case (.case10, .case3):
+<#code#>
+case (.case10, .case4):
+<#code#>
+case (.case10, .case5):
+<#code#>
+case (.case10, .case6):
+<#code#>
+case (.case10, .case7):
+<#code#>
+case (.case10, .case8):
+<#code#>
+case (.case10, .case9):
+<#code#>
+case (.case10, .case11):
+<#code#>
+case (.case9, .case0):
+<#code#>
+case (.case9, .case1):
+<#code#>
+case (.case9, .case2):
+<#code#>
+case (.case9, .case3):
+<#code#>
+case (.case9, .case4):
+<#code#>
+case (.case9, .case5):
+<#code#>
+case (.case9, .case6):
+<#code#>
+case (.case9, .case7):
+<#code#>
+case (.case9, .case8):
+<#code#>
+case (.case9, .case10):
+<#code#>
+case (.case9, .case11):
+<#code#>
+case (.case8, .case0):
+<#code#>
+case (.case8, .case1):
+<#code#>
+case (.case8, .case2):
+<#code#>
+case (.case8, .case3):
+<#code#>
+case (.case8, .case4):
+<#code#>
+case (.case8, .case5):
+<#code#>
+case (.case8, .case6):
+<#code#>
+case (.case8, .case7):
+<#code#>
+case (.case8, .case9):
+<#code#>
+case (.case8, .case10):
+<#code#>
+case (.case8, .case11):
+<#code#>
+case (.case7, .case0):
+<#code#>
+case (.case7, .case1):
+<#code#>
+case (.case7, .case2):
+<#code#>
+case (.case7, .case3):
+<#code#>
+case (.case7, .case4):
+<#code#>
+case (.case7, .case5):
+<#code#>
+case (.case7, .case6):
+<#code#>
+case (.case7, .case8):
+<#code#>
+case (.case7, .case9):
+<#code#>
+case (.case7, .case10):
+<#code#>
+case (.case7, .case11):
+<#code#>
+case (.case6, .case0):
+<#code#>
+case (.case6, .case1):
+<#code#>
+case (.case6, .case2):
+<#code#>
+case (.case6, .case3):
+<#code#>
+case (.case6, .case4):
+<#code#>
+case (.case6, .case5):
+<#code#>
+case (.case6, .case7):
+<#code#>
+case (.case6, .case8):
+<#code#>
+case (.case6, .case9):
+<#code#>
+case (.case6, .case10):
+<#code#>
+case (.case6, .case11):
+<#code#>
+case (.case5, .case0):
+<#code#>
+case (.case5, .case1):
+<#code#>
+case (.case5, .case2):
+<#code#>
+case (.case5, .case3):
+<#code#>
+case (.case5, .case4):
+<#code#>
+case (.case5, .case6):
+<#code#>
+case (.case5, .case7):
+<#code#>
+case (.case5, .case8):
+<#code#>
+case (.case5, .case9):
+<#code#>
+case (.case5, .case10):
+<#code#>
+case (.case5, .case11):
+<#code#>
+case (.case4, .case0):
+<#code#>
+case (.case4, .case1):
+<#code#>
+case (.case4, .case2):
+<#code#>
+case (.case4, .case3):
+<#code#>
+case (.case4, .case5):
+<#code#>
+case (.case4, .case6):
+<#code#>
+case (.case4, .case7):
+<#code#>
+case (.case4, .case8):
+<#code#>
+case (.case4, .case9):
+<#code#>
+case (.case4, .case10):
+<#code#>
+case (.case4, .case11):
+<#code#>
+case (.case3, .case0):
+<#code#>
+case (.case3, .case1):
+<#code#>
+case (.case3, .case2):
+<#code#>
+case (.case3, .case4):
+<#code#>
+case (.case3, .case5):
+<#code#>
+case (.case3, .case6):
+<#code#>
+case (.case3, .case7):
+<#code#>
+case (.case3, .case8):
+<#code#>
+case (.case3, .case9):
+<#code#>
+case (.case3, .case10):
+<#code#>
+case (.case3, .case11):
+<#code#>
+case (.case2, .case0):
+<#code#>
+case (.case2, .case1):
+<#code#>
+case (.case2, .case3):
+<#code#>
+case (.case2, .case4):
+<#code#>
+case (.case2, .case5):
+<#code#>
+case (.case2, .case6):
+<#code#>
+case (.case2, .case7):
+<#code#>
+case (.case2, .case8):
+<#code#>
+case (.case2, .case9):
+<#code#>
+case (.case2, .case10):
+<#code#>
+case (.case2, .case11):
+<#code#>
+case (.case1, .case0):
+<#code#>
+case (.case1, .case2):
+<#code#>
+case (.case1, .case3):
+<#code#>
+case (.case1, .case4):
+<#code#>
+case (.case1, .case5):
+<#code#>
+case (.case1, .case6):
+<#code#>
+case (.case1, .case7):
+<#code#>
+case (.case1, .case8):
+<#code#>
+case (.case1, .case9):
+<#code#>
+case (.case1, .case10):
+<#code#>
+case (.case1, .case11):
+<#code#>
+case (.case0, .case1):
+<#code#>
+case (.case0, .case2):
+<#code#>
+case (.case0, .case3):
+<#code#>
+case (.case0, .case4):
+<#code#>
+case (.case0, .case5):
+<#code#>
+case (.case0, .case6):
+<#code#>
+case (.case0, .case7):
+<#code#>
+case (.case0, .case8):
+<#code#>
+case (.case0, .case9):
+<#code#>
+case (.case0, .case10):
+<#code#>
+case (.case0, .case11):
+<#code#>
 }
 
   switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) {
@@ -340,8 +602,8 @@
   case (.case8, _): return true
   case (.case9, _): return true
   case (.case10, _): return true
-  default:
-<#fatalError()#>
+  case (.case11, _):
+<#code#>
 }
 }
 
diff --git a/test/Generics/rdar45957015.swift b/test/Generics/rdar45957015.swift
deleted file mode 100644
index 031a7b7..0000000
--- a/test/Generics/rdar45957015.swift
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: %target-typecheck-verify-swift
-
-protocol C {
-  associatedtype T : Collection where T.Element == Self
-}
-
-protocol V : C, RawRepresentable where RawValue == String {}
-
-protocol P {
-  associatedtype A: V
-}
-
-extension P {
-  func foo<U: Collection>(_ args: U) -> String where U.Element == A {
-    return args.reduce("", { $1.rawValue }) // Ok
-  }
-}
diff --git a/test/Generics/same_type_constraints.swift b/test/Generics/same_type_constraints.swift
index 53b4ec6..47abdbc 100644
--- a/test/Generics/same_type_constraints.swift
+++ b/test/Generics/same_type_constraints.swift
@@ -353,9 +353,9 @@
 func intercomponentMoreThanSpanningTree<T: P10>(_: T)
   where T.A == T.B,
         T.B == T.C,
-        T.D == T.E, // expected-note {{previous same-type constraint 'T.D' == 'T.E' written here}}
+        T.D == T.E, // expected-note{{previous same-type constraint 'T.D' == 'T.E' written here}}
         T.D == T.B,
-        T.E == T.B  // expected-warning {{redundant same-type constraint 'T.E' == 'T.B'}}
+        T.E == T.B  // expected-warning{{redundant same-type constraint 'T.E' == 'T.B'}}
         { }
 
 func trivialRedundancy<T: P10>(_: T) where T.A == T.A { } // expected-warning{{redundant same-type constraint 'T.A' == 'T.A'}}
diff --git a/test/IDE/print_ast_tc_decls.swift b/test/IDE/print_ast_tc_decls.swift
index 75a2158..147fbc5 100644
--- a/test/IDE/print_ast_tc_decls.swift
+++ b/test/IDE/print_ast_tc_decls.swift
@@ -1072,10 +1072,10 @@
 // PASS_COMMON: {{^}}enum d2300_EnumDeclWithValues1 : Int {{{$}}
 // PASS_COMMON-NEXT: {{^}}  case EDV2_First{{$}}
 // PASS_COMMON-NEXT: {{^}}  case EDV2_Second{{$}}
-// PASS_COMMON-NEXT: {{^}}  typealias RawValue = Int
-// PASS_COMMON-NEXT: {{^}}  init?(rawValue: Int){{$}}
-// PASS_COMMON-NEXT: {{^}}  var rawValue: Int { get }{{$}}
-// PASS_COMMON-NEXT: {{^}}}{{$}}
+// PASS_COMMON-DAG: {{^}}  typealias RawValue = Int
+// PASS_COMMON-DAG: {{^}}  init?(rawValue: Int){{$}}
+// PASS_COMMON-DAG: {{^}}  var rawValue: Int { get }{{$}}
+// PASS_COMMON: {{^}}}{{$}}
 
 enum d2400_EnumDeclWithValues2 : Double {
   case EDV3_First = 10
@@ -1084,10 +1084,10 @@
 // PASS_COMMON: {{^}}enum d2400_EnumDeclWithValues2 : Double {{{$}}
 // PASS_COMMON-NEXT: {{^}}  case EDV3_First{{$}}
 // PASS_COMMON-NEXT: {{^}}  case EDV3_Second{{$}}
-// PASS_COMMON-NEXT: {{^}}  typealias RawValue = Double
-// PASS_COMMON-NEXT: {{^}}  init?(rawValue: Double){{$}}
-// PASS_COMMON-NEXT: {{^}}  var rawValue: Double { get }{{$}}
-// PASS_COMMON-NEXT: {{^}}}{{$}}
+// PASS_COMMON-DAG: {{^}}  typealias RawValue = Double
+// PASS_COMMON-DAG: {{^}}  init?(rawValue: Double){{$}}
+// PASS_COMMON-DAG: {{^}}  var rawValue: Double { get }{{$}}
+// PASS_COMMON: {{^}}}{{$}}
 
 //===---
 //===--- Custom operator printing.
diff --git a/test/IRGen/UseObjCMethod.swift b/test/IRGen/UseObjCMethod.swift
index 957763f..0813ed3 100644
--- a/test/IRGen/UseObjCMethod.swift
+++ b/test/IRGen/UseObjCMethod.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s
 
 // REQUIRES: objc_interop
 import Foundation
diff --git a/test/IRGen/abi_v7k.swift b/test/IRGen/abi_v7k.swift
index dae606e..f4a17df 100644
--- a/test/IRGen/abi_v7k.swift
+++ b/test/IRGen/abi_v7k.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s -module-name test_v7k | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -S -primary-file %s -module-name test_v7k | %FileCheck -check-prefix=V7K %s
+// RUN: %target-swift-frontend -emit-ir -primary-file %s -module-name test_v7k | %FileCheck %s
+// RUN: %target-swift-frontend -S -primary-file %s -module-name test_v7k | %FileCheck -check-prefix=V7K %s
 
 // REQUIRES: CPU=armv7k
 // REQUIRES: OS=watchos
diff --git a/test/IRGen/access_control.sil b/test/IRGen/access_control.sil
index dfabc20..e79c1ce 100644
--- a/test/IRGen/access_control.sil
+++ b/test/IRGen/access_control.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/IRGen/access_markers.sil b/test/IRGen/access_markers.sil
index 2178e01..88f6ee1 100644
--- a/test/IRGen/access_markers.sil
+++ b/test/IRGen/access_markers.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK
+// RUN: %target-swift-frontend -swift-version 4 -enforce-exclusivity=checked %s -emit-ir | %FileCheck %s --check-prefix=CHECK
 
 import Builtin
 import Swift
diff --git a/test/IRGen/alignment.sil b/test/IRGen/alignment.sil
index a401da9..2cb9e80 100644
--- a/test/IRGen/alignment.sil
+++ b/test/IRGen/alignment.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/IRGen/alloc_stack.swift b/test/IRGen/alloc_stack.swift
index 8ab4625..756e6e6 100644
--- a/test/IRGen/alloc_stack.swift
+++ b/test/IRGen/alloc_stack.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/anonymous_context_descriptors.sil b/test/IRGen/anonymous_context_descriptors.sil
new file mode 100644
index 0000000..3097d5a
--- /dev/null
+++ b/test/IRGen/anonymous_context_descriptors.sil
@@ -0,0 +1,23 @@
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
+
+import Builtin
+import Swift
+
+protocol P { }
+
+class Blah<T: P> {
+  private struct Inner<U: P> { }
+}
+
+// Anonymous descriptor
+// CHECK: @"$s29anonymous_context_descriptors4BlahC5Inner33{{.*}}MXX" =
+
+// Flags: anonymous (2) + generic (0x80) + unique (0x40)
+// CHECK-SAME: i32 194
+
+// Parent
+// CHECK-SAME: $s29anonymous_context_descriptors4BlahCMn
+
+// # generic header
+// CHECK-SAME: i16 2, i16 2
+// CHECK-SAME: i16 4, i16 0
diff --git a/test/IRGen/archetype_resilience.sil b/test/IRGen/archetype_resilience.sil
index 0744407..d5aa7cf 100644
--- a/test/IRGen/archetype_resilience.sil
+++ b/test/IRGen/archetype_resilience.sil
@@ -19,7 +19,7 @@
 // CHECK-LABEL: define swiftcc void @copyDynamicMultiEnum(%swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>", %swift.type* %U, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* noalias nocapture swiftself)
 // CHECK: call %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* @"$s20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeOyxGRlzCr0_lWOc"(%T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* %0, %T20archetype_resilience36EnumWithClassArchetypeAndDynamicSizeO* {{.*}}, %swift.type* %"EnumWithClassArchetypeAndDynamicSize<T>")
 // CHECK: ret void
-sil @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
+sil [ossa] @copyDynamicMultiEnum : $@convention(method) <T, U where T: AnyObject> (@in_guaranteed EnumWithClassArchetypeAndDynamicSize<T>) -> () {
 bb0(%0 : $*EnumWithClassArchetypeAndDynamicSize<T>):
   %1 = alloc_stack $EnumWithClassArchetypeAndDynamicSize<T> 
   copy_addr %0 to [initialization] %1 : $*EnumWithClassArchetypeAndDynamicSize<T>
diff --git a/test/IRGen/argument_attrs.sil b/test/IRGen/argument_attrs.sil
index 76023db..2db4522 100644
--- a/test/IRGen/argument_attrs.sil
+++ b/test/IRGen/argument_attrs.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/IRGen/asmname.swift b/test/IRGen/asmname.swift
index 89fbef7..156aaea 100644
--- a/test/IRGen/asmname.swift
+++ b/test/IRGen/asmname.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/assert_conf_default.sil b/test/IRGen/assert_conf_default.sil
index 5d4afa5..32a440c 100644
--- a/test/IRGen/assert_conf_default.sil
+++ b/test/IRGen/assert_conf_default.sil
@@ -1,7 +1,7 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -assert-config DisableReplacement -emit-ir %s   | %FileCheck %s --check-prefix=DISABLED
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -assert-config Release -emit-ir %s   | %FileCheck %s --check-prefix=RELEASE
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -assert-config Debug -emit-ir %s   | %FileCheck %s --check-prefix=DEBUG
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -assert-config Unchecked -emit-ir %s   | %FileCheck %s --check-prefix=UNCHECKED
+// RUN: %target-swift-frontend -assert-config DisableReplacement -emit-ir %s   | %FileCheck %s --check-prefix=DISABLED
+// RUN: %target-swift-frontend -assert-config Release -emit-ir %s   | %FileCheck %s --check-prefix=RELEASE
+// RUN: %target-swift-frontend -assert-config Debug -emit-ir %s   | %FileCheck %s --check-prefix=DEBUG
+// RUN: %target-swift-frontend -assert-config Unchecked -emit-ir %s   | %FileCheck %s --check-prefix=UNCHECKED
 
 import Builtin
 
diff --git a/test/IRGen/associated_type_witness.swift b/test/IRGen/associated_type_witness.swift
index a251440..105d9c1 100644
--- a/test/IRGen/associated_type_witness.swift
+++ b/test/IRGen/associated_type_witness.swift
@@ -1,8 +1,8 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir > %t.ll
+// RUN: %target-swift-frontend -primary-file %s -emit-ir > %t.ll
 // RUN: %FileCheck %s -check-prefix=GLOBAL < %t.ll
 // RUN: %FileCheck %s < %t.ll
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -wmo -num-threads 1 > %t.ll.wmo
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -wmo -num-threads 1 > %t.ll.wmo
 // RUN: %FileCheck %s -check-prefix=GLOBAL < %t.ll.wmo
 // RUN: %FileCheck %s < %t.ll.wmo
 // REQUIRES: CPU=x86_64
diff --git a/test/IRGen/associated_types.swift b/test/IRGen/associated_types.swift
index 3c51f68..17de479 100644
--- a/test/IRGen/associated_types.swift
+++ b/test/IRGen/associated_types.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/assume.sil b/test/IRGen/assume.sil
index 9901b90..5a45b0e 100644
--- a/test/IRGen/assume.sil
+++ b/test/IRGen/assume.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -O -emit-ir %s | %FileCheck %s
 sil_stage canonical
 
 import Swift
diff --git a/test/IRGen/autorelease.sil b/test/IRGen/autorelease.sil
index 65a30fc..be3636f 100644
--- a/test/IRGen/autorelease.sil
+++ b/test/IRGen/autorelease.sil
@@ -9,13 +9,13 @@
 
 class C {}
 sil_vtable C {}
-sil @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
+sil [ossa] @_TFC11autorelease1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $C):
   %1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
   return %1 : $Builtin.NativeObject              // id: %2
 }
 
-sil @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
+sil [ossa] @foo : $@convention(thin) (@owned C?) -> @autoreleased C? {
 bb0(%0 : @owned $C?):
   return %0 : $C?
 }
@@ -28,7 +28,7 @@
 // CHECK-64:        [[T0:%.*]] = tail call i64 bitcast ([[OBJC]]* ([[OBJC]]*)* @objc_autoreleaseReturnValue to i64 (i64)*)(i64 %0)
 // CHECK-64-NEXT:   ret i64 [[T0]]
 
-sil @bar : $@convention(thin) (@owned C?) -> @owned C? {
+sil [ossa] @bar : $@convention(thin) (@owned C?) -> @owned C? {
 bb0(%0 : @owned $C?):
   %1 = function_ref @foo : $@convention(thin) (@owned C?) -> @autoreleased C?
   %2 = apply %1(%0) : $@convention(thin) (@owned C?) -> @autoreleased C?
diff --git a/test/IRGen/autorelease_optimized_aarch64.sil b/test/IRGen/autorelease_optimized_aarch64.sil
index 1511a8f..8931d8d 100644
--- a/test/IRGen/autorelease_optimized_aarch64.sil
+++ b/test/IRGen/autorelease_optimized_aarch64.sil
@@ -12,7 +12,7 @@
 
 sil_vtable C {}
 
-sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
+sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $C):
   %1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
   return %1 : $Builtin.NativeObject              // id: %2
@@ -21,7 +21,7 @@
 sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
 sil public_external @bar : $@convention(thin) (@owned C) -> ()
 
-sil @baz : $@convention(thin) (@owned C) -> () {
+sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
 bb0(%0 : @owned $C):
   %1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
   %2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
diff --git a/test/IRGen/autorelease_optimized_armv7.sil b/test/IRGen/autorelease_optimized_armv7.sil
index f8bd680..20765af 100644
--- a/test/IRGen/autorelease_optimized_armv7.sil
+++ b/test/IRGen/autorelease_optimized_armv7.sil
@@ -12,7 +12,7 @@
 
 sil_vtable C {}
 
-sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
+sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $C):
   %1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
   return %1 : $Builtin.NativeObject              // id: %2
@@ -21,7 +21,7 @@
 sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
 sil public_external @bar : $@convention(thin) (@owned C) -> ()
 
-sil @baz : $@convention(thin) (@owned C) -> () {
+sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
 bb0(%0 : @owned $C):
   %1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
   %2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
diff --git a/test/IRGen/autorelease_optimized_x86_64.sil b/test/IRGen/autorelease_optimized_x86_64.sil
index 307bfeb..870363b 100644
--- a/test/IRGen/autorelease_optimized_x86_64.sil
+++ b/test/IRGen/autorelease_optimized_x86_64.sil
@@ -12,7 +12,7 @@
 
 sil_vtable C {}
 
-sil @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
+sil [ossa] @_TFC21autorelease_optimized1Cd : $@convention(method) (@owned C) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $C):
   %1 = unchecked_ref_cast %0 : $C to $Builtin.NativeObject // user: %2
   return %1 : $Builtin.NativeObject              // id: %2
@@ -21,7 +21,7 @@
 sil public_external @foo : $@convention(thin) (@owned C) -> @autoreleased C
 sil public_external @bar : $@convention(thin) (@owned C) -> ()
 
-sil @baz : $@convention(thin) (@owned C) -> () {
+sil [ossa] @baz : $@convention(thin) (@owned C) -> () {
 bb0(%0 : @owned $C):
   %1 = function_ref @foo : $@convention(thin) (@owned C) -> @autoreleased C
   %2 = apply %1(%0) : $@convention(thin) (@owned C) -> @autoreleased C
diff --git a/test/IRGen/availability.swift b/test/IRGen/availability.swift
index 5312a6d..d0d4ca5 100644
--- a/test/IRGen/availability.swift
+++ b/test/IRGen/availability.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s --check-prefix=OPT
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/big_types_corner_cases.sil b/test/IRGen/big_types_corner_cases.sil
index 752a231..48bbe01 100644
--- a/test/IRGen/big_types_corner_cases.sil
+++ b/test/IRGen/big_types_corner_cases.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
+// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: OS=macosx
diff --git a/test/IRGen/big_types_corner_cases.swift b/test/IRGen/big_types_corner_cases.swift
index 87b26ce..759573f 100644
--- a/test/IRGen/big_types_corner_cases.swift
+++ b/test/IRGen/big_types_corner_cases.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-large-loadable-types %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend -enable-large-loadable-types %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 // REQUIRES: optimized_stdlib
 
 public struct BigStruct {
diff --git a/test/IRGen/big_types_corner_cases_as_library.swift b/test/IRGen/big_types_corner_cases_as_library.swift
index 7cbd836..94b8d62 100644
--- a/test/IRGen/big_types_corner_cases_as_library.swift
+++ b/test/IRGen/big_types_corner_cases_as_library.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-large-loadable-types %s -emit-ir  -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend -enable-large-loadable-types %s -emit-ir  -parse-as-library | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 public struct BigStruct {
   var i0 : Int32 = 0
diff --git a/test/IRGen/big_types_corner_cases_tiny.swift b/test/IRGen/big_types_corner_cases_tiny.swift
index 33f1263..8a9a88b 100644
--- a/test/IRGen/big_types_corner_cases_tiny.swift
+++ b/test/IRGen/big_types_corner_cases_tiny.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-large-loadable-types -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK
+// RUN: %target-swift-frontend -enable-large-loadable-types -primary-file %s %S/big_types_corner_cases.swift -emit-ir | %FileCheck %s --check-prefix=CHECK
 // REQUIRES: optimized_stdlib
 
 // DO NOT ADD ANY MORE CODE TO THIS FILE!
diff --git a/test/IRGen/big_types_coroutine.sil b/test/IRGen/big_types_coroutine.sil
index c8dc7fc..febd5ab 100644
--- a/test/IRGen/big_types_coroutine.sil
+++ b/test/IRGen/big_types_coroutine.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -loadable-address -enable-sil-verify-all %s | %FileCheck %s
+// RUN: %target-sil-opt -loadable-address -enable-sil-verify-all %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: OS=macosx
diff --git a/test/IRGen/big_types_tests.sil b/test/IRGen/big_types_tests.sil
index 28d4d22..1925601 100644
--- a/test/IRGen/big_types_tests.sil
+++ b/test/IRGen/big_types_tests.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
+// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir -enable-large-loadable-types | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: OS=macosx
diff --git a/test/IRGen/bitcast.sil b/test/IRGen/bitcast.sil
index aebc3bb..5966e00 100644
--- a/test/IRGen/bitcast.sil
+++ b/test/IRGen/bitcast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir| %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/bitcast_different_size.sil b/test/IRGen/bitcast_different_size.sil
index eed9fd3..fbe8d79 100644
--- a/test/IRGen/bitcast_different_size.sil
+++ b/test/IRGen/bitcast_different_size.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -verify | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s -verify | %FileCheck %s --check-prefix=OPT
+// RUN: %target-swift-frontend -emit-ir %s -verify | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir -O %s -verify | %FileCheck %s --check-prefix=OPT
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/bitcast_specialization.swift b/test/IRGen/bitcast_specialization.swift
index 083da57..b50c1fa 100644
--- a/test/IRGen/bitcast_specialization.swift
+++ b/test/IRGen/bitcast_specialization.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-object -O %s
+// RUN: %target-swift-frontend -emit-object -O %s
 
 // This is a compile-only test. It checks that the compiler does not crash for
 // a (not executed) bitcast with different sizes. This appears in the
diff --git a/test/IRGen/boxed_existential.sil b/test/IRGen/boxed_existential.sil
index 215aed9..a621981 100644
--- a/test/IRGen/boxed_existential.sil
+++ b/test/IRGen/boxed_existential.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime
 
 import Swift
 
diff --git a/test/IRGen/bridge_object_arm64.sil b/test/IRGen/bridge_object_arm64.sil
index 053cee1..689cbbc 100644
--- a/test/IRGen/bridge_object_arm64.sil
+++ b/test/IRGen/bridge_object_arm64.sil
@@ -1,4 +1,4 @@
-// RUN: %swift -assume-parsing-unqualified-ownership-sil -module-name bridge_object -emit-ir -target arm64-apple-ios8.0 %s | %FileCheck %s
+// RUN: %swift -module-name bridge_object -emit-ir -target arm64-apple-ios8.0 %s | %FileCheck %s
 
 // REQUIRES: CODEGENERATOR=AArch64
 
@@ -35,8 +35,8 @@
 // CHECK:         [[TAGGED_RESULT:%.*]] = bitcast [[BRIDGE]] %0 to [[C:%objc_object\*]]
 // CHECK:         br label %tagged-cont
 // CHECK:       not-tagged-pointer:
-// --                                                     0x00ff_ffff_ffff_fff8
-// CHECK:         [[MASKED_BITS:%.*]] = and i64 [[BOBITS]], 72057594037927928
+// --                                                     0x0fff_ffff_ffff_fff8
+// CHECK:         [[MASKED_BITS:%.*]] = and i64 [[BOBITS]], 1152921504606846968
 // CHECK:         [[MASKED_RESULT:%.*]] = inttoptr i64 [[MASKED_BITS]] to [[C]]
 // CHECK:         br label %tagged-cont
 // CHECK:      tagged-cont:
diff --git a/test/IRGen/bridge_object_armv7.sil b/test/IRGen/bridge_object_armv7.sil
index 33c3379..d4b5fad 100644
--- a/test/IRGen/bridge_object_armv7.sil
+++ b/test/IRGen/bridge_object_armv7.sil
@@ -1,4 +1,4 @@
-// RUN: %swift -assume-parsing-unqualified-ownership-sil -module-name bridge_object -emit-ir -target armv7-apple-ios8.0 %s | %FileCheck %s
+// RUN: %swift -module-name bridge_object -emit-ir -target armv7-apple-ios8.0 %s | %FileCheck %s
 
 // REQUIRES: CODEGENERATOR=ARM
 
diff --git a/test/IRGen/bridge_object_x86_64.sil b/test/IRGen/bridge_object_x86_64.sil
index ebd7ebe..e7ccc88 100644
--- a/test/IRGen/bridge_object_x86_64.sil
+++ b/test/IRGen/bridge_object_x86_64.sil
@@ -1,4 +1,4 @@
-// RUN: %swift -assume-parsing-unqualified-ownership-sil -module-name bridge_object -emit-ir -target x86_64-apple-macosx10.9 %s | %FileCheck %s
+// RUN: %swift -module-name bridge_object -emit-ir -target x86_64-apple-macosx10.9 %s | %FileCheck %s
 
 // REQUIRES: CODEGENERATOR=X86
 
diff --git a/test/IRGen/builtin_math.swift b/test/IRGen/builtin_math.swift
index e3a7b1b..3816b66 100644
--- a/test/IRGen/builtin_math.swift
+++ b/test/IRGen/builtin_math.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -O %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-os
+// RUN: %target-swift-frontend -emit-ir -O %s | %FileCheck %s -check-prefix CHECK -check-prefix CHECK-%target-os
 
 #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
 import Darwin
diff --git a/test/IRGen/builtin_word.sil b/test/IRGen/builtin_word.sil
index 10db401..6dfa030 100644
--- a/test/IRGen/builtin_word.sil
+++ b/test/IRGen/builtin_word.sil
@@ -35,7 +35,7 @@
 // ARM32:   %4 = insertvalue { i32, i64 } %3, i64 %2, 1
 // ARM32:   ret { i32, i64 } %4
 // ARM32: }
-sil @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
+sil [ossa] @word_zextOrBitCast : $(Builtin.Int32, Builtin.Word) -> (Builtin.Word, Builtin.Int64) {
 entry(%i : $Builtin.Int32, %w : $Builtin.Word):
   %j = builtin "zextOrBitCast_Int32_Word"(%i : $Builtin.Int32) : $Builtin.Word
   %v = builtin "zextOrBitCast_Word_Int64"(%w : $Builtin.Word) : $Builtin.Int64
@@ -57,7 +57,7 @@
 // ARM32:   %4 = insertvalue { i32, i32 } %3, i32 %2, 1
 // ARM32:   ret { i32, i32 } %4
 // ARM32: }
-sil @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
+sil [ossa] @word_truncOrBitCast : $(Builtin.Word, Builtin.Int64) -> (Builtin.Int32, Builtin.Word) {
 entry(%w : $Builtin.Word, %i : $Builtin.Int64):
   %v = builtin "truncOrBitCast_Word_Int32"(%w : $Builtin.Word) : $Builtin.Int32
   %j = builtin "truncOrBitCast_Int64_Word"(%i : $Builtin.Int64) : $Builtin.Word
diff --git a/test/IRGen/builtins.swift b/test/IRGen/builtins.swift
index 99b61b4..96c625c 100644
--- a/test/IRGen/builtins.swift
+++ b/test/IRGen/builtins.swift
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -module-name builtins -assume-parsing-unqualified-ownership-sil -parse-stdlib -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-frontend -module-name builtins -parse-stdlib -primary-file %s -emit-ir -o - -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/builtins_objc.swift b/test/IRGen/builtins_objc.swift
index 94a8d6d..3866d15 100644
--- a/test/IRGen/builtins_objc.swift
+++ b/test/IRGen/builtins_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-stdlib -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -parse-stdlib -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: executable_test
 // REQUIRES: objc_interop
diff --git a/test/IRGen/c_function_pointer.sil b/test/IRGen/c_function_pointer.sil
index 8cfd699..d846b04 100644
--- a/test/IRGen/c_function_pointer.sil
+++ b/test/IRGen/c_function_pointer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 import Swift
 
diff --git a/test/IRGen/c_functions.swift b/test/IRGen/c_functions.swift
index 0540bcc..f6fc966 100644
--- a/test/IRGen/c_functions.swift
+++ b/test/IRGen/c_functions.swift
@@ -1,5 +1,5 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu
+// RUN: %target-swift-frontend -import-objc-header %S/Inputs/c_functions.h -primary-file %s -emit-ir | %FileCheck %s -check-prefix CHECK -check-prefix %target-cpu
 
 // This is deliberately not a SIL test so that we can test SILGen too.
 
diff --git a/test/IRGen/c_functions_error.swift b/test/IRGen/c_functions_error.swift
index 184d543..10ff66b 100644
--- a/test/IRGen/c_functions_error.swift
+++ b/test/IRGen/c_functions_error.swift
@@ -1,4 +1,4 @@
-// RUN: not %target-swift-frontend -assume-parsing-unqualified-ownership-sil -Xcc -mno-sse -import-objc-header %S/Inputs/c_functions_error.h -primary-file %s -emit-ir
+// RUN: not %target-swift-frontend -Xcc -mno-sse -import-objc-header %S/Inputs/c_functions_error.h -primary-file %s -emit-ir
 
 // This should fail, but not crash.
 
diff --git a/test/IRGen/c_layout.sil b/test/IRGen/c_layout.sil
index 10708bc..d926c9d 100644
--- a/test/IRGen/c_layout.sil
+++ b/test/IRGen/c_layout.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu
+// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-cpu
 
 sil_stage canonical
 import c_layout
diff --git a/test/IRGen/casts.sil b/test/IRGen/casts.sil
index 62818be..45a9946 100644
--- a/test/IRGen/casts.sil
+++ b/test/IRGen/casts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/cf.sil b/test/IRGen/cf.sil
index 7c26cdf..887f586 100644
--- a/test/IRGen/cf.sil
+++ b/test/IRGen/cf.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %{python} %utils/chex.py < %s > %t/cf.sil
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs %t/cf.sil -emit-ir -import-cf-types | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %t/cf.sil -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/cf_members.sil b/test/IRGen/cf_members.sil
index ddc3129..46fb024 100644
--- a/test/IRGen/cf_members.sil
+++ b/test/IRGen/cf_members.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify -I %S/../IDE/Inputs/custom-modules %s
+// RUN: %target-swift-frontend -emit-ir -verify -I %S/../IDE/Inputs/custom-modules %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/clang_inline.swift b/test/IRGen/clang_inline.swift
index 927d4d4..561de9b 100644
--- a/test/IRGen/clang_inline.swift
+++ b/test/IRGen/clang_inline.swift
@@ -1,10 +1,10 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -I %t | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -sdk %S/Inputs -primary-file %s -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -I %t | %FileCheck %s
 
 // RUN: %empty-directory(%t/Empty.framework/Modules/Empty.swiftmodule)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/%target-swiftmodule-name %S/../Inputs/empty.swift -module-name Empty -I %t
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -I %t -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module-path %t/Empty.framework/Modules/Empty.swiftmodule/%target-swiftmodule-name %S/../Inputs/empty.swift -module-name Empty -I %t
+// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -I %t -F %t -DIMPORT_EMPTY -O -disable-sil-perf-optzns -disable-llvm-optzns -emit-ir -Xcc -fstack-protector -enable-objc-interop | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/clang_inline_reverse.swift b/test/IRGen/clang_inline_reverse.swift
index 5ad0e93..4397fdf 100644
--- a/test/IRGen/clang_inline_reverse.swift
+++ b/test/IRGen/clang_inline_reverse.swift
@@ -2,7 +2,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline -I %t | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs -primary-file %s -enable-objc-interop -emit-ir -module-name clang_inline -I %t | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/class.sil b/test/IRGen/class.sil
index 55f5b1f..b161747 100644
--- a/test/IRGen/class.sil
+++ b/test/IRGen/class.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/class_constraint.sil b/test/IRGen/class_constraint.sil
index 7a17320..2d13746 100644
--- a/test/IRGen/class_constraint.sil
+++ b/test/IRGen/class_constraint.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s
 
 protocol P {}
 class A : P {}
diff --git a/test/IRGen/class_isa_pointers.sil b/test/IRGen/class_isa_pointers.sil
index 3e38f41..c47ad2e 100644
--- a/test/IRGen/class_isa_pointers.sil
+++ b/test/IRGen/class_isa_pointers.sil
@@ -22,7 +22,7 @@
 // CHECK:         [[ISA:%.*]] = load %swift.type*, %swift.type** [[ISA_PTR]]
 // CHECK:         [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
 // CHECK:         getelementptr inbounds {{.*}} [[VTABLE]]
-sil @purebred_method : $@convention(thin) (@owned Purebred) -> () {
+sil [ossa] @purebred_method : $@convention(thin) (@owned Purebred) -> () {
 entry(%0 : @owned $Purebred):
   %m = class_method %0 : $Purebred, #Purebred.method!1 : (Purebred) -> () -> (), $@convention(method) (@guaranteed Purebred) -> ()
   %z = apply %m(%0) : $@convention(method) (@guaranteed Purebred) -> ()
@@ -46,7 +46,7 @@
 // CHECK:         [[ISA:%.*]] = inttoptr i64 [[T3]] to %swift.type*
 // CHECK:         [[VTABLE:%.*]] = bitcast %swift.type* [[ISA]]
 // CHECK:         getelementptr inbounds {{.*}} [[VTABLE]]
-sil @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
+sil [ossa] @mongrel_method : $@convention(thin) (@owned Mongrel) -> () {
 entry(%0 : @owned $Mongrel):
   %m = class_method %0 : $Mongrel, #Mongrel.method!1 : (Mongrel) -> () -> (), $@convention(method) (@guaranteed Mongrel) -> ()
   %z = apply %m(%0) : $@convention(method) (@guaranteed Mongrel) -> ()
@@ -55,15 +55,15 @@
 
 // ObjC stubs expected by ObjC metadata emission
 
-sil private @$s18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
+sil private [ossa] @$s18class_isa_pointers7MongrelC6methodyyFTo : $@convention(objc_method) (Purebred) -> () {
 entry(%0 : @unowned $Purebred):
   unreachable
 }
-sil private @$s18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
+sil private [ossa] @$s18class_isa_pointers7MongrelC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, Purebred) -> () {
 entry(%0 : $Int, %1 : @unowned $Purebred):
   unreachable
 }
-sil private @$s18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
+sil private [ossa] @$s18class_isa_pointers7MongrelCACycfcTo : $@convention(objc_method) (Purebred) -> () {
 entry(%0 : @unowned $Purebred):
   unreachable
 }
diff --git a/test/IRGen/class_stack_alloc.sil b/test/IRGen/class_stack_alloc.sil
index 9596023..45a5990 100644
--- a/test/IRGen/class_stack_alloc.sil
+++ b/test/IRGen/class_stack_alloc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 import Builtin
 import Swift
diff --git a/test/IRGen/closure.swift b/test/IRGen/closure.swift
index b84b8c6..12d7427 100644
--- a/test/IRGen/closure.swift
+++ b/test/IRGen/closure.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/completely_fragile_class_layout.sil b/test/IRGen/completely_fragile_class_layout.sil
index 732f3c7..dbf9089 100644
--- a/test/IRGen/completely_fragile_class_layout.sil
+++ b/test/IRGen/completely_fragile_class_layout.sil
@@ -181,7 +181,7 @@
 
 // CHECK-LABEL: define swiftcc {{(dllexport )?}}{{(protected )?}}i64 @accessClassWithResilientField(%T31completely_fragile_class_layout23ClassWithResilientFieldC*)
 sil @accessClassWithResilientField : $@convention(thin) (@guaranteed ClassWithResilientField) -> Int {
-bb0(%0 : @guaranteed $ClassWithResilientField):
+bb0(%0 : $ClassWithResilientField):
 
 // CHECK:        [[OFFSET:%.*]] = load i64, i64* @"$s31completely_fragile_class_layout23ClassWithResilientFieldC5thirdSivpWvd", align 8
 // CHECK-NEXT:   [[SELF_ADDR:%.*]] = bitcast %T31completely_fragile_class_layout23ClassWithResilientFieldC* %0 to i8*
@@ -192,7 +192,7 @@
   %1 = ref_element_addr %0 : $ClassWithResilientField, #ClassWithResilientField.third
 
 // CHECK-NEXT:   [[VALUE:%.*]] = load i64, i64* [[FIELD_PTR]], align 8
-  %2 = load [trivial] %1 : $*Int
+  %2 = load %1 : $*Int
 
 // CHECK-NEXT:   ret i64 [[VALUE]]
   return %2 : $Int
diff --git a/test/IRGen/condfail.sil b/test/IRGen/condfail.sil
index cc0b117..d236898 100644
--- a/test/IRGen/condfail.sil
+++ b/test/IRGen/condfail.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -O -g -S  | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu --check-prefix CHECK-OPT-%target-os
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -g -S  | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu --check-prefix CHECK-NOOPT-%target-os
+// RUN: %target-swift-frontend -primary-file %s -O -g -S  | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu --check-prefix CHECK-OPT-%target-os
+// RUN: %target-swift-frontend -primary-file %s -g -S  | %FileCheck %s --check-prefix CHECK --check-prefix CHECK-%target-cpu --check-prefix CHECK-NOOPT-%target-os
 
 import Builtin
 import Swift
diff --git a/test/IRGen/conformance_access_path.swift b/test/IRGen/conformance_access_path.swift
index 9cd4357..de5247b 100644
--- a/test/IRGen/conformance_access_path.swift
+++ b/test/IRGen/conformance_access_path.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir > %t.ll
+// RUN: %target-swift-frontend -primary-file %s -emit-ir > %t.ll
 // RUN: %FileCheck %s < %t.ll
 
 
diff --git a/test/IRGen/conformance_multifile.swift b/test/IRGen/conformance_multifile.swift
index 0a4e082..17d4c51 100644
--- a/test/IRGen/conformance_multifile.swift
+++ b/test/IRGen/conformance_multifile.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s %S/Inputs/conformance_multifile_1.swift | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/conformance_multifile_1.swift | %FileCheck %s
 
 func g<U>(_ f : (E) throws -> (U)) {}
 
diff --git a/test/IRGen/constant_struct_with_padding.sil b/test/IRGen/constant_struct_with_padding.sil
index b189570..74c17e5 100644
--- a/test/IRGen/constant_struct_with_padding.sil
+++ b/test/IRGen/constant_struct_with_padding.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -module-name main %s -emit-ir -o - | %FileCheck %s
+// RUN: %target-swift-frontend -module-name main %s -emit-ir -o - | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/copy_value_destroy_value.sil b/test/IRGen/copy_value_destroy_value.sil
index 1846cb7..21b141f 100644
--- a/test/IRGen/copy_value_destroy_value.sil
+++ b/test/IRGen/copy_value_destroy_value.sil
@@ -19,7 +19,7 @@
 // CHECK: define{{( protected)?}} swiftcc void @trivial_arg(
 // CHECK-NEXT: entry
 // CHECK-NEXT: ret void
-sil @trivial_arg : $@convention(thin) (Builtin.Int32) -> () {
+sil [ossa] @trivial_arg : $@convention(thin) (Builtin.Int32) -> () {
 bb0(%0 : $Builtin.Int32):
   %1 = copy_value %0 : $Builtin.Int32
   destroy_value %1 : $Builtin.Int32
@@ -36,7 +36,7 @@
 // CHECK: call %swift.refcounted* @swift_retain(%swift.refcounted* returned [[VAL2]])
 // CHECK: call void @swift_release(%swift.refcounted* [[VAL1]])
 // CHECK: call void @swift_release(%swift.refcounted* [[VAL2]])
-sil @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
+sil [ossa] @non_trivial : $@convention(thin) (@guaranteed Foo) -> () {
 bb0(%0 : @guaranteed $Foo):
   %1 = copy_value %0 : $Foo
   destroy_value %1 : $Foo
@@ -47,7 +47,7 @@
 // CHECK: define{{( protected)?}} swiftcc void @non_trivial_unowned(
 // CHECK: call %swift.refcounted* @swift_unownedRetainStrong(%swift.refcounted* returned %0)
 // CHECK: call void @swift_release(%swift.refcounted* %0)
-sil @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @non_trivial_unowned : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = ref_to_unowned %0 : $Builtin.NativeObject to $@sil_unowned Builtin.NativeObject
   %2 = copy_unowned_value %1 : $@sil_unowned Builtin.NativeObject
diff --git a/test/IRGen/decls.swift b/test/IRGen/decls.swift
index 948f00d..88956c0 100644
--- a/test/IRGen/decls.swift
+++ b/test/IRGen/decls.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // Check that we emit all local decls, not just the first one.
 func test1() {
diff --git a/test/IRGen/dependent_generic_base_class_constraint.swift b/test/IRGen/dependent_generic_base_class_constraint.swift
index 88b924e..5458ce1 100644
--- a/test/IRGen/dependent_generic_base_class_constraint.swift
+++ b/test/IRGen/dependent_generic_base_class_constraint.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s
+// RUN: %target-swift-frontend -emit-ir -verify %s
 class GenericClass<T> { }
 
 protocol MyProtocol { }
diff --git a/test/IRGen/dependent_reabstraction.swift b/test/IRGen/dependent_reabstraction.swift
index 1b1715a..6e18c21 100644
--- a/test/IRGen/dependent_reabstraction.swift
+++ b/test/IRGen/dependent_reabstraction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 func markUsed<T>(_ t: T) {}
 
diff --git a/test/IRGen/dynamic_cast.sil b/test/IRGen/dynamic_cast.sil
index 7be7496..7033089 100644
--- a/test/IRGen/dynamic_cast.sil
+++ b/test/IRGen/dynamic_cast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/dynamic_init.sil b/test/IRGen/dynamic_init.sil
index 7e5f80a..a541446 100644
--- a/test/IRGen/dynamic_init.sil
+++ b/test/IRGen/dynamic_init.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/dynamic_lookup.sil b/test/IRGen/dynamic_lookup.sil
index e4877f6..14af94d 100644
--- a/test/IRGen/dynamic_lookup.sil
+++ b/test/IRGen/dynamic_lookup.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/dynamic_replaceable.sil b/test/IRGen/dynamic_replaceable.sil
index a36a50d..4aefa52 100644
--- a/test/IRGen/dynamic_replaceable.sil
+++ b/test/IRGen/dynamic_replaceable.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-interop | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/dynamic_self.sil b/test/IRGen/dynamic_self.sil
index 816735b..27d0e04 100644
--- a/test/IRGen/dynamic_self.sil
+++ b/test/IRGen/dynamic_self.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/dynamic_self_metadata.swift b/test/IRGen/dynamic_self_metadata.swift
index 9b8d17f..5595db2 100644
--- a/test/IRGen/dynamic_self_metadata.swift
+++ b/test/IRGen/dynamic_self_metadata.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -parse-as-library | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -parse-as-library | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/enum.sil b/test/IRGen/enum.sil
index 5d756c2..d6c403e 100644
--- a/test/IRGen/enum.sil
+++ b/test/IRGen/enum.sil
@@ -1,7 +1,7 @@
 // #if directives don't work with SIL keywords, therefore please put ObjC tests
 // in `enum_objc.sil`.
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -enable-objc-interop  | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize
+// RUN: %target-swift-frontend %s -gnone -emit-ir -enable-objc-interop  | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize-simulator-%target-is-simulator -DWORD=i%target-ptrsize
+// RUN: %target-swift-frontend %s -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize -DWORD=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/enum_32_bit.sil b/test/IRGen/enum_32_bit.sil
index f6abbf4..b380b5f 100644
--- a/test/IRGen/enum_32_bit.sil
+++ b/test/IRGen/enum_32_bit.sil
@@ -1,5 +1,5 @@
-// RUN: %swift -assume-parsing-unqualified-ownership-sil -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
-// RUN: %swift -assume-parsing-unqualified-ownership-sil -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
+// RUN: %swift -target i386-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
+// RUN: %swift -target armv7-apple-ios7 %s -gnone -emit-ir | %FileCheck %s
 
 // REQUIRES: CODEGENERATOR=X86
 // REQUIRES: CODEGENERATOR=ARM
diff --git a/test/IRGen/enum_derived.swift b/test/IRGen/enum_derived.swift
index 57afa30..e5b5f59 100644
--- a/test/IRGen/enum_derived.swift
+++ b/test/IRGen/enum_derived.swift
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module -module-name def_enum -o %t %S/Inputs/def_enum.swift
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %t -O -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NORMAL %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %t -O -primary-file %s -enable-testing -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-TESTABLE %s
+// RUN: %target-swift-frontend -emit-module -module-name def_enum -o %t %S/Inputs/def_enum.swift
+// RUN: %target-swift-frontend -I %t -O -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-NORMAL %s
+// RUN: %target-swift-frontend -I %t -O -primary-file %s -enable-testing -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-TESTABLE %s
 
 import def_enum
 
diff --git a/test/IRGen/enum_dynamic_multi_payload.sil b/test/IRGen/enum_dynamic_multi_payload.sil
index e90a84f..50ed342 100644
--- a/test/IRGen/enum_dynamic_multi_payload.sil
+++ b/test/IRGen/enum_dynamic_multi_payload.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -I %S/Inputs | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend %s -gnone -emit-ir -I %S/Inputs | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
 
 import Builtin
 
diff --git a/test/IRGen/enum_empty_payloads.sil b/test/IRGen/enum_empty_payloads.sil
index 408d287..dc6bdb5 100644
--- a/test/IRGen/enum_empty_payloads.sil
+++ b/test/IRGen/enum_empty_payloads.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s
+// RUN: %target-swift-frontend -emit-ir -verify %s
 sil_stage canonical
 
 typealias Void = ()
diff --git a/test/IRGen/enum_function.sil b/test/IRGen/enum_function.sil
index 5a82299..b4e767b 100644
--- a/test/IRGen/enum_function.sil
+++ b/test/IRGen/enum_function.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -gnone -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -gnone -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/enum_function_payload.swift b/test/IRGen/enum_function_payload.swift
index 2772f34..2063627 100644
--- a/test/IRGen/enum_function_payload.swift
+++ b/test/IRGen/enum_function_payload.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s
+// RUN: %target-swift-frontend -emit-ir %s
 
 enum Singleton {
   case F((Singleton) -> ())
diff --git a/test/IRGen/enum_objc.sil b/test/IRGen/enum_objc.sil
index f82d428..9f537db 100644
--- a/test/IRGen/enum_objc.sil
+++ b/test/IRGen/enum_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-simulator-%target-is-simulator
+// RUN: %target-swift-frontend %s -gnone -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-ptrsize-simulator-%target-is-simulator
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/enum_pack.sil b/test/IRGen/enum_pack.sil
index c298365..809c5f7 100644
--- a/test/IRGen/enum_pack.sil
+++ b/test/IRGen/enum_pack.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s
+// RUN: %target-swift-frontend -emit-ir %s
 
 // This is a compile-only test. It checks if IRGen does not crash when packing
 // and unpacking enums (e.g. optionals) which contain empty structs as payloads.
diff --git a/test/IRGen/enum_spare_bits.sil b/test/IRGen/enum_spare_bits.sil
index 1a8599a..4c22008 100644
--- a/test/IRGen/enum_spare_bits.sil
+++ b/test/IRGen/enum_spare_bits.sil
@@ -75,6 +75,6 @@
 }
 
 sil @$s15enum_spare_bits1DCACycfcTo : $@convention(thin) (@owned D) -> @owned D {
-entry(%x : @owned $D):
+entry(%x : $D):
   return undef : $D
 }
diff --git a/test/IRGen/enum_switch_singleton_enum_in_optional.sil b/test/IRGen/enum_switch_singleton_enum_in_optional.sil
index ec028b7..e45eea4 100644
--- a/test/IRGen/enum_switch_singleton_enum_in_optional.sil
+++ b/test/IRGen/enum_switch_singleton_enum_in_optional.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 sil_stage canonical
 
 enum Optional<T> { case some(T), none }
diff --git a/test/IRGen/enum_top_bits_reserved.sil b/test/IRGen/enum_top_bits_reserved.sil
new file mode 100644
index 0000000..d654702
--- /dev/null
+++ b/test/IRGen/enum_top_bits_reserved.sil
@@ -0,0 +1,58 @@
+// RUN: %swift -module-name test -emit-ir -target arm64-apple-ios10.0 %s | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-arm64
+// RUN: %swift -module-name test -emit-ir -target x86_64-apple-macosx10.12 %s | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-x86_64
+
+class NativeClass {}
+sil_vtable NativeClass {}
+
+// On 64-bit targets, there are 3 spare bits in the alignment bits and
+// either 4 (arm64) or 8 (everywhere else) spare bits in the high byte.
+// Consume those bits one by one.
+
+enum A {
+  case either(NativeClass)
+  case or(NativeClass)
+}
+
+enum B {
+  case either(A)
+  case or(A)
+}
+
+enum C {
+  case either(B)
+  case or(B)
+}
+
+enum D {
+  case either(C)
+  case or(C)
+}
+
+enum E {
+  case either(D)
+  case or(D)
+}
+
+enum F {
+  case either(E)
+  case or(E)
+}
+
+enum G {
+  case either(F)
+  case or(F)
+}
+
+// Okay, we've claimed 7 spare bits.  On ARM64, the eighth spare bit will
+// require an extra discriminator.
+
+// CHECK-LABEL: @"$s4test1HOWV" = internal constant %swift.enum_vwtable
+// CHECK-x86_64-SAME:     i64 8,
+// CHECK-x86_64-SAME:     i64 8,
+// CHECK-arm64-SAME:      i64 9,
+// CHECK-arm64-SAME:      i64 16,
+
+enum H {
+  case either(G)
+  case or(G)
+}
diff --git a/test/IRGen/enum_value_semantics.sil b/test/IRGen/enum_value_semantics.sil
index 027b094..d16f2ca 100644
--- a/test/IRGen/enum_value_semantics.sil
+++ b/test/IRGen/enum_value_semantics.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os
+// RUN: %target-swift-frontend %s -gnone -emit-ir -enable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc --check-prefix=CHECK-objc-simulator-%target-is-simulator --check-prefix=CHECK-objc-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-objc-%target-os
+// RUN: %target-swift-frontend %s -gnone -emit-ir -disable-objc-interop | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native --check-prefix=CHECK-native-%target-ptrsize --check-prefix=CHECK-%target-os --check-prefix=CHECK-native-%target-os
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/enum_value_semantics_special_cases.sil b/test/IRGen/enum_value_semantics_special_cases.sil
index 985d484..b3b0c0b 100644
--- a/test/IRGen/enum_value_semantics_special_cases.sil
+++ b/test/IRGen/enum_value_semantics_special_cases.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime  --check-prefix=CHECK-%target-runtime-simulator-%target-is-simulator
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime  --check-prefix=CHECK-%target-runtime-simulator-%target-is-simulator
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/enum_value_semantics_special_cases_objc.sil b/test/IRGen/enum_value_semantics_special_cases_objc.sil
index ce6b6ff..c1be95c 100644
--- a/test/IRGen/enum_value_semantics_special_cases_objc.sil
+++ b/test/IRGen/enum_value_semantics_special_cases_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -enable-objc-interop -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -enable-objc-interop -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/error_self_conformance.sil b/test/IRGen/error_self_conformance.sil
index 8024181..1610a05 100644
--- a/test/IRGen/error_self_conformance.sil
+++ b/test/IRGen/error_self_conformance.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 import Swift
 
diff --git a/test/IRGen/errors.sil b/test/IRGen/errors.sil
index 52d1856..a2b21c6 100644
--- a/test/IRGen/errors.sil
+++ b/test/IRGen/errors.sil
@@ -1,5 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-cpu
-// REQUIRES: executable_test
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime --check-prefix=CHECK-%target-cpu
 
 sil_stage canonical
 
diff --git a/test/IRGen/errors_optimized.sil b/test/IRGen/errors_optimized.sil
index 9dbad24..2bd4e38 100644
--- a/test/IRGen/errors_optimized.sil
+++ b/test/IRGen/errors_optimized.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -O -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/exactcast.sil b/test/IRGen/exactcast.sil
index 805e95a..2b9cd80 100644
--- a/test/IRGen/exactcast.sil
+++ b/test/IRGen/exactcast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/exactcast2.sil b/test/IRGen/exactcast2.sil
index 7a88884..d7992e1 100644
--- a/test/IRGen/exactcast2.sil
+++ b/test/IRGen/exactcast2.sil
@@ -1,4 +1,4 @@
-// RUN: %target-build-swift %s -Xfrontend -assume-parsing-unqualified-ownership-sil -Xfrontend -enable-objc-interop -emit-ir -o -
+// RUN: %target-build-swift %s -Xfrontend -enable-objc-interop -emit-ir -o -
 // REQUIRES: executable_test
 
 // Make sure we are not crashing here.
diff --git a/test/IRGen/exclusivity.sil b/test/IRGen/exclusivity.sil
index 4d226ff..0f1a563 100644
--- a/test/IRGen/exclusivity.sil
+++ b/test/IRGen/exclusivity.sil
@@ -13,7 +13,7 @@
 sil public_external @changeInt : $@convention(thin) (@inout Int) -> ()
 
 // CHECK-LABEL: define {{.*}} @test1(
-sil @test1 : $@convention(thin) (@owned A) -> Int {
+sil [ossa] @test1 : $@convention(thin) (@owned A) -> Int {
 bb0(%0 : @owned $A):
   // CHECK: [[SCRATCH0:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],
   // CHECK: [[SCRATCH1:%.*]] = alloca [[BUFFER_T:\[.* x i8\]]],
diff --git a/test/IRGen/existential_metatypes.sil b/test/IRGen/existential_metatypes.sil
index b021912..d2801da 100644
--- a/test/IRGen/existential_metatypes.sil
+++ b/test/IRGen/existential_metatypes.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - -primary-file %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir -o - -primary-file %s | %FileCheck %s
 // REQUIRES: CPU=x86_64
 
 sil_stage canonical
@@ -109,10 +109,10 @@
   return %9 : $()
 }
 
-sil_witness_table Int: Kindable module existential_metatypes {
+sil_witness_table public_external Int: Kindable module existential_metatypes {
   method #Kindable.kind!getter.1: @int_kind_getter_witness
 }
 
-sil_witness_table Float: Kindable module existential_metatypes {
+sil_witness_table public_external Float: Kindable module existential_metatypes {
   method #Kindable.kind!getter.1: @float_kind_getter_witness
 }
diff --git a/test/IRGen/existentials.sil b/test/IRGen/existentials.sil
index 5298898..248fe37 100644
--- a/test/IRGen/existentials.sil
+++ b/test/IRGen/existentials.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-interop | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -disable-objc-interop | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/existentials_objc.sil b/test/IRGen/existentials_objc.sil
index d31aec0..4e980c4 100644
--- a/test/IRGen/existentials_objc.sil
+++ b/test/IRGen/existentials_objc.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/existentials_opaque_boxed.sil b/test/IRGen/existentials_opaque_boxed.sil
index 1d7f2c8..b83d0f3 100644
--- a/test/IRGen/existentials_opaque_boxed.sil
+++ b/test/IRGen/existentials_opaque_boxed.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
 
 sil_stage canonical
 
diff --git a/test/IRGen/expressions.swift b/test/IRGen/expressions.swift
index e6ebfe0..8c1153a 100644
--- a/test/IRGen/expressions.swift
+++ b/test/IRGen/expressions.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -parse-stdlib -disable-access-control | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -parse-stdlib -disable-access-control | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/extension_conformance_anyobject_conformance.swift b/test/IRGen/extension_conformance_anyobject_conformance.swift
index af7aff5..9a27383 100644
--- a/test/IRGen/extension_conformance_anyobject_conformance.swift
+++ b/test/IRGen/extension_conformance_anyobject_conformance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s
+// RUN: %target-swift-frontend -emit-ir -verify %s
 
 public struct TestGeneratorCrashy <Key: AnyObject, Value: AnyObject> {
     public mutating func next() -> (Key, Value)? {
diff --git a/test/IRGen/fixed_size_buffer_peepholes.sil b/test/IRGen/fixed_size_buffer_peepholes.sil
index a84883c..4686629 100644
--- a/test/IRGen/fixed_size_buffer_peepholes.sil
+++ b/test/IRGen/fixed_size_buffer_peepholes.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/IRGen/fixlifetime.sil b/test/IRGen/fixlifetime.sil
index 4b5f529..6ba29c0 100644
--- a/test/IRGen/fixlifetime.sil
+++ b/test/IRGen/fixlifetime.sil
@@ -1,6 +1,6 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -O %s | %FileCheck --check-prefix=CHECK-%target-runtime %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s | %FileCheck --check-prefix=CHECK-%target-runtime %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s
+// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -O %s | %FileCheck --check-prefix=CHECK-%target-runtime %s
+// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Ounchecked %s | %FileCheck --check-prefix=CHECK-%target-runtime %s
+// RUN: %target-swift-frontend -parse-sil -emit-ir -disable-llvm-optzns -Onone %s | %FileCheck --check-prefix=ONONE %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/foreign_types.sil b/test/IRGen/foreign_types.sil
index 31e4ed5..1f41e5e 100644
--- a/test/IRGen/foreign_types.sil
+++ b/test/IRGen/foreign_types.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
 
 sil_stage canonical
 import c_layout
diff --git a/test/IRGen/fulfillment.sil b/test/IRGen/fulfillment.sil
index 0a44fea..23442e2 100644
--- a/test/IRGen/fulfillment.sil
+++ b/test/IRGen/fulfillment.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/function-target-features.swift b/test/IRGen/function-target-features.swift
index 0934d7d..c862dab 100644
--- a/test/IRGen/function-target-features.swift
+++ b/test/IRGen/function-target-features.swift
@@ -1,12 +1,12 @@
 // This test verifies that we produce target-cpu and target-features attributes
 // on functions.
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx | %FileCheck %s -check-prefix=AVX-FEATURE
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx512f -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx512er | %FileCheck %s -check-prefix=TWO-AVX
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7 | %FileCheck %s -check-prefix=CORE-CPU
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7 -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx | %FileCheck %s -check-prefix=CORE-CPU-AND-FEATURES
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc x86-64 | %FileCheck %s -check-prefix=X86-64-CPU
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7-avx -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc -avx | %FileCheck %s -check-prefix=AVX-MINUS-FEATURE
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx | %FileCheck %s -check-prefix=AVX-FEATURE
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx512f -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx512er | %FileCheck %s -check-prefix=TWO-AVX
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7 | %FileCheck %s -check-prefix=CORE-CPU
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7 -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc +avx | %FileCheck %s -check-prefix=CORE-CPU-AND-FEATURES
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc x86-64 | %FileCheck %s -check-prefix=X86-64-CPU
+// RUN: %target-swift-frontend -emit-ir -o - %s -Xcc -Xclang -Xcc -target-cpu -Xcc -Xclang -Xcc corei7-avx -Xcc -Xclang -Xcc -target-feature -Xcc -Xclang -Xcc -avx | %FileCheck %s -check-prefix=AVX-MINUS-FEATURE
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/function_metadata.swift b/test/IRGen/function_metadata.swift
index 8ba96b7..91731db 100644
--- a/test/IRGen/function_metadata.swift
+++ b/test/IRGen/function_metadata.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s
 
 func arch<F>(_ f: F) {}
 
diff --git a/test/IRGen/function_param_convention.sil b/test/IRGen/function_param_convention.sil
index f3d0b01..15ffc06 100644
--- a/test/IRGen/function_param_convention.sil
+++ b/test/IRGen/function_param_convention.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -module-name Test | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s -module-name Test | %FileCheck %s
 
 import Builtin
 
diff --git a/test/IRGen/function_types.sil b/test/IRGen/function_types.sil
index f978ab2..c5eb94b 100644
--- a/test/IRGen/function_types.sil
+++ b/test/IRGen/function_types.sil
@@ -1,9 +1,9 @@
-// RUN: %swift -target x86_64-apple-macosx10.9 -module-name function_types -assume-parsing-unqualified-ownership-sil %s -emit-ir -o - | %FileCheck %s
-// RUN: %swift -target i386-apple-ios7.1 %s -module-name function_types -assume-parsing-unqualified-ownership-sil -emit-ir -o - | %FileCheck %s
-// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name function_types -assume-parsing-unqualified-ownership-sil -emit-ir -o - | %FileCheck %s
-// RUN: %swift -target armv7-apple-ios7.1 %s -module-name function_types -assume-parsing-unqualified-ownership-sil -emit-ir -o - | %FileCheck %s
-// RUN: %swift -target arm64-apple-ios7.1 %s -module-name function_types -assume-parsing-unqualified-ownership-sil -emit-ir -o - | %FileCheck %s
-// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name function_types -assume-parsing-unqualified-ownership-sil -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target x86_64-apple-macosx10.9 -module-name function_types %s -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target i386-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target x86_64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target armv7-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target arm64-apple-ios7.1 %s -module-name function_types -emit-ir -o - | %FileCheck %s
+// RUN: %swift -target x86_64-unknown-linux-gnu -disable-objc-interop %s -module-name function_types -emit-ir -o - | %FileCheck %s
 
 // REQUIRES: CODEGENERATOR=X86
 // REQUIRES: CODEGENERATOR=ARM
diff --git a/test/IRGen/generic_class_anyobject.swift b/test/IRGen/generic_class_anyobject.swift
index 568b02a..402bebd 100644
--- a/test/IRGen/generic_class_anyobject.swift
+++ b/test/IRGen/generic_class_anyobject.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/generic_classes.sil b/test/IRGen/generic_classes.sil
index 6faabbf..bdeb3aa 100644
--- a/test/IRGen/generic_classes.sil
+++ b/test/IRGen/generic_classes.sil
@@ -264,7 +264,7 @@
 // RootGeneric.x has fixed layout
 // CHECK: define{{( dllexport)?}}{{( protected)?}} swiftcc i8 @RootGeneric_concrete_fragile_dependent_member_access_x
 // CHECK:   getelementptr inbounds [[ROOTGENERIC]], [[ROOTGENERIC]]* %0, i32 0, i32 1
-sil @RootGeneric_concrete_fragile_dependent_member_access_x : $<F> (RootGeneric<F>) -> UInt8 {
+sil [ossa] @RootGeneric_concrete_fragile_dependent_member_access_x : $<F> (RootGeneric<F>) -> UInt8 {
 entry(%c : @unowned $RootGeneric<F>):
   %p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.x
   %x = load_borrow %p : $*UInt8
@@ -279,7 +279,7 @@
 // CHECK:   [[CLASS_BYTE_ARRAY:%.*]] = bitcast [[ROOTGENERIC]]* {{%.*}} to i8*
 // CHECK:   [[Y_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Y_OFFSET]]
 // CHECK:   bitcast i8* [[Y_ADDR]] to %swift.opaque*
-sil @RootGeneric_concrete_fragile_dependent_member_access_y : $<F> (RootGeneric<F>) -> @out F {
+sil [ossa] @RootGeneric_concrete_fragile_dependent_member_access_y : $<F> (RootGeneric<F>) -> @out F {
 entry(%z : $*F, %c : @unowned $RootGeneric<F>):
   %p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.y
   copy_addr %p to [initialization] %z : $*F
@@ -290,7 +290,7 @@
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @RootGeneric_subst_concrete_fragile_dependent_member_access_y
 // CHECK:   [[Y_ADDR:%.*]] = getelementptr inbounds {{.*}}, {{.*}}* %1, i32 0, i32 3
 // CHECK:   bitcast %TSi* [[Y_ADDR]] to i8*
-sil @RootGeneric_subst_concrete_fragile_dependent_member_access_y : $(RootGeneric<Int>) -> @out Int {
+sil [ossa] @RootGeneric_subst_concrete_fragile_dependent_member_access_y : $(RootGeneric<Int>) -> @out Int {
 entry(%z : $*Int, %c : @unowned $RootGeneric<Int>):
   %p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.y
   copy_addr %p to [initialization] %z : $*Int
@@ -306,7 +306,7 @@
 // CHECK:   [[CLASS_BYTE_ARRAY:%.*]] = bitcast [[ROOTGENERIC]]* {{%.*}} to i8*
 // CHECK:   [[Z_ADDR:%.*]] = getelementptr inbounds i8, i8* [[CLASS_BYTE_ARRAY]], i64 [[Z_OFFSET]]
 // CHECK:   bitcast i8* [[Z_ADDR]] to %Ts5UInt8V*
-sil @RootGeneric_concrete_fragile_dependent_member_access_z : $<F> (RootGeneric<F>) -> UInt8 {
+sil [ossa] @RootGeneric_concrete_fragile_dependent_member_access_z : $<F> (RootGeneric<F>) -> UInt8 {
 entry(%c : @unowned $RootGeneric<F>):
   %p = ref_element_addr %c : $RootGeneric<F>, #RootGeneric.z
   %z = load_borrow %p : $*UInt8
@@ -317,7 +317,7 @@
 // CHECK:   [[Z_ADDR:%.*]] = getelementptr inbounds {{.*}}, {{.*}}* %0, i32 0, i32 4
 // CHECK:   [[T0:%.*]] = getelementptr inbounds %Ts5UInt8V, %Ts5UInt8V* [[Z_ADDR]], i32 0, i32 0
 // CHECK:   load i8, i8* [[T0]], align
-sil @RootGeneric_subst_concrete_fragile_dependent_member_access_z : $(RootGeneric<Int>) -> UInt8 {
+sil [ossa] @RootGeneric_subst_concrete_fragile_dependent_member_access_z : $(RootGeneric<Int>) -> UInt8 {
 entry(%c : @unowned $RootGeneric<Int>):
   %p = ref_element_addr %c : $RootGeneric<Int>, #RootGeneric.z
   %z = load_borrow %p : $*UInt8
diff --git a/test/IRGen/generic_classes_objc.sil b/test/IRGen/generic_classes_objc.sil
index c02e162..5fcd6ab 100644
--- a/test/IRGen/generic_classes_objc.sil
+++ b/test/IRGen/generic_classes_objc.sil
@@ -22,18 +22,18 @@
 
 // __deallocating_deinit
 sil @$s20generic_classes_objc19GenericInheritsObjCCfD : $@convention(method) <T> (GenericInheritsObjC<T>) -> () {
-bb0(%0 : @unowned $GenericInheritsObjC<T>):
+bb0(%0 : $GenericInheritsObjC<T>):
   unreachable
 }
 
 // @objc init
 sil @$s20generic_classes_objc19GenericInheritsObjCCACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
-bb0(%0 : @owned $GenericInheritsObjC<T>):
+bb0(%0 : $GenericInheritsObjC<T>):
   unreachable
 }
 
 sil @$s20generic_classes_objc19GenericInheritsObjCC7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
-bb0(%0 : $Int, %1 : @owned $GenericInheritsObjC<T>):
+bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
   unreachable
 }
 
@@ -50,18 +50,18 @@
 
 // __deallocating_deinit
 sil @$s20generic_classes_objc20GenericInheritsObjC2CfD : $@convention(method) <T> (GenericInheritsObjC2<T>) -> () {
-bb0(%0 : @unowned $GenericInheritsObjC2<T>):
+bb0(%0 : $GenericInheritsObjC2<T>):
   unreachable
 }
 
 // @objc init
 sil @$s20generic_classes_objc20GenericInheritsObjC2CACyxGycfcTo : $@convention(objc_method) <T> (@owned GenericInheritsObjC2<T>) -> @owned GenericInheritsObjC2<T> {
-bb0(%0 : @owned $GenericInheritsObjC2<T>):
+bb0(%0 : $GenericInheritsObjC2<T>):
   unreachable
 }
 
 sil @$s20generic_classes_objc20GenericInheritsObjC2C7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned GenericInheritsObjC<T>) -> @owned GenericInheritsObjC<T> {
-bb0(%0 : $Int, %1 : @owned $GenericInheritsObjC<T>):
+bb0(%0 : $Int, %1 : $GenericInheritsObjC<T>):
   unreachable
 }
 
diff --git a/test/IRGen/generic_enums.swift b/test/IRGen/generic_enums.swift
index c475aa0..2086536 100644
--- a/test/IRGen/generic_enums.swift
+++ b/test/IRGen/generic_enums.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir
+// RUN: %target-swift-frontend -primary-file %s -emit-ir
 
 struct Bar<A1, A2> {
   var a: A1
diff --git a/test/IRGen/generic_requirement_objc.sil b/test/IRGen/generic_requirement_objc.sil
index b14e2d2..45c1139 100644
--- a/test/IRGen/generic_requirement_objc.sil
+++ b/test/IRGen/generic_requirement_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/generic_structs.sil b/test/IRGen/generic_structs.sil
index 602dc61..549786e 100644
--- a/test/IRGen/generic_structs.sil
+++ b/test/IRGen/generic_structs.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %{python} %utils/chex.py < %s > %t/generic_structs.sil
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil
+// RUN: %target-swift-frontend %t/generic_structs.sil -emit-ir | %FileCheck %t/generic_structs.sil
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/generic_structs.swift b/test/IRGen/generic_structs.swift
index b5c303a..e1994c3 100644
--- a/test/IRGen/generic_structs.swift
+++ b/test/IRGen/generic_structs.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize -DINT_32=i32
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize -DINT_32=i32
 
 struct A<T1, T2>
 {
diff --git a/test/IRGen/generic_ternary.swift b/test/IRGen/generic_ternary.swift
index c397401..ab56ba5 100644
--- a/test/IRGen/generic_ternary.swift
+++ b/test/IRGen/generic_ternary.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/generic_tuples.swift b/test/IRGen/generic_tuples.swift
index b00c140..ed6dca3 100644
--- a/test/IRGen/generic_tuples.swift
+++ b/test/IRGen/generic_tuples.swift
@@ -1,8 +1,8 @@
 
-// RUN: %target-swift-frontend -module-name generic_tuples -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s
+// RUN: %target-swift-frontend -module-name generic_tuples -emit-ir -primary-file %s | %FileCheck %s
 
 // Make sure that optimization passes don't choke on storage types for generic tuples
-// RUN: %target-swift-frontend -module-name generic_tuples -assume-parsing-unqualified-ownership-sil -emit-ir -O %s
+// RUN: %target-swift-frontend -module-name generic_tuples -emit-ir -O %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/global_resilience.sil b/test/IRGen/global_resilience.sil
index c73f154..983e85a 100644
--- a/test/IRGen/global_resilience.sil
+++ b/test/IRGen/global_resilience.sil
@@ -1,8 +1,8 @@
 // RUN: %empty-directory(%t)
 
 // RUN: %target-swift-frontend %S/../Inputs/resilient_struct.swift -enable-resilience -emit-module -emit-module-path %t/resilient_struct.swiftmodule
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-resilience -I %t -emit-ir %s | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-resilience -I %t -emit-ir -O %s
+// RUN: %target-swift-frontend -enable-resilience -I %t -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-resilience -I %t -emit-ir -O %s
 
 // CHECK: %swift.type = type { [[INT:i32|i64]] }
 
diff --git a/test/IRGen/globals.swift b/test/IRGen/globals.swift
index b959704..1fece01 100644
--- a/test/IRGen/globals.swift
+++ b/test/IRGen/globals.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/indexing.sil b/test/IRGen/indexing.sil
index add599e..07c0602 100644
--- a/test/IRGen/indexing.sil
+++ b/test/IRGen/indexing.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/indirect_argument.sil b/test/IRGen/indirect_argument.sil
index eba6bd8..69df495 100644
--- a/test/IRGen/indirect_argument.sil
+++ b/test/IRGen/indirect_argument.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-%target-ptrsize %s
 import Swift
 import Builtin
 
diff --git a/test/IRGen/indirect_enum.sil b/test/IRGen/indirect_enum.sil
index 401bb3b..05ced10 100644
--- a/test/IRGen/indirect_enum.sil
+++ b/test/IRGen/indirect_enum.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 import Swift
 
diff --git a/test/IRGen/indirect_return.swift b/test/IRGen/indirect_return.swift
index 6f86fe8..ea91a2e 100644
--- a/test/IRGen/indirect_return.swift
+++ b/test/IRGen/indirect_return.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/infinite_archetype.swift b/test/IRGen/infinite_archetype.swift
index 1dee7ac..248a5a9 100644
--- a/test/IRGen/infinite_archetype.swift
+++ b/test/IRGen/infinite_archetype.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/invalid_alignment.swift b/test/IRGen/invalid_alignment.swift
index dcf236a..2751034 100644
--- a/test/IRGen/invalid_alignment.swift
+++ b/test/IRGen/invalid_alignment.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -verify
+// RUN: %target-swift-frontend -emit-ir %s -verify
 
 @_alignment(1) // expected-error{{cannot decrease alignment below natural alignment of 4}}
 struct Bar { var x, y, z, w: Float }
diff --git a/test/IRGen/invariant_load.sil b/test/IRGen/invariant_load.sil
index e931f71..f083c31 100644
--- a/test/IRGen/invariant_load.sil
+++ b/test/IRGen/invariant_load.sil
@@ -10,7 +10,7 @@
 }
 
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @invariant_load
-sil @invariant_load : $@convention(thin) (Builtin.RawPointer) -> () {
+sil [ossa] @invariant_load : $@convention(thin) (Builtin.RawPointer) -> () {
 entry(%p : $Builtin.RawPointer):
   %a = pointer_to_address %p : $Builtin.RawPointer to [invariant] $*X
   // CHECK: load i32, {{.*}} !invariant.load
diff --git a/test/IRGen/ivar_destroyer.sil b/test/IRGen/ivar_destroyer.sil
index 7c3615c..e339aa4 100644
--- a/test/IRGen/ivar_destroyer.sil
+++ b/test/IRGen/ivar_destroyer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/keypaths.sil b/test/IRGen/keypaths.sil
index 709352b..286c596 100644
--- a/test/IRGen/keypaths.sil
+++ b/test/IRGen/keypaths.sil
@@ -312,7 +312,7 @@
 sil @n_set : $@convention(thin) <UU, TT> (@in_guaranteed UU, @in_guaranteed TT) -> ()
 
 sil @computed_property_indices : $@convention(thin) (C, S, C, S, C, S) -> () {
-entry(%0 : @unowned $C, %1 : @unowned $S, %2 : @unowned $C, %3 : @unowned $S, %4 : @unowned $C, %5 : @unowned $S):
+entry(%0 : $C, %1 : $S, %2 : $C, %3 : $S, %4 : $C, %5 : $S):
   %o = keypath $WritableKeyPath<S, C>, (
     root $S;
     settable_property $C,
diff --git a/test/IRGen/keypaths_objc.sil b/test/IRGen/keypaths_objc.sil
index a14e06f..4ec7159 100644
--- a/test/IRGen/keypaths_objc.sil
+++ b/test/IRGen/keypaths_objc.sil
@@ -36,7 +36,7 @@
 }
 
 sil hidden @$s13keypaths_objc1CC1xSo8NSStringCvgTo : $@convention(objc_method) (@guaranteed C) -> NSString {
-entry(%0 : @guaranteed $C):
+entry(%0 : $C):
   unreachable
 }
 
diff --git a/test/IRGen/lazy_field_metadata.swift b/test/IRGen/lazy_field_metadata.swift
new file mode 100644
index 0000000..702957e
--- /dev/null
+++ b/test/IRGen/lazy_field_metadata.swift
@@ -0,0 +1,18 @@
+// RUN: %target-swift-frontend -emit-ir -wmo -O %s | %FileCheck %s
+
+// Both should be emitted:
+
+// CHECK: @"$s19lazy_field_metadata011GenericWithD5FieldVMn" = hidden constant
+// CHECK: @"$s19lazy_field_metadata24GenericWithConcreteFieldVMn" = hidden constant
+
+struct GenericWithConcreteField<T> {
+  let z = 123
+}
+
+struct GenericWithGenericField<T> {
+  var field = GenericWithConcreteField<T>()
+}
+
+public func forceMetadata() -> Any.Type {
+  return GenericWithGenericField<Int>.self
+}
\ No newline at end of file
diff --git a/test/IRGen/lazy_globals.swift b/test/IRGen/lazy_globals.swift
index 11a15a2..6083d61 100644
--- a/test/IRGen/lazy_globals.swift
+++ b/test/IRGen/lazy_globals.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-as-library -emit-ir -primary-file %s | %FileCheck %s
+// RUN: %target-swift-frontend -parse-as-library -emit-ir -primary-file %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/lazy_multi_file.swift b/test/IRGen/lazy_multi_file.swift
index 4a4795b..78a4a13 100644
--- a/test/IRGen/lazy_multi_file.swift
+++ b/test/IRGen/lazy_multi_file.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s %S/Inputs/lazy_multi_file_helper.swift -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/lifetime.sil b/test/IRGen/lifetime.sil
index db8b5a2..18b8db2 100644
--- a/test/IRGen/lifetime.sil
+++ b/test/IRGen/lifetime.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -gnone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 // CHECK: [[OPAQUE:%swift.opaque]] = type opaque
 // CHECK: [[TYPE:%swift.type]] = type
diff --git a/test/IRGen/literals.sil b/test/IRGen/literals.sil
index 14cec52..193bf81 100644
--- a/test/IRGen/literals.sil
+++ b/test/IRGen/literals.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/local_types.swift b/test/IRGen/local_types.swift
index 98519e5..a676453 100644
--- a/test/IRGen/local_types.swift
+++ b/test/IRGen/local_types.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module %S/Inputs/local_types_helper.swift -o %t
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir -parse-as-library %s -I %t | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE %s
+// RUN: %target-swift-frontend -emit-module %S/Inputs/local_types_helper.swift -o %t
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir -parse-as-library %s -I %t | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE %s
 
 import local_types_helper
 
diff --git a/test/IRGen/lowered_optional_self_metadata.sil b/test/IRGen/lowered_optional_self_metadata.sil
index 2d570ad..2f56a50 100644
--- a/test/IRGen/lowered_optional_self_metadata.sil
+++ b/test/IRGen/lowered_optional_self_metadata.sil
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s
+// RUN: %target-swift-frontend -emit-ir %s
 sil_stage canonical
 
 import Swift
diff --git a/test/IRGen/mangle-anonclosure.swift b/test/IRGen/mangle-anonclosure.swift
index b1a0155..3c80009 100644
--- a/test/IRGen/mangle-anonclosure.swift
+++ b/test/IRGen/mangle-anonclosure.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -o - | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s -o - | %FileCheck %s
 
 func someValidPointer<T>() -> UnsafeMutablePointer<T> { fatalError() }
 
diff --git a/test/IRGen/meta_meta_type.swift b/test/IRGen/meta_meta_type.swift
index 6235e42..a555f16 100644
--- a/test/IRGen/meta_meta_type.swift
+++ b/test/IRGen/meta_meta_type.swift
@@ -2,7 +2,7 @@
 // RUN: %target-build-swift %s -o %t/a.out
 // RUN: %target-codesign %t/a.out
 // RUN: %target-run %t/a.out | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECKIR %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck -check-prefix=CHECKIR %s
 // REQUIRES: executable_test
 
 protocol Proto {
diff --git a/test/IRGen/metadata_dominance.swift b/test/IRGen/metadata_dominance.swift
index 5d90a00..78e24c6 100644
--- a/test/IRGen/metadata_dominance.swift
+++ b/test/IRGen/metadata_dominance.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -emit-ir -primary-file %s | %FileCheck %s --check-prefix=CHECK-OPT -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir -primary-file %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -O -emit-ir -primary-file %s | %FileCheck %s --check-prefix=CHECK-OPT -DINT=i%target-ptrsize
 
 func use_metadata<F>(_ f: F) {}
 
diff --git a/test/IRGen/metatype.sil b/test/IRGen/metatype.sil
index cda8043..4761abd 100644
--- a/test/IRGen/metatype.sil
+++ b/test/IRGen/metatype.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/metatype_casts.sil b/test/IRGen/metatype_casts.sil
index 0145752..680ab0a 100644
--- a/test/IRGen/metatype_casts.sil
+++ b/test/IRGen/metatype_casts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -enable-objc-interop -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend %s -enable-objc-interop -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/mixed_objc_native_protocol_constraints.swift b/test/IRGen/mixed_objc_native_protocol_constraints.swift
index 6153ec7..fcdf714 100644
--- a/test/IRGen/mixed_objc_native_protocol_constraints.swift
+++ b/test/IRGen/mixed_objc_native_protocol_constraints.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s
+// RUN: %target-swift-frontend -emit-ir -verify %s
 
 // compiler_crashers/029-class-with-anyobject-type-constraint.swift
 // Test case submitted to project by https://github.com/jansabbe (Jan Sabbe)
diff --git a/test/IRGen/module_hash.swift b/test/IRGen/module_hash.swift
index 97dccca..9bb2352 100644
--- a/test/IRGen/module_hash.swift
+++ b/test/IRGen/module_hash.swift
@@ -4,28 +4,28 @@
 // Test with a single output file
 
 // RUN: echo "single-threaded initial" >%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: single-threaded initial
 // CHECK: test.o: MD5=[[TEST_MD5:[0-9a-f]+]]
 // CHECK-NOT: prev MD5
 
 // RUN: echo "single-threaded same compilation" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: single-threaded same compilation
 // CHECK: test.o: MD5=[[TEST_MD5]]
 // CHECK: test.o: prev MD5=[[TEST_MD5]] skipping
 
 // RUN: echo "single-threaded file changed" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo %s %S/Inputs/simple2.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo %s %S/Inputs/simple2.swift -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: single-threaded file changed
 // CHECK: test.o: MD5=[[TEST2_MD5:[0-9a-f]+]]
 // CHECK: test.o: prev MD5=[[TEST_MD5]] recompiling
 
 // RUN: echo "single-threaded option changed" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo %s %S/Inputs/simple2.swift -disable-llvm-optzns -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo %s %S/Inputs/simple2.swift -disable-llvm-optzns -module-name=test -c -o %t/test.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: single-threaded option changed
 // CHECK: test.o: MD5=[[TEST3_MD5:[0-9a-f]+]]
@@ -35,7 +35,7 @@
 // Test with multiple output files
 
 // RUN: echo "multi-threaded initial" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo -num-threads 2 %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo -num-threads 2 %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: multi-threaded initial
 // CHECK-DAG: test.o: MD5=[[TEST4_MD5:[0-9a-f]+]]
@@ -43,7 +43,7 @@
 // CHECK-DAG: simple.o: MD5=[[SIMPLE_MD5:[0-9a-f]+]]
 
 // RUN: echo "multi-threaded same compilation" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo -num-threads 2 %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo -num-threads 2 %s %S/Inputs/simple.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: multi-threaded same compilation
 // CHECK-DAG: test.o: MD5=[[TEST4_MD5]]
@@ -52,7 +52,7 @@
 // CHECK-DAG: simple.o: prev MD5=[[SIMPLE_MD5]] skipping
 
 // RUN: echo "multi-threaded one file changed" >>%t/log
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -wmo -num-threads 2 %s %S/Inputs/simple2.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
+// RUN: %target-swift-frontend -O -wmo -num-threads 2 %s %S/Inputs/simple2.swift -module-name=test -c -o %t/test.o -o %t/simple.o -Xllvm -debug-only=irgen 2>>%t/log
 
 // CHECK-LABEL: multi-threaded one file changed
 // CHECK-DAG: test.o: MD5=[[TEST4_MD5]]
diff --git a/test/IRGen/multi_payload_shifting.swift b/test/IRGen/multi_payload_shifting.swift
index 44d9e0b..8fd9419 100644
--- a/test/IRGen/multi_payload_shifting.swift
+++ b/test/IRGen/multi_payload_shifting.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/multithread_module.swift b/test/IRGen/multithread_module.swift
index 9e2860b..2b0325c 100644
--- a/test/IRGen/multithread_module.swift
+++ b/test/IRGen/multithread_module.swift
@@ -1,10 +1,10 @@
 // RUN: %empty-directory(%t)
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %S/Inputs/multithread_module/main.swift -emit-ir -o %t/main.ll %/s -o %t/mt_module.ll -num-threads 2 -O -g -module-name test
+// RUN: %target-swift-frontend %S/Inputs/multithread_module/main.swift -emit-ir -o %t/main.ll %/s -o %t/mt_module.ll -num-threads 2 -O -g -module-name test
 // RUN: %FileCheck --check-prefix=CHECK-MAINLL %s <%t/main.ll
 // RUN: %FileCheck --check-prefix=CHECK-MODULELL %s <%t/mt_module.ll
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -c %S/Inputs/multithread_module/main.swift -o %t/main.o %s -o %t/mt_module.o -num-threads 2 -O -g -module-name test
+// RUN: %target-swift-frontend -c %S/Inputs/multithread_module/main.swift -o %t/main.o %s -o %t/mt_module.o -num-threads 2 -O -g -module-name test
 // RUN: %target-build-swift %t/main.o %t/mt_module.o -o %t/a.out
 // RUN: %target-codesign %t/a.out
 // RUN: %target-run %t/a.out | %FileCheck %s
diff --git a/test/IRGen/nested_types.sil b/test/IRGen/nested_types.sil
index 3a85bd0..33f4a23 100644
--- a/test/IRGen/nested_types.sil
+++ b/test/IRGen/nested_types.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 
 sil_stage canonical
 
diff --git a/test/IRGen/noinline.swift b/test/IRGen/noinline.swift
index 6f92301..cd17fdb 100644
--- a/test/IRGen/noinline.swift
+++ b/test/IRGen/noinline.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -O -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -O -emit-ir | %FileCheck %s
 
 public var x = 0
 
diff --git a/test/IRGen/nonatomic_reference_counting.sil b/test/IRGen/nonatomic_reference_counting.sil
index d385616..e16fc1c 100644
--- a/test/IRGen/nonatomic_reference_counting.sil
+++ b/test/IRGen/nonatomic_reference_counting.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-sil-perf-optzns -O -Xllvm -swiftmergefunc-threshold=0 -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -disable-sil-perf-optzns -O -Xllvm -swiftmergefunc-threshold=0 -emit-ir %s | %FileCheck %s
 
 // Check that IRGen lowers non-atomic reference counting instructions to
 // proper runtime calls.
diff --git a/test/IRGen/nondominant.sil b/test/IRGen/nondominant.sil
index 038628f..67e9615 100644
--- a/test/IRGen/nondominant.sil
+++ b/test/IRGen/nondominant.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/objc_alloc.sil b/test/IRGen/objc_alloc.sil
index 2994c17..933aab4 100644
--- a/test/IRGen/objc_alloc.sil
+++ b/test/IRGen/objc_alloc.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/objc_attr_NSManaged.sil b/test/IRGen/objc_attr_NSManaged.sil
index 19b6bbb7..dd6815a 100644
--- a/test/IRGen/objc_attr_NSManaged.sil
+++ b/test/IRGen/objc_attr_NSManaged.sil
@@ -32,27 +32,27 @@
   @objc @NSManaged func kvc()
 }
 sil @$s19objc_attr_NSManaged1XCACycfcTo : $@convention(objc_method) (@owned X) -> @owned X {
-bb0(%0 : @owned $X):
+bb0(%0 : $X):
   return %0 : $X
 }
 
 sil @$s19objc_attr_NSManaged10SwiftGizmoCACycfcTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : @owned $SwiftGizmo):
+bb0(%0 : $SwiftGizmo):
   return %0 : $SwiftGizmo
 }
 
 sil @$s19objc_attr_NSManaged10SwiftGizmoC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, @owned SwiftGizmo) -> @owned SwiftGizmo? {
-bb0(%0 : $Int, %1 : @owned $SwiftGizmo):
+bb0(%0 : $Int, %1 : $SwiftGizmo):
   unreachable
 }
 
 sil @$s19objc_attr_NSManaged10SwiftGizmoCACycfc : $@convention(method) (@owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : @owned $SwiftGizmo):
+bb0(%0 : $SwiftGizmo):
   return %0 : $SwiftGizmo
 }
 
 sil @$s19objc_attr_NSManaged10SwiftGizmoC7bellsOnACSi_tcfc : $@convention(method) (Int, @owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : $Int, %1 : @owned $SwiftGizmo):
+bb0(%0 : $Int, %1 : $SwiftGizmo):
   return %1 : $SwiftGizmo
 }
 
diff --git a/test/IRGen/objc_block.sil b/test/IRGen/objc_block.sil
index b673b4f..2b6c08b 100644
--- a/test/IRGen/objc_block.sil
+++ b/test/IRGen/objc_block.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/objc_block_storage.sil b/test/IRGen/objc_block_storage.sil
index 85a26b3..046bba2 100644
--- a/test/IRGen/objc_block_storage.sil
+++ b/test/IRGen/objc_block_storage.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -enable-objc-interop -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -gnone -enable-objc-interop -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/objc_casts.sil b/test/IRGen/objc_casts.sil
index 981aad2..f672d4a 100644
--- a/test/IRGen/objc_casts.sil
+++ b/test/IRGen/objc_casts.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s
+// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) -primary-file %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/objc_class_empty_fields.swift b/test/IRGen/objc_class_empty_fields.swift
index 246c9ef..abeffd1 100644
--- a/test/IRGen/objc_class_empty_fields.swift
+++ b/test/IRGen/objc_class_empty_fields.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -enable-objc-interop -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
 
 // SR-1055
 
diff --git a/test/IRGen/objc_class_export.swift b/test/IRGen/objc_class_export.swift
index e308557..1de46ad 100644
--- a/test/IRGen/objc_class_export.swift
+++ b/test/IRGen/objc_class_export.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/objc_class_property.swift b/test/IRGen/objc_class_property.swift
index 21d930b..59e293f 100644
--- a/test/IRGen/objc_class_property.swift
+++ b/test/IRGen/objc_class_property.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/objc_dealloc.sil b/test/IRGen/objc_dealloc.sil
index 5567089..d9fe3c6 100644
--- a/test/IRGen/objc_dealloc.sil
+++ b/test/IRGen/objc_dealloc.sil
@@ -35,7 +35,7 @@
   return %1 : $()                                 // id: %2
 }
 
-sil @$s12objc_dealloc10SwiftGizmoCfd : $@convention(thin) (@owned SwiftGizmo) -> @owned Builtin.NativeObject {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoCfd : $@convention(thin) (@owned SwiftGizmo) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $SwiftGizmo):
   // function_ref objc_dealloc.onDestruct () -> ()
   %1 = function_ref @$s12objc_dealloc10onDestructyyF : $@convention(thin) () -> () // user: %2
@@ -48,7 +48,7 @@
   return %5 : $Builtin.NativeObject              // id: %6
 }
 
-sil @$s12objc_dealloc10SwiftGizmoC1xAA1XCfgTo : $@convention(objc_method) (SwiftGizmo) -> @autoreleased X {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoC1xAA1XCfgTo : $@convention(objc_method) (SwiftGizmo) -> @autoreleased X {
 bb0(%0 : @unowned $SwiftGizmo):
   %1 = begin_borrow %0 : $SwiftGizmo
   %2 = ref_element_addr %1 : $SwiftGizmo, #SwiftGizmo.x      // user: %2
@@ -57,7 +57,7 @@
   return %3 : $X                                  // id: %4
 }
 
-sil @$s12objc_dealloc10SwiftGizmoC1xAA1XCfsTo : $@convention(objc_method) (X, SwiftGizmo) -> () {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoC1xAA1XCfsTo : $@convention(objc_method) (X, SwiftGizmo) -> () {
 bb0(%0 : @unowned $X, %1 : @unowned $SwiftGizmo):
   %2 = copy_value %0 : $X
   %3 = copy_value %1 : $SwiftGizmo
@@ -71,7 +71,7 @@
 }
 
 // CHECK: define internal void @"$s12objc_dealloc10SwiftGizmoCfDTo"([[OPAQUE:%.*]]*, i8*) unnamed_addr
-sil @$s12objc_dealloc10SwiftGizmoCfDTo : $@convention(objc_method) (SwiftGizmo) -> () {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoCfDTo : $@convention(objc_method) (SwiftGizmo) -> () {
 bb0(%0 : @unowned $SwiftGizmo):
   // CHECK-NEXT: entry
   // CHECK-NEXT: [[OBJC_SUPER:%[a-zA-Z0-9_]+]] = alloca %objc_super, align 8
@@ -119,18 +119,18 @@
 }
 
 // @objc ObjectiveC.SwiftGizmo.__ivar_destroyer
-sil @$s12objc_dealloc10SwiftGizmoCfETo : $@convention(objc_method) (SwiftGizmo) -> () {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoCfETo : $@convention(objc_method) (SwiftGizmo) -> () {
 bb0(%0 : @unowned $SwiftGizmo):
   %3 = tuple ()
   return %3 : $()                                 // id: %4
 }
 
-sil @$s12objc_dealloc10SwiftGizmoCACycfcTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoCACycfcTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo {
 bb0(%0 : @owned $SwiftGizmo):
   return %0 : $SwiftGizmo
 }
 
-sil @$s12objc_dealloc10SwiftGizmoC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, @owned SwiftGizmo) -> @owned SwiftGizmo? {
+sil [ossa] @$s12objc_dealloc10SwiftGizmoC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, @owned SwiftGizmo) -> @owned SwiftGizmo? {
 bb0(%0 : $Int, %1 : @owned $SwiftGizmo):
   unreachable
 }
diff --git a/test/IRGen/objc_deprecated_objc_thunks.swift b/test/IRGen/objc_deprecated_objc_thunks.swift
index 625a151..967df75 100644
--- a/test/IRGen/objc_deprecated_objc_thunks.swift
+++ b/test/IRGen/objc_deprecated_objc_thunks.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-swift3-objc-inference -swift-version 4 | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/objc_enum_multi_file.swift b/test/IRGen/objc_enum_multi_file.swift
index 179e768..d7677c0 100644
--- a/test/IRGen/objc_enum_multi_file.swift
+++ b/test/IRGen/objc_enum_multi_file.swift
@@ -1,8 +1,8 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -module-name main -primary-file %s %S/Inputs/objc_enum_multi_file_helper.swift -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -module-name main -primary-file %s %S/Inputs/objc_enum_multi_file_helper.swift -emit-ir | %FileCheck %s
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-objc-attr-requires-foundation-module -enable-objc-interop -emit-module %S/Inputs/objc_enum_multi_file_helper.swift -o %t
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -module-name main -primary-file %s -I %t -DIMPORT -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -enable-objc-interop -emit-module %S/Inputs/objc_enum_multi_file_helper.swift -o %t
+// RUN: %target-swift-frontend -module-name main -primary-file %s -I %t -DIMPORT -emit-ir | %FileCheck %s
 
 #if IMPORT
 import objc_enum_multi_file_helper
diff --git a/test/IRGen/objc_errors.sil b/test/IRGen/objc_errors.sil
index 9d00f8b..81e696b 100644
--- a/test/IRGen/objc_errors.sil
+++ b/test/IRGen/objc_errors.sil
@@ -10,7 +10,7 @@
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc %swift.error* @errortype_from_nserror(%TSo7NSErrorC*)
 // CHECK:         %1 = bitcast %TSo7NSErrorC* %0 to %swift.error*
 sil @errortype_from_nserror : $@convention(thin) (@owned NSError) -> @owned Error {
-entry(%0 : @owned $NSError):
+entry(%0 : $NSError):
   %1 = init_existential_ref %0 : $NSError : $NSError, $Error
   return %1 : $Error
 }
diff --git a/test/IRGen/objc_factory_method.sil b/test/IRGen/objc_factory_method.sil
index e05c345..7c7991b 100644
--- a/test/IRGen/objc_factory_method.sil
+++ b/test/IRGen/objc_factory_method.sil
@@ -18,7 +18,7 @@
 
 // CHECK-LABEL: define {{.*}} @_TFCSo4HiveCfMS_FT5queenGSQCSo3Bee__S_
 sil @_TFCSo4HiveCfMS_FT5queenGSQCSo3Bee__S_ : $@convention(thin) (@owned Optional<Bee>, @thick Hive.Type) -> @owned Optional<Hive> {
-bb0(%0 : @owned $Optional<Bee>, %1 : $@thick Hive.Type):
+bb0(%0 : $Optional<Bee>, %1 : $@thick Hive.Type):
   %2 = thick_to_objc_metatype %1 : $@thick Hive.Type to $@objc_metatype Hive.Type // users: %3, %4
   // CHECK: load i8*, i8** @"\01L_selector(hiveWithQueen:)"
   %3 = objc_method %2 : $@objc_metatype Hive.Type, #Hive.init!allocator.1.foreign : (Hive.Type) -> (Bee!) -> Hive!, $@convention(objc_method) (Optional<Bee>, @objc_metatype Hive.Type) -> @autoreleased Optional<Hive> // user: %4
diff --git a/test/IRGen/objc_generic_class_convention.sil b/test/IRGen/objc_generic_class_convention.sil
index 841081c..813dca6 100644
--- a/test/IRGen/objc_generic_class_convention.sil
+++ b/test/IRGen/objc_generic_class_convention.sil
@@ -15,12 +15,12 @@
 
 // CHECK-LABEL: define swiftcc void @method(i64, %TSo12GenericClassC* swiftself)
 sil @method : $@convention(method) @pseudogeneric <T: AnyObject> (Int64, @guaranteed GenericClass<T>) -> () {
-entry(%0 : $Int64, %1 : @guaranteed $GenericClass<T>):
+entry(%0 : $Int64, %1 : $GenericClass<T>):
   return undef : $()
 }
 
 // CHECK-LABEL: define void @objcMethod(i8*, i8*, i64)
 sil @objcMethod : $@convention(objc_method) @pseudogeneric <T: AnyObject> (Int64, @guaranteed GenericClass<T>) -> () {
-entry(%0 : $Int64, %1 : @guaranteed $GenericClass<T>):
+entry(%0 : $Int64, %1 : $GenericClass<T>):
   return undef : $()
 }
diff --git a/test/IRGen/objc_generic_class_metadata.sil b/test/IRGen/objc_generic_class_metadata.sil
index 4d16e0a..52bdff2 100644
--- a/test/IRGen/objc_generic_class_metadata.sil
+++ b/test/IRGen/objc_generic_class_metadata.sil
@@ -59,22 +59,22 @@
 }
 
 sil @$s27objc_generic_class_metadata8SubclassC5thingACSgSo8NSStringCSg_tcfcTo : $@convention(objc_method) (Optional<NSString>, @owned Subclass) -> @owned Optional<Subclass> {
-entry(%0 : @unowned $Optional<NSString>, %1 : @owned $Subclass):
+entry(%0 : $Optional<NSString>, %1 : $Subclass):
   unreachable
 }
 
 sil @$s27objc_generic_class_metadata8SubclassC13arrayOfThingsACSgSaySo8NSStringCG_tcfcTo : $@convention(objc_method) (NSArray, @owned Subclass) -> @owned Optional<Subclass> {
-entry(%0 : @unowned $NSArray, %1 : @owned $Subclass):
+entry(%0 : $NSArray, %1 : $Subclass):
   unreachable
 }
 
 sil @$s27objc_generic_class_metadata8SubclassCACycfcTo : $@convention(objc_method) (@owned Subclass) -> @owned Subclass {
-entry(%0 : @owned $Subclass):
+entry(%0 : $Subclass):
   unreachable
 }
 
 sil @$s27objc_generic_class_metadata8SubclassC7optionsACSgSDySo13GenericOptionaypGSg_tcfcTo : $@convention(objc_method) (@owned Subclass, @owned NSDictionary) -> @owned Subclass {
-entry(%0: @owned $Subclass, %1: @owned $NSDictionary):
+entry(%0 : $Subclass, %1 : $NSDictionary):
   unreachable
 }
 
diff --git a/test/IRGen/objc_generic_protocol_conformance.swift b/test/IRGen/objc_generic_protocol_conformance.swift
index 0a24707..6acbe6f 100644
--- a/test/IRGen/objc_generic_protocol_conformance.swift
+++ b/test/IRGen/objc_generic_protocol_conformance.swift
@@ -7,5 +7,5 @@
 
 extension Foo: P {}
 
-// SIL-LABEL: sil private [transparent] [thunk] @$sSo3FooCyxG33objc_generic_protocol_conformance1PA2dEP3fooyyFTW {{.*}} @pseudogeneric
+// SIL-LABEL: sil private [transparent] [thunk] [ossa] @$sSo3FooCyxG33objc_generic_protocol_conformance1PA2dEP3fooyyFTW {{.*}} @pseudogeneric
 // IR-LABEL: define internal swiftcc void @"$sSo3FooCyxG33objc_generic_protocol_conformance1PA2dEP3fooyyFTW"(%TSo3FooC** noalias nocapture swiftself dereferenceable({{4|8}}), %swift.type*{{( %Self)?}}, i8**{{( %SelfWitnessTable)?}})
diff --git a/test/IRGen/objc_implicit_with.sil b/test/IRGen/objc_implicit_with.sil
index dc3a770..d62e250 100644
--- a/test/IRGen/objc_implicit_with.sil
+++ b/test/IRGen/objc_implicit_with.sil
@@ -23,26 +23,26 @@
 sil_vtable SwiftGizmo {}
 
 sil @$s18objc_implicit_with10SwiftGizmoC3red5green4blueACSf_S2ftcfcTo : $@convention(objc_method) (Float, Float, Float, @owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : @owned $SwiftGizmo):
+bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : $SwiftGizmo):
   return %3 : $SwiftGizmo
 }
 
 sil @$s18objc_implicit_with10SwiftGizmoC7bellsOnACSgSi_tcfcTo : $@convention(objc_method) (Int, @owned SwiftGizmo) -> @owned SwiftGizmo? {
-bb0(%0 : $Int, %1 : @owned $SwiftGizmo):
+bb0(%0 : $Int, %1 : $SwiftGizmo):
   unreachable
 }
 
 sil @$s18objc_implicit_with10SwiftGizmoCACycfcTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : @owned $SwiftGizmo):
+bb0(%0 : $SwiftGizmo):
   return %0 : $SwiftGizmo
 }
 
 sil @$s18objc_implicit_with10SwiftGizmoC5color3red5green4blueySf_S2ftFTo : $@convention(objc_method) (Float, Float, Float, @owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : @owned $SwiftGizmo):
+bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : $SwiftGizmo):
   return %3 : $SwiftGizmo
 }
 
 sil @$s18objc_implicit_with10SwiftGizmoC13otherColorFor3red5green4blueySf_S2ftFTo : $@convention(objc_method) (Float, Float, Float, @owned SwiftGizmo) -> @owned SwiftGizmo {
-bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : @owned $SwiftGizmo):
+bb0(%0 : $Float, %1 : $Float, %2 : $Float, %3 : $SwiftGizmo):
   return %3 : $SwiftGizmo
 }
diff --git a/test/IRGen/objc_int_encoding.sil b/test/IRGen/objc_int_encoding.sil
index 125cc9b..538e492 100644
--- a/test/IRGen/objc_int_encoding.sil
+++ b/test/IRGen/objc_int_encoding.sil
@@ -20,11 +20,11 @@
 }
 
 sil hidden @$s17objc_int_encoding3FooC3foo1xSuSi_tFTo : $@convention(objc_method) (Int, @guaranteed Foo) -> UInt {
-entry(%0 : $Int, %1 : @owned $Foo):
+entry(%0 : $Int, %1 : $Foo):
   unreachable
 }
 sil @$s17objc_int_encoding3FooCACycfcTo : $@convention(objc_method) (@owned Foo) -> @owned Foo {
-entry(%1 : @owned $Foo):
+entry(%1 : $Foo):
   unreachable
 }
 
diff --git a/test/IRGen/objc_properties.swift b/test/IRGen/objc_properties.swift
index 8e87328..45d3737 100644
--- a/test/IRGen/objc_properties.swift
+++ b/test/IRGen/objc_properties.swift
@@ -47,6 +47,8 @@
   @objc class var extensionClassProp : SomeObject.Type {
     return self
   }
+
+  @objc static var extensionStoredStaticProp: Int64 = 0
 }
 
 // <rdar://problem/16952186> Crash with @lazy in @objc class
@@ -77,14 +79,14 @@
 }
 
 // CHECK-NEW: [[SHARED_NAME:@.*]] = private unnamed_addr constant [11 x i8] c"sharedProp\00"
-// CHECK-NEW: [[SHARED_ATTRS:@.*]] = private unnamed_addr constant [17 x i8] c"Tq,N,VsharedProp\00"
+// CHECK-NEW: [[SHARED_ATTRS:@.*]] = private unnamed_addr constant [5 x i8] c"Tq,N\00"
 
 // CHECK-NEW: @_CLASS_PROPERTIES__TtC15objc_properties10SomeObject = private constant { {{.*}}] } {
 // CHECK-NEW:   i32 16,
 // CHECK-NEW:   i32 1,
 // CHECK-NEW:   [1 x { i8*, i8* }] [{
 // CHECK-NEW:     i8* getelementptr inbounds ([11 x i8], [11 x i8]* [[SHARED_NAME]], i64 0, i64 0),
-// CHECK-NEW:     i8* getelementptr inbounds ([17 x i8], [17 x i8]* [[SHARED_ATTRS]], i64 0, i64 0)
+// CHECK-NEW:     i8* getelementptr inbounds ([5 x i8], [5 x i8]* [[SHARED_ATTRS]], i64 0, i64 0)
 // CHECK-NEW:   }]
 // CHECK-NEW: }, section "__DATA, __objc_const", align 8
 
@@ -209,14 +211,17 @@
 
 // CHECK-NEW: [[EXTENSIONCLASSPROPERTY_NAME:@.*]] = private unnamed_addr constant [19 x i8] c"extensionClassProp\00"
 // CHECK-NEW: [[EXTENSIONCLASSPROPERTY_ATTRS:@.*]] = private unnamed_addr constant [7 x i8] c"T#,N,R\00"
+// CHECK-NEW: [[EXTENSIONSTATICPROPERTY_NAME:@.*]] = private unnamed_addr constant [26 x i8] c"extensionStoredStaticProp\00"
 
 // CHECK-NEW: @"_CATEGORY_CLASS_PROPERTIES__TtC15objc_properties10SomeObject_$_objc_properties" = private constant { {{.*}}] } {
 // CHECK-NEW:   i32 16,
-// CHECK-NEW:   i32 1,
-// CHECK-NEW:   [1 x { i8*, i8* }] [{
+// CHECK-NEW:   i32 2,
+// CHECK-NEW:   [2 x { i8*, i8* }] [{
 // CHECK-NEW:     i8* getelementptr inbounds ([19 x i8], [19 x i8]* [[EXTENSIONCLASSPROPERTY_NAME]], i64 0, i64 0),
 // CHECK-NEW:     i8* getelementptr inbounds ([7 x i8], [7 x i8]* [[EXTENSIONCLASSPROPERTY_ATTRS]], i64 0, i64 0)
-// CHECK-NEW:   }]
+// CHECK-NEW:   }, {
+// CHECK-NEW:	  i8* getelementptr inbounds ([26 x i8], [26 x i8]* [[EXTENSIONSTATICPROPERTY_NAME]], i64 0, i64 0),
+// CHECK-NEW:	  i8* getelementptr inbounds ([5 x i8], [5 x i8]* [[SHARED_ATTRS]], i64 0, i64 0) }]
 // CHECK-NEW: }, section "__DATA, __objc_const", align 8
 
 // CHECK: @"_CATEGORY__TtC15objc_properties10SomeObject_$_objc_properties" = private constant { {{.+}} } {
diff --git a/test/IRGen/objc_protocol_conversion.sil b/test/IRGen/objc_protocol_conversion.sil
index 7115cbe..9d5e52e 100644
--- a/test/IRGen/objc_protocol_conversion.sil
+++ b/test/IRGen/objc_protocol_conversion.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/objc_protocol_multi_file.swift b/test/IRGen/objc_protocol_multi_file.swift
index cc8da31..03affcc 100644
--- a/test/IRGen/objc_protocol_multi_file.swift
+++ b/test/IRGen/objc_protocol_multi_file.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s %S/Inputs/objc_protocol_multi_file_helper.swift -g -emit-ir | %FileCheck %s
 
 // This used to crash <rdar://problem/17929944>.
 // To tickle the crash, SubProto must not be used elsewhere in this file.
diff --git a/test/IRGen/objc_protocols_jit.swift b/test/IRGen/objc_protocols_jit.swift
index 9b63598..0fe25f1 100644
--- a/test/IRGen/objc_protocols_jit.swift
+++ b/test/IRGen/objc_protocols_jit.swift
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t -primary-file %s -use-jit -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/objc_protocols_Bas.swift
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -primary-file %s -use-jit -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/objc_remapped_inits.swift b/test/IRGen/objc_remapped_inits.swift
index afa56f3..437255c 100644
--- a/test/IRGen/objc_remapped_inits.swift
+++ b/test/IRGen/objc_remapped_inits.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // FIXME: This test could use %clang-importer-sdk, but the compiler crashes.
 
diff --git a/test/IRGen/objc_retainAutoreleasedReturnValue.swift b/test/IRGen/objc_retainAutoreleasedReturnValue.swift
index 6056d28..343d403 100644
--- a/test/IRGen/objc_retainAutoreleasedReturnValue.swift
+++ b/test/IRGen/objc_retainAutoreleasedReturnValue.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s
-// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -O -assume-parsing-unqualified-ownership-sil -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s --check-prefix=OPT
+// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -module-name objc_retainAutoreleasedReturnValue -O -import-objc-header %S/Inputs/StaticInline.h %s -emit-ir | %FileCheck %s --check-prefix=OPT
 
 // REQUIRES: objc_interop
 // REQUIRES: CPU=x86_64
diff --git a/test/IRGen/objc_runtime_visible.sil b/test/IRGen/objc_runtime_visible.sil
index 7a7c39b..a0c2511 100644
--- a/test/IRGen/objc_runtime_visible.sil
+++ b/test/IRGen/objc_runtime_visible.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -I %S/../Inputs/custom-modules %s -emit-ir | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/IRGen/objc_selector.sil b/test/IRGen/objc_selector.sil
index 22d5c4d..4548228 100644
--- a/test/IRGen/objc_selector.sil
+++ b/test/IRGen/objc_selector.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/objc_subscripts.swift b/test/IRGen/objc_subscripts.swift
index 5f4a685..6beda46 100644
--- a/test/IRGen/objc_subscripts.swift
+++ b/test/IRGen/objc_subscripts.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/objc_types_as_member.sil b/test/IRGen/objc_types_as_member.sil
index a7609e6..a5b03a0 100644
--- a/test/IRGen/objc_types_as_member.sil
+++ b/test/IRGen/objc_types_as_member.sil
@@ -15,7 +15,7 @@
 // CHECK:   ret void
 
 sil @test : $@convention(witness_method: NSRuncing) (@guaranteed OuterType.InnerType) -> () {
-bb0(%0 : @guaranteed $OuterType.InnerType):
+bb0(%0 : $OuterType.InnerType):
   %1 = function_ref @use_metatype : $@convention(thin) <τ_0_0> (@thin τ_0_0.Type) -> ()
   %2 = metatype $@thin OuterType.Type
   %3 = apply %1<OuterType>(%2) : $@convention(thin) <τ_0_0> (@thin τ_0_0.Type) -> ()
diff --git a/test/IRGen/opaque_values_irgen.sil b/test/IRGen/opaque_values_irgen.sil
index c1635a6..787282e 100644
--- a/test/IRGen/opaque_values_irgen.sil
+++ b/test/IRGen/opaque_values_irgen.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -parse-stdlib -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -enable-sil-opaque-values -parse-stdlib -primary-file %s -emit-ir | %FileCheck %s
 
 import Builtin
 
diff --git a/test/IRGen/open_boxed_existential.sil b/test/IRGen/open_boxed_existential.sil
index 88e6bfa..c154ab2 100644
--- a/test/IRGen/open_boxed_existential.sil
+++ b/test/IRGen/open_boxed_existential.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-%target-runtime
 
 import Swift
 
diff --git a/test/IRGen/optimize_for_size.sil b/test/IRGen/optimize_for_size.sil
index 32cfa3f..c6b5dfb 100644
--- a/test/IRGen/optimize_for_size.sil
+++ b/test/IRGen/optimize_for_size.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -Osize -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
-// RUN: %target-swift-frontend -O -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=O
+// RUN: %target-swift-frontend -Osize -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -O -emit-ir %s | %FileCheck %s --check-prefix=O
 sil_stage canonical
 
 import Builtin
diff --git a/test/IRGen/optional_metatype.sil b/test/IRGen/optional_metatype.sil
index ab29134..926d10f 100644
--- a/test/IRGen/optional_metatype.sil
+++ b/test/IRGen/optional_metatype.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s --check-prefix=%target-cpu
+// RUN: %target-swift-frontend -sdk %S/Inputs -I %t -emit-ir %s | %FileCheck %s --check-prefix=%target-cpu
 
 // REQUIRES: objc_interop
 
diff --git a/test/IRGen/ownership_qualified_memopts.sil b/test/IRGen/ownership_qualified_memopts.sil
index 5597f83..b6737bd 100644
--- a/test/IRGen/ownership_qualified_memopts.sil
+++ b/test/IRGen/ownership_qualified_memopts.sil
@@ -8,7 +8,7 @@
 // CHECK: load
 // CHECK-NOT: retain
 // CHECK: ret void
-sil @take_load : $@convention(thin) (@in Builtin.NativeObject) -> () {
+sil [ossa] @take_load : $@convention(thin) (@in Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject):
   load [take] %0 : $*Builtin.NativeObject
   %1 = tuple()
@@ -19,7 +19,7 @@
 // CHECK: load
 // CHECK: retain
 // CHECK: ret void
-sil @copy_load : $@convention(thin) (@in Builtin.NativeObject) -> () {
+sil [ossa] @copy_load : $@convention(thin) (@in Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject):
   load [copy] %0 : $*Builtin.NativeObject
   %1 = tuple()
@@ -31,7 +31,7 @@
 // CHECK: load
 // CHECK-NOT: retain
 // CHECK: ret void
-sil @trivial_load : $@convention(thin) (@in Builtin.Int32) -> () {
+sil [ossa] @trivial_load : $@convention(thin) (@in Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.Int32):
   load [trivial] %0 : $*Builtin.Int32
   %1 = tuple()
@@ -45,7 +45,7 @@
 // CHECK-NOT: load
 // CHECK-NOT: release
 // CHECK: ret void
-sil @init_store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @init_store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : $Builtin.NativeObject):
   store %1 to [init] %0 : $*Builtin.NativeObject
   %2 = tuple()
@@ -57,7 +57,7 @@
 // CHECK: store
 // CHECK: release
 // CHECK: ret void
-sil @assign_store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @assign_store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   store %1 to [assign] %0 : $*Builtin.NativeObject
   %2 = tuple()
@@ -69,7 +69,7 @@
   var b: Builtin.NativeObject
 }
 
-sil @assign_store_2 : $@convention(thin) (@in Foo, Foo) -> () {
+sil [ossa] @assign_store_2 : $@convention(thin) (@in Foo, Foo) -> () {
 bb0(%0 : $*Foo, %1 : $Foo):
   %2 = load [copy] %0 : $*Foo
   store %1 to [assign] %0 : $*Foo
@@ -84,7 +84,7 @@
 // CHECK-NOT: load
 // CHECK-NOT: release
 // CHECK: ret void
-sil @trivial_store : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
+sil [ossa] @trivial_store : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.Int32, %1 : $Builtin.Int32):
   store %1 to [trivial] %0 : $*Builtin.Int32
   %2 = tuple()
diff --git a/test/IRGen/partial_apply.sil b/test/IRGen/partial_apply.sil
index a866a23..7e443c2 100644
--- a/test/IRGen/partial_apply.sil
+++ b/test/IRGen/partial_apply.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend %s -emit-ir -assume-parsing-unqualified-ownership-sil | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/partial_apply_forwarder.sil b/test/IRGen/partial_apply_forwarder.sil
index edae54a..1e1f9fc 100644
--- a/test/IRGen/partial_apply_forwarder.sil
+++ b/test/IRGen/partial_apply_forwarder.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
 sil_stage canonical
 
 import Builtin
diff --git a/test/IRGen/partial_apply_generic.swift b/test/IRGen/partial_apply_generic.swift
index 87d978a..20f4d1a 100644
--- a/test/IRGen/partial_apply_generic.swift
+++ b/test/IRGen/partial_apply_generic.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/partial_apply_objc.sil b/test/IRGen/partial_apply_objc.sil
index 9284849..2564f74 100644
--- a/test/IRGen/partial_apply_objc.sil
+++ b/test/IRGen/partial_apply_objc.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %build-irgen-test-overlays
-// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -assume-parsing-unqualified-ownership-sil -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend(mock-sdk: -sdk %S/Inputs -I %t) %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 // REQUIRES: CPU=x86_64
 // REQUIRES: objc_interop
diff --git a/test/IRGen/pic.swift b/test/IRGen/pic.swift
index dc9ba80..b458b6f 100644
--- a/test/IRGen/pic.swift
+++ b/test/IRGen/pic.swift
@@ -1,7 +1,7 @@
 // <rdar://problem/15358345> Check that we always use PIC relocations on all
 // platforms.
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -module-name main -S -o - | %FileCheck -check-prefix=%target-cpu %s
+// RUN: %target-swift-frontend %s -module-name main -S -o - | %FileCheck -check-prefix=%target-cpu %s
 
 var global: Int = 0
 
diff --git a/test/IRGen/playground.swift b/test/IRGen/playground.swift
index 2ab82c2..ac2e67f 100644
--- a/test/IRGen/playground.swift
+++ b/test/IRGen/playground.swift
@@ -1,5 +1,5 @@
 // RUN: rm -rf %t
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -use-jit -playground -parse-stdlib %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -use-jit -playground -parse-stdlib %s -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: OS=macosx
 // REQUIRES: CPU=x86_64
diff --git a/test/IRGen/protocol_extensions.sil b/test/IRGen/protocol_extensions.sil
index 0bbc1f1..702e1ca 100644
--- a/test/IRGen/protocol_extensions.sil
+++ b/test/IRGen/protocol_extensions.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/protocol_extensions_constrain.swift b/test/IRGen/protocol_extensions_constrain.swift
index 015c4f1..b57ab9b 100644
--- a/test/IRGen/protocol_extensions_constrain.swift
+++ b/test/IRGen/protocol_extensions_constrain.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // rdar://20532214 -- Wrong code for witness method lookup lets executable crash
 
diff --git a/test/IRGen/protocol_metadata.swift b/test/IRGen/protocol_metadata.swift
index 90039af..193baf3 100644
--- a/test/IRGen/protocol_metadata.swift
+++ b/test/IRGen/protocol_metadata.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/protocol_resilience.sil b/test/IRGen/protocol_resilience.sil
index d4b8955..5ae7dcf 100644
--- a/test/IRGen/protocol_resilience.sil
+++ b/test/IRGen/protocol_resilience.sil
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift
-// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s -DINT=i%target-ptrsize
-// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience -O -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience -O %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/protocol_resilience_descriptors.swift b/test/IRGen/protocol_resilience_descriptors.swift
index 388071f..8820e69 100644
--- a/test/IRGen/protocol_resilience_descriptors.swift
+++ b/test/IRGen/protocol_resilience_descriptors.swift
@@ -6,7 +6,7 @@
 // Resilient protocol usage
 // RUN: %target-swift-frontend -emit-module -enable-resilience -emit-module-path=%t/resilient_protocol.swiftmodule -module-name=resilient_protocol %S/../Inputs/resilient_protocol.swift
 
-// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s -DINT=i%target-ptrsize -check-prefix=CHECK-USAGE
+// RUN: %target-swift-frontend -I %t -emit-ir -enable-resilience %s | %FileCheck %s -DINT=i%target-ptrsize -check-prefix=CHECK-USAGE
 
 // ----------------------------------------------------------------------------
 // Resilient protocol definition
diff --git a/test/IRGen/protocol_with_superclass.sil b/test/IRGen/protocol_with_superclass.sil
index effacd4..3e3084a 100644
--- a/test/IRGen/protocol_with_superclass.sil
+++ b/test/IRGen/protocol_with_superclass.sil
@@ -27,8 +27,8 @@
 
 // CHECK-objc-LABEL: define hidden swiftcc void @checkExistentialDowncast(%T24protocol_with_superclass8ConcreteC*, {{.*}} {
 // CHECK-native-LABEL: define hidden swiftcc void @checkExistentialDowncast(%T24protocol_with_superclass8ConcreteC*, %swift.refcounted*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**) {{.*}} {
-sil hidden @checkExistentialDowncast : $@convention(thin) (@owned Concrete, @owned SuperProto, @owned SuperProto & Concrete, @owned ProtoRefinesClass, @owned SubProto) -> () {
-bb0(%0 : @owned $Concrete, %1 : @owned $SuperProto, %2 : @owned $SuperProto & Concrete, %3 : @owned $ProtoRefinesClass, %4 : @owned $SubProto):
+sil hidden [ossa] @checkExistentialDowncast : $@convention(thin) (@owned Concrete, @owned SuperProto, @owned SuperProto & Concrete, @owned ProtoRefinesClass, @owned SubProto) -> () {
+bb0(%0 : $Concrete, %1 : $SuperProto, %2 : $SuperProto & Concrete, %3 : $ProtoRefinesClass, %4 : $SubProto):
 
   // CHECK:             [[ISA_ADDR:%.*]] = bitcast %T24protocol_with_superclass8ConcreteC* %0 to %swift.type**
   // CHECK-NEXT:        [[ISA:%.*]] = load %swift.type*, %swift.type** [[ISA_ADDR]]
diff --git a/test/IRGen/protocol_with_superclass_where_clause.sil b/test/IRGen/protocol_with_superclass_where_clause.sil
index c223fbe..bac1e70 100644
--- a/test/IRGen/protocol_with_superclass_where_clause.sil
+++ b/test/IRGen/protocol_with_superclass_where_clause.sil
@@ -27,7 +27,7 @@
 
 // CHECK-objc-LABEL: define hidden swiftcc void @checkExistentialDowncast(%T24protocol_with_superclass8ConcreteC*, {{.*}} {
 // CHECK-native-LABEL: define hidden swiftcc void @checkExistentialDowncast(%T24protocol_with_superclass8ConcreteC*, %swift.refcounted*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**, %T24protocol_with_superclass8ConcreteC*, i8**) {{.*}} {
-sil hidden @checkExistentialDowncast : $@convention(thin) (@owned Concrete, @owned SuperProto, @owned SuperProto & Concrete, @owned ProtoRefinesClass, @owned SubProto) -> () {
+sil hidden [ossa] @checkExistentialDowncast : $@convention(thin) (@owned Concrete, @owned SuperProto, @owned SuperProto & Concrete, @owned ProtoRefinesClass, @owned SubProto) -> () {
 bb0(%0 : @owned $Concrete, %1 : @owned $SuperProto, %2 : @owned $SuperProto & Concrete, %3 : @owned $ProtoRefinesClass, %4 : @owned $SubProto):
 
   // CHECK:             [[ISA_ADDR:%.*]] = bitcast %T24protocol_with_superclass8ConcreteC* %0 to %swift.type**
diff --git a/test/IRGen/readonly.sil b/test/IRGen/readonly.sil
index 350153a..b753d45 100644
--- a/test/IRGen/readonly.sil
+++ b/test/IRGen/readonly.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 //sil_stage canonical
 
 import Builtin
diff --git a/test/IRGen/reference_storage_extra_inhabitants.sil b/test/IRGen/reference_storage_extra_inhabitants.sil
index b094e11..e5553a4 100644
--- a/test/IRGen/reference_storage_extra_inhabitants.sil
+++ b/test/IRGen/reference_storage_extra_inhabitants.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-objc-interop -emit-ir -primary-file %s | %FileCheck %s -DWORD=i%target-ptrsize
+// RUN: %target-swift-frontend -disable-objc-interop -emit-ir -primary-file %s | %FileCheck %s -DWORD=i%target-ptrsize
 
 sil_stage canonical
 
diff --git a/test/IRGen/reflection_metadata.swift b/test/IRGen/reflection_metadata.swift
index 1ed1b72..6fb4080 100644
--- a/test/IRGen/reflection_metadata.swift
+++ b/test/IRGen/reflection_metadata.swift
@@ -1,6 +1,6 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-reflection-names -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_NAMES
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-reflection-metadata -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_METADATA
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -disable-reflection-names -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_NAMES
+// RUN: %target-swift-frontend -disable-reflection-metadata -emit-ir %s | %FileCheck %s --check-prefix=STRIP_REFLECTION_METADATA
 
 // STRIP_REFLECTION_NAMES_DAG: section "{{[^"]*swift5_reflect|.sw5rfst\$B}}
 // STRIP_REFLECTION_NAMES_DAG: section "{{[^"]*swift5_fieldmd|.sw5flmd\$B}}
diff --git a/test/IRGen/runtime_calling_conventions.swift b/test/IRGen/runtime_calling_conventions.swift
index eacb0d7..20aa9f0 100644
--- a/test/IRGen/runtime_calling_conventions.swift
+++ b/test/IRGen/runtime_calling_conventions.swift
@@ -1,6 +1,6 @@
 
-// RUN: %target-swift-frontend -module-name runtime_calling_conventions -assume-parsing-unqualified-ownership-sil -parse-as-library -emit-ir %s | %FileCheck %s
-// RUN: %target-swift-frontend -module-name runtime_calling_conventions -assume-parsing-unqualified-ownership-sil -parse-as-library -O -emit-ir %s | %FileCheck --check-prefix=OPT-CHECK %s
+// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -module-name runtime_calling_conventions -parse-as-library -O -emit-ir %s | %FileCheck --check-prefix=OPT-CHECK %s
 
 // Test that runtime functions are invoked using the new calling convention.
 
diff --git a/test/IRGen/same_type_constraints.swift b/test/IRGen/same_type_constraints.swift
index 07f9199..a3ac8a5 100644
--- a/test/IRGen/same_type_constraints.swift
+++ b/test/IRGen/same_type_constraints.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
-// RUN: %target-swift-frontend -Osize -assume-parsing-unqualified-ownership-sil -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=OSIZE
+// RUN: %target-swift-frontend -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -Osize -emit-ir -primary-file %s -disable-objc-attr-requires-foundation-module | %FileCheck %s --check-prefix=OSIZE
 
 // Ensure that same-type constraints between generic arguments get reflected
 // correctly in the type context descriptor.
diff --git a/test/IRGen/sanitize_coverage.swift b/test/IRGen/sanitize_coverage.swift
index 930d438..c25583a 100644
--- a/test/IRGen/sanitize_coverage.swift
+++ b/test/IRGen/sanitize_coverage.swift
@@ -1,12 +1,12 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=func %s | %FileCheck %s -check-prefix=SANCOV
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=bb %s | %FileCheck %s -check-prefix=SANCOV
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge %s | %FileCheck %s -check-prefix=SANCOV
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge,trace-cmp %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge,trace-bb %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_BB
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge,indirect-calls %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_INDIRECT_CALLS
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=address -sanitize-coverage=edge,8bit-counters %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_8BIT_COUNTERS
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=func %s | %FileCheck %s -check-prefix=SANCOV
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=bb %s | %FileCheck %s -check-prefix=SANCOV
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=edge %s | %FileCheck %s -check-prefix=SANCOV
+// RUN: %target-swift-frontend -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=edge,trace-cmp %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=edge,trace-bb %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_BB
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=edge,indirect-calls %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_INDIRECT_CALLS
+// RUN: %target-swift-frontend -emit-ir -sanitize=address -sanitize-coverage=edge,8bit-counters %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_8BIT_COUNTERS
+// RUN: %target-swift-frontend -emit-ir -sanitize=fuzzer %s | %FileCheck %s -check-prefix=SANCOV -check-prefix=SANCOV_TRACE_CMP
 
 #if os(iOS) || os(macOS) || os(tvOS) || os(watchOS)
 import Darwin
diff --git a/test/IRGen/select_enum.sil b/test/IRGen/select_enum.sil
index a199647..7ab3339 100644
--- a/test/IRGen/select_enum.sil
+++ b/test/IRGen/select_enum.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -gnone -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -gnone -emit-ir %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/IRGen/select_enum_optimized.swift b/test/IRGen/select_enum_optimized.swift
index b380ac7..808334c 100644
--- a/test/IRGen/select_enum_optimized.swift
+++ b/test/IRGen/select_enum_optimized.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -O -module-name=test -disable-llvm-optzns -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -O -module-name=test -disable-llvm-optzns -emit-ir | %FileCheck %s
 
 enum NoPayload {
   case E0
diff --git a/test/IRGen/select_enum_single_payload.sil b/test/IRGen/select_enum_single_payload.sil
index a187bb0..b7b0f53 100644
--- a/test/IRGen/select_enum_single_payload.sil
+++ b/test/IRGen/select_enum_single_payload.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s --check-prefix=CHECK-%target-ptrsize
 // REQUIRES: CPU=i386 || CPU=x86_64
 
 sil_stage canonical
diff --git a/test/IRGen/sil_generic_witness_methods.swift b/test/IRGen/sil_generic_witness_methods.swift
index bb1aa15..662963b 100644
--- a/test/IRGen/sil_generic_witness_methods.swift
+++ b/test/IRGen/sil_generic_witness_methods.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/sil_generic_witness_methods_objc.swift b/test/IRGen/sil_generic_witness_methods_objc.swift
index e63ac88..460a0cd 100644
--- a/test/IRGen/sil_generic_witness_methods_objc.swift
+++ b/test/IRGen/sil_generic_witness_methods_objc.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/sil_irgen_library.swift b/test/IRGen/sil_irgen_library.swift
index 37dcfe4..1fff9f9 100644
--- a/test/IRGen/sil_irgen_library.swift
+++ b/test/IRGen/sil_irgen_library.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -parse-as-library
+// RUN: %target-swift-frontend %s -emit-ir -parse-as-library
 
 // Smoke test that SIL-IRGen can compile a library module offline.
 func f() {}
diff --git a/test/IRGen/sil_irgen_standalone.swift b/test/IRGen/sil_irgen_standalone.swift
index 3b606ab..a92617f 100644
--- a/test/IRGen/sil_irgen_standalone.swift
+++ b/test/IRGen/sil_irgen_standalone.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir
+// RUN: %target-swift-frontend %s -emit-ir
 
 // Smoke test that SIL-IRGen can compile a standalone program offline.
 func f() {}
diff --git a/test/IRGen/sil_linkage.sil b/test/IRGen/sil_linkage.sil
index e53594e..102af98 100644
--- a/test/IRGen/sil_linkage.sil
+++ b/test/IRGen/sil_linkage.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/sil_witness_methods.sil b/test/IRGen/sil_witness_methods.sil
index 02ea0dc..94c79d3 100644
--- a/test/IRGen/sil_witness_methods.sil
+++ b/test/IRGen/sil_witness_methods.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/sil_witness_tables.swift b/test/IRGen/sil_witness_tables.swift
index e88498b..b4ebadf 100644
--- a/test/IRGen/sil_witness_tables.swift
+++ b/test/IRGen/sil_witness_tables.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module -o %t %S/sil_witness_tables_external_conformance.swift
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %t -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module -o %t %S/sil_witness_tables_external_conformance.swift
+// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/sil_witness_tables_external_witnesstable.swift b/test/IRGen/sil_witness_tables_external_witnesstable.swift
index 5c0a383..86f032b 100644
--- a/test/IRGen/sil_witness_tables_external_witnesstable.swift
+++ b/test/IRGen/sil_witness_tables_external_witnesstable.swift
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -module-link-name swiftCore
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %t -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module %S/Inputs/sil_witness_tables_external_input.swift -o %t/Swift.swiftmodule -parse-stdlib -parse-as-library -module-name Swift -module-link-name swiftCore
+// RUN: %target-swift-frontend -I %t -primary-file %s -emit-ir | %FileCheck %s
 
 import Swift
 
diff --git a/test/IRGen/sil_witness_tables_inherited_conformance.swift b/test/IRGen/sil_witness_tables_inherited_conformance.swift
index a5de9c2..2b53557 100644
--- a/test/IRGen/sil_witness_tables_inherited_conformance.swift
+++ b/test/IRGen/sil_witness_tables_inherited_conformance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // rdar://problem/20628295
 
diff --git a/test/IRGen/special_protocols.sil b/test/IRGen/special_protocols.sil
index 0f90dac..43df120 100644
--- a/test/IRGen/special_protocols.sil
+++ b/test/IRGen/special_protocols.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir -parse-stdlib -module-name Swift | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir -parse-stdlib -module-name Swift | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize
 
 public protocol Error {}
 // CHECK: [[ERROR_NAME:@.*]] = private constant [6 x i8] c"Error\00"
diff --git a/test/IRGen/static_initializer.sil b/test/IRGen/static_initializer.sil
index 9e6369e..c689015 100644
--- a/test/IRGen/static_initializer.sil
+++ b/test/IRGen/static_initializer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/struct_layout.sil b/test/IRGen/struct_layout.sil
index b76758c..31c58f2 100644
--- a/test/IRGen/struct_layout.sil
+++ b/test/IRGen/struct_layout.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=%target-ptrsize %s
+// RUN: %target-swift-frontend %s -module-name main -emit-ir -o - | %FileCheck -check-prefix=%target-ptrsize %s
 
 import Builtin
 import Swift
diff --git a/test/IRGen/subclass.swift b/test/IRGen/subclass.swift
index bfeb3a3..b8af411 100644
--- a/test/IRGen/subclass.swift
+++ b/test/IRGen/subclass.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -primary-file %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/subclass_existentials.sil b/test/IRGen/subclass_existentials.sil
index 5f4d622..b60254b 100644
--- a/test/IRGen/subclass_existentials.sil
+++ b/test/IRGen/subclass_existentials.sil
@@ -26,7 +26,7 @@
 // CHECK-NEXT:   call void bitcast (void (%swift.refcounted*)* @swift_release to void (%T21subclass_existentials1CC*)*)(%T21subclass_existentials1CC* %0)
 // CHECK-NEXT:   ret void
 
-sil @checkRefcounting : $@convention(thin) (@owned C & P, @owned AnyObject & P) -> () {
+sil [ossa] @checkRefcounting : $@convention(thin) (@owned C & P, @owned AnyObject & P) -> () {
 bb0(%0 : @owned $C & P, %1 : @owned $AnyObject & P):
   destroy_value %1 : $AnyObject & P
   destroy_value %0 : $C & P
@@ -60,7 +60,7 @@
 // CHECK-NEXT:   [[METATYPE:%.*]] = call %swift.type* @swift_getExistentialTypeMetadata(i1 false, %swift.type* [[SUPERCLASS]], {{i32|i64}} 1, [[INT]]* [[PROTOCOLS]])
 // CHECK:        ret
 
-sil @checkMetadata : $@convention(thin) () -> () {
+sil [ossa] @checkMetadata : $@convention(thin) () -> () {
 bb0:
   %0 = function_ref @takesMetadata : $@convention(thin) <τ_0_0> (@thick τ_0_0.Type) -> ()
   %1 = metatype $@thin (C & P).Protocol
@@ -76,7 +76,7 @@
 // CHECK-NEXT:  [[RESULT2:%.*]] = insertvalue { %T21subclass_existentials1CC*, i8** } [[RESULT1]], i8** @"$s21subclass_existentials1DCAA1PAAWP", 1
 // CHECK-NEXT:  ret { %T21subclass_existentials1CC*, i8** } [[RESULT2]]
 sil @eraseToExistential : $@convention(thin) (@owned D) -> @owned C & P {
-bb0(%0 : @owned $D):
+bb0(%0 : $D):
   %2 = init_existential_ref %0 : $D : $D, $C & P
   return %2 : $C & P
 }
@@ -87,13 +87,13 @@
 // CHECK-NEXT:  [[RESULT2:%.*]] = insertvalue { %T21subclass_existentials1GC*, i8** } [[RESULT1]], i8** @"$s21subclass_existentials1ECyxGAA1PAAWP", 1
 // CHECK-NEXT:  ret { %T21subclass_existentials1GC*, i8** } [[RESULT2]]
 sil @eraseToExistentialWithGeneric : $@convention(thin) <τ_0_0> (@owned E<τ_0_0>) -> @owned G<τ_0_0> & P {
-bb0(%0 : @owned $E<τ_0_0>):
+bb0(%0 : $E<τ_0_0>):
   %2 = init_existential_ref %0 : $E<τ_0_0> : $E<τ_0_0>, $G<τ_0_0> & P
   return %2 : $G<τ_0_0> & P
 }
 
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @checkExistentialDowncast(%T21subclass_existentials1CC*, %T21subclass_existentials1CC*, i8**)
-sil @checkExistentialDowncast : $@convention(thin) (@owned C, @owned C & P) -> () {
+sil [ossa] @checkExistentialDowncast : $@convention(thin) (@owned C, @owned C & P) -> () {
 bb0(%0 : @owned $C, %1 : @owned $C & P):
 
 // CHECK:       [[METATYPE_PTR:%.*]] = bitcast %T21subclass_existentials1CC* %0 to %swift.type**
@@ -145,7 +145,7 @@
 // CHECK-NEXT:  unreachable
 
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @checkExistentialSameClassDowncast(%T21subclass_existentials1CC*)
-sil @checkExistentialSameClassDowncast : $@convention(thin) (@owned C) -> () {
+sil [ossa] @checkExistentialSameClassDowncast : $@convention(thin) (@owned C) -> () {
 bb0(%0 : @owned $C):
 
 // CHECK:       [[METATYPE_PTR:%.*]] = bitcast %T21subclass_existentials1CC* %0 to %swift.type**
diff --git a/test/IRGen/super.sil b/test/IRGen/super.sil
index 12b74bc..7f6f1a2 100644
--- a/test/IRGen/super.sil
+++ b/test/IRGen/super.sil
@@ -8,7 +8,7 @@
 
 // RUN: %target-swift-frontend -emit-module -I %t -o %t %S/../Inputs/fixed_layout_class.swift
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-resilience -parse-sil -parse-as-library -emit-ir -I %t %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-resilience -parse-sil -parse-as-library -emit-ir -I %t %s | %FileCheck %s
 
 // CHECK: %swift.type = type { [[INT:i32|i64]] }
 
diff --git a/test/IRGen/superclass_constraint.swift b/test/IRGen/superclass_constraint.swift
index 50734c5..d17183c 100644
--- a/test/IRGen/superclass_constraint.swift
+++ b/test/IRGen/superclass_constraint.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 public protocol A {}
 
diff --git a/test/IRGen/swift_native_objc_runtime_base.sil b/test/IRGen/swift_native_objc_runtime_base.sil
index d2ef60a..8c51b06 100644
--- a/test/IRGen/swift_native_objc_runtime_base.sil
+++ b/test/IRGen/swift_native_objc_runtime_base.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-objc-interop -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // CHECK-LABEL: @"$s30swift_native_objc_runtime_base1CCMm" = hidden global %objc_class {
 // -- metaclass "isa" is root metaclass
diff --git a/test/IRGen/synthesized_conformance.swift b/test/IRGen/synthesized_conformance.swift
index 1ce334d..855ac8c 100644
--- a/test/IRGen/synthesized_conformance.swift
+++ b/test/IRGen/synthesized_conformance.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -swift-version 4 | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s -swift-version 4 | %FileCheck %s
 
 struct Struct<T> {
     var x: T
diff --git a/test/IRGen/tail_alloc.sil b/test/IRGen/tail_alloc.sil
index 18e1947..51fbd0a 100644
--- a/test/IRGen/tail_alloc.sil
+++ b/test/IRGen/tail_alloc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -stack-promotion-limit 48 -Onone -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
 //
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/tsan-attributes.swift b/test/IRGen/tsan-attributes.swift
index 3fbc801..2a22807 100644
--- a/test/IRGen/tsan-attributes.swift
+++ b/test/IRGen/tsan-attributes.swift
@@ -1,6 +1,6 @@
 // This test verifies that we add the function attributes used by TSan.
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -sanitize=thread %s | %FileCheck %s -check-prefix=TSAN
+// RUN: %target-swift-frontend -emit-ir -sanitize=thread %s | %FileCheck %s -check-prefix=TSAN
 
 // TSan is currently only supported on 64 bit mac and simulators.
 // (We do not test the simulators here.)
diff --git a/test/IRGen/tsan_instrumentation.sil b/test/IRGen/tsan_instrumentation.sil
index bf12ff2..1c3ba1a 100644
--- a/test/IRGen/tsan_instrumentation.sil
+++ b/test/IRGen/tsan_instrumentation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/type_layout.swift b/test/IRGen/type_layout.swift
index d500096..f54f7dd 100644
--- a/test/IRGen/type_layout.swift
+++ b/test/IRGen/type_layout.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
 
 class C {}
 
diff --git a/test/IRGen/type_layout_reference_storage.swift b/test/IRGen/type_layout_reference_storage.swift
index b2361b5..6fe7709 100644
--- a/test/IRGen/type_layout_reference_storage.swift
+++ b/test/IRGen/type_layout_reference_storage.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -enable-objc-interop  | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s -disable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native-%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s -enable-objc-interop  | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-objc-%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s -disable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize --check-prefix=CHECK-native-%target-ptrsize
 
 class C {}
 protocol P: class {}
diff --git a/test/IRGen/typed_boxes.sil b/test/IRGen/typed_boxes.sil
index 76a6a7e..d3b7992 100644
--- a/test/IRGen/typed_boxes.sil
+++ b/test/IRGen/typed_boxes.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-ptrsize -DINT=i%target-ptrsize
 sil_stage canonical
 
 import Builtin
diff --git a/test/IRGen/typemetadata.sil b/test/IRGen/typemetadata.sil
index 7acded7..eadc5ed 100644
--- a/test/IRGen/typemetadata.sil
+++ b/test/IRGen/typemetadata.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
-// RUN: %target-swift-frontend -Osize -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefix=OSIZE -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -Osize -enable-objc-interop -emit-ir %s | %FileCheck %s --check-prefix=OSIZE -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/unconditional_checked_cast.sil b/test/IRGen/unconditional_checked_cast.sil
index fbe49cb..29422b2 100644
--- a/test/IRGen/unconditional_checked_cast.sil
+++ b/test/IRGen/unconditional_checked_cast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/undef.sil b/test/IRGen/undef.sil
index 16e4f54..f5b234e 100644
--- a/test/IRGen/undef.sil
+++ b/test/IRGen/undef.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/unknown_object.sil b/test/IRGen/unknown_object.sil
index 63bd0fa..77cd8b9 100644
--- a/test/IRGen/unknown_object.sil
+++ b/test/IRGen/unknown_object.sil
@@ -5,7 +5,7 @@
 import Builtin
 
 // CHECK-LABEL: @retain_release_unknown_object
-sil @retain_release_unknown_object : $@convention(thin) (@guaranteed Builtin.UnknownObject) -> () {
+sil [ossa] @retain_release_unknown_object : $@convention(thin) (@guaranteed Builtin.UnknownObject) -> () {
 entry(%x : @guaranteed $Builtin.UnknownObject):
   // CHECK-native: swift_retain
   // CHECK-objc: swift_unknownObjectRetain
diff --git a/test/IRGen/unowned.sil b/test/IRGen/unowned.sil
index 67c5806..b5310fe 100644
--- a/test/IRGen/unowned.sil
+++ b/test/IRGen/unowned.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -disable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -disable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/unowned_objc.sil b/test/IRGen/unowned_objc.sil
index 5a51874..ecbb3bf 100644
--- a/test/IRGen/unowned_objc.sil
+++ b/test/IRGen/unowned_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/unowned_store.sil b/test/IRGen/unowned_store.sil
index aba80dc..a45dcff 100644
--- a/test/IRGen/unowned_store.sil
+++ b/test/IRGen/unowned_store.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s
+// RUN: %target-swift-frontend -emit-ir -verify %s
 
 import Swift
 
diff --git a/test/IRGen/unused.sil b/test/IRGen/unused.sil
index 912c159..fd26056 100644
--- a/test/IRGen/unused.sil
+++ b/test/IRGen/unused.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE -check-prefix CHECK-%target-object-format %s
+// RUN: %target-swift-frontend -primary-file %s -emit-ir | %FileCheck -check-prefix CHECK -check-prefix NEGATIVE -check-prefix CHECK-%target-object-format %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/upcast.sil b/test/IRGen/upcast.sil
index e6c7897..947a3ce 100644
--- a/test/IRGen/upcast.sil
+++ b/test/IRGen/upcast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // Make sure that we are able to lower upcast addresses.
 
diff --git a/test/IRGen/value_buffers.sil b/test/IRGen/value_buffers.sil
index de8ffc9..c23665a 100644
--- a/test/IRGen/value_buffers.sil
+++ b/test/IRGen/value_buffers.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/vector_reduction.swift b/test/IRGen/vector_reduction.swift
index 8ebc383..b9c840a 100644
--- a/test/IRGen/vector_reduction.swift
+++ b/test/IRGen/vector_reduction.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -Ounchecked %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -Ounchecked %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/vtable.sil b/test/IRGen/vtable.sil
index 0aa3958..cf1c42f 100644
--- a/test/IRGen/vtable.sil
+++ b/test/IRGen/vtable.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
 // REQUIRES: executable_test
 
 // REQUIRES: CPU=x86_64
diff --git a/test/IRGen/vtable_multi_file.swift b/test/IRGen/vtable_multi_file.swift
index 44c4d93..873ed2e 100644
--- a/test/IRGen/vtable_multi_file.swift
+++ b/test/IRGen/vtable_multi_file.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s %S/Inputs/vtable_multi_file_helper.swift -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/weak.sil b/test/IRGen/weak.sil
index e946601..f2c3e75 100644
--- a/test/IRGen/weak.sil
+++ b/test/IRGen/weak.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -enable-objc-interop -emit-ir %s | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -S %s | %FileCheck %s --check-prefix=TAILCALL
+// RUN: %target-swift-frontend -enable-objc-interop -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -O -S %s | %FileCheck %s --check-prefix=TAILCALL
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/weak_class_protocol.sil b/test/IRGen/weak_class_protocol.sil
index fa03a05..7fc0aee 100644
--- a/test/IRGen/weak_class_protocol.sil
+++ b/test/IRGen/weak_class_protocol.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-%target-runtime
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/weak_import_native.swift b/test/IRGen/weak_import_native.swift
index 3b16906..d161143 100644
--- a/test/IRGen/weak_import_native.swift
+++ b/test/IRGen/weak_import_native.swift
@@ -243,7 +243,7 @@
 // CHECK:; <label>:[[BB3]]:
 // CHECK:  [[WEAK_CASE:%.*]] = load i32, i32* @"$s25weak_import_native_helper1EO0A0yA2CmFWC"
 // CHECK:  [[IS_WEAK:%.*]] = icmp eq i32 [[TAG]], [[WEAK_CASE]]
-// CHECK:  br label %21
+// CHECK:  br label %[[BB2]]
 //
 // CHECK:; <label>:[[BB2]]:
 // CHECK:  = phi i1 [ false, %[[BB1]] ], [ [[IS_WEAK]], %[[BB3]] ]
diff --git a/test/IRGen/weak_value_witnesses.sil b/test/IRGen/weak_value_witnesses.sil
index 30bedb1..d604d48 100644
--- a/test/IRGen/weak_value_witnesses.sil
+++ b/test/IRGen/weak_value_witnesses.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck %s
 
 // REQUIRES: CPU=x86_64
 
diff --git a/test/IRGen/witness_method.sil b/test/IRGen/witness_method.sil
index fe6abd0..a982947 100644
--- a/test/IRGen/witness_method.sil
+++ b/test/IRGen/witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend %s -emit-ir | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-%target-cpu %s -DINT=i%target-ptrsize
 
 // REQUIRES: CPU=i386 || CPU=x86_64
 
diff --git a/test/IRGen/witness_method_after_devirt.swift b/test/IRGen/witness_method_after_devirt.swift
index af671cf..34892d1 100644
--- a/test/IRGen/witness_method_after_devirt.swift
+++ b/test/IRGen/witness_method_after_devirt.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir -verify %s 
+// RUN: %target-swift-frontend -emit-ir -verify %s 
 
 protocol BaseProtocol {
     static func run()
diff --git a/test/IRGen/witness_method_phi.sil b/test/IRGen/witness_method_phi.sil
index 4243113..2e1d48b 100644
--- a/test/IRGen/witness_method_phi.sil
+++ b/test/IRGen/witness_method_phi.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/IRGen/witness_table_indirect_conformances.swift b/test/IRGen/witness_table_indirect_conformances.swift
index 399a922..4992a7a8 100644
--- a/test/IRGen/witness_table_indirect_conformances.swift
+++ b/test/IRGen/witness_table_indirect_conformances.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -swift-version 4 | %FileCheck %s -DINT=i%target-ptrsize
 
 protocol P1 {
 	associatedtype AssocP1
diff --git a/test/IRGen/witness_table_multifile.swift b/test/IRGen/witness_table_multifile.swift
index 8ddc938..3885518 100644
--- a/test/IRGen/witness_table_multifile.swift
+++ b/test/IRGen/witness_table_multifile.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s %S/Inputs/witness_table_multifile_2.swift -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s %S/Inputs/witness_table_multifile_2.swift -emit-ir -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // CHECK: [[P_WITNESS_TABLE:%[A-Za-z0-9_]+]] = type { [{{24|12}} x i8], %swift.type*, i8** }
 
diff --git a/test/IRGen/witness_table_objc_associated_type.swift b/test/IRGen/witness_table_objc_associated_type.swift
index 1da6e75..b3e4754 100644
--- a/test/IRGen/witness_table_objc_associated_type.swift
+++ b/test/IRGen/witness_table_objc_associated_type.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize
+// RUN: %target-swift-frontend -primary-file %s -emit-ir -disable-objc-attr-requires-foundation-module -enable-objc-interop | %FileCheck %s -DINT=i%target-ptrsize
 
 protocol A {}
 
diff --git a/test/IRGen/yield_once_big.sil b/test/IRGen/yield_once_big.sil
index dd54abb..74f0907 100644
--- a/test/IRGen/yield_once_big.sil
+++ b/test/IRGen/yield_once_big.sil
@@ -30,7 +30,7 @@
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { i8*, %T14yield_once_big3BigV* } @test_simple
 // CHECK-32-SAME:  (i8* noalias dereferenceable([[BUFFER_SIZE:16]]), %swift.type* %C)
 // CHECK-64-SAME:  (i8* noalias dereferenceable([[BUFFER_SIZE:32]]), %swift.type* %C)
-sil @test_simple : $@yield_once <C: SomeClass> () -> (@yields @owned Big<C>) {
+sil [ossa] @test_simple : $@yield_once <C: SomeClass> () -> (@yields @owned Big<C>) {
 entry:
   //   Allocate space for the return value of make_big.
   // CHECK:         [[TEMP:%.*]] = alloca [[BIG:%T14yield_once_big3BigV]]
@@ -90,7 +90,7 @@
 // CHECK-SAME:      (i8* noalias dereferenceable([[BUFFER_SIZE]]), i1)
 
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @test_simple_call(i1)
-sil @test_simple_call : $(Builtin.Int1) -> () {
+sil [ossa] @test_simple_call : $(Builtin.Int1) -> () {
 entry(%flag : $Builtin.Int1):
   //   Allocate the buffer.
   // CHECK:         [[T0:%.*]] = alloca {{\[}}[[BUFFER_SIZE]] x i8], align [[BUFFER_ALIGN]]
diff --git a/test/IRGen/yield_once_biggish.sil b/test/IRGen/yield_once_biggish.sil
index 72bf6b4..5503a51 100644
--- a/test/IRGen/yield_once_biggish.sil
+++ b/test/IRGen/yield_once_biggish.sil
@@ -31,7 +31,7 @@
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc { i8*, %T18yield_once_biggish9SomeClassC*, %T18yield_once_biggish9SomeClassC*, { %T18yield_once_biggish9SomeClassC*, %T18yield_once_biggish9SomeClassC* }* } @test_simple
 // CHECK-32-SAME:  (i8* noalias dereferenceable([[BUFFER_SIZE:16]]), %swift.type* %C)
 // CHECK-64-SAME:  (i8* noalias dereferenceable([[BUFFER_SIZE:32]]), %swift.type* %C)
-sil @test_simple : $@yield_once <C: SomeClass> () -> (@yields @owned Biggish<C>) {
+sil [ossa] @test_simple : $@yield_once <C: SomeClass> () -> (@yields @owned Biggish<C>) {
 entry:
   //   Allocate space for the indirect spillover.
   // CHECK:         [[SPILLS:%.*]] = alloca [[SPILLS_T:{ %T18yield_once_biggish9SomeClassC\*, %T18yield_once_biggish9SomeClassC\* }]]
@@ -98,7 +98,7 @@
 // CHECK-SAME:      (i8* noalias dereferenceable([[BUFFER_SIZE]]), i1)
 
 // CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @test_simple_call(i1)
-sil @test_simple_call : $(Builtin.Int1) -> () {
+sil [ossa] @test_simple_call : $(Builtin.Int1) -> () {
 entry(%flag : $Builtin.Int1):
   //   Allocate the buffer.
   // CHECK:         [[T0:%.*]] = alloca {{\[}}[[BUFFER_SIZE]] x i8], align [[BUFFER_ALIGN]]
diff --git a/test/IRGen/zombies.swift b/test/IRGen/zombies.swift
index 4c3967e..035573b 100644
--- a/test/IRGen/zombies.swift
+++ b/test/IRGen/zombies.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -primary-file %s -O -emit-ir | %FileCheck %s
+// RUN: %target-swift-frontend -primary-file %s -O -emit-ir | %FileCheck %s
 
 // rdar://24121475
 //   Ideally, these wouldn't be in the v-table at all; but as long as they
diff --git a/test/Interpreter/SDK/Inputs/OldABI/OldABI.h b/test/Interpreter/SDK/Inputs/OldABI/OldABI.h
new file mode 100644
index 0000000..cce9ddb
--- /dev/null
+++ b/test/Interpreter/SDK/Inputs/OldABI/OldABI.h
@@ -0,0 +1,3 @@
+#include <objc/objc.h>
+OBJC_EXTERN bool CanTestOldABI();
+OBJC_EXTERN id _Nonnull AllocOldABIObject();
diff --git a/test/Interpreter/SDK/Inputs/OldABI/OldABI.mm b/test/Interpreter/SDK/Inputs/OldABI/OldABI.mm
new file mode 100644
index 0000000..81f235b
--- /dev/null
+++ b/test/Interpreter/SDK/Inputs/OldABI/OldABI.mm
@@ -0,0 +1,172 @@
+#include "OldABI.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <unistd.h>
+#include <sys/mman.h>
+#include <malloc/malloc.h>
+#include <objc/runtime.h>
+#include <Foundation/Foundation.h>
+
+// Implementation of ObjC classes
+// with bits set to mimic the pre-stable Swift ABI
+// and additional memory protection to detect mis-use
+
+#if __has_include(<objc/objc-internal.h>)
+#include <objc/objc-internal.h>
+#else
+extern "C" Class objc_initializeClassPair(Class superclass, const char *name, Class cls, Class metacls);
+extern "C" id _objc_rootRetain(id);
+extern "C" void _objc_rootRelease(id);
+extern "C" id _objc_rootAutorelease(id);
+extern "C" uintptr_t _objc_rootRetainCount(id);
+extern "C" bool _objc_rootTryRetain(id);
+extern "C" bool _objc_rootIsDeallocating(id);
+#endif
+
+// This class stands in for the pre-stable ABI's SwiftObject.
+// Stable Swift's class is named Swift._SwiftObject (but mangled).
+
+__attribute__((objc_root_class))
+@interface SwiftObject { id isa; } @end
+
+@implementation SwiftObject
++(void)initialize { }
++(id)allocWithZone:(struct _malloc_zone_t *)zone {
+  return class_createInstance(self, 0);
+}
++(id)alloc { return [self allocWithZone:nil]; }
++(id)class { return self; }
+-(id)class { return object_getClass(self); }
++(id)superclass { return class_getSuperclass(self); }
+-(id)superclass { return class_getSuperclass([self class]); }
++(BOOL)isMemberOfClass:(Class)cls { return object_getClass(self) == cls; }
+-(BOOL)isMemberOfClass:(Class)cls { return [self class] == cls; }
+-(id)self { return self; }
+-(BOOL)isProxy { return NO; }
+-(struct _malloc_zone_t *)zone { return malloc_default_zone(); }
+-(void)doesNotRecognizeSelector:(SEL)sel {
+  Class cls = [self class];
+  fprintf(stderr, "unrecognized selector %c[%s %s]\n",
+          class_isMetaClass(cls) ? '+' : '-',
+          class_getName(cls), sel_getName(sel));
+  abort();
+}
+
++(id)retain { return self; }
++(void)release { }
++(id)autorelease { return self; }
++(uintptr_t)retainCount { return ~(uintptr_t)0; }
++(BOOL)_tryRetain { return YES; }
++(BOOL)_isDeallocating { return NO; }
+
+-(id)retain { return _objc_rootRetain(self); }
+-(void)release { _objc_rootRelease(self); }
+-(id)autorelease { return _objc_rootAutorelease(self); }
+-(uintptr_t)retainCount { return _objc_rootRetainCount(self); }
+-(BOOL)_tryRetain { return _objc_rootTryRetain(self); }
+-(BOOL)_isDeallocating { return _objc_rootIsDeallocating(self); }
+-(void)dealloc { object_dispose(self); }
+
+-(BOOL)isKindOfClass:(Class)other {
+  for (Class cls = object_getClass(self); cls; cls = class_getSuperclass(cls))
+    if (cls == other) return YES;
+  return NO;
+}
++(BOOL)isSubclassOfClass:(Class)other {
+  for (Class cls = self; cls; cls = class_getSuperclass(cls))
+    if (cls == other) return YES;
+  return NO;
+}
+-(BOOL)respondsToSelector:(SEL)sel {
+  if (!sel) return NO;
+  return class_respondsToSelector(object_getClass(self), sel);
+}
++(BOOL)instancesRespondToSelector:(SEL)sel {
+  if (!sel) return NO;
+  return class_respondsToSelector(self, sel);
+}
+
+-(uintptr_t)hash { return (uintptr_t)self; }
+-(BOOL)isEqual:(id)other { return self == other; }
++(NSString *)description { return @"FakeSwiftObject class"; }
+-(NSString *)description { return @"FakeSwiftObject instance"; }
+-(NSString *)debugDescription { return [self description]; }
+
+- (BOOL)isNSArray__      { return NO; }
+- (BOOL)isNSCFConstantString__  { return NO; }
+- (BOOL)isNSData__       { return NO; }
+- (BOOL)isNSDate__       { return NO; }
+- (BOOL)isNSDictionary__ { return NO; }
+- (BOOL)isNSObject__     { return NO; }
+- (BOOL)isNSOrderedSet__ { return NO; }
+- (BOOL)isNSNumber__     { return NO; }
+- (BOOL)isNSSet__        { return NO; }
+- (BOOL)isNSString__     { return NO; }
+- (BOOL)isNSTimeZone__   { return NO; }
+- (BOOL)isNSValue__      { return NO; }
+
+@end
+
+
+static char *AllocTailGuardedPointer(size_t size) {
+  // Round up to page boundary.
+  size_t writeableSize = (size + PAGE_MAX_SIZE - 1) & ~(PAGE_MAX_SIZE - 1);
+
+  // Allocate writeable memory plus one guard page.
+  char *writeableBuffer = (char *)mmap(0, writeableSize + PAGE_MAX_SIZE,
+                                       PROT_READ | PROT_WRITE,
+                                       MAP_ANON | MAP_PRIVATE, -1, 0);
+  if (writeableBuffer == MAP_FAILED) abort();
+
+  // Mark the guard page inaccessible.
+  mprotect(writeableBuffer + writeableSize, PAGE_MAX_SIZE, 0);
+
+  // Scribble on the prefix.
+  memset(writeableBuffer, 0x55, writeableSize - size);
+
+  // Return the address just before the guard page.
+  // FIXME: this doesn't handle alignment properly,
+  // but we don't need to for this test's usage.
+  return writeableBuffer + writeableSize - size;
+}
+
+static Class CreateOldABISubclass(Class supercls, const char *name) {
+  // Allocate class and metaclass in tail-guarded memory.
+  // If the Swift runtime incorrectly tries to read Swift
+  // metadata from this class then it'll crash.
+  char *clsbuf  = AllocTailGuardedPointer(5*sizeof(uintptr_t));
+  char *metabuf = AllocTailGuardedPointer(5*sizeof(uintptr_t));
+  Class result = objc_initializeClassPair(supercls, name,
+                                          (Class)clsbuf, (Class)metabuf);
+
+  // Set the old is-Swift bit in the class.
+  uintptr_t *words = (uintptr_t *)clsbuf;
+  words[4] |= 1;
+
+  return result;
+}
+
+static Class FakeOldABIClass;
+
+__attribute__((constructor))
+static void initialize(void) {
+  FakeOldABIClass = CreateOldABISubclass([SwiftObject class],
+                                         "_TtC6OldABI8Subclass");
+}
+
+bool CanTestOldABI() {
+  // These tests don't work until the stable ABI is using its designed bit.
+  // This check can be removed after SWIFT_DARWIN_ENABLE_STABLE_ABI_BIT
+  // is set everywhere.
+  Class cls = objc_getClass("_TtCs19__EmptyArrayStorage");
+  if (!cls) abort();
+  uintptr_t *words = (uintptr_t *)cls;
+  if ((words[4] & 3) != 2) return false;  // wrong stable is-Swift bit
+  return true;
+}
+
+id AllocOldABIObject() {
+  return [FakeOldABIClass alloc];
+}
diff --git a/test/Interpreter/SDK/Inputs/OldABI/module.map b/test/Interpreter/SDK/Inputs/OldABI/module.map
new file mode 100644
index 0000000..4701a30
--- /dev/null
+++ b/test/Interpreter/SDK/Inputs/OldABI/module.map
@@ -0,0 +1,3 @@
+module OldABI {
+  header "OldABI.h"
+}
diff --git a/test/Interpreter/SDK/multi-file-imported-enum.swift b/test/Interpreter/SDK/multi-file-imported-enum.swift
index 0a72ae6..3123c11 100644
--- a/test/Interpreter/SDK/multi-file-imported-enum.swift
+++ b/test/Interpreter/SDK/multi-file-imported-enum.swift
@@ -2,9 +2,9 @@
 // RUN: %target-build-swift -module-name test -whole-module-optimization %s %S/Inputs/multi-file-imported-enum/main.swift -o %t/a.out
 // RUN: %target-codesign %t/a.out
 // RUN: %target-run %t/a.out | %FileCheck %s
-// REQUIRES: executable_test
 
-// XFAIL: linux
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
 
 import Foundation
 
diff --git a/test/Interpreter/SDK/objc_getClass.swift b/test/Interpreter/SDK/objc_getClass.swift
index c25477c..590e518 100644
--- a/test/Interpreter/SDK/objc_getClass.swift
+++ b/test/Interpreter/SDK/objc_getClass.swift
@@ -6,7 +6,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_class)) -Xfrontend -enable-resilience -Xfrontend -enable-class-resilience %S/../../Inputs/resilient_class.swift -emit-module -emit-module-path %t/resilient_class.swiftmodule -module-name resilient_class -I%t -L%t -lresilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_class)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct) %t/libresilient_class%{target-shared-library-suffix}
diff --git a/test/Interpreter/SDK/objc_old_swift.swift b/test/Interpreter/SDK/objc_old_swift.swift
new file mode 100644
index 0000000..76c9a89
--- /dev/null
+++ b/test/Interpreter/SDK/objc_old_swift.swift
@@ -0,0 +1,81 @@
+// RUN: %empty-directory(%t)
+//
+// RUN: cp %s %t/main.swift
+// RUN: %target-clang %S/Inputs/OldABI/OldABI.mm -g -c -o %t/OldABI.o
+// RUN: %target-build-swift %t/main.swift -framework Foundation -I %S/Inputs/OldABI/ -Xlinker %t/OldABI.o -o %t/objc_old_swift -Xfrontend -disable-access-control
+// RUN: %target-codesign %t/objc_old_swift
+// RUN: %target-run %t/objc_old_swift
+
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
+
+// Verify that objects that appear to be from the pre-stable Swift ABI
+// are correctly ignored by stable Swift's entry points.
+
+import Foundation
+import OldABI
+import StdlibUnittest
+
+var tests = TestSuite("objc_old_swift")
+
+tests.test("description")
+  .skip(.custom({ !CanTestOldABI() },
+                reason: "not using stable ABI's is-Swift bit yet"))
+  .code {
+  let obj = AllocOldABIObject()
+  expectEqual(String(describing:obj), "OldABI.Subclass")
+  expectEqual((obj as AnyObject).description!, "FakeSwiftObject instance")
+}
+
+tests.test("casts")
+  .skip(.custom({ !CanTestOldABI() },
+                reason: "not using stable ABI's is-Swift bit yet"))
+  .code {
+  let obj = AllocOldABIObject()
+  expectNil(obj as? String)
+  expectNotNil(obj as Any)
+  expectNotNil(obj as AnyObject)
+}
+
+tests.test("array")
+  .skip(.custom({ !CanTestOldABI() },
+                reason: "not using stable ABI's is-Swift bit yet"))
+  .code {
+  let array = Array(repeating: AllocOldABIObject(), count:5)
+  expectEqual(String(describing: array), "[OldABI.Subclass, OldABI.Subclass, OldABI.Subclass, OldABI.Subclass, OldABI.Subclass]")
+
+  var array2 = Array(repeating: AllocOldABIObject(), count:0)
+  for i in 0..<array.count {
+    expectNotNil(array[i])
+    array2.append(i as NSNumber)
+    array2.append(array[i]);
+  }
+  expectEqual(String(describing: array2), "[0, OldABI.Subclass, 1, OldABI.Subclass, 2, OldABI.Subclass, 3, OldABI.Subclass, 4, OldABI.Subclass]")
+
+  // Bridge an array of pre-stable objects to NSArray
+  let nsarray = NSMutableArray(array: array2)
+  expectEqual(nsarray.description, #"""
+    (
+        0,
+        "FakeSwiftObject instance",
+        1,
+        "FakeSwiftObject instance",
+        2,
+        "FakeSwiftObject instance",
+        3,
+        "FakeSwiftObject instance",
+        4,
+        "FakeSwiftObject instance"
+    )
+    """#)
+
+  nsarray.add(5 as NSNumber)
+
+  // Bridge back from NSArray
+  let array3 = nsarray as [AnyObject]
+  expectEqual(String(describing: array3), "[0, OldABI.Subclass, 1, OldABI.Subclass, 2, OldABI.Subclass, 3, OldABI.Subclass, 4, OldABI.Subclass, 5]")
+}
+
+// FIXME: add coverage of more Swift runtime entrypoints
+
+runAllTests()
diff --git a/test/Interpreter/builtin_bridge_object.swift b/test/Interpreter/builtin_bridge_object.swift
index f92b6bf..a49ed02 100644
--- a/test/Interpreter/builtin_bridge_object.swift
+++ b/test/Interpreter/builtin_bridge_object.swift
@@ -2,10 +2,11 @@
 // RUN: %target-build-swift -parse-stdlib %s -o %t/a.out
 // RUN: %target-codesign %t/a.out
 // RUN: %target-run %t/a.out | %FileCheck %s
+
 // REQUIRES: executable_test
+// REQUIRES: objc_interop
 
 // FIXME: rdar://problem/19648117 Needs splitting objc parts out
-// XFAIL: linux
 
 import Swift
 import SwiftShims
diff --git a/test/Interpreter/class_resilience.swift b/test/Interpreter/class_resilience.swift
index 5a550d5..e750689 100644
--- a/test/Interpreter/class_resilience.swift
+++ b/test/Interpreter/class_resilience.swift
@@ -9,7 +9,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(fixed_layout_class)) -Xfrontend -enable-resilience -Xfrontend -enable-class-resilience %S/../Inputs/fixed_layout_class.swift -emit-module -emit-module-path %t/fixed_layout_class.swiftmodule -module-name fixed_layout_class -I%t -L%t -lresilient_struct
 // RUN: %target-codesign %t/%target-library-name(fixed_layout_class)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -lfixed_layout_class -o %t/main -Xfrontend -enable-class-resilience -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -lfixed_layout_class -o %t/main -Xfrontend -enable-class-resilience %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct) %t/%target-library-name(resilient_class) %t/%target-library-name(fixed_layout_class)
@@ -23,7 +23,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(fixed_layout_class_wmo)) -Xfrontend -enable-resilience -Xfrontend -enable-class-resilience %S/../Inputs/fixed_layout_class.swift -emit-module -emit-module-path %t/fixed_layout_class.swiftmodule -module-name fixed_layout_class -I%t -L%t -lresilient_struct_wmo -whole-module-optimization
 // RUN: %target-codesign %t/%target-library-name(fixed_layout_class_wmo)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_class_wmo -lfixed_layout_class_wmo -Xfrontend -enable-class-resilience -o %t/main2 -Xlinker -rpath -Xlinker %t -module-name main
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_class_wmo -lfixed_layout_class_wmo -Xfrontend -enable-class-resilience -o %t/main2 %target-rpath(%t) -module-name main
 // RUN: %target-codesign %t/main2
 
 // RUN: %target-run %t/main2 %t/%target-library-name(resilient_struct_wmo) %t/%target-library-name(resilient_class_wmo) %t/%target-library-name(fixed_layout_class_wmo)
diff --git a/test/Interpreter/conditional_conformances_modules.swift b/test/Interpreter/conditional_conformances_modules.swift
index 54057ef..6e10ddc 100644
--- a/test/Interpreter/conditional_conformances_modules.swift
+++ b/test/Interpreter/conditional_conformances_modules.swift
@@ -2,7 +2,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Basic)) %S/../Inputs/conditional_conformance_basic_conformances.swift -module-name Basic -emit-module -emit-module-path %t/Basic.swiftmodule
 // RUN: %target-build-swift-dylib(%t/%target-library-name(WithAssoc)) %S/../Inputs/conditional_conformance_with_assoc.swift -module-name WithAssoc -emit-module -emit-module-path %t/WithAssoc.swiftmodule
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Subclass)) %S/../Inputs/conditional_conformance_subclass.swift -module-name Subclass -emit-module -emit-module-path %t/Subclass.swiftmodule
-// RUN: %target-build-swift -I%t -L%t -lBasic -lWithAssoc -lSubclass %s -o %t/conditional_conformances_modules -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift -I%t -L%t -lBasic -lWithAssoc -lSubclass %s -o %t/conditional_conformances_modules %target-rpath(%t)
 // RUN: %target-run %t/conditional_conformances_modules %t/%target-library-name(Basic) %t/%target-library-name(WithAssoc) %t/%target-library-name(Subclass)
 
 // REQUIRES: executable_test
diff --git a/test/Interpreter/dynamic_replacement.swift b/test/Interpreter/dynamic_replacement.swift
index 3e2a0cc..c358aa9 100644
--- a/test/Interpreter/dynamic_replacement.swift
+++ b/test/Interpreter/dynamic_replacement.swift
@@ -1,31 +1,31 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -DMODULE -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
 // Now the same in optimized mode.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -O -DMODULE -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -O -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -O -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
 // Now the same in size mode.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -Osize -DMODULE -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -Osize -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -Osize -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -Osize -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -Osize -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
 // Now the same in optimized wholemodule mode.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -O -wmo -DMODULE -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -wmo -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -O -wmo -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -wmo -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -O -wmo -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
@@ -33,16 +33,16 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -DMODULENODYNAMIC -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift -Xfrontend -enable-implicit-dynamic
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
 // Test the -enable-implicit-dynamic flag in optimized wholemodule mode.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(Module1)) -O -wmo -DMODULENODYNAMIC -module-name Module1 -emit-module -emit-module-path %t/Module1.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift -Xfrontend -enable-implicit-dynamic
-// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -wmo -I%t -L%t -lModule1 -Xlinker -rpath -Xlinker %t -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
-// RUN: %target-build-swift -O -wmo -I%t -L%t -lModule1 -DMAIN -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(Module2)) -O -wmo -I%t -L%t -lModule1 %target-rpath(%t) -DMODULE2 -module-name Module2 -emit-module -emit-module-path %t/Module2.swiftmodule -swift-version 5 %S/Inputs/dynamic_replacement_module.swift
+// RUN: %target-build-swift -O -wmo -I%t -L%t -lModule1 -DMAIN -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 // RUN: %target-run %t/main %t/%target-library-name(Module1) %t/%target-library-name(Module2)
 
diff --git a/test/Interpreter/dynamic_replacement_chaining.swift b/test/Interpreter/dynamic_replacement_chaining.swift
index ad7af25..2b30230 100644
--- a/test/Interpreter/dynamic_replacement_chaining.swift
+++ b/test/Interpreter/dynamic_replacement_chaining.swift
@@ -1,18 +1,18 @@
 // First build without chaining.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(A)) -module-name A -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_A.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(B)) -I%t -L%t -lA -Xlinker -rpath -Xlinker %t -module-name B -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(C)) -I%t -L%t -lA -Xlinker -rpath -Xlinker %t -module-name C -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift
-// RUN: %target-build-swift -I%t -L%t -lA -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(B)) -I%t -L%t -lA %target-rpath(%t) -module-name B -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift
+// RUN: %target-build-swift-dylib(%t/%target-library-name(C)) -I%t -L%t -lA %target-rpath(%t) -module-name C -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift
+// RUN: %target-build-swift -I%t -L%t -lA -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(A) %t/%target-library-name(B) %t/%target-library-name(C)
 // RUN: %target-run %t/main %t/%target-library-name(A) %t/%target-library-name(B) %t/%target-library-name(C)
 
 // Now build with chaining enabled.
 // RUN: %empty-directory(%t)
 // RUN: %target-build-swift-dylib(%t/%target-library-name(A)) -module-name A -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_A.swift
-// RUN: %target-build-swift-dylib(%t/%target-library-name(B)) -I%t -L%t -lA -Xlinker -rpath -Xlinker %t -module-name B -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift -Xfrontend -enable-dynamic-replacement-chaining
-// RUN: %target-build-swift-dylib(%t/%target-library-name(C)) -I%t -L%t -lA -Xlinker -rpath -Xlinker %t -module-name C -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift -Xfrontend -enable-dynamic-replacement-chaining
-// RUN: %target-build-swift -I%t -L%t -lA -DCHAINING -o %t/main -Xlinker -rpath -Xlinker %t %s -swift-version 5
+// RUN: %target-build-swift-dylib(%t/%target-library-name(B)) -I%t -L%t -lA %target-rpath(%t) -module-name B -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift -Xfrontend -enable-dynamic-replacement-chaining
+// RUN: %target-build-swift-dylib(%t/%target-library-name(C)) -I%t -L%t -lA %target-rpath(%t) -module-name C -emit-module -emit-module-path %t -swift-version 5 %S/Inputs/dynamic_replacement_chaining_B.swift -Xfrontend -enable-dynamic-replacement-chaining
+// RUN: %target-build-swift -I%t -L%t -lA -DCHAINING -o %t/main %target-rpath(%t) %s -swift-version 5
 // RUN: %target-codesign %t/main %t/%target-library-name(A) %t/%target-library-name(B) %t/%target-library-name(C)
 // RUN: %target-run %t/main %t/%target-library-name(A) %t/%target-library-name(B) %t/%target-library-name(C)
 
diff --git a/test/Interpreter/enum_resilience.swift b/test/Interpreter/enum_resilience.swift
index ab810d2..cf5bc99 100644
--- a/test/Interpreter/enum_resilience.swift
+++ b/test/Interpreter/enum_resilience.swift
@@ -6,7 +6,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_enum)) -Xfrontend -enable-resilience %S/../Inputs/resilient_enum.swift -emit-module -emit-module-path %t/resilient_enum.swiftmodule -module-name resilient_enum -I%t -L%t -lresilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_enum)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_enum -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_enum -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct) %t/%target-library-name(resilient_enum)
@@ -17,7 +17,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_enum_wmo)) -Xfrontend -enable-resilience %S/../Inputs/resilient_enum.swift -emit-module -emit-module-path %t/resilient_enum.swiftmodule -module-name resilient_enum -I%t -L%t -lresilient_struct_wmo -whole-module-optimization
 // RUN: %target-codesign %t/%target-library-name(resilient_enum_wmo)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_enum_wmo -o %t/main2 -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_enum_wmo -o %t/main2 %target-rpath(%t)
 // RUN: %target-codesign %t/main2
 
 // RUN: %target-run %t/main2 %t/%target-library-name(resilient_struct_wmo) %t/%target-library-name(resilient_enum_wmo)
diff --git a/test/Interpreter/global_resilience.swift b/test/Interpreter/global_resilience.swift
index b125a6d..d3d351d 100644
--- a/test/Interpreter/global_resilience.swift
+++ b/test/Interpreter/global_resilience.swift
@@ -6,7 +6,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_global)) -Xfrontend -enable-resilience %S/../Inputs/resilient_global.swift -emit-module -emit-module-path %t/resilient_global.swiftmodule -module-name resilient_global -I%t -L%t -lresilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_global)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_global -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_global -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct) %t/%target-library-name(resilient_global)
@@ -17,7 +17,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_global_wmo)) -Xfrontend -enable-resilience %S/../Inputs/resilient_global.swift -emit-module -emit-module-path %t/resilient_global.swiftmodule -module-name resilient_global -I%t -L%t -lresilient_struct_wmo -whole-module-optimization
 // RUN: %target-codesign %t/%target-library-name(resilient_global_wmo)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_global_wmo -o %t/main2 -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct_wmo -lresilient_global_wmo -o %t/main2 %target-rpath(%t)
 // RUN: %target-codesign %t/main2
 
 // RUN: %target-run %t/main2 %t/%target-library-name(resilient_struct_wmo) %t/%target-library-name(resilient_global_wmo)
diff --git a/test/Interpreter/objc_class_resilience.swift b/test/Interpreter/objc_class_resilience.swift
index 05bb923..aac1925 100644
--- a/test/Interpreter/objc_class_resilience.swift
+++ b/test/Interpreter/objc_class_resilience.swift
@@ -3,7 +3,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct)) -Xfrontend -enable-resilience -Xfrontend -enable-class-resilience %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_struct)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct)
diff --git a/test/Interpreter/protocol_resilience.swift b/test/Interpreter/protocol_resilience.swift
index 522ef77..ea63e6f 100644
--- a/test/Interpreter/protocol_resilience.swift
+++ b/test/Interpreter/protocol_resilience.swift
@@ -3,7 +3,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_protocol)) -Xfrontend -enable-resilience %S/../Inputs/resilient_protocol.swift -emit-module -emit-module-path %t/resilient_protocol.swiftmodule -module-name resilient_protocol
 // RUN: %target-codesign %t/%target-library-name(resilient_protocol)
 
-// RUN: %target-build-swift %s -lresilient_protocol -I %t -L %t -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -lresilient_protocol -I %t -L %t -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_protocol)
@@ -11,7 +11,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_protocol_wmo)) -Xfrontend -enable-resilience %S/../Inputs/resilient_protocol.swift -emit-module -emit-module-path %t/resilient_protocol.swiftmodule -module-name resilient_protocol -whole-module-optimization
 // RUN: %target-codesign %t/%target-library-name(resilient_protocol_wmo)
 
-// RUN: %target-build-swift %s -lresilient_protocol_wmo -I %t -L %t -o %t/main2 -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -lresilient_protocol_wmo -I %t -L %t -o %t/main2 %target-rpath(%t)
 // RUN: %target-codesign %t/main2
 
 // RUN: %target-run %t/main2 %t/%target-library-name(resilient_protocol_wmo)
diff --git a/test/Interpreter/resilient_metadata_cycles.swift b/test/Interpreter/resilient_metadata_cycles.swift
index 949fa80..92ac30c 100644
--- a/test/Interpreter/resilient_metadata_cycles.swift
+++ b/test/Interpreter/resilient_metadata_cycles.swift
@@ -6,7 +6,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_class)) -Xfrontend -enable-resilience -Xfrontend -enable-class-resilience %S/../Inputs/resilient_class.swift -emit-module -emit-module-path %t/resilient_class.swiftmodule -module-name resilient_class -I%t -L%t -lresilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_class)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresilient_struct -lresilient_class -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct) %t/%target-library-name(resilient_class)
diff --git a/test/Interpreter/struct_resilience.swift b/test/Interpreter/struct_resilience.swift
index 8a6b684..13ed53e 100644
--- a/test/Interpreter/struct_resilience.swift
+++ b/test/Interpreter/struct_resilience.swift
@@ -3,7 +3,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct)) -Xfrontend -enable-resilience %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct
 // RUN: %target-codesign %t/%target-library-name(resilient_struct)
 
-// RUN: %target-build-swift %s -lresilient_struct -I %t -L %t -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -lresilient_struct -I %t -L %t -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-run %t/main %t/%target-library-name(resilient_struct)
@@ -11,7 +11,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resilient_struct_wmo)) -Xfrontend -enable-resilience %S/../Inputs/resilient_struct.swift -emit-module -emit-module-path %t/resilient_struct.swiftmodule -module-name resilient_struct -whole-module-optimization
 // RUN: %target-codesign %t/%target-library-name(resilient_struct_wmo)
 
-// RUN: %target-build-swift %s -lresilient_struct_wmo -I %t -L %t -o %t/main2 -Xlinker -rpath -Xlinker %t -module-name main
+// RUN: %target-build-swift %s -lresilient_struct_wmo -I %t -L %t -o %t/main2 %target-rpath(%t) -module-name main
 // RUN: %target-codesign %t/main2
 
 // RUN: %target-run %t/main2 %t/%target-library-name(resilient_struct_wmo)
diff --git a/test/Interpreter/unresolvable_dynamic_metadata_cycles.swift b/test/Interpreter/unresolvable_dynamic_metadata_cycles.swift
index 38bae3f..fe30424 100644
--- a/test/Interpreter/unresolvable_dynamic_metadata_cycles.swift
+++ b/test/Interpreter/unresolvable_dynamic_metadata_cycles.swift
@@ -3,7 +3,7 @@
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resil)) -Xfrontend -enable-resilience %S/Inputs/resilient_generic_struct_v1.swift -emit-module -emit-module-path %t/resil.swiftmodule -module-name resil
 // RUN: %target-codesign %t/%target-library-name(resil)
 
-// RUN: %target-build-swift %s -L %t -I %t -lresil -o %t/main -Xlinker -rpath -Xlinker %t
+// RUN: %target-build-swift %s -L %t -I %t -lresil -o %t/main %target-rpath(%t)
 // RUN: %target-codesign %t/main
 
 // RUN: %target-build-swift-dylib(%t/%target-library-name(resil)) -Xfrontend -enable-resilience %S/Inputs/resilient_generic_struct_v2.swift -emit-module -emit-module-path %t/resil.swiftmodule -module-name resil
diff --git a/test/Interpreter/varargs.swift b/test/Interpreter/varargs.swift
index faf2746..1fe3689 100644
--- a/test/Interpreter/varargs.swift
+++ b/test/Interpreter/varargs.swift
@@ -1,7 +1,7 @@
 // RUN: %target-run-simple-swift | %FileCheck %s
-// REQUIRES: executable_test
 
-// XFAIL: linux
+// REQUIRES: executable_test
+// REQUIRES: objc_interop
 
 import Foundation
 
diff --git a/test/Migrator/Inputs/API.json b/test/Migrator/Inputs/API.json
index 47ed41e..589d30a 100644
--- a/test/Migrator/Inputs/API.json
+++ b/test/Migrator/Inputs/API.json
@@ -531,6 +531,17 @@
   },
   {
     "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Function",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:6Cities12ToplevelTypeC8trailingyyySayypGSgcF",
+    "LeftComment": "",
+    "RightUsr": "",
+    "RightComment": "trailing2(a:)",
+    "ModuleName": "Cities"
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
     "NodeKind": "TypeDecl",
     "NodeAnnotation": "Rename",
     "ChildIndex": "0",
@@ -539,5 +550,16 @@
     "RightUsr": "",
     "RightComment": "FontWeighting",
     "ModuleName": "Cities"
-  }
+  },
+  {
+    "DiffItemKind": "CommonDiffItem",
+    "NodeKind": "Var",
+    "NodeAnnotation": "Rename",
+    "ChildIndex": "0",
+    "LeftUsr": "s:6CitiesAAC6yogurtSivp",
+    "LeftComment": "yogurt",
+    "RightUsr": "",
+    "RightComment": "cheese",
+    "ModuleName": "Cities"
+  },
 ]
diff --git a/test/Migrator/Inputs/Cities.swift b/test/Migrator/Inputs/Cities.swift
index 8be42c8..5cb7320 100644
--- a/test/Migrator/Inputs/Cities.swift
+++ b/test/Migrator/Inputs/Cities.swift
@@ -9,6 +9,7 @@
   open func buderim() -> Cities? { return Cities(x: 1) }
   open func noosa() -> [[String : Cities]?] { return [] }
   open func maroochy(x: Int?, y: Int?) {}
+  open var yogurt: Int { return 1 }
   public struct CityKind {
     public static let Town = 1
     public static let Village = 1
@@ -61,6 +62,7 @@
   public init() {}
   public init(recordName: String) {}
   open func member(_ x: @escaping ([Any]?) -> Void) {}
+  open func trailing(_ x: @escaping ([Any]?) -> Void) {}
 }
 
 public var GlobalAttribute: String = ""
diff --git a/test/Migrator/rename-func-decl.swift b/test/Migrator/rename-func-decl.swift
index 3d4c943..c3ffdf9 100644
--- a/test/Migrator/rename-func-decl.swift
+++ b/test/Migrator/rename-func-decl.swift
@@ -18,3 +18,11 @@
 class MySubTopLevelType2: ToplevelType {
   override func member(_ x: @escaping (((([(Any)])?))) -> Void) {}
 }
+
+class SubCities: Cities {
+  override var yogurt: Int { return 2 }
+}
+
+func boo(_ a: ToplevelType) {
+  a.trailing {  print($0!) }
+}
diff --git a/test/Migrator/rename-func-decl.swift.expected b/test/Migrator/rename-func-decl.swift.expected
index 5c7e94a..90cccdc 100644
--- a/test/Migrator/rename-func-decl.swift.expected
+++ b/test/Migrator/rename-func-decl.swift.expected
@@ -18,3 +18,11 @@
 class MySubTopLevelType2: ToplevelType {
   override func member(_ x: @escaping (((([(Int)])?))) -> Void) {}
 }
+
+class SubCities: Cities {
+  override var cheese: Int { return 2 }
+}
+
+func boo(_ a: ToplevelType) {
+  a.trailing2 {  print($0!) }
+}
diff --git a/test/Migrator/stdlib_rename.swift b/test/Migrator/stdlib_rename.swift
new file mode 100644
index 0000000..20397f3
--- /dev/null
+++ b/test/Migrator/stdlib_rename.swift
@@ -0,0 +1,12 @@
+// REQUIRES: objc_interop
+// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null
+// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
+// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2
+// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
+
+func test1(_ a: [String], s: String) {
+  _ = a.index(of: s)
+}
+func test2(_ s: String, c: Character) {
+  _ = s.index(of: c)
+}
\ No newline at end of file
diff --git a/test/Migrator/stdlib_rename.swift.expected b/test/Migrator/stdlib_rename.swift.expected
new file mode 100644
index 0000000..f721bf8
--- /dev/null
+++ b/test/Migrator/stdlib_rename.swift.expected
@@ -0,0 +1,12 @@
+// REQUIRES: objc_interop
+// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null
+// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
+// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -F %S/mock-sdk -emit-migrated-file-path %t/stdlib_rename.swift.result -emit-remap-file-path %t/stdlib_rename.swift.remap -o /dev/null -swift-version 4.2
+// RUN: diff -u %S/stdlib_rename.swift.expected %t/stdlib_rename.swift.result
+
+func test1(_ a: [String], s: String) {
+  _ = a.firstIndex(of: s)
+}
+func test2(_ s: String, c: Character) {
+  _ = s.firstIndex(of: c)
+}
\ No newline at end of file
diff --git a/test/Misc/tbi.sil b/test/Misc/tbi.sil
index 63e81ec..6aa5338 100644
--- a/test/Misc/tbi.sil
+++ b/test/Misc/tbi.sil
@@ -32,7 +32,7 @@
 
 import Builtin
 
-sil @testTBI : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
+sil [ossa] @testTBI : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
 bb0(%0 : $Builtin.Int64):
   %1 = integer_literal $Builtin.Int64, 0x00FFFFFFFFFFFFFF
   %2 = builtin "and_Int64"(%0 : $Builtin.Int64, %1 : $Builtin.Int64) : $Builtin.Int64
diff --git a/test/NameBinding/Inputs/HasResult.swift b/test/NameBinding/Inputs/HasResult.swift
new file mode 100644
index 0000000..6fcc1dd
--- /dev/null
+++ b/test/NameBinding/Inputs/HasResult.swift
@@ -0,0 +1,4 @@
+public enum Result<Value, Error> {
+case success(Value)
+case failure(Error)
+}
diff --git a/test/NameBinding/Inputs/MemberTypesInClasses.swift b/test/NameBinding/Inputs/MemberTypesInClasses.swift
new file mode 100644
index 0000000..1e9ed6f
--- /dev/null
+++ b/test/NameBinding/Inputs/MemberTypesInClasses.swift
@@ -0,0 +1,7 @@
+public class RootClass {
+}
+
+public class SubClass: RootClass {
+  public typealias Member = Int
+}
+
diff --git a/test/NameBinding/member_type_shadowing.swift b/test/NameBinding/member_type_shadowing.swift
new file mode 100644
index 0000000..b9231a1
--- /dev/null
+++ b/test/NameBinding/member_type_shadowing.swift
@@ -0,0 +1,15 @@
+// RUN: %empty-directory(%t)
+// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/MemberTypesInClasses.swift
+// RUN: %target-swift-frontend -typecheck %s -I %t -verify
+
+import MemberTypesInClasses
+
+protocol P {
+  associatedtype Member
+}
+
+extension RootClass: P {
+  typealias Member = SubClass.Member
+}
+
+
diff --git a/test/NameBinding/reference-dependencies.swift b/test/NameBinding/reference-dependencies.swift
index 1d1c120..5c61d42 100644
--- a/test/NameBinding/reference-dependencies.swift
+++ b/test/NameBinding/reference-dependencies.swift
@@ -416,7 +416,6 @@
 // CHECK-DAG: - !private ["s33ExpressibleByUnicodeScalarLiteralP", ""]
 // CHECK-DAG: - !private ["Sx", "Stride"]
 // CHECK-DAG: - !private ["Sa", "reduce"]
-// CHECK-DAG: - !private ["Sb", "_getBuiltinLogicValue"]
 // CHECK-DAG: - ["Sb", "InnerToBool"]
 // CHECK-DAG: - !private ["4main17OtherFileIntArrayV", "deinit"]
 // CHECK-DAG: - !private ["4main18OtherFileOuterTypeV", "InnerType"]
diff --git a/test/NameBinding/stdlib_shadowing.swift b/test/NameBinding/stdlib_shadowing.swift
new file mode 100644
index 0000000..ccbb824
--- /dev/null
+++ b/test/NameBinding/stdlib_shadowing.swift
@@ -0,0 +1,9 @@
+// RUN: %empty-directory(%t)
+// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/HasResult.swift
+// RUN: %target-swift-frontend -typecheck %s -I %t -verify
+
+import HasResult
+
+func foo() -> Result<Int, Error> {
+  return Result<Int, Error>.success(42)
+}
diff --git a/test/Parse/if_expr.swift b/test/Parse/if_expr.swift
index c029d60..07b0c8d 100644
--- a/test/Parse/if_expr.swift
+++ b/test/Parse/if_expr.swift
@@ -3,13 +3,10 @@
 // CHECK: (func_decl{{.*}}"r13756261(_:_:)"
 func r13756261(_ x: Bool, _ y: Int) -> Int {
   // CHECK: (if_expr
-  // CHECK:   (call_expr
   // CHECK:   (declref_expr
   // CHECK:   (if_expr
-  // CHECK:     (call_expr
   // CHECK:     (declref_expr
   // CHECK:     (if_expr
-  // CHECK:       (call_expr
   // CHECK:       (declref_expr
   // CHECK:       (declref_expr
   return (x) ? y : (x) ? y : (x) ? y : y
@@ -18,13 +15,10 @@
 // CHECK: (func_decl{{.*}}"r13756221(_:_:)"
 func r13756221(_ x: Bool, _ y: Int) -> Int {
   // CHECK: (if_expr
-  // CHECK:   (call_expr
   // CHECK:   (declref_expr
   // CHECK:   (if_expr
-  // CHECK:     (call_expr
   // CHECK:     (declref_expr
   // CHECK:     (if_expr
-  // CHECK:       (call_expr
   // CHECK:       (declref_expr
   // CHECK:       (declref_expr
   return (x) ? y
@@ -36,11 +30,8 @@
 // CHECK: (func_decl{{.*}}"telescoping_if(_:_:)"
 func telescoping_if(_ x: Bool, _ y: Int) -> Int {
   // CHECK: (if_expr
-  // CHECK:   (call_expr
   // CHECK:   (if_expr
-  // CHECK:     (call_expr
   // CHECK:     (if_expr
-  // CHECK:       (call_expr
   // CHECK:       (declref_expr
   // CHECK:       (declref_expr
   // CHECK:     (declref_expr
@@ -91,11 +82,9 @@
   // CHECK:     (binary_expr
   // CHECK:       (declref_expr
   // CHECK:       (if_expr
-  // CHECK:         (call_expr
   // CHECK:         (binary_expr
   // CHECK:         (declref_expr
   // CHECK:     (if_expr
-  // CHECK:       (call_expr
   // CHECK:       (binary_expr
   // CHECK:       (declref_expr
   // CHECK:   (declref_expr
@@ -109,14 +98,12 @@
   // CHECK: (binary_expr
   // CHECK:   (declref_expr
   // CHECK:   (if_expr
-  // CHECK:     (call_expr
   // CHECK:     (binary_expr
   // CHECK:       (declref_expr
   // CHECK:       (declref_expr
   // CHECK:     (binary_expr
   // CHECK:       (declref_expr
   // CHECK:       (if_expr
-  // CHECK:         (call_expr
   // CHECK:         (binary_expr
   // CHECK:           (declref_expr
   // CHECK:           (declref_expr
diff --git a/test/Parse/try.swift b/test/Parse/try.swift
index 54a2aa2..f58f4a0 100644
--- a/test/Parse/try.swift
+++ b/test/Parse/try.swift
@@ -258,3 +258,14 @@
 let _: Int?? = try? producer.produceDoubleOptionalInt() // expected-error {{value of optional type 'Int???' not unwrapped; did you mean to use 'try!' or chain with '?'?}}
 let _: Int??? = try? producer.produceDoubleOptionalInt() // good
 let _: String = try? producer.produceDoubleOptionalInt() // expected-error {{cannot convert value of type 'Int???' to specified type 'String'}}
+
+// rdar://problem/46742002
+protocol Dummy : class {}
+
+class F<T> {
+  func wait() throws -> T { fatalError() }
+}
+
+func bar(_ a: F<Dummy>, _ b: F<Dummy>) {
+  _ = (try? a.wait()) === (try? b.wait())
+}
diff --git a/test/Parse/try_swift5.swift b/test/Parse/try_swift5.swift
index 6d463a0..ec05752 100644
--- a/test/Parse/try_swift5.swift
+++ b/test/Parse/try_swift5.swift
@@ -261,3 +261,14 @@
 let _: Int?? = try? producer.produceDoubleOptionalInt() // good
 let _: Int??? = try? producer.produceDoubleOptionalInt() // good
 let _: String = try? producer.produceDoubleOptionalInt() // expected-error {{cannot convert value of type 'Int??' to specified type 'String'}}
+
+// rdar://problem/46742002
+protocol Dummy : class {}
+
+class F<T> {
+  func wait() throws -> T { fatalError() }
+}
+
+func bar(_ a: F<Dummy>, _ b: F<Dummy>) {
+  _ = (try? a.wait()) === (try? b.wait())
+}
diff --git a/test/ParseableInterface/DefaultArgs.swiftinterface b/test/ParseableInterface/DefaultArgs.swiftinterface
index 8cf428a..2aa7bb0 100644
--- a/test/ParseableInterface/DefaultArgs.swiftinterface
+++ b/test/ParseableInterface/DefaultArgs.swiftinterface
@@ -7,11 +7,11 @@
   // Has defaults, but no body.
   public func hasDefaults(a: Int = 4, b: Int = 1 + 2)
 
-  // CHECK-LABEL: sil hidden @$s11DefaultArgs9SomeClassC11hasDefaults1a1bySi_SitFfA_
+  // CHECK-LABEL: sil hidden [ossa] @$s11DefaultArgs9SomeClassC11hasDefaults1a1bySi_SitFfA_
   // CHECK: integer_literal $Builtin.IntLiteral, 4
   // CHECK: end sil function '$s11DefaultArgs9SomeClassC11hasDefaults1a1bySi_SitFfA_'
 
-  // CHECK-LABEL: sil hidden @$s11DefaultArgs9SomeClassC11hasDefaults1a1bySi_SitFfA0_
+  // CHECK-LABEL: sil hidden [ossa] @$s11DefaultArgs9SomeClassC11hasDefaults1a1bySi_SitFfA0_
   // CHECK: integer_literal $Builtin.IntLiteral, 1
   // CHECK: integer_literal $Builtin.IntLiteral, 2
   // CHECK: function_ref @$sSi1poiyS2i_SitFZ
@@ -19,7 +19,7 @@
 
   public init(a: Int = 5)
 
-  // CHECK-LABEL: sil hidden @$s11DefaultArgs9SomeClassC1aACSi_tcfcfA_
+  // CHECK-LABEL: sil hidden [ossa] @$s11DefaultArgs9SomeClassC1aACSi_tcfcfA_
   // CHECK: integer_literal $Builtin.IntLiteral, 5
   // CHECK: end sil function '$s11DefaultArgs9SomeClassC1aACSi_tcfcfA_'
 }
diff --git a/test/ParseableInterface/ModuleCache/module-cache-diagnostics.swift b/test/ParseableInterface/ModuleCache/module-cache-diagnostics.swift
index d050672..e51d530 100644
--- a/test/ParseableInterface/ModuleCache/module-cache-diagnostics.swift
+++ b/test/ParseableInterface/ModuleCache/module-cache-diagnostics.swift
@@ -1,4 +1,3 @@
-// REQUIRES: rdar46073729
 // RUN: %empty-directory(%t)
 // RUN: %empty-directory(%t/modulecache)
 //
@@ -55,7 +54,7 @@
 // RUN: not %target-swift-frontend -I %t -module-cache-path %t/modulecache -enable-parseable-module-interface -emit-module -o %t/TestModule.swiftmodule -module-name TestModule %s >%t/err.txt 2>&1
 // RUN: %{python} %S/Inputs/check-is-old.py %t/modulecache/OtherModule-*.swiftmodule %t/modulecache/LeafModule-*.swiftmodule
 // RUN: %FileCheck %s -check-prefix=CHECK-ERROR <%t/err.txt
-// CHECK-ERROR: LeafModule.swiftinterface:6:8: error: no such module 'NotAModule'
+// CHECK-ERROR: LeafModule.swiftinterface:7:8: error: no such module 'NotAModule'
 // CHECK-ERROR: OtherModule.swiftinterface:4:8: error: no such module 'LeafModule'
 //
 //
diff --git a/test/ParseableInterface/SmokeTest.swiftinterface b/test/ParseableInterface/SmokeTest.swiftinterface
index 345b239..4bb590a 100644
--- a/test/ParseableInterface/SmokeTest.swiftinterface
+++ b/test/ParseableInterface/SmokeTest.swiftinterface
@@ -1,5 +1,9 @@
+// The "flags" line in this test deliberately has no flags and no space after
+// the colon, just to make sure that works (even though it'll never be printed
+// that way).
+
+// swift-module-flags:
 // swift-interface-format-version: 1.0
-// swift-module-flags: 
 
 // Make sure parse-only works...
 // RUN: %target-swift-frontend -parse %s
diff --git a/test/ParseableInterface/fixed-layout-property-initializers.swift b/test/ParseableInterface/fixed-layout-property-initializers.swift
index 0b817bc..099a214 100644
--- a/test/ParseableInterface/fixed-layout-property-initializers.swift
+++ b/test/ParseableInterface/fixed-layout-property-initializers.swift
@@ -1,16 +1,16 @@
 // RUN: %empty-directory(%t)
 
 // RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t.swiftinterface %s
-// RUN: %FileCheck %s < %t.swiftinterface
+// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t.swiftinterface
 
 // RUN: %target-swift-frontend -typecheck -emit-parseable-module-interface-path %t-resilient.swiftinterface -enable-resilience %s
-// RUN: %FileCheck %s < %t-resilient.swiftinterface
+// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t-resilient.swiftinterface
 
 // RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule %t.swiftinterface -disable-objc-attr-requires-foundation-module
-// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-parseable-module-interface-path - | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -module-name Test -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK
 
 // RUN: %target-swift-frontend -emit-module -o %t/TestResilient.swiftmodule -enable-resilience %t-resilient.swiftinterface -disable-objc-attr-requires-foundation-module
-// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-resilience -emit-parseable-module-interface-path - | %FileCheck %s
+// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/TestResilient.swiftmodule -module-name TestResilient -enable-resilience -emit-parseable-module-interface-path - | %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK
 
 // CHECK: @_fixed_layout public struct MyStruct {
 @_fixed_layout
@@ -34,7 +34,8 @@
   // CHECK: @_hasInitialValue public static var staticVar: [[BOOL]]
   public static var staticVar: Bool = Bool(true && false)
 
-  // CHECK: @inlinable internal init() {}
+  // FROMSOURCE: @inlinable internal init() {}
+  // FROMMODULE: @inlinable internal init(){{$}}
   @inlinable init() {}
 }
 
@@ -57,7 +58,8 @@
   // CHECK: @_hasInitialValue public static var staticVar: [[BOOL]]
   public static var staticVar: Bool = Bool(true && false)
 
-  // CHECK: @inlinable internal init() {}
+  // FROMSOURCE: @inlinable internal init() {}
+  // FROMMODULE: @inlinable internal init(){{$}}
   @inlinable init() {}
 }
 
diff --git a/test/ParseableInterface/inlinable-function.swift b/test/ParseableInterface/inlinable-function.swift
index 3bb0589..f22e63d 100644
--- a/test/ParseableInterface/inlinable-function.swift
+++ b/test/ParseableInterface/inlinable-function.swift
@@ -1,15 +1,17 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-parseable-module-interface-path %t/Test.swiftinterface -module-name Test %s
-// RUN: %FileCheck %s < %t/Test.swiftinterface
-// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path - -module-name Test | %FileCheck %s
+// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
+// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path %t/TestFromModule.swiftinterface -module-name Test
+// RUN: %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK < %t/TestFromModule.swiftinterface
 
 // CHECK: public struct Foo : Hashable {
 public struct Foo: Hashable {
   // CHECK: public var inlinableGetPublicSet: [[INT:(Swift.)?Int]] {
   public var inlinableGetPublicSet: Int {
-  // CHECK: @inlinable get {
-  // CHECK-NEXT: return 3
-  // CHECK-NEXT: }
+  // FROMSOURCE: @inlinable get {
+  // FROMMODULE: @inlinable get{{$}}
+  // FROMSOURCE-NEXT: return 3
+  // FROMSOURCE-NEXT: }
     @inlinable
     get {
       return 3
@@ -35,11 +37,11 @@
     // CHECK-NEXT: {{^}}  }
   }
 
-
   // CHECK: @_transparent public var transparent: [[INT]] {
-  // CHECK-NEXT:   get {
-  // CHECK-NEXT:   return 34
-  // CHECK-NEXT: }
+  // FROMMODULE-NEXT: get{{$}}
+  // FROMSOURCE-NEXT: get {
+  // FROMSOURCE-NEXT:   return 34
+  // FROMSOURCE-NEXT: }
   // CHECK-NEXT: }
   @_transparent
   public var transparent: Int {
@@ -52,17 +54,18 @@
     get {
       return 34
     }
-    // CHECK-NEXT: @_transparent set[[NEWVALUE]] {
-    // CHECK-NOT:   #if false
-    // CHECK-NOT:   print("I should not appear")
-    // CHECK-NOT:   #else
-    // CHECK-NOT:   #if false
-    // CHECK-NOT:   print("I also should not")
-    // CHECK-NOT:   #else
-    // CHECK:       print("I am set to \(newValue)")
-    // CHECK-NOT:   #endif
-    // CHECK-NOT:   #endif
-    // CHECK-NEXT: }
+    // FROMMODULE-NEXT: @_transparent set[[NEWVALUE]]{{$}}
+    // FROMSOURCE-NEXT: @_transparent set[[NEWVALUE]] {
+    // FROMSOURCE-NOT:   #if false
+    // FROMSOURCE-NOT:   print("I should not appear")
+    // FROMSOURCE-NOT:   #else
+    // FROMSOURCE-NOT:   #if false
+    // FROMSOURCE-NOT:   print("I also should not")
+    // FROMSOURCE-NOT:   #else
+    // FROMSOURCE:       print("I am set to \(newValue)")
+    // FROMSOURCE-NOT:   #endif
+    // FROMSOURCE-NOT:   #endif
+    // FROMSOURCE-NEXT: }
     @_transparent
     set {
       #if false
@@ -80,20 +83,22 @@
   // CHECK: @inlinable public var inlinableProperty: [[INT]] {
   @inlinable
   public var inlinableProperty: Int {
-    // CHECK: get {
-    // CHECK:   return 32
-    // CHECK: }
+    // FROMMODULE:      get{{$}}
+    // FROMSOURCE:      get {
+    // FROMSOURCE-NEXT:   return 32
+    // FROMSOURCE-NEXT: }
     get {
       return 32
     }
 
-    // CHECK: set[[NEWVALUE]] {
-    // CHECK-NOT: #if true
-    // CHECK:     print("I am set to \(newValue)")
-    // CHECK-NOT: #else
-    // CHECK-NOT: print("I should not appear")
-    // CHECK-NOT  #endif
-    // CHECK: }
+    // FROMMODULE: set[[NEWVALUE]]{{$}}
+    // FROMSOURCE: set[[NEWVALUE]] {
+    // FROMSOURCE-NOT: #if true
+    // FROMSOURCE:     print("I am set to \(newValue)")
+    // FROMSOURCE-NOT: #else
+    // FROMSOURCE-NOT: print("I should not appear")
+    // FROMSOURCE-NOT  #endif
+    // FROMSOURCE: }
     set {
       #if true
       print("I am set to \(newValue)")
@@ -107,16 +112,18 @@
   // CHECK: @inlinable public var inlinableReadAndModify: [[INT]] {
   @inlinable
   public var inlinableReadAndModify: Int {
-    // CHECK: _read {
-    // CHECK-NEXT: yield 0
-    // CHECK-NEXT: }
+    // FROMMODULE:      _read{{$}}
+    // FROMSOURCE:      _read {
+    // FROMSOURCE-NEXT:   yield 0
+    // FROMSOURCE-NEXT: }
     _read {
       yield 0
     }
-    // CHECK: _modify {
-    // CHECK-NEXT: var x = 0
-    // CHECK-NEXT: yield &x
-    // CHECK-NEXT: }
+    // FROMMODULE:      _modify{{$}}
+    // FROMSOURCE:      _modify {
+    // FROMSOURCE-NEXT:   var x = 0
+    // FROMSOURCE-NEXT:   yield &x
+    // FROMSOURCE-NEXT: }
     _modify {
       var x = 0
       yield &x
@@ -126,9 +133,10 @@
 
   // CHECK: public var inlinableReadNormalModify: [[INT]] {
   public var inlinableReadNormalModify: Int {
-    // CHECK: @inlinable _read {
-    // CHECK-NEXT: yield 0
-    // CHECK-NEXT: }
+    // FROMMODULE: @inlinable _read{{$}}
+    // FROMSOURCE: @inlinable _read {
+    // FROMSOURCE-NEXT: yield 0
+    // FROMSOURCE-NEXT: }
     @inlinable _read {
       yield 0
     }
@@ -153,10 +161,11 @@
       yield 0
     }
 
-    // CHECK: @inlinable _modify {
-    // CHECK-NEXT: var x = 0
-    // CHECK-NEXT: yield &x
-    // CHECK-NEXT: }
+    // FROMMODULE: @inlinable _modify{{$}}
+    // FROMSOURCE: @inlinable _modify {
+    // FROMSOURCE-NEXT: var x = 0
+    // FROMSOURCE-NEXT: yield &x
+    // FROMSOURCE-NEXT: }
     @inlinable _modify {
       var x = 0
       yield &x
@@ -176,12 +185,13 @@
     // CHECK-NEXT: }
   }
 
-  // CHECK: @inlinable public func inlinableMethod() {
-  // CHECK-NOT: #if NO
-  // CHECK-NOT: print("Hello, world!")
-  // CHECK-NOT: #endif
-  // CHECK:     print("Goodbye, world!")
-  // CHECK-NEXT: }
+  // FROMMODULE: @inlinable public func inlinableMethod(){{$}}
+  // FROMSOURCE: @inlinable public func inlinableMethod() {
+  // FROMSOURCE-NOT: #if NO
+  // FROMSOURCE-NOT: print("Hello, world!")
+  // FROMSOURCE-NOT: #endif
+  // FROMSOURCE:     print("Goodbye, world!")
+  // FROMSOURCE-NEXT: }
   @inlinable
   public func inlinableMethod() {
     #if NO
@@ -191,9 +201,10 @@
   }
 
 
-  // CHECK: @_transparent [[ATTRS:(mutating public|public mutating)]] func transparentMethod() {
-  // CHECK-NEXT:   inlinableProperty = 4
-  // CHECK-NEXT: }
+  // FROMMODULE: @_transparent [[ATTRS:(mutating public|public mutating)]] func transparentMethod(){{$}}
+  // FROMSOURCE: @_transparent [[ATTRS:(mutating public|public mutating)]] func transparentMethod() {
+  // FROMSOURCE-NEXT:   inlinableProperty = 4
+  // FROMSOURCE-NEXT: }
   @_transparent
   mutating public func transparentMethod() {
     inlinableProperty = 4
@@ -207,7 +218,8 @@
 
   // CHECK: public subscript(i: [[INT]]) -> [[INT]] {
   // CHECK-NEXT:   get{{$}}
-  // CHECK-NEXT:   @inlinable set[[NEWVALUE]] { print("set") }
+  // FROMSOURCE-NEXT:   @inlinable set[[NEWVALUE]] { print("set") }
+  // FROMMODULE-NEXT:   @inlinable set[[NEWVALUE]]{{$}}
   // CHECK-NEXT: }
   public subscript(i: Int) -> Int {
     get { return 0 }
@@ -215,7 +227,8 @@
   }
 
   // CHECK: public subscript(j: [[INT]], k: [[INT]]) -> [[INT]] {
-  // CHECK-NEXT:   @inlinable get { return 0 }
+  // FROMMODULE-NEXT:   @inlinable get{{$}}
+  // FROMSOURCE-NEXT:   @inlinable get { return 0 }
   // CHECK-NEXT:   set[[NEWVALUE]]{{$}}
   // CHECK-NEXT: }
   public subscript(j: Int, k: Int) -> Int {
@@ -224,8 +237,10 @@
   }
 
   // CHECK: @inlinable public subscript(l: [[INT]], m: [[INT]], n: [[INT]]) -> [[INT]] {
-  // CHECK-NEXT:   get { return 0 }
-  // CHECK-NEXT:   set[[NEWVALUE]] { print("set") }
+  // FROMMODULE-NEXT:   get{{$}}
+  // FROMSOURCE-NEXT:   get { return 0 }
+  // FROMMODULE-NEXT:   set[[NEWVALUE]]{{$}}
+  // FROMSOURCE-NEXT:   set[[NEWVALUE]] { print("set") }
   // CHECK-NEXT: }
   @inlinable
   public subscript(l: Int, m: Int, n: Int) -> Int {
@@ -233,11 +248,12 @@
     set { print("set") }
   }
 
-  // CHECK: public init(value: [[INT]]) {
-  // CHECK-NEXT: topLevelUsableFromInline()
-  // CHECK-NEXT: noAccessors = value
-  // CHECK-NEXT: hasDidSet = value
-  // CHECK-NEXT: }
+  // FROMMODULE: @inlinable public init(value: [[INT]]){{$}}
+  // FROMSOURCE: @inlinable public init(value: [[INT]]) {
+  // FROMSOURCE-NEXT: topLevelUsableFromInline()
+  // FROMSOURCE-NEXT: noAccessors = value
+  // FROMSOURCE-NEXT: hasDidSet = value
+  // FROMSOURCE-NEXT: }
   @inlinable public init(value: Int) {
     topLevelUsableFromInline()
     noAccessors = value
@@ -266,9 +282,10 @@
   topLevelPrivate()
 }
 
-// CHECK: @inlinable public func topLevelInlinable() {
-// CHECK-NEXT:  topLevelUsableFromInline()
-// CHECK-NEXT: }
+// FROMMODULE: @inlinable public func topLevelInlinable(){{$}}
+// FROMSOURCE: @inlinable public func topLevelInlinable() {
+// FROMSOURCE-NEXT:  topLevelUsableFromInline()
+// FROMSOURCE-NEXT: }
 @inlinable public func topLevelInlinable() {
   topLevelUsableFromInline()
 }
@@ -278,9 +295,10 @@
   // CHECK: public init(){{$}}
   public init() {}
 
-  // CHECK: [[OBJC:(@objc )?]]@inlinable deinit {
-  // CHECK-NEXT: print("goodbye")
-  // CHECK-NEXT: }
+  // FROMMODULE: [[OBJC:(@objc )?]]@inlinable deinit{{$}}
+  // FROMSOURCE: [[OBJC:(@objc )?]]@inlinable deinit {
+  // FROMSOURCE-NEXT: print("goodbye")
+  // FROMSOURCE-NEXT: }
   @inlinable deinit {
     print("goodbye")
   }
diff --git a/test/ParseableInterface/modifiers.swift b/test/ParseableInterface/modifiers.swift
index d63a46a..c0576b0 100644
--- a/test/ParseableInterface/modifiers.swift
+++ b/test/ParseableInterface/modifiers.swift
@@ -1,14 +1,15 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -o %t/Test.swiftmodule -emit-parseable-module-interface-path %t/Test.swiftinterface -module-name Test -disable-objc-attr-requires-foundation-module -enable-objc-interop %s
-// RUN: %FileCheck %s < %t/Test.swiftinterface
-// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path - -module-name Test -enable-objc-interop | %FileCheck %s
+// RUN: %FileCheck %s --check-prefix FROMSOURCE --check-prefix CHECK < %t/Test.swiftinterface
+// RUN: %target-swift-frontend -emit-module -o /dev/null -merge-modules %t/Test.swiftmodule -disable-objc-attr-requires-foundation-module -emit-parseable-module-interface-path - -module-name Test -enable-objc-interop | %FileCheck %s --check-prefix FROMMODULE --check-prefix CHECK
 
 // CHECK-LABEL: final public class FinalClass {
 public final class FinalClass {
   // CHECK: @inlinable final public class var a: [[INT:(Swift.)?Int]] {
-  // CHECK-NEXT: {{^}} get {
-  // CHECK-NEXT: return 3
-  // CHECK-NEXT: }
+  // FROMSOURCE-NEXT: {{^}} get {
+  // FROMSOURCE-NEXT: return 3
+  // FROMSOURCE-NEXT: }
+  // FROMMODULE-NEXT: get{{$}}
   // CHECK-NEXT: }
   @inlinable
   public final class var a: Int {
@@ -16,9 +17,10 @@
   }
 
   // CHECK: final public class var b: [[INT]] {
-  // CHECK-NEXT:   {{^}} @inlinable get {
-  // CHECK-NEXT:     return 3
-  // CHECK-NEXT:   }
+  // FROMSOURCE-NEXT: {{^}} @inlinable get {
+  // FROMSOURCE-NEXT:   return 3
+  // FROMSOURCE-NEXT: }
+  // FROMMODULE-NEXT: {{^}} @inlinable get{{$}}
   // CHECK-NEXT:   set[[NEWVALUE:(\(newValue\))?]]{{$}}
   // CHECK-NEXT: }
   public final class var b: Int {
@@ -32,7 +34,8 @@
 
   // CHECK: public static var c: [[INT]] {
   // CHECK-NEXT: {{^}} get
-  // CHECK-NEXT:   @inlinable set[[NEWVALUE]] {}
+  // FROMSOURCE-NEXT:   @inlinable set[[NEWVALUE]] {}
+  // FROMMODULE-NEXT:   @inlinable set[[NEWVALUE]]{{$}}
   // CHECK-NEXT: }
   public static var c: Int {
     get {
@@ -85,7 +88,8 @@
 public struct MyStruct {
   // CHECK: public var e: [[INT]] {
   // CHECK-NEXT: {{^}} mutating get{{$}}
-  // CHECK-NEXT: {{^}} @inlinable nonmutating set[[NEWVALUE]] {}
+  // FROMSOURCE-NEXT: {{^}} @inlinable nonmutating set[[NEWVALUE]] {}
+  // FROMMODULE-NEXT: {{^}} @inlinable nonmutating set[[NEWVALUE]]{{$}}
   // CHECK-NEXT: }
   public var e: Int {
     mutating get { return 0 }
diff --git a/test/ParseableInterface/synthesized.swift b/test/ParseableInterface/synthesized.swift
index 7f4016f..868c019 100644
--- a/test/ParseableInterface/synthesized.swift
+++ b/test/ParseableInterface/synthesized.swift
@@ -4,20 +4,20 @@
 public enum HasRawValue: Int {
   // CHECK-NEXT: case a, b, c
   case a, b = 5, c
-  // CHECK-NEXT: public typealias RawValue = Swift.Int
-  // CHECK-NEXT: @inlinable public init?(rawValue: Swift.Int)
-  // CHECK-NEXT: public var rawValue: Swift.Int {
-  // CHECK-NEXT:   @inlinable get{{$}}
-  // CHECK-NEXT: }
-} // CHECK-NEXT: {{^}$}}
+  // CHECK-DAG: public typealias RawValue = Swift.Int
+  // CHECK-DAG: @inlinable public init?(rawValue: Swift.Int)
+  // CHECK-DAG: public var rawValue: Swift.Int {
+  // CHECK-DAG:   @inlinable get{{$}}
+  // CHECK-DAG: }
+} // CHECK: {{^}$}}
 
 // CHECK-LABEL: @objc public enum ObjCEnum : Int {
 @objc public enum ObjCEnum: Int {
   // CHECK-NEXT: case a, b, c
   case a, b = 5, c
-  // CHECK-NEXT: public typealias RawValue = Swift.Int
-  // CHECK-NEXT: @inlinable public init?(rawValue: Swift.Int)
-  // CHECK-NEXT: public var rawValue: Swift.Int {
-  // CHECK-NEXT:   @inlinable get{{$}}
-  // CHECK-NEXT: }
-} // CHECK-NEXT: {{^}$}}
+  // CHECK-DAG: public typealias RawValue = Swift.Int
+  // CHECK-DAG: @inlinable public init?(rawValue: Swift.Int)
+  // CHECK-DAG: public var rawValue: Swift.Int {
+  // CHECK-DAG:   @inlinable get{{$}}
+  // CHECK-DAG: }
+} // CHECK: {{^}$}}
diff --git a/test/PrintAsObjC/availability.swift b/test/PrintAsObjC/availability.swift
index 924876a..45eb15a 100644
--- a/test/PrintAsObjC/availability.swift
+++ b/test/PrintAsObjC/availability.swift
@@ -46,22 +46,22 @@
 // CHECK-DAG: SWIFT_AVAILABILITY(tvos_app_extension,unavailable)
 // CHECK-DAG: SWIFT_AVAILABILITY(watchos_app_extension,unavailable)
 // CHECK-SAME: ;
-// CHECK-NEXT: - (void)overloadingMethodWithFirst:(NSInteger)first second:(NSInteger)second;
-// CHECK-NEXT: - (void)deprecatedMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_DEPRECATED_MSG("", "overloadingMethodWithFirst:second:");
-// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadingMethodWithFirst:second:'");
-// CHECK-NEXT: - (void)unavailableMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethod' has been renamed to 'overloadingMethodWithFirst:second:'");
-// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadingMethodWithFirst:second:'");
+// CHECK-NEXT: - (void)overloadMethodWithFirst:(NSInteger)first second:(NSInteger)second;
+// CHECK-NEXT: - (void)deprecatedMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_DEPRECATED_MSG("", "overloadMethodWithFirst:second:");
+// CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
+// CHECK-NEXT: - (void)unavailableMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
+// CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToOverloadMethodWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethod' has been renamed to 'overloadMethodWithFirst:second:'");
 
 // CHECK-NEXT: - (void)firstOverloadingMethodWithDiffernceNameWithFirst:(NSInteger)first second:(NSInteger)second;
 // CHECK-NEXT: - (void)secondOverloadingMethodWithDiffernceNameWithFirst:(double)first second:(double)second;
 // CHECK-NEXT: - (void)deprecatedMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "overloadMethodWithDifferenceObjCName(first:second:)");
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "firstOverloadingMethodWithDiffernceNameWithFirst:second:");
 // CHECK-NEXT: - (void)deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'overloadMethodWithDifferenceObjCName(first:second:)'");
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDiffernceNameWithFirst:second:'");
 // CHECK-NEXT: - (void)unavailableMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'overloadMethodWithDifferenceObjCName(first:second:)'");
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDiffernceNameWithFirst:second:'");
 // CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceNameWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'overloadMethodWithDifferenceObjCName(first:second:)'");
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToOverloadMethodWithDifferenceName' has been renamed to 'firstOverloadingMethodWithDiffernceNameWithFirst:second:'");
 
 // CHECK-NEXT: + (void)deprecatedAvailabilityWithValue:(NSInteger)value;
 // CHECK-NEXT: - (void)deprecatedInstanceMethodRenamedToClassMethodWithValue:(NSInteger)value
@@ -101,17 +101,17 @@
 // CHECK-NEXT: - (void)unavailableOnMacOSMethodRenamedToSimpleProperty
 // CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToSimpleProperty' has been renamed to 'simpleProperty'");
 
-// CHECK-NEXT: - (NSInteger)methodReturningInt
+// CHECK-NEXT: - (NSInteger)methodReturningInt SWIFT_WARN_UNUSED_RESULT;
 // CHECK-NEXT: - (NSInteger)methodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT;
 
-// CHECK-NEXT: - (NSInteger)deprecatedMethodRenamedToMethodWithouCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
+// CHECK-NEXT: - (NSInteger)deprecatedMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
 // CHECK-SAME: SWIFT_DEPRECATED_MSG("", "methodWithoutCustomObjCNameWithValue:");
-// CHECK-NEXT: - (NSInteger)deprecatedOnMacOSMethodRenamedToMethodWithouCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToMethodWithouCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
-// CHECK-NEXT: - (NSInteger)unavailableMethodRenamedToMethodWithouCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
-// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToMethodWithouCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
-// CHECK-NEXT: - (NSInteger)unavailableOnMacOSMethodRenamedToMethodWithouCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToMethodWithouCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
+// CHECK-NEXT: - (NSInteger)deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
+// CHECK-NEXT: - (NSInteger)unavailableMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
+// CHECK-NEXT: - (NSInteger)unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCNameWithValue:(NSInteger)value SWIFT_WARN_UNUSED_RESULT
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCName' has been renamed to 'methodWithoutCustomObjCNameWithValue:'");
 
 // CHECK-NEXT: + (void)unavailableAvailabilityWithValue:(NSInteger)value;
 // CHECK-NEXT: + (void)makeDeprecatedAvailabilityWithValue:(NSInteger)value
@@ -124,7 +124,17 @@
 // CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'__makeUnavailableOnMacOSAvailability' has been renamed to 'unavailableAvailabilityWithValue:': use something else");
 
 // CHECK-NEXT: - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
-// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)_ OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(macos,introduced=10.10);
+// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)x OBJC_DESIGNATED_INITIALIZER SWIFT_AVAILABILITY(macos,introduced=10.10);
+// CHECK-NEXT: - (nonnull instancetype)initWithFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER;
+// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("", "initWithFirst:second:");
+// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedOnMacOSFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'init' has been renamed to 'initWithFirst:second:'");
+// CHECK-NEXT: - (nonnull instancetype)initWithUnavailableFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'init' has been renamed to 'initWithFirst:second:'");
+// CHECK-NEXT: - (nonnull instancetype)initWithUnavailableOnMacOSFirst:(NSInteger)first second:(NSInteger)second OBJC_DESIGNATED_INITIALIZER
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'init' has been renamed to 'initWithFirst:second:'");
+
 // CHECK-NEXT: @property (nonatomic, readonly) NSInteger simpleProperty;
 // CHECK-NEXT: @property (nonatomic) NSInteger alwaysUnavailableProperty SWIFT_UNAVAILABLE_MSG("'alwaysUnavailableProperty' has been renamed to 'baz': whatever");
 // CHECK-NEXT: @property (nonatomic, readonly) NSInteger alwaysDeprecatedProperty SWIFT_DEPRECATED_MSG("use something else", "quux");
@@ -163,49 +173,71 @@
 // CHECK-LABEL: @interface AvailabilitySub
 // CHECK-NEXT: - (nonnull instancetype)init SWIFT_UNAVAILABLE;
 // CHECK-NEXT: + (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable");
-// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)_ SWIFT_UNAVAILABLE;
+// CHECK-NEXT: - (nonnull instancetype)initWithX:(NSInteger)x SWIFT_UNAVAILABLE;
 // CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedZ:(NSInteger)deprecatedZ OBJC_DESIGNATED_INITIALIZER SWIFT_DEPRECATED_MSG("init(deprecatedZ:) was deprecated. Use the new one instead", "initWithNewZ:")
 // CHECK-NEXT: - (nonnull instancetype)initWithNewZ:(NSInteger)z OBJC_DESIGNATED_INITIALIZER;
-// CHECK-NEXT: @end
+// CHECK-NEXT: - (nonnull instancetype)initWithFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
+// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
+// CHECK-NEXT: - (nonnull instancetype)initWithDeprecatedOnMacOSFirst:(NSInteger)first second:(NSInteger)second SWIFT_UNAVAILABLE;
+// CHECK: @end
 
 // CHECK-LABEL: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'DeprecatedAvailability' has been renamed to 'SWTReplacementAvailable'")
 // CHECK-LABEL: @interface DeprecatedAvailability
-// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClass(first:second:)");
-// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClass' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClass(first:second:)': use method in another class instead");
+// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead");
+
+// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead");
+
 // CHECK-NEXT: @end
 
 // CHECK-LABEL: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'DeprecatedAvailabilityProtocol' has been renamed to 'SWTReplacementAvailableProtocol'")
 // CHECK-LABEL: @protocol DeprecatedAvailabilityProtocol
-// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)");
-// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClass' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
+// CHECK-NEXT: - (void)deprecatedMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("use method in another class instead", "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+// CHECK-NEXT: - (void)deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,deprecated=0.0.1,message="'deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
 // CHECK-NEXT: @end
 
 // CHECK-LABEL: @interface SWTReplacementAvailable
-// CHECK-NEXT: - (void)replacingMethodInReplacementClassWithFirst:(NSInteger)first second:(NSInteger)second;
+// CHECK-NEXT: - (void)replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second;
+// CHECK-NEXT: - (void)replacingMethodInReplacementClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second;
+// CHECK-NEXT: - (void)deprecatedMethodReplacingInReplacementClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("Deprecated method with the Context name in the renamed attribute - ContextName is self",
+// CHECK-SAME: "replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:second:")
+// CHECK-NEXT: - (void)deprecatedmethodReplacingInReplacementClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
+// CHECK-SAME: SWIFT_DEPRECATED_MSG("Deprecated method with the Context name in the renamed attribute - ContextName is self",
+// CHECK-SAME: "replacingMethodInReplacementClassWithClassObjectParametersWithFirst:second:")
 // CHECK-NEXT: @end
 
 // CHECK-LABEL: @protocol SWTReplacementAvailableProtocol
 // CHECK-NEXT: - (void)replacingMethodInReplacementProtocolWithFirst:(NSInteger)first second:(NSInteger)second;
 // CHECK-NEXT: @end
 
+
 // CHECK-LABEL: SWIFT_AVAILABILITY(macos,unavailable,message="'UnavailableAvailability' has been renamed to 'SWTReplacementAvailable'")
 // CHECK-LABEL: @interface UnavailableAvailability
-// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClass' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClass(first:second:)': use method in another class instead");
-// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClass' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClass(first:second:)': use method in another class instead");
+// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead")
+// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead");
+
+// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead")
+// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithClassObjectParametersWithFirst:(SWTReplacementAvailable * _Nonnull)first second:(SWTReplacementAvailable * _Nonnull)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithClassObjectParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)': use method in another class instead");
 // CHECK-NEXT: @end
 
 // CHECK-LABEL: SWIFT_AVAILABILITY(macos,unavailable,message="'UnavailableAvailabilityProtocol' has been renamed to 'SWTReplacementAvailableProtocol'")
 // CHECK-LABEL: @protocol UnavailableAvailabilityProtocol
-// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClass' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
-// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithFirst:(NSInteger)first second:(NSInteger)second
-// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClass' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
+// CHECK-NEXT: - (void)unavailableMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_UNAVAILABLE_MSG("'unavailableMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)': use method in another class instead")
+// CHECK-NEXT: - (void)unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParametersWithFirst:(NSInteger)first second:(NSInteger)second
+// CHECK-SAME: SWIFT_AVAILABILITY(macos,unavailable,message="'unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters' has been renamed to 'ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)': use method in another class instead");
 // CHECK-NEXT: @end
 
 // CHECK-LABEL: SWIFT_CLASS("{{.+}}WholeClassAvailability") 
@@ -291,7 +323,7 @@
     @available(watchOSApplicationExtension, unavailable)
     @objc func extensionUnavailable() {}
   
-    @objc(overloadingMethodWithFirst:second:) func overloadMethod(first: Int, second: Int) {}
+    @objc func overloadMethod(first: Int, second: Int) {}
     func overloadMethod(first: Double, second: Double) {}
 
     @available(*, deprecated, renamed: "overloadMethod(first:second:)")
@@ -374,18 +406,18 @@
     @objc public func unavailableOnMacOSMethodRenamedToSimpleProperty() {}
 
     @objc(methodReturningInt) public func simpleMethodReturningInt() -> Int { return -1 }
-  
+
     @objc public func methodWithoutCustomObjCName(value: Int) -> Int { return -1 }
 
     @available(*, deprecated, renamed: "methodWithoutCustomObjCName(value:)")
-    @objc public func deprecatedMethodRenamedToMethodWithouCustomObjCName(value: Int) -> Int { return -1 }
+    @objc public func deprecatedMethodRenamedToMethodWithoutCustomObjCName(value: Int) -> Int { return -1 }
     @available(macOS, deprecated, renamed: "methodWithoutCustomObjCName(value:)")
-    @objc public func deprecatedOnMacOSMethodRenamedToMethodWithouCustomObjCName(value: Int) -> Int { return -1 }
+    @objc public func deprecatedOnMacOSMethodRenamedToMethodWithoutCustomObjCName(value: Int) -> Int { return -1 }
 
     @available(*, unavailable, renamed: "methodWithoutCustomObjCName(value:)")
-    @objc public func unavailableMethodRenamedToMethodWithouCustomObjCName(value: Int) -> Int { return -1 }
+    @objc public func unavailableMethodRenamedToMethodWithoutCustomObjCName(value: Int) -> Int { return -1 }
     @available(macOS, unavailable, renamed: "methodWithoutCustomObjCName(value:)")
-    @objc public func unavailableOnMacOSMethodRenamedToMethodWithouCustomObjCName(value: Int) -> Int { return -1 }
+    @objc public func unavailableOnMacOSMethodRenamedToMethodWithoutCustomObjCName(value: Int) -> Int { return -1 }
 
 
     @objc(unavailableAvailabilityWithValue:)
@@ -412,8 +444,23 @@
 
     @objc init() {}
     @available(macOS 10.10, *)
-    @objc init(x _: Int) {}
-
+    @objc init(x: Int) {}
+    
+    @objc init(first: Int, second: Int) {}
+    init(first: Double, second: Double) {}
+    
+    @available(*, deprecated, renamed: "init(first:second:)")
+    @objc init(deprecatedFirst first: Int, second: Int) {}
+    
+    @available(macOS, deprecated, renamed: "init(first:second:)")
+    @objc init(deprecatedOnMacOSFirst first: Int, second: Int) {}
+    
+    @available(*, unavailable, renamed: "init(first:second:)")
+    @objc init(unavailableFirst first: Int, second: Int) {}
+    
+    @available(macOS, unavailable, renamed: "init(first:second:)")
+    @objc init(unavailableOnMacOSFirst first: Int, second: Int) {}
+    
     @objc var simpleProperty: Int {
         get {
             return 100
@@ -517,7 +564,6 @@
 extension Availability {
     @objc func extensionAvailability(_: WholeClassAvailability) {}
     
-    
     @available(macOS, deprecated: 10.10)
     @objc var propertyDeprecatedInsideExtension: Int {
         get {
@@ -529,7 +575,7 @@
 @objc class AvailabilitySub: Availability {
     private override init() { super.init() }
     @available(macOS 10.10, *)
-    private override init(x _: Int) { super.init() }
+    private override init(x: Int) { super.init() }
     @available(*, deprecated, message: "init(deprecatedZ:) was deprecated. Use the new one instead", renamed: "init(z:)")
     @objc init(deprecatedZ: Int) { super.init() }
     @objc(initWithNewZ:) init(z: Int) { super.init() }
@@ -546,45 +592,73 @@
     func wholeProtoAvailability(_: WholeClassAvailability)
 }
 
-
 @objc(SWTReplacementAvailable) class ReplacementAvailable {
-    @objc(replacingMethodInReplacementClassWithFirst:second:) func methodReplacingInReplacementClass(first: Int, second: Int) -> Void {}
+    @objc(replacingMethodInReplacementClassWithPrimitiveParametersWithFirst:second:)
+    func methodReplacingInReplacementClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+    
+    @objc(replacingMethodInReplacementClassWithClassObjectParametersWithFirst:second:)
+    func methodReplacingInReplacementClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
+    
+    @available(*, deprecated,
+    message: "Deprecated method with the Context name in the renamed attribute - ContextName is self",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func deprecatedMethodReplacingInReplacementClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+    
+    @available(*, deprecated,
+    message: "Deprecated method with the Context name in the renamed attribute - ContextName is self",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+    @objc func deprecatedmethodReplacingInReplacementClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
 }
 
 @available(macOS, deprecated, renamed: "ReplacementAvailable")
 @objc class DeprecatedAvailability {
-    @available(*, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClass(first:second:)")
-    @objc func deprecatedMethodInDeprecatedClass(first: Int, second: Int) -> Void {}
-    @available(macOS, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClass(first:second:)")
-    @objc func deprecatedOnMacOSMethodInDeprecatedClass(first: Int, second: Int) -> Void {}
+    @available(*, deprecated, message: "use method in another class instead",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func deprecatedMethodInDeprecatedClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+    @available(macOS, deprecated, message: "use method in another class instead",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+  
+    @available(*, deprecated, message: "use method in another class instead",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+    @objc func deprecatedMethodInDeprecatedClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
+    @available(macOS, deprecated, message: "use method in another class instead",
+    renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+    @objc func deprecatedOnMacOSMethodInDeprecatedClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
 }
 
 @available(macOS, unavailable, renamed: "ReplacementAvailable")
 @objc class UnavailableAvailability {
-  @available(*, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClass(first:second:)")
-  @objc func unavailableMethodInUnavailableClass(first: Int, second: Int) -> Void {}
-  @available(macOS, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClass(first:second:)")
-  @objc func unavailableOnMacOSMethodInUnavailableClass(first: Int, second: Int) -> Void {}
+    @available(*, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func unavailableMethodInUnavailableClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+    @available(macOS, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters(first: Int, second: Int) -> Void {}
+  
+    @available(*, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+    @objc func unavailableMethodInUnavailableClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
+    @available(macOS, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithClassObjectParameters(first:second:)")
+    @objc func unavailableOnMacOSMethodInUnavailableClassWithClassObjectParameters(first: ReplacementAvailable, second: ReplacementAvailable) -> Void {}
 }
 
 @objc(SWTReplacementAvailableProtocol) protocol ReplacementAvailableProtocol {
-  @objc(replacingMethodInReplacementProtocolWithFirst:second:) func methodReplacingInReplacementProtocol(first: Int, second: Int) -> Void
+    @objc(replacingMethodInReplacementProtocolWithFirst:second:)
+    func methodReplacingInReplacementProtocol(first: Int, second: Int) -> Void
 }
 
 @available(macOS, deprecated, renamed: "ReplacementAvailableProtocol")
 @objc protocol DeprecatedAvailabilityProtocol {
-  @available(*, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
-  @objc func deprecatedMethodInDeprecatedClass(first: Int, second: Int) -> Void
-  @available(macOS, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
-  @objc func deprecatedOnMacOSMethodInDeprecatedClass(first: Int, second: Int) -> Void
+    @available(*, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func deprecatedMethodInDeprecatedClassWithPrimitiveParameters(first: Int, second: Int) -> Void
+    @available(macOS, deprecated, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
+    @objc func deprecatedOnMacOSMethodInDeprecatedClassWithPrimitiveParameters(first: Int, second: Int) -> Void
 }
 
 @available(macOS, unavailable, renamed: "ReplacementAvailableProtocol")
 @objc protocol UnavailableAvailabilityProtocol {
-  @available(*, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
-  @objc func unavailableMethodInUnavailableClass(first: Int, second: Int) -> Void
-  @available(macOS, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
-  @objc func unavailableOnMacOSMethodInUnavailableClass(first: Int, second: Int) -> Void
+    @available(*, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailable.methodReplacingInReplacementClassWithPrimitiveParameters(first:second:)")
+    @objc func unavailableMethodInUnavailableClassWithPrimitiveParameters(first: Int, second: Int) -> Void
+    @available(macOS, unavailable, message: "use method in another class instead", renamed: "ReplacementAvailableProtocol.methodReplacingInReplacementProtocol(first:second:)")
+    @objc func unavailableOnMacOSMethodInUnavailableClassWithPrimitiveParameters(first: Int, second: Int) -> Void
 }
 
 
diff --git a/test/Profiler/coverage_irgen.swift b/test/Profiler/coverage_irgen.swift
index 7fd3e24..42f3745 100644
--- a/test/Profiler/coverage_irgen.swift
+++ b/test/Profiler/coverage_irgen.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -profile-generate -profile-coverage-mapping -emit-sil -o - -module-name=irgen | %FileCheck %s --check-prefix=SIL
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -profile-generate -profile-coverage-mapping -emit-ir -o - -module-name=irgen | %FileCheck %s --check-prefix=IR
+// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -emit-sil -o - -module-name=irgen | %FileCheck %s --check-prefix=SIL
+// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -emit-ir -o - -module-name=irgen | %FileCheck %s --check-prefix=IR
 
 // IR-NOT: __llvm_coverage_names
 // IR-NOT: __profn
diff --git a/test/Profiler/coverage_irgen_ignored.swift b/test/Profiler/coverage_irgen_ignored.swift
index 12ee1c8..46bc770 100644
--- a/test/Profiler/coverage_irgen_ignored.swift
+++ b/test/Profiler/coverage_irgen_ignored.swift
@@ -1,5 +1,5 @@
 // RUN: %target-swift-frontend %s -profile-generate -emit-sil -o %t.sil
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %t.sil -module-name=coverage_ignored -emit-ir -o - | %FileCheck %s -check-prefix=CHECK-IGNORED
+// RUN: %target-swift-frontend %t.sil -module-name=coverage_ignored -emit-ir -o - | %FileCheck %s -check-prefix=CHECK-IGNORED
 
 // CHECK-IGNORED-NOT: llvm.instrprof
 // CHECK-IGNORED-NOT: profc
diff --git a/test/Profiler/coverage_with_asan.swift b/test/Profiler/coverage_with_asan.swift
index b89f9f9..63803d7 100644
--- a/test/Profiler/coverage_with_asan.swift
+++ b/test/Profiler/coverage_with_asan.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -profile-generate -profile-coverage-mapping -sanitize=address -emit-ir -o - | %FileCheck %s
+// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -sanitize=address -emit-ir -o - | %FileCheck %s
 // REQUIRES: OS=macosx
 
 // CHECK: main
diff --git a/test/Profiler/instrprof_basic.swift b/test/Profiler/instrprof_basic.swift
index 1d0d3de..fb09554 100644
--- a/test/Profiler/instrprof_basic.swift
+++ b/test/Profiler/instrprof_basic.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-frontend -parse-as-library -enable-sil-ownership -emit-silgen -profile-generate %s | %FileCheck %s
 
-// CHECK: sil hidden @[[F_EMPTY:.*empty.*]] :
+// CHECK: sil hidden [ossa] @[[F_EMPTY:.*empty.*]] :
 // CHECK: %[[NAME:.*]] = string_literal utf8 "{{.*}}instrprof_basic.swift:[[F_EMPTY]]"
 // CHECK: %[[HASH:.*]] = integer_literal $Builtin.Int64,
 // CHECK: %[[NCOUNTS:.*]] = integer_literal $Builtin.Int32, 1
@@ -10,7 +10,7 @@
   // CHECK-NOT: builtin "int_instrprof_increment"
 }
 
-// CHECK: sil hidden @[[F_BASIC:.*basic.*]] :
+// CHECK: sil hidden [ossa] @[[F_BASIC:.*basic.*]] :
 // CHECK: %[[NAME:.*]] = string_literal utf8 "{{.*}}instrprof_basic.swift:[[F_BASIC]]"
 // CHECK: %[[HASH:.*]] = integer_literal $Builtin.Int64,
 // CHECK: %[[NCOUNTS:.*]] = integer_literal $Builtin.Int32, 6
@@ -42,9 +42,9 @@
   // CHECK-NOT: builtin "int_instrprof_increment"
 }
 
-// CHECK: sil hidden @[[F_THROWING_NOP:.*throwing_nop.*]] :
+// CHECK: sil hidden [ossa] @[[F_THROWING_NOP:.*throwing_nop.*]] :
 func throwing_nop() throws {}
-// CHECK: sil hidden @[[F_EXCEPTIONS:.*exceptions.*]] :
+// CHECK: sil hidden [ossa] @[[F_EXCEPTIONS:.*exceptions.*]] :
 // CHECK: %[[NAME:.*]] = string_literal utf8 "{{.*}}instrprof_basic.swift:[[F_EXCEPTIONS]]"
 // CHECK: %[[HASH:.*]] = integer_literal $Builtin.Int64,
 // CHECK: %[[NCOUNTS:.*]] = integer_literal $Builtin.Int32, 2
diff --git a/test/Profiler/instrprof_operators.swift b/test/Profiler/instrprof_operators.swift
index 313a100..be11063 100644
--- a/test/Profiler/instrprof_operators.swift
+++ b/test/Profiler/instrprof_operators.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-frontend -parse-as-library -emit-silgen -enable-sil-ownership -profile-generate %s | %FileCheck %s
 
-// CHECK: sil hidden @[[F_OPERATORS:.*operators.*]] :
+// CHECK: sil hidden [ossa] @[[F_OPERATORS:.*operators.*]] :
 // CHECK: %[[NAME:.*]] = string_literal utf8 "{{.*}}instrprof_operators.swift:[[F_OPERATORS]]"
 // CHECK: %[[HASH:.*]] = integer_literal $Builtin.Int64,
 // CHECK: %[[NCOUNTS:.*]] = integer_literal $Builtin.Int32, 2
diff --git a/test/Profiler/instrprof_symtab_valid.sil b/test/Profiler/instrprof_symtab_valid.sil
index fce17c0..c7b02a5 100644
--- a/test/Profiler/instrprof_symtab_valid.sil
+++ b/test/Profiler/instrprof_symtab_valid.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -profile-generate -profile-coverage-mapping -emit-ir -o - -module-name=irgen | %FileCheck %s
+// RUN: %target-swift-frontend %s -profile-generate -profile-coverage-mapping -emit-ir -o - -module-name=irgen | %FileCheck %s
 
 // CHECK-NOT: @__llvm_coverage_mapping
 
diff --git a/test/Prototypes/CollectionTransformers.swift b/test/Prototypes/CollectionTransformers.swift
index 312d024..d108770 100644
--- a/test/Prototypes/CollectionTransformers.swift
+++ b/test/Prototypes/CollectionTransformers.swift
@@ -641,7 +641,7 @@
   internal let _maxThreads: Int
   /// Total number of threads: number of running threads plus the number of
   /// threads that are preparing to start).
-  internal let _totalThreads: _stdlib_AtomicInt = _stdlib_AtomicInt(0)
+  internal let _totalThreads = _stdlib_AtomicInt(0)
 
   internal var _runningThreads: [_ForkJoinWorkerThread] = []
   internal var _runningThreadsMutex: _ForkJoinMutex = _ForkJoinMutex()
diff --git a/test/Reflection/capture_descriptors.sil b/test/Reflection/capture_descriptors.sil
index 83dc61f..223ac1f 100644
--- a/test/Reflection/capture_descriptors.sil
+++ b/test/Reflection/capture_descriptors.sil
@@ -18,13 +18,13 @@
 protocol P {}
 extension Int: P {}
 
-sil @concrete_callee1 : $@convention(thin) (Int, @owned <τ_0_0> { var τ_0_0 } <Int>, @thin Int.Type, @thick P.Type) -> () {
+sil [ossa] @concrete_callee1 : $@convention(thin) (Int, @owned <τ_0_0> { var τ_0_0 } <Int>, @thin Int.Type, @thick P.Type) -> () {
 bb0(%i : $Int, %b : @owned $<τ_0_0> { var τ_0_0 } <Int>, %m : $@thin Int.Type, %p : $@thick P.Type):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @concrete_caller1 : $@convention(thin) (Int, @thick P.Type) -> @owned @callee_guaranteed () -> () {
+sil [ossa] @concrete_caller1 : $@convention(thin) (Int, @thick P.Type) -> @owned @callee_guaranteed () -> () {
 bb0(%i : $Int, %p : $@thick P.Type):
   %f = function_ref @concrete_callee1 : $@convention(thin) (Int, @owned <τ_0_0> { var τ_0_0 } <Int>, @thin Int.Type, @thick P.Type) -> ()
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
@@ -51,13 +51,13 @@
 // Concrete caller and generic callee -- capture types are fully substituted,
 // and there are no metadata bindings
 
-sil @generic_callee2 : $@convention(thin) <T, U> (@in T, @owned <τ_0_0> { var τ_0_0 } <U>) -> () {
+sil [ossa] @generic_callee2 : $@convention(thin) <T, U> (@in T, @owned <τ_0_0> { var τ_0_0 } <U>) -> () {
 bb0(%i : $*T, %b : @owned $<τ_0_0> { var τ_0_0 } <U>):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @concrete_caller2 : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
+sil [ossa] @concrete_caller2 : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
 bb0:
   %f = function_ref @generic_callee2 : $@convention(thin) <T, U> (@in T, @owned <τ_0_0> { var τ_0_0 } <U>) -> ()
   %i = alloc_stack $Int
@@ -84,13 +84,13 @@
 // structural sub-terms of the callee's substituted generic parameters that
 // contain the caller's generic parameters.
 
-sil @generic_callee3 : $@convention(thin) <T, U> (@in_guaranteed T) -> () {
+sil [ossa] @generic_callee3 : $@convention(thin) <T, U> (@in_guaranteed T) -> () {
 bb0(%t : $*T):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @generic_caller3 : $@convention(thin) <A, B, C> () -> @owned @callee_guaranteed () -> () {
+sil [ossa] @generic_caller3 : $@convention(thin) <A, B, C> () -> @owned @callee_guaranteed () -> () {
 bb0:
   %f = function_ref @generic_callee3 : $@convention(thin) <T, U> (@in_guaranteed T) -> ()
   %t = alloc_stack $Optional<@callee_guaranteed (@in_guaranteed A) -> @out B>
@@ -122,13 +122,13 @@
 // Generic caller and generic callee -- and one of the type parameters is
 // fulfilled by a thick metatype value.
 
-sil @generic_callee4 : $@convention(thin) <T, U> (@thick Optional<T>.Type) -> () {
+sil [ossa] @generic_callee4 : $@convention(thin) <T, U> (@thick Optional<T>.Type) -> () {
 bb0(%t : $@thick Optional<T>.Type):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @generic_caller4 : $@convention(thin) <A, B, C> () -> @owned @callee_guaranteed () -> () {
+sil [ossa] @generic_caller4 : $@convention(thin) <A, B, C> () -> @owned @callee_guaranteed () -> () {
 bb0:
   %f = function_ref @generic_callee4 : $@convention(thin) <T, U> (@thick Optional<T>.Type) -> ()
   %t = metatype $@thick Optional<(B) -> C>.Type
@@ -159,13 +159,13 @@
 
 class GenericClass<T, U> {}
 
-sil @generic_callee5 : $@convention(thin) <T, U, V> (@owned GenericClass<T, U>) -> () {
+sil [ossa] @generic_callee5 : $@convention(thin) <T, U, V> (@owned GenericClass<T, U>) -> () {
 bb0(%t : @owned $GenericClass<T, U>):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @generic_caller5 : $@convention(thin) <A, B, C> (@owned GenericClass<(A, B), (B, C)>) -> @owned @callee_guaranteed () -> () {
+sil [ossa] @generic_caller5 : $@convention(thin) <A, B, C> (@owned GenericClass<(A, B), (B, C)>) -> @owned @callee_guaranteed () -> () {
 bb0(%g : @owned $GenericClass<(A, B), (B, C)>):
   %f = function_ref @generic_callee5 : $@convention(thin) <T, U, V> (@owned GenericClass<T, U>) -> ()
   %c = partial_apply [callee_guaranteed] %f<(A, B), (B, C), (C, A)>(%g) : $@convention(thin) <T, U, V> (@owned GenericClass<T, U>) -> ()
@@ -202,13 +202,13 @@
 // Pseudogeneric caller and pseudogeneric callee -- type parameters are
 // erased at runtime.
 
-sil @pseudogeneric_callee : $@convention(thin) @pseudogeneric <T : AnyObject, U : AnyObject> (@owned T, @owned U) -> () {
+sil [ossa] @pseudogeneric_callee : $@convention(thin) @pseudogeneric <T : AnyObject, U : AnyObject> (@owned T, @owned U) -> () {
 bb0(%t : @owned $T, %u : @owned $U):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @pseudogeneric_caller : $@convention(thin) @pseudogeneric <A : AnyObject, B : AnyObject, C : AnyObject> (@owned A, @owned B) -> @owned @callee_guaranteed () -> () {
+sil [ossa] @pseudogeneric_caller : $@convention(thin) @pseudogeneric <A : AnyObject, B : AnyObject, C : AnyObject> (@owned A, @owned B) -> @owned @callee_guaranteed () -> () {
 bb0(%a : @owned $A, %b : @owned $B):
   %f = function_ref @pseudogeneric_callee : $@convention(thin) @pseudogeneric <T : AnyObject, U : AnyObject> (@owned T, @owned U) -> ()
   %c = partial_apply [callee_guaranteed] %f<A, B>(%a, %b) : $@convention(thin) @pseudogeneric <A : AnyObject, B : AnyObject> (@owned A, @owned B) -> ()
@@ -223,13 +223,13 @@
 
 // Capturing lowered function types
 
-sil @function_callee : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> () {
+sil [ossa] @function_callee : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> () {
 bb0(%thin : $@convention(thin) () -> (), %c : $@convention(c) () -> (), %block : @unowned $@convention(block) () -> (), %thick : @unowned $@convention(thick) () -> (), %method : $@convention(method) () -> (), %witness_method : $@convention(witness_method: P) (Int) -> ()):
   %12 = tuple ()
   return %12 : $()
 }
 
-sil @function_caller : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> @owned @callee_guaranteed () -> () {
+sil [ossa] @function_caller : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> @owned @callee_guaranteed () -> () {
 bb0(%thin: $@convention(thin) () -> (), %c: $@convention(c) () -> (), %block: @unowned $@convention(block) () -> (), %thick: @unowned $@convention(thick) () -> (), %method: $@convention(method) () -> (), %witness_method: $@convention(witness_method: P) (Int) -> ()):
   %f = function_ref @function_callee : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> ()
   %result = partial_apply [callee_guaranteed] %f(%thin, %c, %block, %thick, %method, %witness_method) : $@convention(thin) (@convention(thin) () -> (), @convention(c) () -> (), @convention(block) () -> (), @convention(thick) () -> (), @convention(method) () -> (), @convention(witness_method: P) (Int) -> ()) -> ()
@@ -270,13 +270,13 @@
 // FIXME: Eventually, we should emit a useful capture descriptor
 // for this case.
 
-sil @existential_callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> () -> @out P {
+sil [ossa] @existential_callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> () -> @out P {
 bb0(%0 : $*P):
   unreachable
 }
 
 
-sil @existential_caller : $@convention(thin) (@in P) -> () {
+sil [ossa] @existential_caller : $@convention(thin) (@in P) -> () {
 bb0(%0 : $*P):
   %payload = open_existential_addr immutable_access %0 : $*P to $*@opened("2D7A8F84-2973-11E7-838D-34363BD08DA0") P
   %f = function_ref @existential_callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> () -> @out P
diff --git a/test/Runtime/associated_type_demangle_private.swift b/test/Runtime/associated_type_demangle_private.swift
index 072017b..e1df60a 100644
--- a/test/Runtime/associated_type_demangle_private.swift
+++ b/test/Runtime/associated_type_demangle_private.swift
@@ -43,6 +43,10 @@
   associatedtype A
 }
 
+private func getP2_A<T: P2>(_: T.Type) -> Any.Type {
+  return T.A.self
+}
+
 struct Bar: P2 {
   typealias A = Int
 }
@@ -55,4 +59,19 @@
   expectEqual("C2<Bar>", String(describing: C2<Bar>.self))
 }
 
+// rdar://problem/46853806
+class C3<T: P>: P2 {
+  fileprivate struct Inner<U: P> { }
+  fileprivate typealias A = Inner<T>
+}
+
+extension Int: P {
+  typealias A = Int
+}
+
+AssociatedTypeDemangleTests.test("generic anonymous contexts") {
+  expectEqual("Inner<Int>", String(describing: getP2_A(C3<Int>.self)))
+}
+
+
 runAllTests()
diff --git a/test/Runtime/demangleToMetadataObjC.swift b/test/Runtime/demangleToMetadataObjC.swift
index f6a89c9..fba76ef 100644
--- a/test/Runtime/demangleToMetadataObjC.swift
+++ b/test/Runtime/demangleToMetadataObjC.swift
@@ -92,6 +92,7 @@
 }
 
 DemangleToMetadataTests.test("members of runtime-only Objective-C classes") {
+  expectNotNil(_typeByName("So17OS_dispatch_queueC8DispatchE10AttributesV"))
   expectEqual(DispatchQueue.Attributes.self,
     _typeByName("So17OS_dispatch_queueC8DispatchE10AttributesV")!)
 }
diff --git a/test/SIL/Parser/SILDeclRef.sil b/test/SIL/Parser/SILDeclRef.sil
index 3139aa4..09d0634 100644
--- a/test/SIL/Parser/SILDeclRef.sil
+++ b/test/SIL/Parser/SILDeclRef.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -module-name="SILDeclRef" %s
+// RUN: %target-sil-opt -enable-sil-verify-all -module-name="SILDeclRef" %s
 
 // Check that SILDeclRefs with interface types can be parsed properly.
 
diff --git a/test/SIL/Parser/apply_with_conformance.sil b/test/SIL/Parser/apply_with_conformance.sil
index b7e4585..85c600d 100644
--- a/test/SIL/Parser/apply_with_conformance.sil
+++ b/test/SIL/Parser/apply_with_conformance.sil
@@ -18,10 +18,10 @@
 // test.S.foo (test.S)<A : test.P>(A) -> ()
 sil @_TFV4test1S3foofS0_US_1P__FQ_T_ : $@convention(method) <T where T : P> (@in T, S) -> ()
 
-// CHECK-LABEL: define{{( protected)?}} swiftcc void @_TF4test3barFTVS_1SVS_1X_T_()
+// CHECK-LABEL: define{{( dllexport)?}}{{( protected)?}} swiftcc void @_TF4test3barFTVS_1SVS_1X_T_()
 // CHECK: call
 // test.bar (test.S, test.X) -> ()
-sil @_TF4test3barFTVS_1SVS_1X_T_ : $@convention(thin) (S, X) -> () {
+sil [ossa] @_TF4test3barFTVS_1SVS_1X_T_ : $@convention(thin) (S, X) -> () {
 bb0(%0 : @unowned $S, %1 : @unowned $X):
   debug_value %0 : $S  // let s                   // id: %2
   debug_value %1 : $X  // let x                   // id: %3
diff --git a/test/SIL/Parser/apply_with_substitution.sil b/test/SIL/Parser/apply_with_substitution.sil
index 82af9b8..6b50222 100644
--- a/test/SIL/Parser/apply_with_substitution.sil
+++ b/test/SIL/Parser/apply_with_substitution.sil
@@ -7,8 +7,8 @@
 import Builtin
 import Swift
 
-// CHECK-LABEL: sil @_TF4test3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> ()
-sil @_TF4test3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> () {
+// CHECK-LABEL: sil [ossa] @_TF4test3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> ()
+sil [ossa] @_TF4test3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> () {
 bb0(%0 : @guaranteed $Optional<@callee_guaranteed () -> @out ()>):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Optional<@callee_guaranteed () -> @out ()>>  // var f    // users: %2, %6, %32
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <Optional<@callee_guaranteed () -> @out ()>>, 0
diff --git a/test/SIL/Parser/array_roundtrip.swift b/test/SIL/Parser/array_roundtrip.swift
index c2e24b3..5321acd 100644
--- a/test/SIL/Parser/array_roundtrip.swift
+++ b/test/SIL/Parser/array_roundtrip.swift
@@ -1,7 +1,7 @@
-// RUN: %target-swift-frontend %s -emit-sil -Ounchecked | %target-sil-opt -assume-parsing-unqualified-ownership-sil
+// RUN: %target-swift-frontend %s -emit-sil -Ounchecked | %target-sil-opt
 
 // Fails if the positions of the two Collection subscript requirements are
 // reversed. rdar://problem/46650834
-// XFAIL: swift_evolve
+// UNSUPPORTED: swift_evolve
 
 var W = [UInt32](repeating: 0, count: 16)
diff --git a/test/SIL/Parser/attributes.sil b/test/SIL/Parser/attributes.sil
index 288800d..6db8bc3 100644
--- a/test/SIL/Parser/attributes.sil
+++ b/test/SIL/Parser/attributes.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 // CHECK-LABEL: sil [_semantics "123"] [_semantics "456"] @foo : $@convention(thin) () -> () {
 sil [_semantics "123"] [_semantics "456"] @foo : $@convention(thin) () -> () {
diff --git a/test/SIL/Parser/available.sil b/test/SIL/Parser/available.sil
index cece52f..35e16e6 100644
--- a/test/SIL/Parser/available.sil
+++ b/test/SIL/Parser/available.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 @available(*,unavailable,message: "it has been renamed")
 public struct mmConstUnsafePointer<T> {
diff --git a/test/SIL/Parser/basic.sil b/test/SIL/Parser/basic.sil
index e9ebec2..0562ed6 100644
--- a/test/SIL/Parser/basic.sil
+++ b/test/SIL/Parser/basic.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=true %s | %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=true | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all=true %s | %target-sil-opt -enable-objc-interop -enable-sil-verify-all=true | %FileCheck %s
 
 sil_stage raw // CHECK: sil_stage raw
 
diff --git a/test/SIL/Parser/basic2.sil b/test/SIL/Parser/basic2.sil
index 4e60fbf..73e681d 100644
--- a/test/SIL/Parser/basic2.sil
+++ b/test/SIL/Parser/basic2.sil
@@ -2,24 +2,24 @@
 
 import Builtin
 
-// CHECK-LABEL: sil @test_copy_release_value
+// CHECK-LABEL: sil [ossa] @test_copy_release_value
 // CHECK: bb0([[T0:%[0-9]+]] : @unowned $Builtin.NativeObject):
 // CHECK-NEXT: [[COPY_RESULT:%.*]] = copy_value [[T0]] : $Builtin.NativeObject
 // CHECK-NEXT: destroy_value [[T0]] : $Builtin.NativeObject
 // CHECK-NEXT: return [[COPY_RESULT]]
-sil @test_copy_release_value : $@convention(thin) (Builtin.NativeObject) -> Builtin.NativeObject {
+sil [ossa] @test_copy_release_value : $@convention(thin) (Builtin.NativeObject) -> Builtin.NativeObject {
 bb0(%0 : @unowned $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   destroy_value %0 : $Builtin.NativeObject
   return %1 : $Builtin.NativeObject
 }
 
-// CHECK-LABEL: sil @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+// CHECK-LABEL: sil [ossa] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 // CHECK: bb0([[T0:%[0-9]+]] : @owned $@sil_unowned Builtin.NativeObject):
 // CHECK-NEXT: [[COPY_RESULT:%.*]] = copy_unowned_value [[T0]] : $@sil_unowned Builtin.NativeObject
 // CHECK-NEXT: destroy_value [[T0]] : $@sil_unowned Builtin.NativeObject
 // CHECK-NEXT: return [[COPY_RESULT]] : $Builtin.NativeObject
-sil @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [ossa] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $@sil_unowned Builtin.NativeObject):
   %1 = copy_unowned_value %0 : $@sil_unowned Builtin.NativeObject
   destroy_value %0 : $@sil_unowned Builtin.NativeObject
diff --git a/test/SIL/Parser/basic_objc.sil b/test/SIL/Parser/basic_objc.sil
index 471ef29..427329e 100644
--- a/test/SIL/Parser/basic_objc.sil
+++ b/test/SIL/Parser/basic_objc.sil
@@ -21,10 +21,10 @@
 class SomeClass {}
 protocol SomeClassProtocol : class {}
 
-// CHECK-LABEL: sil @metatype_to_object
+// CHECK-LABEL: sil [ossa] @metatype_to_object
 // CHECK:         {{%.*}} = objc_metatype_to_object {{%.*}} : $@objc_metatype SomeClass.Type to $AnyObject
 // CHECK:         {{%.*}} = objc_existential_metatype_to_object {{%.*}} : $@objc_metatype SomeClassProtocol.Type to $AnyObject
-sil @metatype_to_object : $@convention(thin) (@objc_metatype SomeClass.Type, @objc_metatype SomeClassProtocol.Type) -> @owned (AnyObject, AnyObject) {
+sil [ossa] @metatype_to_object : $@convention(thin) (@objc_metatype SomeClass.Type, @objc_metatype SomeClassProtocol.Type) -> @owned (AnyObject, AnyObject) {
 entry(%a : $@objc_metatype SomeClass.Type, %b : $@objc_metatype SomeClassProtocol.Type):
   %x = objc_metatype_to_object %a : $@objc_metatype SomeClass.Type to $AnyObject
   %y = objc_existential_metatype_to_object %b : $@objc_metatype SomeClassProtocol.Type to $AnyObject
@@ -34,7 +34,7 @@
 
 sil @requires_any_object : $@convention(thin) <T: AnyObject> (@owned T) -> ()
 
-sil @foo : $@convention(thin) (@owned ObjCProto) -> () {
+sil [ossa] @foo : $@convention(thin) (@owned ObjCProto) -> () {
 entry(%a : @owned $ObjCProto):
   %f = function_ref @requires_any_object : $@convention(thin) <T: AnyObject> (@owned T) -> ()
   %0 = apply %f<ObjCProto>(%a) : $@convention(thin) <T: AnyObject> (@owned T) -> ()
diff --git a/test/SIL/Parser/borrow.sil b/test/SIL/Parser/borrow.sil
index daa1b91..57464f3 100644
--- a/test/SIL/Parser/borrow.sil
+++ b/test/SIL/Parser/borrow.sil
@@ -5,7 +5,7 @@
 import Builtin
 
 // We do not verify here, but just make sure that all of the combinations parse and print correctly.
-// CHECK-LABEL: sil @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.NativeObject, [[ARG2:%[0-9]+]] : @unowned $Builtin.NativeObject):
 // CHECK: begin_borrow [[ARG2]]
 // CHECK: [[MEM:%.*]] = alloc_stack $Builtin.NativeObject
@@ -14,7 +14,7 @@
 // CHECK: end_borrow [[ARG2]] : $Builtin.NativeObject
 // CHECK: end_borrow [[ARG1]] : $*Builtin.NativeObject
 // CHECK: end_borrow [[ARG2]] : $Builtin.NativeObject
-sil @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   %2 = begin_borrow %1 : $Builtin.NativeObject
   end_borrow %2 : $Builtin.NativeObject
diff --git a/test/SIL/Parser/borrow_argument.sil b/test/SIL/Parser/borrow_argument.sil
index a414912..b1c3038 100644
--- a/test/SIL/Parser/borrow_argument.sil
+++ b/test/SIL/Parser/borrow_argument.sil
@@ -4,10 +4,10 @@
 
 import Builtin
 
-// CHECK-LABEL: sil @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb1([[PHIBBARG:%.*]] : @guaranteed $Builtin.NativeObject):
 // CHECK: end_borrow [[PHIBBARG]] : $Builtin.NativeObject
-sil @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
diff --git a/test/SIL/Parser/bound_generic.sil b/test/SIL/Parser/bound_generic.sil
index f2d9f20..b218097 100644
--- a/test/SIL/Parser/bound_generic.sil
+++ b/test/SIL/Parser/bound_generic.sil
@@ -7,8 +7,8 @@
 import Builtin
 import Swift
 
-// CHECK-LABEL: sil @_TF9optional3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> ()
-sil @_TF9optional3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> (@out ())>) -> () {
+// CHECK-LABEL: sil [ossa] @_TF9optional3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> @out ()>) -> ()
+sil [ossa] @_TF9optional3fooFT1fGSqFT_T___T_ : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> (@out ())>) -> () {
 bb0(%0 : @guaranteed $Optional<@callee_guaranteed () -> (@out ())>):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Optional<@callee_guaranteed () -> (@out ())>>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <Optional<@callee_guaranteed () -> (@out ())>>, 0
diff --git a/test/SIL/Parser/boxes.sil b/test/SIL/Parser/boxes.sil
index 2ea077c..0e3b53f 100644
--- a/test/SIL/Parser/boxes.sil
+++ b/test/SIL/Parser/boxes.sil
@@ -11,8 +11,8 @@
 
 // TODO: Transform boxes by transforming their arguments, not as single-field,
 // so that they work as parameters in generic SIL functions.
-// CHECK-LABEL: sil @box_type_parsing : $@convention(thin) (
-sil @box_type_parsing : $@convention(thin) (
+// CHECK-LABEL: sil [ossa] @box_type_parsing : $@convention(thin) (
+sil [ossa] @box_type_parsing : $@convention(thin) (
   // CHECK: <τ_0_0> { var τ_0_0 } <F>,
   <B>{ var B }<F>,
   // CHECK: <τ_0_0 where τ_0_0 : P> { let τ_0_0 } <G>,
@@ -33,8 +33,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil @box_type_parsing_in_generic_function : $@convention(thin) <F, G where G : P> (
-sil @box_type_parsing_in_generic_function : $@convention(thin) <F, G: P> (
+// CHECK-LABEL: sil [ossa] @box_type_parsing_in_generic_function : $@convention(thin) <F, G where G : P> (
+sil [ossa] @box_type_parsing_in_generic_function : $@convention(thin) <F, G: P> (
   // CHECK: <τ_0_0> { var τ_0_0 } <F>,
   <B>{ var B }<F>,
   // CHECK: <τ_0_0 where τ_0_0 : P> { let τ_0_0 } <G>,
@@ -55,8 +55,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
-sil @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
+// CHECK-LABEL: sil [ossa] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
+sil [ossa] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
   // CHECK: <τ_0_0> { var τ_0_0 } <Int>,
   <A> { var A } <Int>,
   // CHECK: <τ_0_0> { var τ_0_0 } <String>
@@ -67,8 +67,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
-sil @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
+// CHECK-LABEL: sil [ossa] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
+sil [ossa] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
   // CHECK: <τ_0_0> { var τ_0_0 } <A>
   <A> { var A } <A>
 // CHECK: ) -> ()
@@ -77,14 +77,14 @@
   unreachable
 }
 
-// CHECK-LABEL: sil @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <τ_0_0> { let τ_0_0 } <Int>) -> ()
-sil @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <T> { let T } <Int>) -> () {
+// CHECK-LABEL: sil [ossa] @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <τ_0_0> { let τ_0_0 } <Int>) -> ()
+sil [ossa] @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <T> { let T } <Int>) -> () {
 entry(%0 : @owned ${ var Int }, %1 : @guaranteed $<T> { let T } <Int>):
   unreachable
 }
 
-// CHECK-LABEL: sil @address_of_box
-sil @address_of_box : $@convention(thin) (@in { var Int }, @in <T> { let T } <Int>) -> () {
+// CHECK-LABEL: sil [ossa] @address_of_box
+sil [ossa] @address_of_box : $@convention(thin) (@in { var Int }, @in <T> { let T } <Int>) -> () {
 // CHECK: %0 : $*{ var Int }, %1 : $*<τ_0_0> { let τ_0_0 } <Int>
 entry(%0 : $*{ var Int }, %1 : $*<T> { let T } <Int>):
   unreachable
diff --git a/test/SIL/Parser/coroutines.sil b/test/SIL/Parser/coroutines.sil
index 37e8c9c..4095e5e 100644
--- a/test/SIL/Parser/coroutines.sil
+++ b/test/SIL/Parser/coroutines.sil
@@ -19,7 +19,7 @@
   return %0 : $()
 }
 
-sil @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb2
 
@@ -31,7 +31,7 @@
   unwind
 }
 
-sil @yield_many : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield_many : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb3
 
@@ -52,7 +52,7 @@
   unwind
 }
 
-sil @begin_apply : $(Int, Float) -> () {
+sil [ossa] @begin_apply : $(Int, Float) -> () {
 bb0(%0 : $Int, %1 : $Float):
   %coro = function_ref @yield : $@convention(thin) @yield_once (Int, Float) -> (@yields Int, @yields Float)
   (%int, %float, %token) = begin_apply %coro(%0, %1) : $@convention(thin) @yield_once (Int, Float) -> (@yields Int, @yields Float)
diff --git a/test/SIL/Parser/coroutines_failure_merge.sil b/test/SIL/Parser/coroutines_failure_merge.sil
index e95cc0d..804500b 100644
--- a/test/SIL/Parser/coroutines_failure_merge.sil
+++ b/test/SIL/Parser/coroutines_failure_merge.sil
@@ -5,7 +5,7 @@
 
 import Swift
 
-sil @yield : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb2
 
diff --git a/test/SIL/Parser/coroutines_failure_unwind_return.sil b/test/SIL/Parser/coroutines_failure_unwind_return.sil
index c79c645..b25de91 100644
--- a/test/SIL/Parser/coroutines_failure_unwind_return.sil
+++ b/test/SIL/Parser/coroutines_failure_unwind_return.sil
@@ -5,7 +5,7 @@
 
 import Swift
 
-sil @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb2
 
diff --git a/test/SIL/Parser/coroutines_failure_unwind_reuse.sil b/test/SIL/Parser/coroutines_failure_unwind_reuse.sil
index adfe6d6..3880e4e 100644
--- a/test/SIL/Parser/coroutines_failure_unwind_reuse.sil
+++ b/test/SIL/Parser/coroutines_failure_unwind_reuse.sil
@@ -5,7 +5,7 @@
 
 import Swift
 
-sil @yield : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield : $@yield_many (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb3
 
diff --git a/test/SIL/Parser/coroutines_failure_yieldonce_twice.sil b/test/SIL/Parser/coroutines_failure_yieldonce_twice.sil
index e14b74f..eb642ce 100644
--- a/test/SIL/Parser/coroutines_failure_yieldonce_twice.sil
+++ b/test/SIL/Parser/coroutines_failure_yieldonce_twice.sil
@@ -5,7 +5,7 @@
 
 import Swift
 
-sil @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
+sil [ossa] @yield : $@yield_once (Int, Float) -> (@yields Int, @yields Float) {
 bb0(%0 : $Int, %1 : $Float):
   yield (%0 : $Int, %1 : $Float), resume bb1, unwind bb3
 
diff --git a/test/SIL/Parser/coverage_maps.sil b/test/SIL/Parser/coverage_maps.sil
index 0e4778f..e1e68e4 100644
--- a/test/SIL/Parser/coverage_maps.sil
+++ b/test/SIL/Parser/coverage_maps.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=coverage_maps | %target-sil-opt -assume-parsing-unqualified-ownership-sil -verify -module-name=coverage_maps | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=coverage_maps | %target-sil-opt -verify -module-name=coverage_maps | %FileCheck %s
 
 sil @someFunction : $@convention(thin) () -> () {
 bb0:
diff --git a/test/SIL/Parser/default_witness_tables.sil b/test/SIL/Parser/default_witness_tables.sil
index 8153e21..2bda267 100644
--- a/test/SIL/Parser/default_witness_tables.sil
+++ b/test/SIL/Parser/default_witness_tables.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=witness_tables -enable-resilience | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name=witness_tables -enable-resilience | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=witness_tables -enable-resilience -O | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=witness_tables -enable-resilience | %target-sil-opt -module-name=witness_tables -enable-resilience | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=witness_tables -enable-resilience -O | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SIL/Parser/enum_in_class.sil b/test/SIL/Parser/enum_in_class.sil
index 0d2dfab..100a526 100644
--- a/test/SIL/Parser/enum_in_class.sil
+++ b/test/SIL/Parser/enum_in_class.sil
@@ -14,7 +14,7 @@
 }
 
 // CHECK: @test_declref_enum
-sil [transparent] @test_declref_enum : $@convention(thin) (UInt8, @thin Task.State.Type) -> Task.State {
+sil [transparent] [ossa] @test_declref_enum : $@convention(thin) (UInt8, @thin Task.State.Type) -> Task.State {
 bb0(%0 : $UInt8, %1 : $@thin Task.State.Type):
 // CHECK: enum $Task.State, #Task.State.Bits!enumelt
   %2 = enum $Task.State, #Task.State.Bits!enumelt.1, %0 : $UInt8
diff --git a/test/SIL/Parser/errors.sil b/test/SIL/Parser/errors.sil
index 2d801fa..386a210 100644
--- a/test/SIL/Parser/errors.sil
+++ b/test/SIL/Parser/errors.sil
@@ -5,7 +5,7 @@
 
 import Swift
 
-sil @block_errors : $() -> () {
+sil [ossa] @block_errors : $() -> () {
 bb0:
   %0 = tuple ()
   return %0 : $()
@@ -13,7 +13,7 @@
   return %0 : $()
 }
 
-sil @local_value_errors : $() -> () {
+sil [ossa] @local_value_errors : $() -> () {
 bb0:
   %0 = tuple ()
   %0 = tuple ()           // expected-error {{redefinition of value '%0'}}
@@ -21,12 +21,12 @@
   %2 = tuple (%199 : $())  // expected-error {{use of undefined value '%199'}}
 }
 
-sil @local_value_errors2 : $() -> () {
+sil [ossa] @local_value_errors2 : $() -> () {
 bb0:
   %0 = builtin "cmp_eq_Int1"(%0 : $() // expected-error @+1 {{expected ')' or ',' in SIL instruction}}
 } // expected-error {{extraneous '}' at top level}}
 
-sil @global_value_errors : $() -> () {
+sil [ossa] @global_value_errors : $() -> () {
 bb0:
   %0 = function_ref @global_value_errors : $ () -> ((), ()) // expected-error {{defined with mismatching type}}
   %1 = function_ref @not_defined : $ () -> () // expected-error {{use of undefined value 'not_defined'}}
@@ -34,19 +34,19 @@
   return %2 : $()
 }
 
-sil @global_value_errors : $() -> () {  // expected-error {{redefinition of value 'global_value_errors'}}
+sil [ossa] @global_value_errors : $() -> () {  // expected-error {{redefinition of value 'global_value_errors'}}
 bb0:
   %1 = function_ref @wrong_type : $() -> ((), ())  // expected-note {{prior reference was here}}
 }
 
-sil @wrong_type : $() -> () {  // expected-error {{value 'wrong_type' defined with mismatching type '() -> ((), ())' (expected '@convention(thin) () -> ()')}}
+sil [ossa] @wrong_type : $() -> () {  // expected-error {{value 'wrong_type' defined with mismatching type '() -> ((), ())' (expected '@convention(thin) () -> ()')}}
 bb0:
   %1 = tuple ()
 }
 
 sil_stage nonsense // expected-error {{expected 'raw' or 'canonical' after 'sil_stage'}}
 
-sil @missing_type : $@convention(thin) (Int) -> () {
+sil [ossa] @missing_type : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   br bb3(%0) // expected-error {{expected ':' before type in SIL value reference}}
   // FIXME: The next error is unexpected.
diff --git a/test/SIL/Parser/function_named_subscript.sil b/test/SIL/Parser/function_named_subscript.sil
index f41fa9f..012e78a 100644
--- a/test/SIL/Parser/function_named_subscript.sil
+++ b/test/SIL/Parser/function_named_subscript.sil
@@ -12,7 +12,7 @@
   func `subscript`()
 }
 
-sil hidden @$s4test19SubscriptAsFunctionC9subscriptyyF : $@convention(method) (@guaranteed SubscriptAsFunction) -> () {
+sil hidden [ossa] @$s4test19SubscriptAsFunctionC9subscriptyyF : $@convention(method) (@guaranteed SubscriptAsFunction) -> () {
 bb0(%0 : @guaranteed $SubscriptAsFunction):
   return undef : $()
 }
diff --git a/test/SIL/Parser/generics.sil b/test/SIL/Parser/generics.sil
index 765e2eb..2e73dfb 100644
--- a/test/SIL/Parser/generics.sil
+++ b/test/SIL/Parser/generics.sil
@@ -3,12 +3,12 @@
 sil_stage raw
 import Builtin
 
-// CHECK-LABEL: sil @foo : $@convention(thin) <T> (@in T) -> @out T {
+// CHECK-LABEL: sil [ossa] @foo : $@convention(thin) <T> (@in T) -> @out T {
 // CHECK: bb0(%0 : $*T, %1 : $*T):
 // CHECK:   copy_addr [take] %1 to [initialization] %0 : $*T
 // CHECK:   return undef : $()
 // CHECK: }
-sil @foo : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @foo : $@convention(thin) <T> (@in T) -> @out T {
 entry(%o : $*T, %i : $*T):
   copy_addr [take] %i to [initialization] %o : $*T
   return undef : $()
@@ -17,10 +17,10 @@
 struct Bar {}
 struct Bas {}
 
-// CHECK-LABEL: sil @ref_foo_1 : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @ref_foo_1 : $@convention(thin) () -> () {
 // CHECK:   %2 = function_ref @foo : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
 // CHECK:   %3 = apply %2<Bar>(%1, %0) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
-sil @ref_foo_1 : $@convention(thin) () -> () {
+sil [ossa] @ref_foo_1 : $@convention(thin) () -> () {
 entry:
   %i = alloc_stack $Bar
   %o = alloc_stack $Bar
@@ -31,10 +31,10 @@
   return %z : $()
 }
 
-// CHECK-LABEL: sil @ref_foo_2 : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @ref_foo_2 : $@convention(thin) () -> () {
 // CHECK:  %2 = function_ref @foo : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
 // CHECK:  %3 = apply %2<Bas>(%1, %0) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
-sil @ref_foo_2 : $@convention(thin) () -> () {
+sil [ossa] @ref_foo_2 : $@convention(thin) () -> () {
 entry:
   %i = alloc_stack $Bas
   %o = alloc_stack $Bas
@@ -45,11 +45,11 @@
   return %z : $()
 }
 
-// CHECK-LABEL: sil @ref_foo_partial_apply : $@convention(thin) () -> @owned @callee_owned () -> @out Bas {
+// CHECK-LABEL: sil [ossa] @ref_foo_partial_apply : $@convention(thin) () -> @owned @callee_owned () -> @out Bas {
 // CHECK:  %1 = function_ref @foo : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
 // CHECK:  %2 = partial_apply %1<Bas>(%0) : $@convention(thin) <τ_0_0> (@in τ_0_0) -> @out τ_0_0
 // CHECK:  return %2 : $@callee_owned () -> @out Bas
-sil @ref_foo_partial_apply : $@convention(thin) () -> @owned @callee_owned () -> @out Bas {
+sil [ossa] @ref_foo_partial_apply : $@convention(thin) () -> @owned @callee_owned () -> @out Bas {
 entry:
   %i = alloc_stack $Bas
   %f = function_ref @foo : $@convention(thin) <Z> (@in Z) -> @out Z
@@ -61,8 +61,8 @@
 sil_global @zero: $Builtin.Int64
 sil_global @f: $@callee_owned (Builtin.Int32) -> ()
 
-// CHECK-LABEL: sil @test_apply
-sil @test_apply : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @test_apply
+sil [ossa] @test_apply : $@convention(thin) () -> () {
 bb0:
   %0 = global_addr @zero : $*Builtin.Int64
   %1 = mark_uninitialized [var] %0 : $*Builtin.Int64
@@ -96,7 +96,7 @@
 }
 
 // These generic parameters used to crash the compiler.
-sil @protocol_extension_with_constrained_associated_type : $@convention(method) <Self where Self : FooProto, Self.Assoc : FooProtoHelper><I where I : FooProto, I.Assoc == Self.Assoc> (@in I, @in_guaranteed Self) -> () {
+sil [ossa] @protocol_extension_with_constrained_associated_type : $@convention(method) <Self where Self : FooProto, Self.Assoc : FooProtoHelper><I where I : FooProto, I.Assoc == Self.Assoc> (@in I, @in_guaranteed Self) -> () {
 bb0(%0 : $*I, %1 : $*Self):
   %2 = alloc_stack $I                             // users: %3, %6, %7, %9
   copy_addr %0 to [initialization] %2 : $*I     // id: %3
diff --git a/test/SIL/Parser/global_decl.sil b/test/SIL/Parser/global_decl.sil
index e47309c..4fa49c0 100644
--- a/test/SIL/Parser/global_decl.sil
+++ b/test/SIL/Parser/global_decl.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s
 
 // Check that sil_globals and their corresponding decls are
 // parsed. There is no direct way to verify that the declarations are
diff --git a/test/SIL/Parser/indirect_enum.sil b/test/SIL/Parser/indirect_enum.sil
index ae81ecd..4bdc895 100644
--- a/test/SIL/Parser/indirect_enum.sil
+++ b/test/SIL/Parser/indirect_enum.sil
@@ -21,7 +21,7 @@
   indirect case Branch(left: TreeInt, right: TreeInt)
 }
 
-sil @indirect_enum : $@convention(thin) <T> (@owned TreeA<T>) -> () {
+sil [ossa] @indirect_enum : $@convention(thin) <T> (@owned TreeA<T>) -> () {
 entry(%e : @owned $TreeA<T>):
   %a = unchecked_enum_data %e : $TreeA<T>, #TreeA.Leaf!enumelt.1
   %b = project_box %a : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -32,7 +32,7 @@
   return undef : $()
 }
 
-sil @indirect_enum_case_addr_only : $@convention(thin) <T> (@in TreeB<T>) -> () {
+sil [ossa] @indirect_enum_case_addr_only : $@convention(thin) <T> (@in TreeB<T>) -> () {
 entry(%e : $*TreeB<T>):
   %a = unchecked_take_enum_data_addr %e : $*TreeB<T>, #TreeB.Leaf!enumelt.1
   destroy_addr %a : $*T
@@ -43,7 +43,7 @@
   return undef : $()
 }
 
-sil @indirect_enum_case_loadable : $@convention(thin) (@owned TreeInt) -> () {
+sil [ossa] @indirect_enum_case_loadable : $@convention(thin) (@owned TreeInt) -> () {
 entry(%e : @owned $TreeInt):
   %a = unchecked_enum_data %e : $TreeInt, #TreeInt.Leaf!enumelt.1
   store %a to [trivial] undef : $*Int
diff --git a/test/SIL/Parser/keypath.sil b/test/SIL/Parser/keypath.sil
index 76f0bd3..0d9478e 100644
--- a/test/SIL/Parser/keypath.sil
+++ b/test/SIL/Parser/keypath.sil
@@ -43,8 +43,8 @@
   subscript<U: Hashable>(ro _: U) -> T { get }
 }
 
-// CHECK-LABEL: sil shared @stored_properties
-sil shared @stored_properties : $@convention(thin) () -> () {
+// CHECK-LABEL: sil shared [ossa] @stored_properties
+sil shared [ossa] @stored_properties : $@convention(thin) () -> () {
 entry:
   // CHECK: keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
   %a = keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
@@ -58,8 +58,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil shared @stored_properties_generic
-sil shared @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+// CHECK-LABEL: sil shared [ossa] @stored_properties_generic
+sil shared [ossa] @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
 entry:
   // CHECK: keypath $WritableKeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where {{.*}}> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; stored_property #Gen.x : $τ_0_0) <D, E, F>
   %a = keypath $WritableKeyPath<Gen<D,E,F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; stored_property #Gen.x : $G) <D, E, F>
@@ -86,8 +86,8 @@
 sil @gen_subs_hash : $@convention(thin) <A: Hashable, B: Hashable, C: Hashable> (UnsafeRawPointer) -> Int
 
 
-// CHECK-LABEL: sil shared @computed_properties
-sil shared @computed_properties : $@convention(thin) () -> () {
+// CHECK-LABEL: sil shared [ossa] @computed_properties
+sil shared [ossa] @computed_properties : $@convention(thin) () -> () {
 entry:
   // CHECK: keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in_guaranteed S) -> @out Int)
   %a = keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in_guaranteed S) -> @out Int)
@@ -124,8 +124,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil @indexes
-sil @indexes : $@convention(thin) (S, C) -> () {
+// CHECK-LABEL: sil [ossa] @indexes
+sil [ossa] @indexes : $@convention(thin) (S, C) -> () {
 // CHECK: bb0([[S:%.*]] : @unowned $S, [[C:%.*]] : @unowned $C):
 entry(%s : @unowned $S, %c : @unowned $C):
   // CHECK: keypath $KeyPath<S, Int>, (root $S; settable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int_subs : $@convention(thin) (@in_guaranteed S, UnsafeRawPointer) -> @out Int, setter @set_s_int_subs : $@convention(thin) (@in_guaranteed Int, @in_guaranteed S, UnsafeRawPointer) -> (), indices [%$0 : $S : $S, %$1 : $C : $C], indices_equals @subs_eq : $@convention(thin) (UnsafeRawPointer, UnsafeRawPointer) -> Bool, indices_hash @subs_hash : $@convention(thin) (UnsafeRawPointer) -> Int) ([[S]], [[C]])
diff --git a/test/SIL/Parser/nonatomic_reference_counting.sil b/test/SIL/Parser/nonatomic_reference_counting.sil
index 3928d22..ea8c554 100644
--- a/test/SIL/Parser/nonatomic_reference_counting.sil
+++ b/test/SIL/Parser/nonatomic_reference_counting.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-silgen | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
 
 // Check that all reference counting instructions can take the [nonatomic]
 // attribute. SIL parser should be able to parse this attribute and
diff --git a/test/SIL/Parser/opaque_values_parse.sil b/test/SIL/Parser/opaque_values_parse.sil
index bae6901..3a15a43 100644
--- a/test/SIL/Parser/opaque_values_parse.sil
+++ b/test/SIL/Parser/opaque_values_parse.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-opaque-values -enable-sil-verify-all -emit-sorted-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all -emit-sorted-sil %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SIL/Parser/overloaded_member.sil b/test/SIL/Parser/overloaded_member.sil
index 3867f2a..1e0dffe 100644
--- a/test/SIL/Parser/overloaded_member.sil
+++ b/test/SIL/Parser/overloaded_member.sil
@@ -15,8 +15,8 @@
   init(a1: A, a2: A)
 }
 
-// CHECK-LABEL: sil @_TFCSo1XcfMS_FT1aV11peer_method1A_S_
-sil @_TFCSo1XcfMS_FT1aV11peer_method1A_S_ : $@convention(method) (A, @owned X) -> @owned X {
+// CHECK-LABEL: sil [ossa] @_TFCSo1XcfMS_FT1aV11peer_method1A_S_
+sil [ossa] @_TFCSo1XcfMS_FT1aV11peer_method1A_S_ : $@convention(method) (A, @owned X) -> @owned X {
 bb0(%0 : $A, %1 : @owned $X):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <X>
   %2a = project_box %2 : $<τ_0_0> { var τ_0_0 } <X>, 0
diff --git a/test/SIL/Parser/ownership_arguments.sil b/test/SIL/Parser/ownership_arguments.sil
index 55a0012..6d4e08c 100644
--- a/test/SIL/Parser/ownership_arguments.sil
+++ b/test/SIL/Parser/ownership_arguments.sil
@@ -4,11 +4,11 @@
 
 import Builtin
 
-// CHECK-LABEL: sil @simple : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.Int32) -> () {
+// CHECK-LABEL: sil [ossa] @simple : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.Int32) -> () {
 // CHECK: bb0({{%.*}} : @owned $Builtin.NativeObject, {{%.*}} : @unowned $Builtin.NativeObject, {{%.*}} : @guaranteed $Builtin.NativeObject, {{%.*}} : $Builtin.Int32):
 // CHECK: bb1({{%[0-9][0-9]*}} : @owned $Builtin.NativeObject, {{%[0-9][0-9]*}} : @unowned $Builtin.NativeObject, {{%[0-9][0-9]*}} : @guaranteed $Builtin.NativeObject, {{%[0-9][0-9]*}} : $Builtin.Int32):
 
-sil @simple : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.Int32) -> () {
+sil [ossa] @simple : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.Int32) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject, %2 : @guaranteed $Builtin.NativeObject, %3 : $Builtin.Int32):
   br bb1(%0 : $Builtin.NativeObject, %1 : $Builtin.NativeObject, %2 : $Builtin.NativeObject, %3 : $Builtin.Int32)
 
diff --git a/test/SIL/Parser/ownership_qualified_memopts.sil b/test/SIL/Parser/ownership_qualified_memopts.sil
index 1c04d50..e3967b6 100644
--- a/test/SIL/Parser/ownership_qualified_memopts.sil
+++ b/test/SIL/Parser/ownership_qualified_memopts.sil
@@ -3,13 +3,13 @@
 
 import Builtin
 
-// CHECK-LABEL: sil @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.NativeObject, [[ARG2:%[0-9]+]] : @unowned $Builtin.NativeObject):
 // CHECK: load [take] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: load [copy] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: store [[ARG2]] to [init] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: store [[ARG2]] to [assign] [[ARG1]] : $*Builtin.NativeObject
-sil @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   load [take] %0 : $*Builtin.NativeObject
   load [copy] %0 : $*Builtin.NativeObject
@@ -19,11 +19,11 @@
   return %2 : $()
 }
 
-// CHECK-LABEL: sil @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
+// CHECK-LABEL: sil [ossa] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.Int32, [[ARG2:%[0-9]+]] : $Builtin.Int32):
 // CHECK: load [trivial] [[ARG1]] : $*Builtin.Int32
 // CHECK: store [[ARG2]] to [trivial] [[ARG1]] : $*Builtin.Int32
-sil @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
+sil [ossa] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.Int32, %1 : $Builtin.Int32):
   load [trivial] %0 : $*Builtin.Int32
   store %1 to [trivial] %0 : $*Builtin.Int32
diff --git a/test/SIL/Parser/polymorphic_function.sil b/test/SIL/Parser/polymorphic_function.sil
index 668c18c..66dab1f 100644
--- a/test/SIL/Parser/polymorphic_function.sil
+++ b/test/SIL/Parser/polymorphic_function.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SIL/Parser/projection_lowered_type_parse.sil b/test/SIL/Parser/projection_lowered_type_parse.sil
index 0281f1b..a4e548d 100644
--- a/test/SIL/Parser/projection_lowered_type_parse.sil
+++ b/test/SIL/Parser/projection_lowered_type_parse.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-sil-opt %s
 
 import Builtin
 
diff --git a/test/SIL/Parser/protocol_getter.sil b/test/SIL/Parser/protocol_getter.sil
index 6e3d44c..8166ea5 100644
--- a/test/SIL/Parser/protocol_getter.sil
+++ b/test/SIL/Parser/protocol_getter.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil %s -emit-silgen | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
 
 // Verify that SILParser correctly handles witness_method on a getter.
 import Swift
diff --git a/test/SIL/Parser/self.sil b/test/SIL/Parser/self.sil
index de5dcdf..443bf41 100644
--- a/test/SIL/Parser/self.sil
+++ b/test/SIL/Parser/self.sil
@@ -14,7 +14,7 @@
 
 sil_vtable SelfTest {}
 
-sil @test_stuff : $@convention(method) (@owned SelfTest) -> () {
+sil [ossa] @test_stuff : $@convention(method) (@owned SelfTest) -> () {
 bb0(%0 : @owned $SelfTest):
   // CHECK: metatype $@thick @dynamic_self SelfTest
   %2 = metatype $@thick @dynamic_self SelfTest.Type
diff --git a/test/SIL/Parser/self_substitution.sil b/test/SIL/Parser/self_substitution.sil
index 6049e9f..461e48b 100644
--- a/test/SIL/Parser/self_substitution.sil
+++ b/test/SIL/Parser/self_substitution.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SIL/Parser/sil_scope.sil b/test/SIL/Parser/sil_scope.sil
index 3865f43..298b4fd 100644
--- a/test/SIL/Parser/sil_scope.sil
+++ b/test/SIL/Parser/sil_scope.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -sil-print-debuginfo -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo %s | %FileCheck %s
 
 // CHECK: sil_scope 1 { loc "foo.sil":12:34 parent @foo : $@convention(thin) () -> () }
           sil_scope 1 { loc "foo.sil":12:34 parent @foo : $@convention(thin) () -> () }
diff --git a/test/SIL/Parser/sil_scope_inline_fn.sil b/test/SIL/Parser/sil_scope_inline_fn.sil
index a5efdd3..69c7c82 100644
--- a/test/SIL/Parser/sil_scope_inline_fn.sil
+++ b/test/SIL/Parser/sil_scope_inline_fn.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -sil-print-debuginfo -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -O %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all -O %s | %FileCheck %s
 
 sil_scope 1 { loc "foo.sil":3:4 parent @foo : $@convention(thin) () -> () }
 sil_scope 2 { loc "foo.sil":3:4 parent 1 }
diff --git a/test/SIL/Parser/sillocation.sil b/test/SIL/Parser/sillocation.sil
index 336a5cf..a75f376 100644
--- a/test/SIL/Parser/sillocation.sil
+++ b/test/SIL/Parser/sillocation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -sil-print-debuginfo -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo %s | %FileCheck %s
 
 sil @foo : $@convention(thin) () -> () {
 bb0:
diff --git a/test/SIL/Parser/static_initializer.sil b/test/SIL/Parser/static_initializer.sil
index bd4ae32..7b1c2ad 100644
--- a/test/SIL/Parser/static_initializer.sil
+++ b/test/SIL/Parser/static_initializer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 // Generated from
 // var x : Int32 = 2
diff --git a/test/SIL/Parser/stored_property.sil b/test/SIL/Parser/stored_property.sil
index 1ae76da..050b183 100644
--- a/test/SIL/Parser/stored_property.sil
+++ b/test/SIL/Parser/stored_property.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SIL/Parser/string_literal.sil b/test/SIL/Parser/string_literal.sil
index be7bd4d..6675a08 100644
--- a/test/SIL/Parser/string_literal.sil
+++ b/test/SIL/Parser/string_literal.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-sil-opt %s
 
 sil @test : $@convention(thin) () -> () {
 bb0:
diff --git a/test/SIL/Parser/typed_boxes.sil b/test/SIL/Parser/typed_boxes.sil
index 22453d1..f8e668c 100644
--- a/test/SIL/Parser/typed_boxes.sil
+++ b/test/SIL/Parser/typed_boxes.sil
@@ -2,8 +2,8 @@
 
 import Swift
 
-// CHECK-LABEL: sil @alloc_dealloc : $@convention(thin) (Int) -> () {
-sil @alloc_dealloc : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil [ossa] @alloc_dealloc : $@convention(thin) (Int) -> () {
+sil [ossa] @alloc_dealloc : $@convention(thin) (Int) -> () {
 entry(%x : $Int):
   // CHECK: [[B:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
diff --git a/test/SIL/Parser/undef.sil b/test/SIL/Parser/undef.sil
index 4c03101..6e31ccf 100644
--- a/test/SIL/Parser/undef.sil
+++ b/test/SIL/Parser/undef.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil %s | %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop %s | %target-sil-opt -enable-objc-interop | %FileCheck %s
 sil_stage raw
 
 import Builtin
diff --git a/test/SIL/Parser/undef_objc.sil b/test/SIL/Parser/undef_objc.sil
index b4119cd..967dc84 100644
--- a/test/SIL/Parser/undef_objc.sil
+++ b/test/SIL/Parser/undef_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s | %target-sil-opt -assume-parsing-unqualified-ownership-sil | %FileCheck %s
+// RUN: %target-sil-opt %s | %target-sil-opt | %FileCheck %s
 // REQUIRES: objc_interop
 
 sil_stage raw
diff --git a/test/SIL/Parser/unmanaged.sil b/test/SIL/Parser/unmanaged.sil
index f182d43..9c72fad 100644
--- a/test/SIL/Parser/unmanaged.sil
+++ b/test/SIL/Parser/unmanaged.sil
@@ -5,7 +5,7 @@
 
 class C {}
 
-sil @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
+sil [ossa] @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
 bb0(%0 : $*Optional<U>):
   %1 = load [copy] %0 : $*Optional<U>
   %2 = ref_to_unmanaged %1 : $Optional<U> to $@sil_unmanaged Optional<U>
@@ -15,7 +15,7 @@
   return %9999 : $()
 }
 
-sil @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
+sil [ossa] @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
 bb0(%0 : @unowned $@sil_unmanaged Optional<C>):
   %1 = unmanaged_to_ref %0 : $@sil_unmanaged Optional<C> to $Optional<C>
   unmanaged_retain_value %1 : $Optional<C>
diff --git a/test/SIL/Parser/unnamed_struct_identifiers.sil b/test/SIL/Parser/unnamed_struct_identifiers.sil
index 39c1483..fecd0d1 100644
--- a/test/SIL/Parser/unnamed_struct_identifiers.sil
+++ b/test/SIL/Parser/unnamed_struct_identifiers.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sdk %clang-importer-sdk-path %s
+// RUN: %target-sil-opt -sdk %clang-importer-sdk-path %s
 
 import ctypes
 
diff --git a/test/SIL/Parser/where_clause.sil b/test/SIL/Parser/where_clause.sil
index 5b4addb..5e14fb4 100644
--- a/test/SIL/Parser/where_clause.sil
+++ b/test/SIL/Parser/where_clause.sil
@@ -10,8 +10,8 @@
 
 struct Spoon<T: Runcible> {}
 
-// CHECK: sil @foo : $@convention(thin) <T where T : Runcible, T == T.Mince> () -> @out Spoon<T>
-sil @foo : $@convention(thin) <T where T: Runcible, T == T.Mince> () -> @out Spoon<T> {
+// CHECK: sil [ossa] @foo : $@convention(thin) <T where T : Runcible, T == T.Mince> () -> @out Spoon<T>
+sil [ossa] @foo : $@convention(thin) <T where T: Runcible, T == T.Mince> () -> @out Spoon<T> {
 entry(%0 : $*Spoon<T>):
   return undef : $()
 }
diff --git a/test/SIL/Parser/without_actually_escaping.sil b/test/SIL/Parser/without_actually_escaping.sil
index 2758e05..d7ebeba 100644
--- a/test/SIL/Parser/without_actually_escaping.sil
+++ b/test/SIL/Parser/without_actually_escaping.sil
@@ -2,17 +2,17 @@
 
 // thunk for @escaping @callee_guaranteed () -> ()
 // Check that the [without_actually_escaping] thunk attribute is parsed and printed.
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
-sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
 bb0(%0 : @guaranteed $@callee_guaranteed () -> ()):
   %1 = apply %0() : $@callee_guaranteed () -> ()
   return %1 : $()
 }
 
 // Check that the convert_function [without_actually_escaping] attribute is parsed and printed.
-// CHECK-LABEL: sil hidden @testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
+// CHECK-LABEL: sil hidden [ossa] @testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
 // CHECK: convert_function %0 : $@convention(block) @noescape () -> () to [without_actually_escaping] $@convention(block) () -> ()
-sil hidden @testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
+sil hidden [ossa] @testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
 bb0(%0 : @guaranteed $@convention(block) @noescape () -> ()):
   %cvt = convert_function %0 : $@convention(block) @noescape () -> () to [without_actually_escaping] $@convention(block) () -> ()
   %f = function_ref @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> ()
@@ -23,7 +23,7 @@
 }
 
 // closure #1 in testBlock(block:)
-sil private @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
+sil private [ossa] @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
 bb0(%0 : @guaranteed $@convention(block) () -> ()):
   %call = apply %0() : $@convention(block) () -> ()
   %v = tuple ()
diff --git a/test/SIL/Parser/witness_bug.sil b/test/SIL/Parser/witness_bug.sil
index c749fbf..d51e70a 100644
--- a/test/SIL/Parser/witness_bug.sil
+++ b/test/SIL/Parser/witness_bug.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-sil-opt %s
 
 import Builtin
 import Swift
diff --git a/test/SIL/Parser/witness_method.sil b/test/SIL/Parser/witness_method.sil
index 51e1ce8..7edeced 100644
--- a/test/SIL/Parser/witness_method.sil
+++ b/test/SIL/Parser/witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=witness_tables | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name=witness_tables | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=witness_tables | %target-sil-opt -module-name=witness_tables | %FileCheck %s
 
 protocol AssocReqt {
   func requiredMethod()
diff --git a/test/SIL/Parser/witness_protocol_from_import.sil b/test/SIL/Parser/witness_protocol_from_import.sil
index ddcea18..e90c650 100644
--- a/test/SIL/Parser/witness_protocol_from_import.sil
+++ b/test/SIL/Parser/witness_protocol_from_import.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend %s -assume-parsing-unqualified-ownership-sil -emit-silgen | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-silgen | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SIL/Parser/witness_specialize.sil b/test/SIL/Parser/witness_specialize.sil
index 21db905..c76d793 100644
--- a/test/SIL/Parser/witness_specialize.sil
+++ b/test/SIL/Parser/witness_specialize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=witness_specialize | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name=witness_specialize | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=witness_specialize | %target-sil-opt -module-name=witness_specialize | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SIL/Parser/witness_table_redeclare.sil b/test/SIL/Parser/witness_table_redeclare.sil
new file mode 100644
index 0000000..528646a
--- /dev/null
+++ b/test/SIL/Parser/witness_table_redeclare.sil
@@ -0,0 +1,12 @@
+// RUN: %target-sil-opt %s -module-name=witness_table_redeclare | %target-sil-opt -module-name=witness_table_redeclare | %FileCheck %s
+
+protocol P {}
+
+struct S : P {}
+
+sil_witness_table S: P module witness_table_redeclare
+
+sil_witness_table S: P module witness_table_redeclare {}
+
+// CHECK-LABEL: sil_witness_table S: P module witness_table_redeclare {
+// CHECK-NEXT: }
diff --git a/test/SIL/Parser/witness_tables.sil b/test/SIL/Parser/witness_tables.sil
index c9b0ac0..77d8e81 100644
--- a/test/SIL/Parser/witness_tables.sil
+++ b/test/SIL/Parser/witness_tables.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name=witness_tables | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name=witness_tables | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name=witness_tables | %target-sil-opt -module-name=witness_tables | %FileCheck %s
 
 protocol AssocReqt {
   func requiredMethod()
@@ -114,4 +114,4 @@
 }
 
 sil_default_witness_table hidden P {
-}
\ No newline at end of file
+}
diff --git a/test/SIL/Parser/witness_with_inherited_gp.sil b/test/SIL/Parser/witness_with_inherited_gp.sil
index 258fdf6..134304b 100644
--- a/test/SIL/Parser/witness_with_inherited_gp.sil
+++ b/test/SIL/Parser/witness_with_inherited_gp.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name WitnessTableWithGP | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name WitnessTableWithGP | %FileCheck %s
 
 // REQUIRES: disabled
 // FIXME: <rdar://problem/20592011>
diff --git a/test/SIL/Serialization/Inputs/function_param_convention_input.sil b/test/SIL/Serialization/Inputs/function_param_convention_input.sil
index c5897ce..c97a494 100644
--- a/test/SIL/Serialization/Inputs/function_param_convention_input.sil
+++ b/test/SIL/Serialization/Inputs/function_param_convention_input.sil
@@ -3,7 +3,7 @@
 
 // Make sure that we can deserialize an apply with various parameter calling
 // conventions.
-sil [serialized] @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
+sil [serialized] [ossa] @foo : $@convention(thin) (@in X, @inout X, @in_guaranteed X, @owned X, X, @guaranteed X) -> @out X {
 bb0(%0 : $*X, %1 : $*X, %2 : $*X, %3 : $*X, %4 : @owned $X, %5 : @unowned $X, %6 : @guaranteed $X):
   %9999 = tuple()
   return %9999 : $()
diff --git a/test/SIL/Serialization/Inputs/generic_shared_function_helper.sil b/test/SIL/Serialization/Inputs/generic_shared_function_helper.sil
index d46c7cb..8870566 100644
--- a/test/SIL/Serialization/Inputs/generic_shared_function_helper.sil
+++ b/test/SIL/Serialization/Inputs/generic_shared_function_helper.sil
@@ -5,7 +5,7 @@
 
 sil public_external @impl_func : $@convention(thin) <T> () -> @out Optional<T>
 
-sil shared [serialized] @shared_func : $@convention(thin) <T> () -> @out Optional<T> {
+sil shared [serialized] [ossa] @shared_func : $@convention(thin) <T> () -> @out Optional<T> {
 bb0(%0 : $*Optional<T>):
   %1 = function_ref @impl_func : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0> // user: %2
   %2 = apply %1<T>(%0) : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0>
@@ -13,7 +13,7 @@
   return %3 : $()                                 // id: %4
 }
 
-sil public [serialized] @public_func : $@convention(thin) <T> () -> @out Optional<T> {
+sil public [serialized] [ossa] @public_func : $@convention(thin) <T> () -> @out Optional<T> {
 bb0(%0 : $*Optional<T>):
   %1 = function_ref @shared_func : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0> // user: %2
   %2 = apply %1<T>(%0) : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0>
diff --git a/test/SIL/Serialization/Inputs/init_existential_inst_deserializes_witness_tables_input.swift b/test/SIL/Serialization/Inputs/init_existential_inst_deserializes_witness_tables_input.swift
index 4caca33..51ac863 100644
--- a/test/SIL/Serialization/Inputs/init_existential_inst_deserializes_witness_tables_input.swift
+++ b/test/SIL/Serialization/Inputs/init_existential_inst_deserializes_witness_tables_input.swift
@@ -13,6 +13,7 @@
   public init() {}
 }
 
+@inlinable
 public func whatShouldIDo(_ p : P) {
   p.doSomething()
 }
diff --git a/test/SIL/Serialization/Recovery/function.sil b/test/SIL/Serialization/Recovery/function.sil
index 23d1609..a6cacce 100644
--- a/test/SIL/Serialization/Recovery/function.sil
+++ b/test/SIL/Serialization/Recovery/function.sil
@@ -11,8 +11,8 @@
 import Types
 
 // CHECK-LABEL: sil @missingParam : $@convention(thin) (SoonToBeMissing) -> () {
-// CHECK-RECOVERY-NEGATIVE-NOT: sil @missingParam
-sil @missingParam : $@convention(thin) (SoonToBeMissing) -> () {
+// CHECK-RECOVERY-NEGATIVE-NOT: sil [ossa] @missingParam
+sil [ossa] @missingParam : $@convention(thin) (SoonToBeMissing) -> () {
 entry(%arg : @unowned $SoonToBeMissing):
   %9999 = tuple()
   return %9999 : $()
diff --git a/test/SIL/Serialization/basic.sil b/test/SIL/Serialization/basic.sil
index d3b6bc9..823168a 100644
--- a/test/SIL/Serialization/basic.sil
+++ b/test/SIL/Serialization/basic.sil
@@ -6,17 +6,17 @@
 
 import Builtin
 
-// CHECK-LABEL: sil [serialized] @test_unchecked_ownership_conversion : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @test_unchecked_ownership_conversion : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: unchecked_ownership_conversion {{%.*}} : $Builtin.NativeObject, @guaranteed to @owned
-sil [serialized] @test_unchecked_ownership_conversion : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [serialized] [ossa] @test_unchecked_ownership_conversion : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   unchecked_ownership_conversion %0 : $Builtin.NativeObject, @guaranteed to @owned
   return undef : $()
 }
 
-// CHECK-LABEL: sil [serialized] @test_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @test_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 // CHECK: end_lifetime {{%.*}} : $Builtin.NativeObject
-sil [serialized] @test_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [serialized] [ossa] @test_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   end_lifetime %0 : $Builtin.NativeObject
   return undef : $()
@@ -37,7 +37,7 @@
   var x: Builtin.Int32
 }
 
-sil @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned TestArray2) -> @owned (Builtin.NativeObject, Builtin.Int32, TestArrayStorage, Int32, TestArrayStorage) {
+sil [ossa] @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned TestArray2) -> @owned (Builtin.NativeObject, Builtin.Int32, TestArrayStorage, Int32, TestArrayStorage) {
 bb0(%0 : @owned $(Builtin.NativeObject, Builtin.Int32), %1 : @owned $TestArray2):
   (%2, %3) = destructure_tuple %0 : $(Builtin.NativeObject, Builtin.Int32)
   (%4, %5, %6) = destructure_struct %1 : $TestArray2
diff --git a/test/SIL/Serialization/borrow.sil b/test/SIL/Serialization/borrow.sil
index 5c37b11..ee606e5 100644
--- a/test/SIL/Serialization/borrow.sil
+++ b/test/SIL/Serialization/borrow.sil
@@ -9,7 +9,7 @@
 import Builtin
 
 // We do not verify here, but just make sure that all of the combinations parse and print correctly.
-// CHECK-LABEL: sil [serialized] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.NativeObject, [[ARG2:%[0-9]+]] : @unowned $Builtin.NativeObject):
 // CHECK: begin_borrow [[ARG2]]
 // CHECK: [[MEM:%.*]] = alloc_stack $Builtin.NativeObject
@@ -18,7 +18,7 @@
 // CHECK: end_borrow [[ARG2]] : $Builtin.NativeObject
 // CHECK: end_borrow [[ARG1]] : $*Builtin.NativeObject
 // CHECK: end_borrow [[ARG2]] : $Builtin.NativeObject
-sil [serialized] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [serialized] [ossa] @borrow_test : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   %2 = begin_borrow %1 : $Builtin.NativeObject
   end_borrow %2 : $Builtin.NativeObject
diff --git a/test/SIL/Serialization/borrow_argument.sil b/test/SIL/Serialization/borrow_argument.sil
index d19b1af..b59acfb 100644
--- a/test/SIL/Serialization/borrow_argument.sil
+++ b/test/SIL/Serialization/borrow_argument.sil
@@ -8,10 +8,10 @@
 
 import Builtin
 
-// CHECK-LABEL: sil [serialized] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb1([[PHIBBARG:%.*]] : @guaranteed $Builtin.NativeObject):
 // CHECK: end_borrow [[PHIBBARG]] : $Builtin.NativeObject
-sil [serialized] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [serialized] [ossa] @borrow_argument_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
diff --git a/test/SIL/Serialization/boxes.sil b/test/SIL/Serialization/boxes.sil
index ee13f2a..2b348c0 100644
--- a/test/SIL/Serialization/boxes.sil
+++ b/test/SIL/Serialization/boxes.sil
@@ -15,8 +15,8 @@
 
 // TODO: Transform boxes by transforming their arguments, not as single-field,
 // so that they work as parameters in generic SIL functions.
-// CHECK-LABEL: sil hidden [serialized] @box_type_parsing : $@convention(thin) (
-sil hidden [serialized] @box_type_parsing : $@convention(thin) (
+// CHECK-LABEL: sil hidden [serialized] [ossa] @box_type_parsing : $@convention(thin) (
+sil hidden [serialized] [ossa] @box_type_parsing : $@convention(thin) (
   // CHECK: <τ_0_0> { var τ_0_0 } <F>,
   <B>{ var B }<F>,
   // CHECK: <τ_0_0 where τ_0_0 : P> { let τ_0_0 } <G>,
@@ -37,8 +37,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil hidden [serialized] @box_type_parsing_in_generic_function : $@convention(thin) <F, G where G : P> (
-sil hidden [serialized] @box_type_parsing_in_generic_function : $@convention(thin) <F, G: P> (
+// CHECK-LABEL: sil hidden [serialized] [ossa] @box_type_parsing_in_generic_function : $@convention(thin) <F, G where G : P> (
+sil hidden [serialized] [ossa] @box_type_parsing_in_generic_function : $@convention(thin) <F, G: P> (
   // CHECK: <τ_0_0> { var τ_0_0 } <F>,
   <B>{ var B }<F>,
   // CHECK: <τ_0_0 where τ_0_0 : P> { let τ_0_0 } <G>,
@@ -59,8 +59,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil hidden [serialized] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
-sil hidden [serialized] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
+// CHECK-LABEL: sil hidden [serialized] [ossa] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
+sil hidden [serialized] [ossa] @same_generic_param_name_in_multiple_box_signatures : $@convention(thin) (
   // CHECK: <τ_0_0> { var τ_0_0 } <Int>,
   <A> { var A } <Int>,
   // CHECK: <τ_0_0> { var τ_0_0 } <String>
@@ -71,8 +71,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil hidden [serialized] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
-sil hidden [serialized] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
+// CHECK-LABEL: sil hidden [serialized] [ossa] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
+sil hidden [serialized] [ossa] @same_generic_param_name_in_outer_scope : $@convention(thin) <A> (
   // CHECK: <τ_0_0> { var τ_0_0 } <A>
   <A> { var A } <A>
 // CHECK: ) -> ()
@@ -81,14 +81,14 @@
   unreachable
 }
 
-// CHECK-LABEL: sil hidden [serialized] @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <τ_0_0> { let τ_0_0 } <Int>) -> ()
-sil hidden [serialized ]@box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <T> { let T } <Int>) -> () {
+// CHECK-LABEL: sil hidden [serialized] [ossa] @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <τ_0_0> { let τ_0_0 } <Int>) -> ()
+sil hidden [serialized ] [ossa] @box_ownership : $@convention(thin) (@owned { var Int }, @guaranteed <T> { let T } <Int>) -> () {
 entry(%0 : @owned ${ var Int }, %1 : @guaranteed $<T> { let T } <Int>):
   unreachable
 }
 
-// CHECK-LABEL: sil hidden [serialized] @address_of_box
-sil hidden [serialized] @address_of_box : $@convention(thin) (@in { var Int }, @in <T> { let T } <Int>) -> () {
+// CHECK-LABEL: sil hidden [serialized] [ossa] @address_of_box
+sil hidden [serialized] [ossa] @address_of_box : $@convention(thin) (@in { var Int }, @in <T> { let T } <Int>) -> () {
 // CHECK: %0 : $*{ var Int }, %1 : $*<τ_0_0> { let τ_0_0 } <Int>
 entry(%0 : $*{ var Int }, %1 : $*<T> { let T } <Int>):
   unreachable
diff --git a/test/SIL/Serialization/clang_conformances.swift b/test/SIL/Serialization/clang_conformances.swift
index 7f9bd75..f989e85 100644
--- a/test/SIL/Serialization/clang_conformances.swift
+++ b/test/SIL/Serialization/clang_conformances.swift
@@ -1,5 +1,5 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/clang_conformances.sil -module-name clang_conformances -import-objc-header %S/Inputs/clang_conformances_helper.h -assume-parsing-unqualified-ownership-sil
+// RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/clang_conformances.sil -module-name clang_conformances -import-objc-header %S/Inputs/clang_conformances_helper.h
 // RUN: %target-swift-frontend -emit-sil -o %t -I %t -primary-file %s -module-name main -O
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/copy_value_destroy_value.sil b/test/SIL/Serialization/copy_value_destroy_value.sil
index a2bcaf9..f9d9c08 100644
--- a/test/SIL/Serialization/copy_value_destroy_value.sil
+++ b/test/SIL/Serialization/copy_value_destroy_value.sil
@@ -9,24 +9,24 @@
 import Builtin
 
 
-// CHECK-LABEL: sil [serialized] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+// CHECK-LABEL: sil [serialized] [ossa] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 // CHECK: bb0([[T0:%[0-9]+]] : @owned $@sil_unowned Builtin.NativeObject):
 // CHECK-NEXT: [[COPY_RESULT:%.*]] = copy_unowned_value [[T0]] : $@sil_unowned Builtin.NativeObject
 // CHECK-NEXT: destroy_value [[T0]] : $@sil_unowned Builtin.NativeObject
 // CHECK-NEXT: return [[COPY_RESULT]] : $Builtin.NativeObject
-sil [serialized] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [serialized] [ossa] @test_copy_unowned_value : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $@sil_unowned Builtin.NativeObject):
   %1 = copy_unowned_value %0 : $@sil_unowned Builtin.NativeObject
   destroy_value %0 : $@sil_unowned Builtin.NativeObject
   return %1 : $Builtin.NativeObject
 }
 
-// CHECK-LABEL: sil [serialized] @test : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+// CHECK-LABEL: sil [serialized] [ossa] @test : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 // CHECK: bb0([[ARG1:%[0-9]+]] : @owned $Builtin.NativeObject):
 // CHECK: [[COPY_VALUE_RESULT:%[0-9]+]] = copy_value [[ARG1]] : $Builtin.NativeObject
 // CHECK: destroy_value [[ARG1]]
 // CHECK: return [[COPY_VALUE_RESULT]]
-sil [serialized] @test : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [serialized] [ossa] @test : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   destroy_value %0 : $Builtin.NativeObject
diff --git a/test/SIL/Serialization/deserialize_appkit.sil b/test/SIL/Serialization/deserialize_appkit.sil
index 93844d6..3ad45aa 100644
--- a/test/SIL/Serialization/deserialize_appkit.sil
+++ b/test/SIL/Serialization/deserialize_appkit.sil
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize AppKit.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-sdk-overlay-dir/AppKit.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-sdk-overlay-dir/AppKit.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/AppKit.swiftmodule | %FileCheck %s
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/deserialize_coregraphics.swift b/test/SIL/Serialization/deserialize_coregraphics.swift
index 181e12a..60d57ce 100644
--- a/test/SIL/Serialization/deserialize_coregraphics.swift
+++ b/test/SIL/Serialization/deserialize_coregraphics.swift
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize CoreGraphics.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-sdk-overlay-dir/CoreGraphics.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-sdk-overlay-dir/CoreGraphics.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/CoreGraphics.swiftmodule | %FileCheck %s
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/deserialize_darwin.sil b/test/SIL/Serialization/deserialize_darwin.sil
index 65ff9c3..31c94a1 100644
--- a/test/SIL/Serialization/deserialize_darwin.sil
+++ b/test/SIL/Serialization/deserialize_darwin.sil
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize darwin.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-sdk-overlay-dir/Darwin.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-sdk-overlay-dir/Darwin.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/Darwin.swiftmodule | %FileCheck %s
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/deserialize_foundation.sil b/test/SIL/Serialization/deserialize_foundation.sil
index 946ef95..ca1ad37 100644
--- a/test/SIL/Serialization/deserialize_foundation.sil
+++ b/test/SIL/Serialization/deserialize_foundation.sil
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize foundation.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-sdk-overlay-dir/Foundation.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-sdk-overlay-dir/Foundation.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/Foundation.swiftmodule | %FileCheck %s
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/deserialize_generic.sil b/test/SIL/Serialization/deserialize_generic.sil
index d57775c..68d4027 100644
--- a/test/SIL/Serialization/deserialize_generic.sil
+++ b/test/SIL/Serialization/deserialize_generic.sil
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_generic.swift
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -performance-linker -I %t %s | %FileCheck %s
+// RUN: %target-sil-opt -performance-linker -I %t %s | %FileCheck %s
 
 // Make sure that SILFunctionType with GenericSignature can match up with
 // SILFunctionType deserialized from module.
diff --git a/test/SIL/Serialization/deserialize_generic_marker.sil b/test/SIL/Serialization/deserialize_generic_marker.sil
index 3bffb22..09ac6e6 100644
--- a/test/SIL/Serialization/deserialize_generic_marker.sil
+++ b/test/SIL/Serialization/deserialize_generic_marker.sil
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -o %t %S/Inputs/def_generic_marker.swift
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -performance-linker -I %t %s | %FileCheck %s
+// RUN: %target-sil-opt -performance-linker -I %t %s | %FileCheck %s
 
 // Make sure that SILFunctionType with GenericSignature can match up with
 // SILFunctionType deserialized from module.
diff --git a/test/SIL/Serialization/deserialize_objectivec.sil b/test/SIL/Serialization/deserialize_objectivec.sil
index b9e03c9..113a227 100644
--- a/test/SIL/Serialization/deserialize_objectivec.sil
+++ b/test/SIL/Serialization/deserialize_objectivec.sil
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize Objective-C.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-sdk-overlay-dir/ObjectiveC.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-sdk-overlay-dir/ObjectiveC.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-sdk-overlay-dir/ObjectiveC.swiftmodule | %FileCheck %s
 
 // REQUIRES: objc_interop
diff --git a/test/SIL/Serialization/deserialize_stdlib.sil b/test/SIL/Serialization/deserialize_stdlib.sil
index 19ab776..4176250 100644
--- a/test/SIL/Serialization/deserialize_stdlib.sil
+++ b/test/SIL/Serialization/deserialize_stdlib.sil
@@ -1,5 +1,5 @@
 // Make sure that we can deserialize the stdlib.
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %platform-module-dir/Swift.swiftmodule > /dev/null
+// RUN: %target-sil-opt %platform-module-dir/Swift.swiftmodule > /dev/null
 // RUN: llvm-bcanalyzer %platform-module-dir/Swift.swiftmodule | %FileCheck %s
 
 // CHECK-NOT: Unknown
diff --git a/test/SIL/Serialization/effectsattr.sil b/test/SIL/Serialization/effectsattr.sil
index 2a0c74d..cde3757 100644
--- a/test/SIL/Serialization/effectsattr.sil
+++ b/test/SIL/Serialization/effectsattr.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -o - | %FileCheck %s
+// RUN: %target-sil-opt %s -o - | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SIL/Serialization/function_param_convention.sil b/test/SIL/Serialization/function_param_convention.sil
index 9503baa..82a5f27 100644
--- a/test/SIL/Serialization/function_param_convention.sil
+++ b/test/SIL/Serialization/function_param_convention.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -parse-sil -sil-inline-threshold 0 %S/Inputs/function_param_convention_input.sil -o %t/FunctionInput.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-name FunctionInput -O
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -I %t -performance-linker %s -o - | %FileCheck %s
+// RUN: %target-sil-opt -I %t -performance-linker %s -o - | %FileCheck %s
 
 import Swift
 import FunctionInput
diff --git a/test/SIL/Serialization/keypath.sil b/test/SIL/Serialization/keypath.sil
index 05f3433..bcadb84 100644
--- a/test/SIL/Serialization/keypath.sil
+++ b/test/SIL/Serialization/keypath.sil
@@ -49,8 +49,8 @@
   init()
 }
 
-// CHECK-LABEL: sil shared [serialized] @stored_properties
-sil shared [serialized] @stored_properties : $@convention(thin) () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @stored_properties
+sil shared [serialized] [ossa] @stored_properties : $@convention(thin) () -> () {
 entry:
   // CHECK: keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
   %a = keypath $WritableKeyPath<S, Int>, (root $S; stored_property #S.x : $Int)
@@ -64,8 +64,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil shared [serialized] @stored_properties_generic
-sil shared [serialized] @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @stored_properties_generic
+sil shared [serialized] [ossa] @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
 entry:
   // CHECK: keypath $WritableKeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where {{.*}}> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; stored_property #Gen.x : $τ_0_0) <D, E, F>
   %a = keypath $WritableKeyPath<Gen<D,E,F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; stored_property #Gen.x : $G) <D, E, F>
@@ -91,8 +91,8 @@
 sil @gen_subs_eq : $@convention(thin) <A: Hashable, B: Hashable, C: Hashable> (UnsafeRawPointer, UnsafeRawPointer) -> Bool
 sil @gen_subs_hash : $@convention(thin) <A: Hashable, B: Hashable, C: Hashable> (UnsafeRawPointer) -> Int
 
-// CHECK-LABEL: sil shared [serialized] @computed_properties
-sil shared [serialized] @computed_properties : $@convention(thin) () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @computed_properties
+sil shared [serialized] [ossa] @computed_properties : $@convention(thin) () -> () {
 entry:
   // CHECK: keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in_guaranteed S) -> @out Int)
   %a = keypath $KeyPath<S, Int>, (root $S; gettable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int : $@convention(thin) (@in_guaranteed S) -> @out Int)
@@ -109,8 +109,8 @@
 sil @get_gen_a : $@convention(thin) <X1: P, Y1: Q, Z1: R> (@in_guaranteed Gen<X1, Y1, Z1>) -> @out X1
 sil @set_gen_a : $@convention(thin) <X2: P, Y2: Q, Z2: R> (@in_guaranteed X2, @in_guaranteed Gen<X2, Y2, Z2>) -> ()
 
-// CHECK-LABEL: sil shared [serialized] @computed_properties_generic
-sil shared [serialized] @computed_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @computed_properties_generic
+sil shared [serialized] [ossa] @computed_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> () {
 entry:
   // CHECK: keypath $KeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; settable_property $τ_0_0, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in_guaranteed Gen<τ_0_0, τ_0_1, τ_0_2>) -> @out τ_0_0, setter @set_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in_guaranteed τ_0_0, @in_guaranteed Gen<τ_0_0, τ_0_1, τ_0_2>) -> ()) <D, E, F>
   %a = keypath $KeyPath<Gen<D, E, F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; settable_property $G, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <X3: P, Y3: Q, Z3: R> (@in_guaranteed Gen<X3, Y3, Z3>) -> @out X3, setter @set_gen_a : $@convention(thin) <X4: P, Y4: Q, Z4: R> (@in_guaranteed X4, @in_guaranteed Gen<X4, Y4, Z4>) -> ()) <D, E, F>
@@ -118,8 +118,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil shared [serialized] @optional
-sil shared [serialized] @optional : $@convention(thin) () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @optional
+sil shared [serialized] [ossa] @optional : $@convention(thin) () -> () {
 entry:
   // CHECK: keypath $KeyPath<Optional<Int>, Optional<Int>>, (root $Optional<Int>; optional_chain : $Int; optional_wrap : $Optional<Int>)
   %a = keypath $KeyPath<Optional<Int>, Optional<Int>>, (root $Optional<Int>; optional_chain : $Int; optional_wrap : $Optional<Int>)
@@ -129,8 +129,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil shared [serialized] @indexes
-sil shared [serialized] @indexes : $@convention(thin) (S, C) -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @indexes
+sil shared [serialized] [ossa] @indexes : $@convention(thin) (S, C) -> () {
 // CHECK: bb0([[S:%.*]] : @unowned $S, [[C:%.*]] : @unowned $C):
 entry(%s : @unowned $S, %c : @unowned $C):
   // CHECK: keypath $KeyPath<S, Int>, (root $S; settable_property $Int, id @id_a : $@convention(thin) () -> (), getter @get_s_int_subs : $@convention(thin) (@in_guaranteed S, UnsafeRawPointer) -> @out Int, setter @set_s_int_subs : $@convention(thin) (@in_guaranteed Int, @in_guaranteed S, UnsafeRawPointer) -> (), indices [%$0 : $S : $S, %$1 : $C : $C], indices_equals @subs_eq : $@convention(thin) (UnsafeRawPointer, UnsafeRawPointer) -> Bool, indices_hash @subs_hash : $@convention(thin) (UnsafeRawPointer) -> Int) ([[S]], [[C]])
@@ -148,8 +148,8 @@
   return undef : $()
 }
 
-// CHECK-LABEL: sil shared [serialized] @external
-sil shared [serialized] @external : $@convention(thin) <D: P, E: Q, F: R> () -> () {
+// CHECK-LABEL: sil shared [serialized] [ossa] @external
+sil shared [serialized] [ossa] @external : $@convention(thin) <D: P, E: Q, F: R> () -> () {
 entry:
   // CHECK: keypath $KeyPath<Gen<D, E, F>, D>, <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (root $Gen<τ_0_0, τ_0_1, τ_0_2>; settable_property $τ_0_0, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in_guaranteed Gen<τ_0_0, τ_0_1, τ_0_2>) -> @out τ_0_0, setter @set_gen_a : $@convention(thin) <τ_0_0, τ_0_1, τ_0_2 where τ_0_0 : P, τ_0_1 : Q, τ_0_2 : R> (@in_guaranteed τ_0_0, @in_guaranteed Gen<τ_0_0, τ_0_1, τ_0_2>) -> (), external #Gen.x<τ_0_0, τ_0_1, τ_0_2>) <D, E, F>
   %a = keypath $KeyPath<Gen<D, E, F>, D>, <G: P, H: Q, I: R> (root $Gen<G, H, I>; settable_property $G, id @id_a : $@convention(thin) () -> (), getter @get_gen_a : $@convention(thin) <X3: P, Y3: Q, Z3: R> (@in_guaranteed Gen<X3, Y3, Z3>) -> @out X3, setter @set_gen_a : $@convention(thin) <X4: P, Y4: Q, Z4: R> (@in_guaranteed X4, @in_guaranteed Gen<X4, Y4, Z4>) -> (), external #Gen.x<G, H, I>) <D, E, F>
@@ -157,7 +157,7 @@
   return undef : $()
 }
 
-sil [serialized] @serialize_all : $@convention(thin) () -> () {
+sil [serialized] [ossa] @serialize_all : $@convention(thin) () -> () {
 entry:
   %0 = function_ref @stored_properties : $@convention(thin) () -> ()
   %1 = function_ref @stored_properties_generic : $@convention(thin) <D: P, E: Q, F: R> () -> ()
diff --git a/test/SIL/Serialization/metatype_casts.sil b/test/SIL/Serialization/metatype_casts.sil
index ccab961..8364ea5 100644
--- a/test/SIL/Serialization/metatype_casts.sil
+++ b/test/SIL/Serialization/metatype_casts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -o - | %FileCheck %s
+// RUN: %target-sil-opt %s -o - | %FileCheck %s
 
 // Check that this file can be parsed at all.
 // SIL verifier should not crash on metatypes of metatypes.
diff --git a/test/SIL/Serialization/opaque_values_serialize.sil b/test/SIL/Serialization/opaque_values_serialize.sil
index 4766db9..a634368 100644
--- a/test/SIL/Serialization/opaque_values_serialize.sil
+++ b/test/SIL/Serialization/opaque_values_serialize.sil
@@ -1,9 +1,9 @@
 // First parse this and then emit a *.sib. Then read in the *.sib, then recreate
 // RUN: %empty-directory(%t)
 // FIXME: <rdar://problem/29281364> sil-opt -verify is broken
-// RUN: %target-sil-opt %s -assume-parsing-unqualified-ownership-sil -enable-sil-opaque-values -emit-sib -o %t/tmp.sib -module-name opaqueval
-// RUN: %target-sil-opt %t/tmp.sib -assume-parsing-unqualified-ownership-sil -enable-sil-opaque-values -verify -o %t/tmp.2.sib -module-name opaqueval
-// RUN: %target-sil-opt %t/tmp.2.sib -assume-parsing-unqualified-ownership-sil -enable-sil-opaque-values -emit-sorted-sil -verify -module-name opaqueval | %FileCheck %s
+// RUN: %target-sil-opt %s -enable-sil-opaque-values -emit-sib -o %t/tmp.sib -module-name opaqueval
+// RUN: %target-sil-opt %t/tmp.sib -enable-sil-opaque-values -verify -o %t/tmp.2.sib -module-name opaqueval
+// RUN: %target-sil-opt %t/tmp.2.sib -enable-sil-opaque-values -emit-sorted-sil -verify -module-name opaqueval | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SIL/Serialization/ownership_qualified_memopts.sil b/test/SIL/Serialization/ownership_qualified_memopts.sil
index cc3a1c0..44b3298 100644
--- a/test/SIL/Serialization/ownership_qualified_memopts.sil
+++ b/test/SIL/Serialization/ownership_qualified_memopts.sil
@@ -9,11 +9,11 @@
 import Builtin
 
 
-// CHECK-LABEL: sil [serialized] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.Int32, [[ARG2:%[0-9]+]] : $Builtin.Int32):
 // CHECK: load [trivial] [[ARG1]] : $*Builtin.Int32
 // CHECK: store [[ARG2]] to [trivial] [[ARG1]] : $*Builtin.Int32
-sil [serialized] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
+sil [serialized] [ossa] @trivial_args : $@convention(thin) (@in Builtin.Int32, Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.Int32, %1 : $Builtin.Int32):
   load [trivial] %0 : $*Builtin.Int32
   store %1 to [trivial] %0 : $*Builtin.Int32
@@ -21,13 +21,13 @@
   return %2 : $()
 }
 
-// CHECK-LABEL: sil [serialized] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG1:%[0-9]+]] : $*Builtin.NativeObject, [[ARG2:%[0-9]+]] : @unowned $Builtin.NativeObject):
 // CHECK: load [take] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: load [copy] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: store [[ARG2]] to [init] [[ARG1]] : $*Builtin.NativeObject
 // CHECK: store [[ARG2]] to [assign] [[ARG1]] : $*Builtin.NativeObject
-sil [serialized] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [serialized] [ossa] @non_trivial : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   load [take] %0 : $*Builtin.NativeObject
   load [copy] %0 : $*Builtin.NativeObject
diff --git a/test/SIL/Serialization/projection_lowered_type_parse.sil b/test/SIL/Serialization/projection_lowered_type_parse.sil
index ee1b2d3..ecb097b 100644
--- a/test/SIL/Serialization/projection_lowered_type_parse.sil
+++ b/test/SIL/Serialization/projection_lowered_type_parse.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-module %s -module-name Swift -module-link-name swiftCore -parse-as-library -parse-sil -parse-stdlib -o - | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name=Swift
+// RUN: %target-swift-frontend -emit-module %s -module-name Swift -module-link-name swiftCore -parse-as-library -parse-sil -parse-stdlib -o - | %target-sil-opt -module-name=Swift
 
 struct A {
   var f : () -> ()
diff --git a/test/SIL/Serialization/public_external.sil b/test/SIL/Serialization/public_external.sil
index 4c18cc8..c0babe9 100644
--- a/test/SIL/Serialization/public_external.sil
+++ b/test/SIL/Serialization/public_external.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend %s -parse-sil -emit-module -module-name Swift -module-link-name swiftCore -parse-stdlib -parse-as-library -o - | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -emit-sorted-sil | %FileCheck %s
+// RUN: %target-swift-frontend %s -parse-sil -emit-module -module-name Swift -module-link-name swiftCore -parse-stdlib -parse-as-library -o - | %target-sil-opt -module-name Swift -emit-sorted-sil | %FileCheck %s
 
 sil_stage raw
 import Builtin
diff --git a/test/SIL/Serialization/semanticsattr.sil b/test/SIL/Serialization/semanticsattr.sil
index b5b2ea2..3f84c68 100644
--- a/test/SIL/Serialization/semanticsattr.sil
+++ b/test/SIL/Serialization/semanticsattr.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -parse-sil -emit-sib -parse-as-library -parse-stdlib -module-name SemanticsAttr -o %t/SemanticsAttr.sib %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %t/SemanticsAttr.sib -o - -emit-sorted-sil | %FileCheck %s
+// RUN: %target-sil-opt %t/SemanticsAttr.sib -o - -emit-sorted-sil | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SIL/Serialization/shared_function_serialization.sil b/test/SIL/Serialization/shared_function_serialization.sil
index 28b5740..d875bff 100644
--- a/test/SIL/Serialization/shared_function_serialization.sil
+++ b/test/SIL/Serialization/shared_function_serialization.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend %S/Inputs/shared_function_serialization_input.swift -o %t/Swift.swiftmodule -emit-module -parse-as-library -parse-stdlib -module-link-name swiftCore -module-name Swift -O
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -I %t -performance-linker -inline %s -o - | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -I %t -performance-linker -inline %s -o - | %FileCheck %s
 
 // CHECK: sil private @top_level_code
 // CHECK: sil public_external [serialized] @$ss1XVABycfC{{.*}}
diff --git a/test/SIL/Serialization/unmanaged.sil b/test/SIL/Serialization/unmanaged.sil
index 487fb1e..9201cdb 100644
--- a/test/SIL/Serialization/unmanaged.sil
+++ b/test/SIL/Serialization/unmanaged.sil
@@ -9,13 +9,13 @@
 
 class C {}
 
-// CHECK-LABEL: sil [serialized] @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
 // CHECK: bb0([[ARG:%.*]] : $@sil_unmanaged Optional<C>):
 // CHECK: [[REF:%.*]] = unmanaged_to_ref [[ARG]] : $@sil_unmanaged Optional<C> to $Optional<C>
 // CHECK: unmanaged_retain_value [[REF]]
 // CHECK: unmanaged_autorelease_value [[REF]]
 // CHECK: unmanaged_release_value [[REF]]
-sil [serialized] @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
+sil [serialized] [ossa] @retain_release : $@convention(thin) (@sil_unmanaged Optional<C>) -> () {
 bb0(%0 : @unowned $@sil_unmanaged Optional<C>):
   %1 = unmanaged_to_ref %0 : $@sil_unmanaged Optional<C> to $Optional<C>
   unmanaged_retain_value %1 : $Optional<C>
@@ -25,13 +25,13 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil [serialized] @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
 // CHECK: bb0([[ARG:%.*]] : $*Optional<U>):
 // CHECK: [[LOADED_ARG:%.*]] = load [copy] [[ARG]]
 // CHECK: [[UNMANAGED_LOADED_ARG:%.*]] = ref_to_unmanaged [[LOADED_ARG]] : $Optional<U> to $@sil_unmanaged Optional<U>
 // CHECK: {{%.*}} = unmanaged_to_ref [[UNMANAGED_LOADED_ARG]] : $@sil_unmanaged Optional<U> to $Optional<U>
 // CHECK: destroy_value [[LOADED_ARG]]
-sil [serialized] @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
+sil [serialized] [ossa] @test : $@convention(thin) <U where U : AnyObject> (@inout Optional<U>) -> () {
 bb0(%0 : $*Optional<U>):
   %1 = load [copy] %0 : $*Optional<U>
   %2 = ref_to_unmanaged %1 : $Optional<U> to $@sil_unmanaged Optional<U>
diff --git a/test/SIL/Serialization/visibility.sil b/test/SIL/Serialization/visibility.sil
index ff8305d..57a0072 100644
--- a/test/SIL/Serialization/visibility.sil
+++ b/test/SIL/Serialization/visibility.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend %s -parse-sil -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=false -module-name Swift > %t.sil
+// RUN: %target-swift-frontend %s -parse-sil -emit-module -o - -module-name Swift -module-link-name swiftCore -parse-as-library -parse-stdlib | %target-sil-opt -enable-sil-verify-all=false -module-name Swift > %t.sil
 // RUN: %FileCheck %s < %t.sil
 // RUN: %FileCheck -check-prefix=NEG-CHECK %s < %t.sil
 
diff --git a/test/SIL/Serialization/without_actually_escaping.sil b/test/SIL/Serialization/without_actually_escaping.sil
index 77af896..5ee4a39 100644
--- a/test/SIL/Serialization/without_actually_escaping.sil
+++ b/test/SIL/Serialization/without_actually_escaping.sil
@@ -6,17 +6,17 @@
 
 // thunk for @escaping @callee_guaranteed () -> ()
 // Check that the [without_actually_escaping] thunk attribute is parsed and printed.
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @f1_testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
-sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @f1_testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @f1_testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @f1_testWithoutActuallyEscapingThunk : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
 bb0(%0 : @guaranteed $@callee_guaranteed () -> ()):
   %1 = apply %0() : $@callee_guaranteed () -> ()
   return %1 : $()
 }
 
 // Check that the convert_function [without_actually_escaping] attribute is parsed and printed.
-// CHECK-LABEL: sil hidden @f2_testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
+// CHECK-LABEL: sil hidden [ossa] @f2_testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
 // CHECK: convert_function %0 : $@convention(block) @noescape () -> () to [without_actually_escaping] $@convention(block) () -> ()
-sil hidden @f2_testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
+sil hidden [ossa] @f2_testWithoutActuallyEscapingBlock : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> () {
 bb0(%0 : @guaranteed $@convention(block) @noescape () -> ()):
   %cvt = convert_function %0 : $@convention(block) @noescape () -> () to [without_actually_escaping] $@convention(block) () -> ()
   %f = function_ref @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> ()
@@ -27,7 +27,7 @@
 }
 
 // closure #1 in testBlock(block:)
-sil private @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
+sil private [ossa] @closure1 : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
 bb0(%0 : @guaranteed $@convention(block) () -> ()):
   %call = apply %0() : $@convention(block) () -> ()
   %v = tuple ()
diff --git a/test/SIL/Serialization/witness_tables.sil b/test/SIL/Serialization/witness_tables.sil
index 7b0c2e5..85ff340 100644
--- a/test/SIL/Serialization/witness_tables.sil
+++ b/test/SIL/Serialization/witness_tables.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -parse-as-library -module-name witness_tables -emit-module -o - %s | %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name witness_tables | %FileCheck %s
+// RUN: %target-swift-frontend -parse-as-library -module-name witness_tables -emit-module -o - %s | %target-sil-opt -module-name witness_tables | %FileCheck %s
 
 protocol AssocReqt {
   func requiredMethod()
diff --git a/test/SIL/clone_init_existential.sil b/test/SIL/clone_init_existential.sil
index b718fa1..f9eb8ea 100644
--- a/test/SIL/clone_init_existential.sil
+++ b/test/SIL/clone_init_existential.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -inline %s | %FileCheck %s
 
 // Check if cloning of init_existential_* works correctly with multiple
 // conformances.
diff --git a/test/SIL/clone_select_switch_value.sil b/test/SIL/clone_select_switch_value.sil
index 1754b66..6cb64f5 100644
--- a/test/SIL/clone_select_switch_value.sil
+++ b/test/SIL/clone_select_switch_value.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -inline %s | %FileCheck %s
 
 // Check if cloning of select_value and switch_value works correctly without
 // producing illegal SIL.
diff --git a/test/SIL/cloning.sil b/test/SIL/cloning.sil
index 6b3241c..390532d 100644
--- a/test/SIL/cloning.sil
+++ b/test/SIL/cloning.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -inline %s | %FileCheck %s
 
 // Check cloning of instructions.
 
diff --git a/test/SIL/opaque-verify.sil b/test/SIL/opaque-verify.sil
index 534c485..87e0c2c 100644
--- a/test/SIL/opaque-verify.sil
+++ b/test/SIL/opaque-verify.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-sil-opt -enable-sil-opaque-values %s
 
 // REQUIRES: asserts
 
diff --git a/test/SIL/ownership-verifier/arguments.sil b/test/SIL/ownership-verifier/arguments.sil
index b1709f9..9f56018 100644
--- a/test/SIL/ownership-verifier/arguments.sil
+++ b/test/SIL/ownership-verifier/arguments.sil
@@ -13,7 +13,7 @@
 // CHECK: Value: %2 = argument of bb1 : $Builtin.NativeObject
 //
 // TODO: Better error message here.
-sil @no_end_borrow_error : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @no_end_borrow_error : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
@@ -27,7 +27,7 @@
 // CHECK-NEXT:     Value: %2 = argument of bb1 : $Builtin.NativeObject
 // CHECK-NEXT:     Post Dominating Failure Blocks:
 // CHECK-NEXT:         bb3
-sil @leak_along_path : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @leak_along_path : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
@@ -51,7 +51,7 @@
 // CHECK-NEXT:     Post Dominating Failure Blocks:
 // CHECK-NEXT:         bb5
 
-sil @leak_along_subarg_path : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @leak_along_subarg_path : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
@@ -75,7 +75,7 @@
 }
 
 // CHECK-NOT: Function: 'good_order'
-sil @good_order : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @good_order : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb5
@@ -116,7 +116,7 @@
 // CHECK-NEXT: User:  end_borrow %4 : $Builtin.NativeObject
 // CHECK-NEXT: Block: bb2
 // CHECK-NOT: Block: bb1
-sil @bad_order : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @bad_order : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb5
@@ -167,7 +167,7 @@
 
 // NOTE: We use the expected numbered value in the output to make it easier to
 // match the filecheck patterns with the input.
-sil @bad_order_add_a_level : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @bad_order_add_a_level : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb7
@@ -248,7 +248,7 @@
 // CHECK-NEXT: User:   end_borrow %4 : $Builtin.NativeObject
 // CHECK-NEXT: Block: bb2
 // CHECK-NOT: Block
-sil @bad_order_add_a_level_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @bad_order_add_a_level_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb7
@@ -296,7 +296,7 @@
 // CHECK-NEXT: Value: %3 = argument of bb1 : $Builtin.NativeObject
 // CHECK-NOT: Block
 // CHECK-NOT: Function: 'owned_argument_overuse_br1'
-sil @owned_argument_overuse_br1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_argument_overuse_br1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   br bb1(%0 : $Builtin.NativeObject)
@@ -313,7 +313,7 @@
 // CHECK-NEXT: Block: bb0
 // CHECK-NOT: Block
 // CHECK-NOT: Function: 'owned_argument_overuse_br2'
-sil @owned_argument_overuse_br2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_argument_overuse_br2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   br bb1(%0 : $Builtin.NativeObject)
@@ -333,7 +333,7 @@
 // CHECK-NEXT: Error! Found a leaked owned value that was never consumed.
 // CHECK-NEXT: Value: %3 = argument of bb1 : $Builtin.NativeObject
 // CHECK-NOT: Function: 'owned_argument_overuse_condbr1'
-sil @owned_argument_overuse_condbr1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_argument_overuse_condbr1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
@@ -353,7 +353,7 @@
 // CHECK-NEXT: Block: bb0
 // CHECK-NOT: Block
 // CHECK-NOT: Function: 'owned_argument_overuse_condbr2'
-sil @owned_argument_overuse_condbr2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_argument_overuse_condbr2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
diff --git a/test/SIL/ownership-verifier/cond_br_crash.sil b/test/SIL/ownership-verifier/cond_br_crash.sil
index a4e6ea3..5d0d30f 100644
--- a/test/SIL/ownership-verifier/cond_br_crash.sil
+++ b/test/SIL/ownership-verifier/cond_br_crash.sil
@@ -20,7 +20,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
 // CHECK: Block: bb0
-sil @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
@@ -41,7 +41,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK: Block: bb1
-sil @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
 
@@ -63,7 +63,7 @@
 // CHECK: Consuming User:   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
 // CHECK: Non Consuming User:   end_borrow %3 : $Builtin.NativeObject
 // CHECK: Block: bb1
-sil @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
 
diff --git a/test/SIL/ownership-verifier/cond_br_no_crash.sil b/test/SIL/ownership-verifier/cond_br_no_crash.sil
index 2e1cdb3..d701385 100644
--- a/test/SIL/ownership-verifier/cond_br_no_crash.sil
+++ b/test/SIL/ownership-verifier/cond_br_no_crash.sil
@@ -15,7 +15,7 @@
 
 // Test that an owned value used by the same cond_br instruction is properly
 // treated as a use in its destination block.
-sil @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2(%0 : $Builtin.NativeObject)
 
@@ -33,7 +33,7 @@
 
 // Test that an owned value used by one side of same cond_br instruction is
 // properly treated as a use in its destination block.
-sil @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1(%0 : $Builtin.NativeObject), bb2
 
@@ -51,7 +51,7 @@
 }
 
 // Make sure that we handle properly a use in the same block as the cond_br.
-sil @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   end_borrow %1 : $Builtin.NativeObject
@@ -71,7 +71,7 @@
 }
 
 // Make sure that we can properly handle a loop with a split back edge.
-sil @test4 : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [ossa] @test4 : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
diff --git a/test/SIL/ownership-verifier/definite_init.sil b/test/SIL/ownership-verifier/definite_init.sil
index c3c923f..86f27aa 100644
--- a/test/SIL/ownership-verifier/definite_init.sil
+++ b/test/SIL/ownership-verifier/definite_init.sil
@@ -30,7 +30,7 @@
 //  takes_Int_inout(&a)
 //  return (t, a)
 //}
-sil @used_by_inout : $@convention(thin) (Builtin.Int32) -> (Builtin.Int32, Builtin.Int32) {
+sil [ossa] @used_by_inout : $@convention(thin) (Builtin.Int32) -> (Builtin.Int32, Builtin.Int32) {
 bb0(%0 : $Builtin.Int32):
   %91 = alloc_box $<τ_0_0> { var τ_0_0 } <Builtin.Int32>
   %91a = project_box %91 : $<τ_0_0> { var τ_0_0 } <Builtin.Int32>, 0
@@ -54,7 +54,7 @@
 sil @returns_generic_struct : $@convention(thin) () -> @out AddressOnlyStruct
 
 // There should be no error in this function.
-sil @call_struct_return_function : $@convention(thin) () -> Builtin.Int32 {
+sil [ossa] @call_struct_return_function : $@convention(thin) () -> Builtin.Int32 {
 bb0:
   %0 = alloc_box $<τ_0_0> { var τ_0_0 } <AddressOnlyStruct>
   %0a = project_box %0 : $<τ_0_0> { var τ_0_0 } <AddressOnlyStruct>, 0
@@ -67,7 +67,7 @@
   return %5 : $Builtin.Int32
 }
 
-sil @copy_addr1 : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @copy_addr1 : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $*T, %1 : $*T):
   %3 = alloc_box $<τ_0_0> { var τ_0_0 } <T>
   %3a = project_box %3 : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -84,7 +84,7 @@
 sil @getSomeClass : $@convention(thin) () -> @owned SomeClass
 sil @getSomeOptionalClass : $@convention(thin) () -> Optional<SomeClass>
 
-sil @assign_test_trivial : $@convention(thin) (Builtin.Int32) -> Builtin.Int32 {
+sil [ossa] @assign_test_trivial : $@convention(thin) (Builtin.Int32) -> Builtin.Int32 {
 bb0(%0 : $Builtin.Int32):
   %7 = alloc_box $<τ_0_0> { var τ_0_0 } <Builtin.Int32>
   %7a = project_box %7 : $<τ_0_0> { var τ_0_0 } <Builtin.Int32>, 0
@@ -102,7 +102,7 @@
   return %2 : $Builtin.Int32
 }
 
-sil @assign_test_nontrivial : $@convention(thin) () -> () {
+sil [ossa] @assign_test_nontrivial : $@convention(thin) () -> () {
 bb0:
   // Assignments of nontrivial types.  The first becomes an initialize (i.e.,
   // lone store), the second becomes an assignment (retain/release dance).
@@ -122,7 +122,7 @@
 }
 
 
-sil @assign_test_addressonly : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @assign_test_addressonly : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $*T, %1 : $*T):
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <T>
   %ba = project_box %b : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -135,7 +135,7 @@
   return %9 : $()
 }
 
-sil @assign_test_unowned : $@convention(thin) () -> () {
+sil [ossa] @assign_test_unowned : $@convention(thin) () -> () {
 bb0:
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <@sil_unowned SomeClass>
   %ba = project_box %b : $<τ_0_0> { var τ_0_0 } <@sil_unowned SomeClass>, 0
@@ -168,7 +168,7 @@
   var y : Builtin.NativeObject
 }
 
-sil @test_struct : $@convention(thin) (@inout ContainsNativeObject) -> () {
+sil [ossa] @test_struct : $@convention(thin) (@inout ContainsNativeObject) -> () {
 bb0(%0 : $*ContainsNativeObject):
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <ContainsNativeObject>
   %ba = project_box %b : $<τ_0_0> { var τ_0_0 } <ContainsNativeObject>, 0
@@ -181,13 +181,13 @@
   return %x : $()
 }
 
-sil @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
+sil [ossa] @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
 bb0(%0 : $*Bool, %1 : $Bool):
   assign %1 to %0 : $*Bool
   %9 = tuple ()
   return %9 : $()
 }
-sil @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
+sil [ossa] @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
 bb0(%0 : $*SomeClass, %1 : @owned $SomeClass):
   assign %1 to %0 : $*SomeClass
   %9 = tuple ()
@@ -196,10 +196,10 @@
 
 sil_global @int_global : $Builtin.Int32
 
-// CHECK-LABEL: sil @test_tlc
+// CHECK-LABEL: sil [ossa] @test_tlc
 // CHECK-NOT: mark_uninitialized
 // CHECK: return
-sil @test_tlc : $() -> () {
+sil [ossa] @test_tlc : $() -> () {
   %0 = global_addr @int_global : $*Builtin.Int32
   %1 = mark_uninitialized [var] %0 : $*Builtin.Int32
 
@@ -219,7 +219,7 @@
 sil @use : $@convention(thin) (@in P) -> ()
 
 
-sil @release_not_constructed : $@convention(thin) () -> () {
+sil [ossa] @release_not_constructed : $@convention(thin) () -> () {
 bb0:
   %3 = alloc_stack $SomeClass
   %c = mark_uninitialized [var] %3 : $*SomeClass
@@ -229,7 +229,7 @@
   return %15 : $()
 }
 
-sil @release_some_constructed : $@convention(thin) () -> () {
+sil [ossa] @release_some_constructed : $@convention(thin) () -> () {
 bb0:
   %0 = tuple ()
   %b = alloc_stack $(SomeClass, SomeClass)
@@ -244,7 +244,7 @@
   return %8 : $()
 }
 
-sil @init_existential_with_class : $@convention(thin) (@inout C) -> () {
+sil [ossa] @init_existential_with_class : $@convention(thin) (@inout C) -> () {
 entry(%a : $*C):
   %p = alloc_stack $P
   %b = mark_uninitialized [var] %p : $*P
@@ -257,7 +257,7 @@
   return %z : $()
 }
 
-sil @conditional_init : $@convention(thin) (Bool) -> () {
+sil [ossa] @conditional_init : $@convention(thin) (Bool) -> () {
 bb0(%0 : $Bool):
   %2 = alloc_stack $SomeClass
   %3 = mark_uninitialized [var] %2 : $*SomeClass
@@ -277,7 +277,7 @@
   return %14 : $()
 }
 
-sil @conditionalInitOrAssign : $@convention(thin) (Builtin.Int1) -> () {
+sil [ossa] @conditionalInitOrAssign : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   %5 = alloc_stack $SomeClass
   %6 = mark_uninitialized [var] %5 : $*SomeClass
@@ -307,7 +307,7 @@
 }
 
 /// Root class tests.
-sil @rootclass_test1 : $@convention(method) (@owned RootClassWithIVars, Builtin.Int32) -> @owned RootClassWithIVars {
+sil [ossa] @rootclass_test1 : $@convention(method) (@owned RootClassWithIVars, Builtin.Int32) -> @owned RootClassWithIVars {
 bb0(%0 : @owned $RootClassWithIVars, %1 : $Builtin.Int32):
   %3 = mark_uninitialized [rootself] %0 : $RootClassWithIVars
   %4 = begin_borrow %3 : $RootClassWithIVars
@@ -334,7 +334,7 @@
 sil @superinit : $@convention(method) (@owned RootClassWithIVars) -> @owned RootClassWithIVars
 
 
-sil @derived_test1 : $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
+sil [ossa] @derived_test1 : $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
 bb0(%0 : @owned $DerivedClassWithIVars):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>, 0
@@ -365,7 +365,7 @@
 
 struct MyStruct : P {}
 
-sil @self_init_assert_instruction : $@convention(thin) (Builtin.Int32, @thin MyStruct.Type) -> MyStruct {
+sil [ossa] @self_init_assert_instruction : $@convention(thin) (Builtin.Int32, @thin MyStruct.Type) -> MyStruct {
 bb0(%0 : $Builtin.Int32, %1 : $@thin MyStruct.Type):
   %2 = alloc_stack $MyStruct, var, name "sf"
   %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct
@@ -387,7 +387,7 @@
 
 sil @selfinit_delegate : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2
 
-sil @self_init_copyaddr : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2 {
+sil [ossa] @self_init_copyaddr : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2 {
 bb0(%0 : $*MyStruct2, %1 : $@thin MyStruct2.Type):
   %2 = alloc_stack $MyStruct2, var, name "sf"
   %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct2
@@ -413,7 +413,7 @@
   override init()
 }
 
-sil @test_root_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_root_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %4 = mark_uninitialized [rootself] %0 : $RootClassWithNontrivialStoredProperties
   destroy_value %4 : $RootClassWithNontrivialStoredProperties
@@ -421,7 +421,7 @@
   return %13 : $()
 }
 
-sil @test_root_partial_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_root_partial_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %4 = mark_uninitialized [rootself] %0 : $RootClassWithNontrivialStoredProperties
   %1 = alloc_ref $SomeClass
@@ -434,7 +434,7 @@
   return %13 : $()
 }
 
-sil @test_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
   %1 = alloc_stack $DerivedClassWithNontrivialStoredProperties
   %4 = mark_uninitialized [derivedself] %1 : $*DerivedClassWithNontrivialStoredProperties
@@ -445,7 +445,7 @@
   return %13 : $()
 }
 
-sil @test_derived_partial_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_derived_partial_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
   %1 = alloc_stack $DerivedClassWithNontrivialStoredProperties
   %4 = mark_uninitialized [derivedself] %1 : $*DerivedClassWithNontrivialStoredProperties
@@ -464,7 +464,7 @@
   return %13 : $()
 }
 
-sil @test_delegating_box_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_delegating_box_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
   %2a = project_box %2 : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>, 0
@@ -475,7 +475,7 @@
   return %13 : $()
 }
 
-sil @test_delegating_rvalue_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_delegating_rvalue_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>
   %2a = project_box %2 : $<τ_0_0> { var τ_0_0 } <RootClassWithNontrivialStoredProperties>, 0
@@ -488,7 +488,7 @@
   return %13 : $()
 }
 
-sil @test_delegating_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_delegating_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
   %2 = alloc_stack $DerivedClassWithNontrivialStoredProperties
   %4 = mark_uninitialized [delegatingself] %2 : $*DerivedClassWithNontrivialStoredProperties
@@ -499,7 +499,7 @@
   return %13 : $()
 }
 
-sil @super_init_out_of_order :  $@convention(method) (@owned DerivedClassWithIVars, Builtin.Int32) -> @owned DerivedClassWithIVars {
+sil [ossa] @super_init_out_of_order :  $@convention(method) (@owned DerivedClassWithIVars, Builtin.Int32) -> @owned DerivedClassWithIVars {
 bb0(%0 : @owned $DerivedClassWithIVars, %i : $Builtin.Int32):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>, 0
@@ -533,7 +533,7 @@
 }
 sil @selfinit_mystruct3 : $@convention(thin) () -> @owned MyStruct3
 
-sil hidden @test_conditional_destroy_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
+sil hidden [ossa] @test_conditional_destroy_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   %2 = alloc_stack $MyStruct3
   %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct3
@@ -556,7 +556,7 @@
 }
 sil @selfinit_myclass3 : $@convention(thin) (@owned MyClass3) -> @owned MyClass3
 
-sil hidden @test_conditional_destroy_class_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
+sil hidden [ossa] @test_conditional_destroy_class_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   %2 = alloc_stack $MyClass3
   %3 = mark_uninitialized [delegatingself] %2 : $*MyClass3
diff --git a/test/SIL/ownership-verifier/disable_verifier_using_semantic_tag.sil b/test/SIL/ownership-verifier/disable_verifier_using_semantic_tag.sil
index 14c7fbc..0547ac7 100644
--- a/test/SIL/ownership-verifier/disable_verifier_using_semantic_tag.sil
+++ b/test/SIL/ownership-verifier/disable_verifier_using_semantic_tag.sil
@@ -9,7 +9,7 @@
 
 import Builtin
 
-sil [_semantics "verify.ownership.sil.never"] @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [_semantics "verify.ownership.sil.never"] [ossa] @test1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   destroy_value %0 : $Builtin.NativeObject
@@ -24,7 +24,7 @@
 // CHECK-NEXT: User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK-NEXT: Block: bb0
 // CHECK-NOT: Function: 'test1'
-sil @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   destroy_value %0 : $Builtin.NativeObject
diff --git a/test/SIL/ownership-verifier/false_positive_leaks.sil b/test/SIL/ownership-verifier/false_positive_leaks.sil
index c7adf53..5769186 100644
--- a/test/SIL/ownership-verifier/false_positive_leaks.sil
+++ b/test/SIL/ownership-verifier/false_positive_leaks.sil
@@ -22,7 +22,7 @@
 // Tests //
 ///////////
 
-sil @leak_loop_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @leak_loop_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = alloc_stack $Builtin.NativeObject
   %2 = begin_borrow %0 : $Builtin.NativeObject
@@ -55,7 +55,7 @@
 // lifetime ending user and that lifetime ending user is in the same block as
 // the producer, we do not consider the predecessor blocks where our value is
 // not defined. In the following test case, the bad predecessor is bb0.
-sil @single_block_consume_with_arg_and_unreachable : $@convention(thin) () -> () {
+sil [ossa] @single_block_consume_with_arg_and_unreachable : $@convention(thin) () -> () {
 bb0:
   %0 = function_ref @error_func : $@convention(thin) () -> (Builtin.Int32, @error Error)
   try_apply %0() : $@convention(thin) () -> (Builtin.Int32, @error Error), normal bb1, error bb2
@@ -74,7 +74,7 @@
 // user is in the same block as the producer, we do not consider the predecessor
 // blocks where our value is not defined. In the following test case, the bad
 // predecessor is bb0.
-sil @single_block_consume_with_allocated_arg_and_unreachable : $@convention(thin) () -> () {
+sil [ossa] @single_block_consume_with_allocated_arg_and_unreachable : $@convention(thin) () -> () {
 bb0:
   cond_br undef, bb1, bb2
 
@@ -94,7 +94,7 @@
 // ending user is in the same block as the producer, we do not consider the
 // predecessor blocks where our value is not defined. In the following test
 // case, the bad predecessor is bb0.
-sil @single_block_consume_with_diamond : $@convention(thin) () -> () {
+sil [ossa] @single_block_consume_with_diamond : $@convention(thin) () -> () {
 bb0:
   cond_br undef, bb1, bb2
 
@@ -114,7 +114,7 @@
 
 // This test makes sure that we do not consider successors of our lifetime
 // ending users as successors that we must visit. The target block is bb4.
-sil @multiple_block_consume_with_diamond : $@convention(thin) () -> () {
+sil [ossa] @multiple_block_consume_with_diamond : $@convention(thin) () -> () {
 bb0:
   cond_br undef, bb1, bb4
 
diff --git a/test/SIL/ownership-verifier/leaks.sil b/test/SIL/ownership-verifier/leaks.sil
index 83f2f8e..e037007 100644
--- a/test/SIL/ownership-verifier/leaks.sil
+++ b/test/SIL/ownership-verifier/leaks.sil
@@ -20,7 +20,7 @@
 // CHECK-LABEL: Function: 'owned_never_consumed'
 // CHECK: Error! Found a leaked owned value that was never consumed.
 // CHECK: Value:   %1 = copy_value %0 : $Builtin.NativeObject
-sil @owned_never_consumed : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @owned_never_consumed : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %9999 = tuple()
@@ -32,7 +32,7 @@
 // CHECK:     Value: %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK:     Post Dominating Failure Blocks:
 // CHECK:         bb1
-sil @owned_leaks_along_one_path : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_leaks_along_one_path : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -52,7 +52,7 @@
 // CHECK-LABEL: Function: 'owned_leaks_with_phi'
 // CHECK: Error! Found a leaked owned value that was never consumed.
 // CHECK: Value: %6 = argument of bb4 : $Builtin.NativeObject
-sil @owned_leaks_with_phi : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_leaks_with_phi : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
diff --git a/test/SIL/ownership-verifier/objc_use_verifier.sil b/test/SIL/ownership-verifier/objc_use_verifier.sil
index 56e2e91..9f34fef 100644
--- a/test/SIL/ownership-verifier/objc_use_verifier.sil
+++ b/test/SIL/ownership-verifier/objc_use_verifier.sil
@@ -6,7 +6,7 @@
 
 class Protocol : NSBurrito {}
 
-sil @test_objc_protocol : $@convention(thin) () -> @owned Protocol {
+sil [ossa] @test_objc_protocol : $@convention(thin) () -> @owned Protocol {
 bb0:
   %0 = objc_protocol #NSBurrito : $Protocol
   %1 = copy_value %0 : $Protocol
@@ -22,7 +22,7 @@
   override init()
 }
 
-sil hidden @test_objc_super_method : $@convention(method) (@thick Hoozit.Type) -> () {
+sil hidden [ossa] @test_objc_super_method : $@convention(method) (@thick Hoozit.Type) -> () {
 bb0(%0 : $@thick Hoozit.Type):
   %2 = upcast %0 : $@thick Hoozit.Type to $@thick Gizmo.Type
   %3 = objc_super_method %0 : $@thick Hoozit.Type, #Gizmo.runce!1.foreign : (Gizmo.Type) -> () -> (), $@convention(objc_method) (@objc_metatype Gizmo.Type) -> ()
diff --git a/test/SIL/ownership-verifier/opaque_use_verifier.sil b/test/SIL/ownership-verifier/opaque_use_verifier.sil
index 41a62d0..83b10b1 100644
--- a/test/SIL/ownership-verifier/opaque_use_verifier.sil
+++ b/test/SIL/ownership-verifier/opaque_use_verifier.sil
@@ -9,24 +9,24 @@
 
 import Builtin
 
-sil @unconditional_checked_cast_value_test : $@convention(thin) <T> (Builtin.Int32) -> @out T {
+sil [ossa] @unconditional_checked_cast_value_test : $@convention(thin) <T> (Builtin.Int32) -> @out T {
 bb0(%0 : $Builtin.Int32):
   %1 = unconditional_checked_cast_value %0 : $Builtin.Int32 to $T
   return %1 : $T
 }
 
-sil @opaque_identity : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @opaque_identity : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : @owned $T):
   return %0 : $T
 }
 
-sil @opaque_copy : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+sil [ossa] @opaque_copy : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 bb0(%0 : @guaranteed $T):
   %1 = copy_value %0 : $T
   return %1 : $T
 }
 
-sil @opaque_arg_copy : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @opaque_arg_copy : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : @owned $T):
   %1 = begin_borrow %0 : $T
   %2 = copy_value %1 : $T
@@ -37,7 +37,7 @@
   return %11 : $T
 }
 
-sil @opaque_arg_borrow : $@convention(thin) <T> (@in T) -> @out T {
+sil [ossa] @opaque_arg_borrow : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : @owned $T):
   %1 = begin_borrow %0 : $T
   %9 = function_ref @opaque_copy : $@convention(thin) <T> (@in_guaranteed T) -> @out T
@@ -47,7 +47,7 @@
   return %11 : $T
 }
 
-sil @opaque_arg_guaranteed : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+sil [ossa] @opaque_arg_guaranteed : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 bb0(%0 : @guaranteed $T):
   %1 = copy_value %0 : $T
   %2 = begin_borrow %1 : $T
@@ -60,14 +60,14 @@
 
 typealias AnyObject = Builtin.AnyObject
 
-sil @takeType : $@convention(thin) (@thick AnyObject.Type) -> () {
+sil [ossa] @takeType : $@convention(thin) (@thick AnyObject.Type) -> () {
 bb0(%0 : $@thick AnyObject.Type):
   %18 = tuple ()
   return %18 : $()
 }
 
 // Test an unconditional cast from an owned value to a trivial value.
-sil @castToTrivial : $@convention(thin) (@owned AnyObject) -> () {
+sil [ossa] @castToTrivial : $@convention(thin) (@owned AnyObject) -> () {
 bb0(%0 : @owned $AnyObject):
   %6 = function_ref @takeType : $@convention(thin) (@thick AnyObject.Type) -> ()
   %8 = begin_borrow %0 : $AnyObject
@@ -80,7 +80,7 @@
   return %18 : $()
 }
 
-sil @passTrivialAsOpaqueValue : $@convention(thin) (Builtin.Int64) -> () {
+sil [ossa] @passTrivialAsOpaqueValue : $@convention(thin) (Builtin.Int64) -> () {
 bb0(%0 : $Builtin.Int64):
   %1 = function_ref @opaque_copy : $@convention(thin) <T> (@in_guaranteed T) -> @out T
   %2 = apply %1<Builtin.Int64>(%0) : $@convention(thin) <T> (@in_guaranteed T) -> @out T
diff --git a/test/SIL/ownership-verifier/over_consume.sil b/test/SIL/ownership-verifier/over_consume.sil
index 6a5406e..c79fed0 100644
--- a/test/SIL/ownership-verifier/over_consume.sil
+++ b/test/SIL/ownership-verifier/over_consume.sil
@@ -40,7 +40,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK: Block: bb0
-sil @double_consume_same_bb : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @double_consume_same_bb : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   destroy_value %0 : $Builtin.NativeObject
@@ -55,7 +55,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK: Block: bb0
-sil @double_consume_jump_thread_blocks : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @double_consume_jump_thread_blocks : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   br bb1
@@ -72,7 +72,7 @@
 // CHECK: Found over consume?!
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: Block: bb0
-sil @double_consume_loop_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @double_consume_loop_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = alloc_stack $Builtin.NativeObject
   store %0 to [init] %1 : $*Builtin.NativeObject
@@ -104,7 +104,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK: Conv: guaranteed
-sil @consumed_guaranteed_arg : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @consumed_guaranteed_arg : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   %9999 = tuple()
@@ -120,7 +120,7 @@
 // CHECK: Consuming User:   end_borrow %1 : $Builtin.NativeObject
 // CHECK: Non Consuming User:   %4 = apply %2(%1) : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
 // CHECK: Block: bb0
-sil @use_after_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @use_after_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   %2 = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -140,7 +140,7 @@
 // CHECK: Consuming User:   destroy_value %0 : $Builtin.NativeObject
 // CHECK: Non Consuming User:   end_borrow %1 : $Builtin.NativeObject
 // CHECK: Block: bb0
-sil @destroy_before_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @destroy_before_end_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   %2 = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -155,7 +155,7 @@
 // CHECK: Value:   %0 = argument of bb0 : $RefWithInt
 // CHECK: User:   %1 = ref_element_addr %0 : $RefWithInt, #RefWithInt.value
 // CHECK: Conv: owned
-sil @ref_element_addr_requires_borrow : $@convention(thin) (@owned RefWithInt) -> () {
+sil [ossa] @ref_element_addr_requires_borrow : $@convention(thin) (@owned RefWithInt) -> () {
 bb0(%0 : @owned $RefWithInt):
   %1 = ref_element_addr %0 : $RefWithInt, #RefWithInt.value
   destroy_value %0 : $RefWithInt
@@ -171,7 +171,7 @@
 // CHECK: Value: %0 = argument of bb0 : $Optional<Builtin.NativeObject>
 // CHECK: User: destroy_value %0 : $Optional<Builtin.NativeObject>
 // CHECK: Block: bb0
-sil @unchecked_enum_data_propagates_ownership : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
+sil [ossa] @unchecked_enum_data_propagates_ownership : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
 bb0(%0 : @owned $Optional<Builtin.NativeObject>):
   %1 = unchecked_enum_data %0 : $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1
   destroy_value %0 : $Optional<Builtin.NativeObject>
@@ -190,7 +190,7 @@
 // CHECK: owned: Yes. Liveness: MustBeInvalidated
 // CHECK: guaranteed:  No.
 // CHECK: any: Yes. Liveness: MustBeLive
-sil @switch_enum_mismatching_argument_guaranteed_to_owned : $@convention(thin) (@guaranteed Optional<Builtin.NativeObject>) -> () {
+sil [ossa] @switch_enum_mismatching_argument_guaranteed_to_owned : $@convention(thin) (@guaranteed Optional<Builtin.NativeObject>) -> () {
 bb0(%0 : @guaranteed $Optional<Builtin.NativeObject>):
   switch_enum %0 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
 
@@ -217,7 +217,7 @@
 // CHECK: owned:  No.
 // CHECK: guaranteed: Yes. Liveness: MustBeLive
 // CHECK: any: Yes. Liveness: MustBeLive
-sil @switch_enum_mismatching_argument_owned_to_guaranteed : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
+sil [ossa] @switch_enum_mismatching_argument_owned_to_guaranteed : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
 bb0(%0 : @owned $Optional<Builtin.NativeObject>):
   switch_enum %0 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
 
@@ -240,7 +240,7 @@
 // CHECK: Consuming User:   end_borrow %1 : $Optional<Builtin.NativeObject>
 // CHECK: Non Consuming User:   end_borrow %3 : $Builtin.NativeObject
 // CHECK: Block: bb1
-sil @switch_enum_guaranteed_arg_outlives_original_value : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
+sil [ossa] @switch_enum_guaranteed_arg_outlives_original_value : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> () {
 bb0(%0 : @owned $Optional<Builtin.NativeObject>):
   %1 = begin_borrow %0 : $Optional<Builtin.NativeObject>
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
@@ -271,7 +271,7 @@
 // CHECK: owned: Yes. Liveness: MustBeInvalidated
 // CHECK: guaranteed:  No.
 // CHECK: any: Yes. Liveness: MustBeLive
-sil @checked_cast_br_mismatching_argument_guaranteed_to_owned_1 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_guaranteed_to_owned_1 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -294,7 +294,7 @@
 // CHECK: Value: %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 // CHECK: Conv: guaranteed
-sil @checked_cast_br_mismatching_argument_guaranteed_to_owned_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_guaranteed_to_owned_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -317,7 +317,7 @@
 // CHECK: Value: %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 // CHECK: Conv: guaranteed
-sil @checked_cast_br_mismatching_argument_guaranteed_to_owned_3 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_guaranteed_to_owned_3 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -345,7 +345,7 @@
 // CHECK: owned:  No.
 // CHECK: guaranteed: Yes. Liveness: MustBeLive
 // CHECK: any: Yes. Liveness: MustBeLive
-sil @checked_cast_br_mismatching_argument_owned_to_guaranteed_1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_owned_to_guaranteed_1 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -369,7 +369,7 @@
 // CHECK: Value: %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 // CHECK: Conv: owned
-sil @checked_cast_br_mismatching_argument_owned_to_guaranteed_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_owned_to_guaranteed_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -392,7 +392,7 @@
 // CHECK: Value: %0 = argument of bb0 : $Builtin.NativeObject
 // CHECK: User:   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 // CHECK: Conv: owned
-sil @checked_cast_br_mismatching_argument_owned_to_guaranteed_3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_mismatching_argument_owned_to_guaranteed_3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -415,7 +415,7 @@
 // CHECK: Consuming User:   end_borrow %1 : $Builtin.NativeObject
 // CHECK: Non Consuming User:   end_borrow %7 : $Builtin.NativeObject
 // CHECK: Block: bb2
-sil @checked_cast_br_guaranteed_arg_outlives_original_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_guaranteed_arg_outlives_original_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   checked_cast_br %1 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
@@ -442,7 +442,7 @@
 // CHECK: Consuming User:   store %2 to [init] %1 : $*SuperKlass
 // CHECK: Non Consuming User:   %4 = class_method %2 : $SuperKlass, #SuperKlass.doSomething!1 : (SuperKlass) -> () -> (), $@convention(method) (@guaranteed SuperKlass) -> ()
 // CHECK: Block: bb0
-sil @consume_with_classmethod : $@convention(thin) (@owned Klass) -> () {
+sil [ossa] @consume_with_classmethod : $@convention(thin) (@owned Klass) -> () {
 bb0(%0 : @owned $Klass):
   %1 = alloc_stack $SuperKlass
   %2 = upcast %0 : $Klass to $SuperKlass
diff --git a/test/SIL/ownership-verifier/over_consume_positive.sil b/test/SIL/ownership-verifier/over_consume_positive.sil
index a6af9c2..a56d151 100644
--- a/test/SIL/ownership-verifier/over_consume_positive.sil
+++ b/test/SIL/ownership-verifier/over_consume_positive.sil
@@ -17,9 +17,9 @@
 class Klass {
 }
 
-sil @klass_user : $@convention(thin) (@guaranteed FakeOptional<Klass>) -> ()
+sil [ossa] @klass_user : $@convention(thin) (@guaranteed FakeOptional<Klass>) -> ()
 
-sil @guaranteed_is_not_owned_use : $@convention(thin) (@guaranteed Klass) -> () {
+sil [ossa] @guaranteed_is_not_owned_use : $@convention(thin) (@guaranteed Klass) -> () {
 bb0(%0 : @guaranteed $Klass):
   %1 = copy_value %0 : $Klass
   %2 = function_ref @klass_user : $@convention(thin) (@guaranteed FakeOptional<Klass>) -> ()
diff --git a/test/SIL/ownership-verifier/subobject_borrowing.sil b/test/SIL/ownership-verifier/subobject_borrowing.sil
index 54c7012..cd1bf15 100644
--- a/test/SIL/ownership-verifier/subobject_borrowing.sil
+++ b/test/SIL/ownership-verifier/subobject_borrowing.sil
@@ -37,7 +37,7 @@
 //
 
 // NEGATIVE-TEST-NOT: Function: 'value_subobject_without_corresponding_end_borrow'
-sil @value_subobject_without_corresponding_end_borrow : $@convention(thin) (@owned B) -> () {
+sil [ossa] @value_subobject_without_corresponding_end_borrow : $@convention(thin) (@owned B) -> () {
 bb0(%0 : @owned $B):
   %1 = begin_borrow %0 : $B
   %2 = struct_extract %1 : $B, #B.a1
@@ -59,7 +59,7 @@
 // CHECK: Consuming User:   end_borrow %1 : $B
 // CHECK: Non Consuming User:   %4 = struct_extract %2 : $A, #A.ptr
 // CHECK: Block: bb0
-sil @value_subobject_with_use_after_end_borrow : $@convention(thin) (@owned B) -> () {
+sil [ossa] @value_subobject_with_use_after_end_borrow : $@convention(thin) (@owned B) -> () {
 bb0(%0 : @owned $B):
   %1 = begin_borrow %0 : $B
   %2 = struct_extract %1 : $B, #B.a1
@@ -84,7 +84,7 @@
 // the borrow root, not from each of the subobjects of the borrow.
 // NEGATIVE-TEST: Function: 'value_subobject_with_destroy_of_subobject'
 // NEGATIVE-TEST-NOT: Function: 'value_subobject_with_destroy_of_subobject'
-sil @value_subobject_with_destroy_of_subobject : $@convention(thin) (@owned B) -> () {
+sil [ossa] @value_subobject_with_destroy_of_subobject : $@convention(thin) (@owned B) -> () {
 bb0(%0 : @owned $B):
   %1 = begin_borrow %0 : $B
   %2 = struct_extract %1 : $B, #B.a1
@@ -104,7 +104,7 @@
 // CHECK: Consuming User:   end_borrow %1 : $B
 // CHECK: Non Consuming User:   %6 = tuple_extract %4 : $(Builtin.NativeObject, Builtin.NativeObject), 1
 // CHECK: Block: bb0
-sil @value_different_subobject_kinds_multiple_levels : $@convention(thin) (@owned B) -> () {
+sil [ossa] @value_different_subobject_kinds_multiple_levels : $@convention(thin) (@owned B) -> () {
 bb0(%0 : @owned $B):
   %1 = begin_borrow %0 : $B
   %2 = struct_extract %1 : $B, #B.a1
@@ -122,7 +122,7 @@
 //
 
 // NEGATIVE-TEST-NOT: Function: 'funcarg_subobject_basic_test'
-sil @funcarg_subobject_basic_test : $@convention(thin) (@guaranteed B) -> () {
+sil [ossa] @funcarg_subobject_basic_test : $@convention(thin) (@guaranteed B) -> () {
 bb0(%0 : @guaranteed $B):
   %2 = struct_extract %0 : $B, #B.a1
   %3 = struct_extract %2 : $A, #A.ptr
@@ -141,7 +141,7 @@
 // CHECK: Value:   %4 = tuple_extract %3 : $(Builtin.NativeObject, Builtin.NativeObject), 1
 // CHECK: User:   destroy_value %4 : $Builtin.NativeObject
 // CHECK: Conv: guaranteed
-sil @funcarg_subobject_with_destroy_of_subobject : $@convention(thin) (@guaranteed B) -> () {
+sil [ossa] @funcarg_subobject_with_destroy_of_subobject : $@convention(thin) (@guaranteed B) -> () {
 bb0(%0 : @guaranteed $B):
   %2 = struct_extract %0 : $B, #B.a1
   %3 = struct_extract %2 : $A, #A.ptr2
diff --git a/test/SIL/ownership-verifier/unreachable_code.sil b/test/SIL/ownership-verifier/unreachable_code.sil
index d120e3f..ee170d0 100644
--- a/test/SIL/ownership-verifier/unreachable_code.sil
+++ b/test/SIL/ownership-verifier/unreachable_code.sil
@@ -24,7 +24,7 @@
 
 // Make sure that we properly handle owned parameters in one function block that
 // are leaked and those that are not leaked.
-sil @test1 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+sil [ossa] @test1 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject):
   destroy_value %1 : $Builtin.NativeObject
   unreachable
@@ -32,7 +32,7 @@
 
 // Make sure that we properly handle owned parameters that are leaked along one
 // block and are consumed along a different one.
-sil @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -47,7 +47,7 @@
 
 // Make sure that we properly handle loop parameters that are leaked along the
 // exit edge of a loop.
-sil @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test3 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
@@ -63,7 +63,7 @@
 
 // Make sure that we properly handle loop parameters that are leaked in the body
 // of a loop.
-sil @test4 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test4 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   br bb1(%0 : $Builtin.NativeObject)
 
@@ -88,7 +88,7 @@
 }
 
 // Check that we handle diamonds correctly.
-sil @test5 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test5 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -109,7 +109,7 @@
 
 // Make sure that even if we have a destroy value in our unreachable path, we do
 // not really care.
-sil @test6 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test6 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -129,7 +129,7 @@
   return %9999 : $()
 }
 
-sil @test7 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @test7 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb2
diff --git a/test/SIL/ownership-verifier/use_verifier.sil b/test/SIL/ownership-verifier/use_verifier.sil
index 6b5fed2..0f0ac13 100644
--- a/test/SIL/ownership-verifier/use_verifier.sil
+++ b/test/SIL/ownership-verifier/use_verifier.sil
@@ -110,13 +110,13 @@
 ////////////////
 
 // Make sure that guaranteed args do not have a consuming use.
-sil @direct_guaranteed_arg_doesnt_have_consuming_use : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @direct_guaranteed_arg_doesnt_have_consuming_use : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %9999 = tuple()
   return %9999 : $()
 }
 
-sil @store_borrow_result : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @store_borrow_result : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = alloc_stack $Builtin.NativeObject
   store_borrow %0 to %1 : $*Builtin.NativeObject
@@ -125,7 +125,7 @@
   return %9999 : $()
 }
 
-sil @load_borrow_from_class : $@convention(thin) (@guaranteed RefWithRef) -> () {
+sil [ossa] @load_borrow_from_class : $@convention(thin) (@guaranteed RefWithRef) -> () {
 bb0(%0 : @guaranteed $RefWithRef):
   %1 = ref_element_addr %0 : $RefWithRef, #RefWithRef.value
   %2 = load_borrow %1 : $*RefWithRef
@@ -134,21 +134,21 @@
   return %9999 : $()
 }
 
-sil @trivial_struct_extract_from_non_trivial : $@convention(thin) (@guaranteed NonTrivialStructWithTrivialField) -> () {
+sil [ossa] @trivial_struct_extract_from_non_trivial : $@convention(thin) (@guaranteed NonTrivialStructWithTrivialField) -> () {
 bb0(%0 : @guaranteed $NonTrivialStructWithTrivialField):
   %1 = struct_extract %0 : $NonTrivialStructWithTrivialField, #NonTrivialStructWithTrivialField.payload
   %9999 = tuple()
   return %9999 : $()
 }
 
-sil @trivial_struct_extract_from_trivial : $@convention(thin) (TrivialStruct) -> () {
+sil [ossa] @trivial_struct_extract_from_trivial : $@convention(thin) (TrivialStruct) -> () {
 bb0(%0 : $TrivialStruct):
   %1 = struct_extract %0 : $TrivialStruct, #TrivialStruct.f1
   %9999 = tuple()
   return %9999 : $()
 }
 
-sil @in_address_arg : $@convention(thin) (@in Builtin.NativeObject) -> () {
+sil [ossa] @in_address_arg : $@convention(thin) (@in Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject):
   destroy_addr %0 : $*Builtin.NativeObject
   %9999 = tuple()
@@ -156,13 +156,13 @@
 }
 
 // We shouldn't assert given an unowned argument that is never used.
-sil @non_trivial_unowned_arg : $@convention(thin) (Builtin.NativeObject) -> () {
+sil [ossa] @non_trivial_unowned_arg : $@convention(thin) (Builtin.NativeObject) -> () {
 bb0(%0 : @unowned $Builtin.NativeObject):
   %9999 = tuple()
   return %9999 : $()
 }
 
-sil @builtin_unreachable_has_a_return_value : $@convention(thin) () -> () {
+sil [ossa] @builtin_unreachable_has_a_return_value : $@convention(thin) () -> () {
 bb0:
   %0 = builtin "unreachable"() : $Never
   unreachable
@@ -170,7 +170,7 @@
 
 // Make sure that we can pass an owned, guaranteed, and unowned argument as
 // unowned parameters such that the use is viewed as a non-lifetime ending use.
-sil @call_func_with_nontrivial_unowned_user_arg : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @call_func_with_nontrivial_unowned_user_arg : $@convention(thin) (@owned Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   %2 = function_ref @nontrivial_unowned_user : $@convention(thin) (Builtin.NativeObject) -> ()
   apply %2(%0) : $@convention(thin) (Builtin.NativeObject) -> ()
@@ -183,7 +183,7 @@
   return %9999 : $()
 }
 
-sil @forwarding_guaranteed_nonfunction_values_doesnt_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @forwarding_guaranteed_nonfunction_values_doesnt_end_lifetime : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   %2 = unchecked_ref_cast %1 : $Builtin.NativeObject to $SuperKlass
@@ -193,7 +193,7 @@
   return %9999 : $()
 }
 
-sil @alloc_value_buffer_dealloc_value_buffer : $@convention(thin) (@inout Builtin.UnsafeValueBuffer, Builtin.Int32) -> () {
+sil [ossa] @alloc_value_buffer_dealloc_value_buffer : $@convention(thin) (@inout Builtin.UnsafeValueBuffer, Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.UnsafeValueBuffer, %1 : $Builtin.Int32):
   %2 = alloc_value_buffer $Builtin.Int32 in %0 : $*Builtin.UnsafeValueBuffer
   store %1 to [trivial] %2 : $*Builtin.Int32
@@ -202,7 +202,7 @@
   return %9999 : $()
 }
 
-sil @builtins_test : $@convention(thin) (@owned Error, Builtin.Int1, Builtin.RawPointer, Builtin.Word) -> ((), @error Error) {
+sil [ossa] @builtins_test : $@convention(thin) (@owned Error, Builtin.Int1, Builtin.RawPointer, Builtin.Word) -> ((), @error Error) {
 bb0(%0 : @owned $Error, %1 : $Builtin.Int1, %2 : $Builtin.RawPointer, %3 : $Builtin.Word):
   %4 = metatype $@thick Builtin.Int32.Type
   builtin "willThrow"(%0 : $Error) : $()
@@ -225,7 +225,7 @@
   throw %0 : $Error
 }
 
-sil @existential_box_test : $@convention(thin) (@owned SomeError) -> () {
+sil [ossa] @existential_box_test : $@convention(thin) (@owned SomeError) -> () {
 bb0(%0 : @owned $SomeError):
   %1 = alloc_existential_box $Error, $SomeError
   %2 = project_existential_box $SomeError in %1 : $Error
@@ -237,7 +237,7 @@
   return %9999 : $()
 }
 
-sil @tail_allocated_alloc_ref : $@convention(thin) (Builtin.Word, Builtin.Word, @thick SuperKlass.Type) -> () {
+sil [ossa] @tail_allocated_alloc_ref : $@convention(thin) (Builtin.Word, Builtin.Word, @thick SuperKlass.Type) -> () {
 bb0(%0 : $Builtin.Word, %1 : $Builtin.Word, %2 : $@thick SuperKlass.Type):
   %3 = alloc_ref [tail_elems $Val * %0 : $Builtin.Word] [tail_elems $Aleph * %1 : $Builtin.Word] $SuperKlass
   dealloc_ref %3 : $SuperKlass
@@ -251,7 +251,7 @@
 }
 
 // All of these uses should not be consuming except for the destroy.
-sil @select_enum_test : $@convention(thin) (@owned ThreeDifferingPayloadEnum, @owned Builtin.NativeObject, Optional<Builtin.Int32>, @owned Builtin.NativeObject) -> () {
+sil [ossa] @select_enum_test : $@convention(thin) (@owned ThreeDifferingPayloadEnum, @owned Builtin.NativeObject, Optional<Builtin.Int32>, @owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $ThreeDifferingPayloadEnum, %1 : @owned $Builtin.NativeObject, %2 : $Optional<Builtin.Int32>, %3 : @owned $Builtin.NativeObject):
   %4 = integer_literal $Builtin.Int32, 2
   select_enum %0 : $ThreeDifferingPayloadEnum, case #ThreeDifferingPayloadEnum.nopayload!enumelt: %4, case #ThreeDifferingPayloadEnum.trivial_payload!enumelt.1: %4, case #ThreeDifferingPayloadEnum.nontrivial_payload!enumelt.1: %4 : $Builtin.Int32
@@ -262,7 +262,7 @@
   return %9999 : $()
 }
 
-sil @cast_tests : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @cast_tests : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %2 = unchecked_trivial_bit_cast %0 : $Builtin.NativeObject to $Builtin.RawPointer
   %3 = unchecked_trivial_bit_cast %2 : $Builtin.RawPointer to $Builtin.RawPointer
@@ -271,7 +271,7 @@
   return %9999 : $()
 }
 
-sil @existential_metatype_test : $@convention(thin) (@owned SwiftKlassP, @in SwiftKlassP) -> () {
+sil [ossa] @existential_metatype_test : $@convention(thin) (@owned SwiftKlassP, @in SwiftKlassP) -> () {
 bb0(%0 : @owned $SwiftKlassP, %1 : $*SwiftKlassP):
   %2 = existential_metatype $@thick SwiftKlassP.Type, %0 : $SwiftKlassP
   %3 = existential_metatype $@thick SwiftKlassP.Type, %1 : $*SwiftKlassP
@@ -281,7 +281,7 @@
   return %9999 : $()
 }
 
-sil @value_metatype_test : $@convention(thin) (@owned Ref, @in Ref) -> () {
+sil [ossa] @value_metatype_test : $@convention(thin) (@owned Ref, @in Ref) -> () {
 bb0(%0 : @owned $Ref, %1 : $*Ref):
   %2 = value_metatype $@thick Ref.Type, %0 : $Ref
   %3 = value_metatype $@thick Ref.Type, %1 : $*Ref
@@ -291,7 +291,7 @@
   return %9999 : $()
 }
 
-sil @ref_element_addr_test : $@convention(thin) (@owned RefWithInt) -> () {
+sil [ossa] @ref_element_addr_test : $@convention(thin) (@owned RefWithInt) -> () {
 bb0(%0 : @owned $RefWithInt):
   %1 = begin_borrow %0 : $RefWithInt
   %2 = ref_element_addr %1 : $RefWithInt, #RefWithInt.value
@@ -301,7 +301,7 @@
   return %9999 : $()
 }
 
-sil @trivial_payload_enum_pass_to_apply : $@convention(thin) () -> () {
+sil [ossa] @trivial_payload_enum_pass_to_apply : $@convention(thin) () -> () {
 bb0:
   %0 = enum $ThreeDifferingPayloadEnum, #ThreeDifferingPayloadEnum.nopayload!enumelt
   %1 = function_ref @three_differing_payload_enum_user : $@convention(thin) (@owned ThreeDifferingPayloadEnum, @guaranteed ThreeDifferingPayloadEnum, ThreeDifferingPayloadEnum) -> ()
@@ -310,7 +310,7 @@
   return %9999 : $()
 }
 
-sil @unsafeGuaranteedTest : $@convention(thin) (@owned Ref) -> () {
+sil [ossa] @unsafeGuaranteedTest : $@convention(thin) (@owned Ref) -> () {
 bb0(%0 : @owned $Ref):
   %1 = builtin "unsafeGuaranteed"(%0 : $Ref) : $(Ref, Builtin.Int8)
   %2 = begin_borrow %1 : $(Ref, Builtin.Int8)
@@ -322,7 +322,7 @@
   return %9999 : $()
 }
 
-sil @unchecked_enum_data_propagates_ownership : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> @owned Builtin.NativeObject {
+sil [ossa] @unchecked_enum_data_propagates_ownership : $@convention(thin) (@owned Optional<Builtin.NativeObject>) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $Optional<Builtin.NativeObject>):
   %1 = begin_borrow %0 : $Optional<Builtin.NativeObject>
   unchecked_enum_data %1 : $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1
@@ -333,7 +333,7 @@
   return %2 : $Builtin.NativeObject
 }
 
-sil @access_tests : $@convention(thin) () -> () {
+sil [ossa] @access_tests : $@convention(thin) () -> () {
 bb0:
   %0 = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %1 = project_box %0 : ${ var Builtin.Int64 }, 0
@@ -358,7 +358,7 @@
   return %9999 : $()
 }
 
-sil @block_invoke_test : $@convention(thin) (@owned @convention(block) () -> ()) -> () {
+sil [ossa] @block_invoke_test : $@convention(thin) (@owned @convention(block) () -> ()) -> () {
 bb0(%0 : @owned $@convention(block) () -> ()):
   apply %0() : $@convention(block) () -> ()
   destroy_value %0 : $@convention(block) () -> ()
@@ -366,22 +366,22 @@
   return %9999 : $()
 }
 
-sil @class_method_metatype_test : $@convention(thin) (@thick SuperKlass.Type) -> () {
+sil [ossa] @class_method_metatype_test : $@convention(thin) (@thick SuperKlass.Type) -> () {
 bb0(%0 : $@thick SuperKlass.Type):
   %1 = class_method %0 : $@thick SuperKlass.Type, #SuperKlass.d!1 : (SuperKlass) -> () -> (), $@convention(method) (@guaranteed SuperKlass) -> ()
   %9999 = tuple()
   return %9999 : $()
 }
 
-sil @trivial_enum_return_value : $@convention(thin) () -> @owned Optional<Builtin.NativeObject> {
+sil [ossa] @trivial_enum_return_value : $@convention(thin) () -> @owned Optional<Builtin.NativeObject> {
 bb0:
   %0 = enum $Optional<Builtin.NativeObject>, #Optional.none!enumelt
   return %0 : $Optional<Builtin.NativeObject>
 }
 
-sil @c_function : $@convention(c) (@inout_aliasable @block_storage @callee_owned () -> ()) -> ()
+sil [ossa] @c_function : $@convention(c) (@inout_aliasable @block_storage @callee_owned () -> ()) -> ()
 
-sil @test_block_storage : $@convention(thin) () -> () {
+sil [ossa] @test_block_storage : $@convention(thin) () -> () {
 bb0:
   %0 = function_ref @c_function : $@convention(c) (@inout_aliasable @block_storage @callee_owned () -> ()) -> ()
   %1 = alloc_stack $@block_storage @callee_owned () -> ()
@@ -392,7 +392,7 @@
   return %9999 : $()
 }
 
-sil @test_store_weak : $@convention(thin) (@owned Optional<SuperKlass>, @in @sil_weak Optional<SuperKlass>, @guaranteed Optional<SuperKlass>) -> () {
+sil [ossa] @test_store_weak : $@convention(thin) (@owned Optional<SuperKlass>, @in @sil_weak Optional<SuperKlass>, @guaranteed Optional<SuperKlass>) -> () {
 bb0(%0 : @owned $Optional<SuperKlass>, %1 : $*@sil_weak Optional<SuperKlass>, %2 : @guaranteed $Optional<SuperKlass>):
   store_weak %0 to %1 : $*@sil_weak Optional<SuperKlass>
   store_weak %2 to %1 : $*@sil_weak Optional<SuperKlass>
@@ -401,7 +401,7 @@
   return %9999 : $()
 }
 
-sil @test_dealloc_partial_ref : $@convention(thin) (@owned SuperKlass) -> () {
+sil [ossa] @test_dealloc_partial_ref : $@convention(thin) (@owned SuperKlass) -> () {
 bb0(%0 : @owned $SuperKlass):
   %1 = metatype $@thick SuperKlass.Type
   dealloc_partial_ref %0 : $SuperKlass, %1 : $@thick SuperKlass.Type
@@ -413,7 +413,7 @@
 // Terminator Tests //
 //////////////////////
 
-sil @simple_branch : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @simple_branch : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   // Simple branch without an argument.
   br bb1
@@ -435,7 +435,7 @@
 
 // Make sure that we can propagate through an argument through an enum that is
 // switched upon and whose payload is then destroyed.
-sil @switch_enum_owned_payload_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_owned_payload_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %0 : $Builtin.NativeObject
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
@@ -454,7 +454,7 @@
 
 // Make sure that we can propagate through an argument through an enum that is
 // switched upon and whose payload is then destroyed.
-sil @switch_enum_owned_payload_test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_owned_payload_test2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %0 : $Builtin.NativeObject
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2
@@ -471,7 +471,7 @@
   return %9999 : $()
 }
 
-sil @switch_enum_owned_payload_test3 : $@convention(thin) () -> () {
+sil [ossa] @switch_enum_owned_payload_test3 : $@convention(thin) () -> () {
 bb0:
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.none!enumelt
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.none!enumelt: bb1, case #Optional.some!enumelt.1: bb2
@@ -490,7 +490,7 @@
 
 // Make sure that we can propagate through an argument through an enum that is
 // switched upon and whose payload is then destroyed.
-sil @switch_enum_owned_payload_test4 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_owned_payload_test4 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %0 : $Builtin.NativeObject
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb2, case #Optional.none!enumelt: bb1
@@ -508,7 +508,7 @@
 }
 
 // Make sure that we can properly handle a guaranteed switch_enum.
-sil @switch_enum_guaranteed_arg_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_guaranteed_arg_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %0 : $Builtin.NativeObject
   switch_enum %1 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
@@ -525,7 +525,7 @@
   return %9999 : $()
 }
 
-sil @switch_enum_guaranteed_beginborrow_test_1a : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_guaranteed_beginborrow_test_1a : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   %2 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %1 : $Builtin.NativeObject
@@ -546,7 +546,7 @@
   return %9999 : $()
 }
 
-sil @switch_enum_guaranteed_beginborrow_test_1b : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_guaranteed_beginborrow_test_1b : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   %2 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %1 : $Builtin.NativeObject
@@ -566,7 +566,7 @@
   return %9999 : $()
 }
 
-sil @switch_enum_guaranteed_beginborrow_test_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @switch_enum_guaranteed_beginborrow_test_2 : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %0 : $Builtin.NativeObject
   %2 = begin_borrow %1 : $Optional<Builtin.NativeObject>
@@ -588,7 +588,7 @@
 
 // Make sure that we can properly handle a switch enum case where the input
 // argument is an enum, but the final argument is trivial.
-sil @switch_enum_no_payload_test : $@convention(thin) () -> () {
+sil [ossa] @switch_enum_no_payload_test : $@convention(thin) () -> () {
 bb0:
   %0 = enum $Optional<Builtin.NativeObject>, #Optional.none!enumelt
   switch_enum %0 : $Optional<Builtin.NativeObject>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2
@@ -617,7 +617,7 @@
 // @owned trivial ownership kind. When we do the loop, we first skip over all
 // trivial enums and then process only the non-trivial enums. That is why we
 // need to make sure we handle all 3 cases.
-sil @three_different_payload_enum_ordering : $@convention(thin) () -> () {
+sil [ossa] @three_different_payload_enum_ordering : $@convention(thin) () -> () {
 bb0:
   %0 = integer_literal $Builtin.Int32, 0
   %1 = function_ref @allocate_object : $@convention(thin) () -> @owned Builtin.NativeObject
@@ -754,7 +754,7 @@
 }
 
 // We check first for objects, then for metatypes, then for guaranteed values
-sil @checked_cast_br_test : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_test : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %6 : @guaranteed $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
 
@@ -792,7 +792,7 @@
   return %9999 : $()
 }
 
-sil @dynamic_method_br_test : $@convention(thin) (@owned AnyObject, @thick AnyObject.Type) -> () {
+sil [ossa] @dynamic_method_br_test : $@convention(thin) (@owned AnyObject, @thick AnyObject.Type) -> () {
 bb0(%0 : @owned $AnyObject, %1 : $@thick AnyObject.Type):
   %2 = open_existential_ref %0 : $AnyObject to $@opened("01234567-89ab-cdef-0123-000000000000") AnyObject
   %3 = unchecked_ref_cast %2 : $@opened("01234567-89ab-cdef-0123-000000000000") AnyObject to $Builtin.UnknownObject
@@ -820,7 +820,7 @@
   return %9999 : $()
 }
 
-sil @enum_cases_with_trivial_owned_cases_arg_into_phi : $@convention(thin) (@owned Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
+sil [ossa] @enum_cases_with_trivial_owned_cases_arg_into_phi : $@convention(thin) (@owned Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -846,7 +846,7 @@
   return %5 : $ThreeDifferingPayloadEnum
 }
 
-sil @enum_cases_with_trivial_unowned_cases_arg_into_phi : $@convention(thin) (Builtin.NativeObject) -> ThreeDifferingPayloadEnum {
+sil [ossa] @enum_cases_with_trivial_unowned_cases_arg_into_phi : $@convention(thin) (Builtin.NativeObject) -> ThreeDifferingPayloadEnum {
 bb0(%0 : @unowned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -870,7 +870,7 @@
   return %5 : $ThreeDifferingPayloadEnum
 }
 
-sil @enum_cases_with_trivial_guaranteed_cases_arg_into_phi : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
+sil [ossa] @enum_cases_with_trivial_guaranteed_cases_arg_into_phi : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -896,7 +896,7 @@
   return %6 : $ThreeDifferingPayloadEnum
 }
 
-sil @enum_cases_with_trivial_guaranteed_cases_value_into_phi : $@convention(thin) (@owned Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
+sil [ossa] @enum_cases_with_trivial_guaranteed_cases_value_into_phi : $@convention(thin) (@owned Builtin.NativeObject) -> @owned ThreeDifferingPayloadEnum {
 bb0(%0 : @owned $Builtin.NativeObject):
   cond_br undef, bb1, bb2
 
@@ -936,13 +936,13 @@
 // These tests make sure that we properly handle @owned forwarding of multiple
 // levels of aggregate.
 
-sil @owned_aggregates_simple : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject) -> (@owned (Builtin.NativeObject, Builtin.NativeObject)) {
+sil [ossa] @owned_aggregates_simple : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject) -> (@owned (Builtin.NativeObject, Builtin.NativeObject)) {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject):
   %2 = tuple(%0 : $Builtin.NativeObject, %1 : $Builtin.NativeObject)
   return %2 : $(Builtin.NativeObject, Builtin.NativeObject)
 }
 
-sil @multiple_level_owned_aggregates : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> (@owned TupleContainingNonTrivialStruct) {
+sil [ossa] @multiple_level_owned_aggregates : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> (@owned TupleContainingNonTrivialStruct) {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject, %2 : @owned $Builtin.NativeObject):
   %3 = tuple(%0 : $Builtin.NativeObject, %1 : $Builtin.NativeObject)
   %4 = enum $Optional<Builtin.NativeObject>, #Optional.some!enumelt.1, %2 : $Builtin.NativeObject
@@ -950,7 +950,7 @@
   return %5 : $TupleContainingNonTrivialStruct
 }
 
-sil @aggregates_with_mixed_trivial_nontrivial_types : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @aggregates_with_mixed_trivial_nontrivial_types : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @guaranteed $Builtin.NativeObject, %2 : @unowned $Builtin.NativeObject):
   %3 = integer_literal $Builtin.Int32, 1
   %4 = copy_value %0 : $Builtin.NativeObject
@@ -976,7 +976,7 @@
 // result of mark_dependence to move into the non-lifetime ending use set of the
 // base object, this test should be extended with a negative use-after-free test
 // in over-consume.
-sil @mark_dependence_test : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed RefWithInt) -> () {
+sil [ossa] @mark_dependence_test : $@convention(thin) (@owned Builtin.NativeObject, @guaranteed RefWithInt) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @guaranteed $RefWithInt):
   %2 = alloc_stack $Builtin.Int32
   %3 = integer_literal $Builtin.Int32, 0
@@ -995,7 +995,7 @@
   return %9999 : $()
 }
 
-sil @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned NonTrivialStructWithTrivialField) -> @owned (Builtin.NativeObject, Builtin.Int32, Builtin.NativeObject, Builtin.Int32) {
+sil [ossa] @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned NonTrivialStructWithTrivialField) -> @owned (Builtin.NativeObject, Builtin.Int32, Builtin.NativeObject, Builtin.Int32) {
 bb0(%0 : @owned $(Builtin.NativeObject, Builtin.Int32), %1 : @owned $NonTrivialStructWithTrivialField):
   // First test guaranteed
   %2 = begin_borrow %0 : $(Builtin.NativeObject, Builtin.Int32)
@@ -1013,7 +1013,7 @@
   return %12 : $(Builtin.NativeObject, Builtin.Int32, Builtin.NativeObject, Builtin.Int32)
 }
 
-sil @test_empty_destructure : $@convention(thin) () -> () {
+sil [ossa] @test_empty_destructure : $@convention(thin) () -> () {
 bb0:
   %0 = struct $EmptyStruct()
   () = destructure_struct %0 : $EmptyStruct
@@ -1029,7 +1029,7 @@
 
 // Make sure that we are properly ignoring type dependent operands. These do not
 // have parameter conventions.
-sil @dependent_type : $@convention(thin) (@owned SwiftKlassP) -> () {
+sil [ossa] @dependent_type : $@convention(thin) (@owned SwiftKlassP) -> () {
 bb0(%0 : @owned $SwiftKlassP):
   %1 = begin_borrow %0 : $SwiftKlassP
   %2 = open_existential_ref %1 : $SwiftKlassP to $@opened("3B64717A-E2B3-11E6-9646-985AEB89C610") SwiftKlassP
@@ -1046,7 +1046,7 @@
 // Undef Tests //
 /////////////////
 
-sil @class_method_undef_test : $@convention(thin) () -> () {
+sil [ossa] @class_method_undef_test : $@convention(thin) () -> () {
 bb0:
   %0 = unchecked_ref_cast undef : $Builtin.NativeObject to $SuperKlass
   %1 = class_method %0 : $SuperKlass, #SuperKlass.d!1 : (SuperKlass) -> () -> (), $@convention(method) (@guaranteed SuperKlass) -> ()
@@ -1055,7 +1055,7 @@
   return %9999 : $()
 }
 
-sil @forwarding_instruction_undef_test : $@convention(thin) () -> () {
+sil [ossa] @forwarding_instruction_undef_test : $@convention(thin) () -> () {
 bb0:
   %0 = unchecked_ref_cast undef : $Builtin.NativeObject to $SuperKlass
   %1 = unchecked_ref_cast %0 : $SuperKlass to $Builtin.NativeObject
@@ -1064,7 +1064,7 @@
   return %9999 : $()
 }
 
-sil @transforming_terminator_undef_test : $@convention(thin) () -> () {
+sil [ossa] @transforming_terminator_undef_test : $@convention(thin) () -> () {
 bb0:
   %0 = unchecked_ref_cast undef : $Builtin.NativeObject to $Builtin.NativeObject
   checked_cast_br %0 : $Builtin.NativeObject to $SuperKlass, bb1, bb2
@@ -1082,7 +1082,7 @@
   return %9999 : $()
 }
 
-sil @super_method_metatype_test : $@convention(thin) (@thick SubKlass.Type) -> () {
+sil [ossa] @super_method_metatype_test : $@convention(thin) (@thick SubKlass.Type) -> () {
 bb0(%0 : $@thick SubKlass.Type):
   %1 = upcast %0 : $@thick SubKlass.Type to $@thick SuperKlass.Type
   %2 = class_method %1 : $@thick SuperKlass.Type, #SuperKlass.f!1 : (SuperKlass.Type) -> () -> (), $@convention(method) (@thick SuperKlass.Type) -> ()
@@ -1091,7 +1091,7 @@
   return %9999 : $()
 }
 
-sil @switch_enum_apply_test : $@convention(thin) () -> @owned Builtin.NativeObject {
+sil [ossa] @switch_enum_apply_test : $@convention(thin) () -> @owned Builtin.NativeObject {
 bb0:
   %0 = function_ref @produce_owned_optional : $@convention(thin) () -> @owned Optional<Builtin.NativeObject>
   %1 = apply %0() : $@convention(thin) () -> @owned Optional<Builtin.NativeObject>
@@ -1106,7 +1106,7 @@
 
 // Make sure that we allow for @owned parameters to be passed as @guaranteed
 // parameters since we are performing an "instantaneous" borrow.
-sil @owned_passed_to_guaranteed_apply_parameter : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @owned_passed_to_guaranteed_apply_parameter : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0k(%0 : @owned $Builtin.NativeObject):
   %1 = function_ref @guaranteed_nativeobject_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
   apply %1(%0) : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -1115,7 +1115,7 @@
   return %9999 : $()
 }
 
-sil @owned_partial_apply_used_as_callee_guaranteed : $@convention(thin) () -> () {
+sil [ossa] @owned_partial_apply_used_as_callee_guaranteed : $@convention(thin) () -> () {
 bb0:
   %0 = function_ref @allocate_object : $@convention(thin) () -> @owned Builtin.NativeObject
   %1 = partial_apply %0() : $@convention(thin) () -> @owned Builtin.NativeObject
diff --git a/test/SIL/printer_include_decls.swift b/test/SIL/printer_include_decls.swift
index c176a08..9e53c13 100644
--- a/test/SIL/printer_include_decls.swift
+++ b/test/SIL/printer_include_decls.swift
@@ -1,7 +1,7 @@
 // RUN: rm -f %t.*
 // RUN: %target-swift-frontend -emit-sil %s -o %t.sil
 // RUN: %FileCheck --input-file=%t.sil %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %t.sil -module-name=printer_include_decl | %FileCheck %s
+// RUN: %target-swift-frontend -emit-silgen %t.sil -module-name=printer_include_decl | %FileCheck %s
 
 var x: Int
 // CHECK: var x: Int
diff --git a/test/SIL/restricted-partial-apply.sil b/test/SIL/restricted-partial-apply.sil
index 556f21a..dfe4e89 100644
--- a/test/SIL/restricted-partial-apply.sil
+++ b/test/SIL/restricted-partial-apply.sil
@@ -12,7 +12,7 @@
 sil @g_box_context : $@convention(thin) (@guaranteed <τ_0_0> { var τ_0_0 } <Builtin.Word>) -> ()
 sil @g_class_context : $@convention(thin) (@guaranteed C) -> ()
 
-sil @limited_partial_applies : $@convention(thin) (Builtin.NativeObject, <τ_0_0> { var τ_0_0 } <Builtin.Word>, C) -> () {
+sil [ossa] @limited_partial_applies : $@convention(thin) (Builtin.NativeObject, <τ_0_0> { var τ_0_0 } <Builtin.Word>, C) -> () {
 entry(%0 : @unowned $Builtin.NativeObject, %1 : @unowned $<τ_0_0> { var τ_0_0 } <Builtin.Word>, %2 : @unowned $C):
   %a = function_ref @native_object_context : $@convention(thin) (@owned Builtin.NativeObject) -> ()
   %b = function_ref @box_context : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Builtin.Word>) -> ()
diff --git a/test/SIL/verifier-fail-bb.sil b/test/SIL/verifier-fail-bb.sil
index 634e6ac..4bf89d4 100644
--- a/test/SIL/verifier-fail-bb.sil
+++ b/test/SIL/verifier-fail-bb.sil
@@ -1,4 +1,4 @@
-// RUN: not --crash %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: not --crash %target-sil-opt %s
 // REQUIRES: asserts
 
 sil @no_terminator : $@convention(thin) () -> () {
diff --git a/test/SIL/verifier-fail-instruction.sil b/test/SIL/verifier-fail-instruction.sil
index 2268664..dda958f 100644
--- a/test/SIL/verifier-fail-instruction.sil
+++ b/test/SIL/verifier-fail-instruction.sil
@@ -1,4 +1,4 @@
-// RUN: not --crash %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: not --crash %target-sil-opt %s
 // REQUIRES: asserts
 
 class A {
diff --git a/test/SIL/verifier-init-existential.sil b/test/SIL/verifier-init-existential.sil
index 93bb9c4..dd11733 100644
--- a/test/SIL/verifier-init-existential.sil
+++ b/test/SIL/verifier-init-existential.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s
+// RUN: %target-sil-opt %s
 // REQUIRES: asserts
 
 sil_stage canonical
diff --git a/test/SIL/verifier-value-metatype-lowering.sil b/test/SIL/verifier-value-metatype-lowering.sil
index d4aa37c..475f553 100644
--- a/test/SIL/verifier-value-metatype-lowering.sil
+++ b/test/SIL/verifier-value-metatype-lowering.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift %s
+// RUN: %target-sil-opt -module-name Swift %s
 // REQUIRES: asserts
 //
 // Make sure that we properly verify the lowering of optional value
diff --git a/test/SILGen/NSApplicationMain.swift b/test/SILGen/NSApplicationMain.swift
index 016dbad..9489cfe 100644
--- a/test/SILGen/NSApplicationMain.swift
+++ b/test/SILGen/NSApplicationMain.swift
@@ -12,7 +12,7 @@
 @NSApplicationMain
 class MyDelegate: NSApplicationDelegate {}
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 // CHECK:         function_ref @NSApplicationMain
 // IR-LABEL: define{{( protected)?}} i32 @main
 // IR:            call swiftcc i32 @NSApplicationMain
diff --git a/test/SILGen/SILDeclRef.swift b/test/SILGen/SILDeclRef.swift
index 3430949..2b939aa 100644
--- a/test/SILGen/SILDeclRef.swift
+++ b/test/SILGen/SILDeclRef.swift
@@ -1,5 +1,5 @@
 // RUN: %target-swift-emit-sil %s | %FileCheck %s
-// RUN: %target-swift-emit-sil %s | %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -module-name="SILDeclRef"  - | %FileCheck %s
+// RUN: %target-swift-emit-sil %s | %target-sil-opt -enable-sil-verify-all -module-name="SILDeclRef"  - | %FileCheck %s
 
 // Check that all SILDeclRefs are represented in the text form with a signature.
 // This allows to avoid ambiguities which sometimes arise e.g. when a
diff --git a/test/SILGen/UIApplicationMain.swift b/test/SILGen/UIApplicationMain.swift
index a5ac911..0d1e4ae 100644
--- a/test/SILGen/UIApplicationMain.swift
+++ b/test/SILGen/UIApplicationMain.swift
@@ -29,7 +29,7 @@
 @UIApplicationMain
 class MyDelegate : UIApplicationDelegate {}
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 // CHECK:         function_ref @UIApplicationMain
 // IR-LABEL: define{{( protected)?}} i32 @main
 // IR:            call i32 @UIApplicationMain
diff --git a/test/SILGen/access_marker_gen.swift b/test/SILGen/access_marker_gen.swift
index f879a88..43d8761 100644
--- a/test/SILGen/access_marker_gen.swift
+++ b/test/SILGen/access_marker_gen.swift
@@ -8,7 +8,7 @@
   var o: AnyObject?
 }
 
-// CHECK-LABEL: sil hidden [noinline] @$s17access_marker_gen5initSyAA1SVyXlSgF : $@convention(thin) (@guaranteed Optional<AnyObject>) -> @owned S {
+// CHECK-LABEL: sil hidden [noinline] [ossa] @$s17access_marker_gen5initSyAA1SVyXlSgF : $@convention(thin) (@guaranteed Optional<AnyObject>) -> @owned S {
 // CHECK: bb0(%0 : @guaranteed $Optional<AnyObject>):
 // CHECK: [[BOX:%.*]] = alloc_box ${ var S }, var, name "s"
 // CHECK: [[MARKED_BOX:%.*]] = mark_uninitialized [var] [[BOX]] : ${ var S }
@@ -42,7 +42,7 @@
 @inline(never)
 func takeS(_ s: S) {}
 
-// CHECK-LABEL: sil @$s17access_marker_gen14modifyAndReadSyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @$s17access_marker_gen14modifyAndReadSyyF : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK: %[[BOX:.*]] = alloc_box ${ var S }, var, name "s"
 // CHECK: %[[ADDRS:.*]] = project_box %[[BOX]] : ${ var S }, 0
@@ -66,7 +66,7 @@
   return global.o
 }
 
-// CHECK-LABEL: sil hidden @$s17access_marker_gen10readGlobalyXlSgyF
+// CHECK-LABEL: sil hidden [ossa] @$s17access_marker_gen10readGlobalyXlSgyF
 // CHECK:         [[ADDRESSOR:%.*]] = function_ref @$s17access_marker_gen6globalAA1SVvau :
 // CHECK-NEXT:    [[T0:%.*]] = apply [[ADDRESSOR]]()
 // CHECK-NEXT:    [[T1:%.*]] = pointer_to_address [[T0]] : $Builtin.RawPointer to [strict] $*S
@@ -81,7 +81,7 @@
   var f: Int = 7
   var g: Int = 9
 
-// CHECK-LABEL: sil hidden @$s17access_marker_gen22HasTwoStoredPropertiesV027noOverlapOnAssignFromPropToM0yyF : $@convention(method) (@inout HasTwoStoredProperties) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17access_marker_gen22HasTwoStoredPropertiesV027noOverlapOnAssignFromPropToM0yyF : $@convention(method) (@inout HasTwoStoredProperties) -> ()
 // CHECK:       [[ACCESS1:%.*]] = begin_access [read] [unknown] [[SELF_ADDR:%.*]] : $*HasTwoStoredProperties
 // CHECK-NEXT:  [[G_ADDR:%.*]] = struct_element_addr [[ACCESS1]] : $*HasTwoStoredProperties, #HasTwoStoredProperties.g
 // CHECK-NEXT:  [[G_VAL:%.*]] = load [trivial] [[G_ADDR]] : $*Int
@@ -104,7 +104,7 @@
   let y = c.x
   c.x = y
 }
-// CHECK-LABEL: sil hidden @$s17access_marker_gen27testClassInstanceProperties1cyAA1CC_tF :
+// CHECK-LABEL: sil hidden [ossa] @$s17access_marker_gen27testClassInstanceProperties1cyAA1CC_tF :
 // CHECK: bb0([[C:%.*]] : @guaranteed $C
 // CHECK-NEXT:  debug_value
 // CHECK-NEXT:  [[CX:%.*]] = ref_element_addr [[C]] : $C, #C.x
@@ -121,7 +121,7 @@
   return c.z
 }
 
-// CHECK-LABEL: sil hidden @$s17access_marker_gen20testClassLetProperty1cSiAA1CC_tF : $@convention(thin) (@guaranteed C) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s17access_marker_gen20testClassLetProperty1cSiAA1CC_tF : $@convention(thin) (@guaranteed C) -> Int {
 // CHECK: bb0(%0 : @guaranteed $C):
 // CHECK:   [[ADR:%.*]] = ref_element_addr %{{.*}} : $C, #C.z
 // CHECK-NOT: begin_access
@@ -136,7 +136,7 @@
 }
 
 //   modify
-// CHECK-LABEL: sil hidden [transparent] @$s17access_marker_gen1DC1xSivM
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s17access_marker_gen1DC1xSivM
 // CHECK:       [[T0:%.*]] = ref_element_addr %0 : $D, #D.x
 // CHECK-NEXT:  [[T1:%.*]] = begin_access [modify] [dynamic] [[T0]] : $*Int
 // CHECK:       yield [[T1]] : $*Int
@@ -146,7 +146,7 @@
 func testDispatchedClassInstanceProperty(d: D) {
   modify(&d.x)
 }
-// CHECK-LABEL: sil hidden @$s17access_marker_gen35testDispatchedClassInstanceProperty1dyAA1DC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s17access_marker_gen35testDispatchedClassInstanceProperty1dyAA1DC_tF
 // CHECK:     bb0([[D:%.*]] : @guaranteed $D
 // CHECK:       [[METHOD:%.*]] = class_method [[D]] : $D, #D.x!modify.1
 // CHECK:       begin_apply [[METHOD]]([[D]])
diff --git a/test/SILGen/accessibility_vtables.swift b/test/SILGen/accessibility_vtables.swift
index 7be97ea..4a33979 100644
--- a/test/SILGen/accessibility_vtables.swift
+++ b/test/SILGen/accessibility_vtables.swift
@@ -12,7 +12,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s21accessibility_vtables3SubCACycfc : $@convention(method) (@owned Sub) -> @owned Sub
+// CHECK-LABEL: sil hidden [ossa] @$s21accessibility_vtables3SubCACycfc : $@convention(method) (@owned Sub) -> @owned Sub
 // CHECK:       bb0(%0 : @owned $Sub):
 // CHECK:         function_ref @$ss25_unimplementedInitializer9className04initD04file4line6columns5NeverOs12StaticStringV_A2JS2utF
 
diff --git a/test/SILGen/accessibility_warnings.swift b/test/SILGen/accessibility_warnings.swift
index 8b88ffb..a5ce8a1 100644
--- a/test/SILGen/accessibility_warnings.swift
+++ b/test/SILGen/accessibility_warnings.swift
@@ -7,7 +7,7 @@
 public struct PublicStruct {
   // CHECK-DAG: sil{{( \[.+\])*}} @$s22accessibility_warnings12PublicStructV9publicVarSivg
   public var publicVar = 0
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings12PublicStructVACycfC
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings12PublicStructVACycfC
 }
 
 internal struct InternalStruct {
@@ -18,83 +18,83 @@
   // expected-warning@+1 {{'public(set)' modifier is redundant for a public property}} {{10-22=}}
   public public(set) var publicVarPublicSet = 0
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructV16publicVarGetOnlySivg
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructV16publicVarGetOnlySivg
   public var publicVarGetOnly: Int { return 0 }
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructV15publicVarGetSetSivg
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructV15publicVarGetSetSivg
   public var publicVarGetSet: Int { get { return 0 } set {} }
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructVACycfC
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructVACycfC
 }
 
 private struct PrivateStruct {
   public var publicVar = 0
-  // CHECK-DAG: sil private @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLVADycfC
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLVADycfC
 }
 
 
 extension PublicStruct {
-  // CHECK-DAG: sil @$s22accessibility_warnings12PublicStructV1xACSi_tcfC
+  // CHECK-DAG: sil [ossa] @$s22accessibility_warnings12PublicStructV1xACSi_tcfC
   public init(x: Int) { self.init() }
 
-  // CHECK-DAG: sil @$s22accessibility_warnings12PublicStructV18publicVarExtensionSivg
+  // CHECK-DAG: sil [ossa] @$s22accessibility_warnings12PublicStructV18publicVarExtensionSivg
   public var publicVarExtension: Int { get { return 0 } set {} }
 }
 
 extension InternalStruct {
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructV1xACSi_tcfC
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructV1xACSi_tcfC
   public init(x: Int) { self.init() }
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructV18publicVarExtensionSivg
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructV18publicVarExtensionSivg
   public var publicVarExtension: Int { get { return 0 } set {} }
 }
 
 extension PrivateStruct {
-  // CHECK-DAG: sil private @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV1xADSi_tcfC
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV1xADSi_tcfC
   public init(x: Int) { self.init() }
 
-  // CHECK-DAG: sil private @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV18publicVarExtensionSivg
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV18publicVarExtensionSivg
   public var publicVarExtension: Int { get { return 0 } set {} }
 }
 
 public extension PublicStruct {
-  // CHECK-DAG: sil @$s22accessibility_warnings12PublicStructV09extMemberC0yyF
+  // CHECK-DAG: sil [ossa] @$s22accessibility_warnings12PublicStructV09extMemberC0yyF
   public func extMemberPublic() {} // expected-warning {{'public' modifier is redundant for instance method declared in a public extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings12PublicStructV07extImplC033_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings12PublicStructV07extImplC033_5D2F2E026754A901C0FF90C404896D02LLyyF
   private func extImplPublic() {}
 }
 
 internal extension PublicStruct {
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings12PublicStructV17extMemberInternalyyF
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings12PublicStructV17extMemberInternalyyF
   public func extMemberInternal() {} // expected-warning {{declaring a public instance method in an internal extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings12PublicStructV15extImplInternal33_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings12PublicStructV15extImplInternal33_5D2F2E026754A901C0FF90C404896D02LLyyF
   private func extImplInternal() {}
 }
 private extension PublicStruct {
-  // CHECK-DAG: sil private @$s22accessibility_warnings12PublicStructV16extMemberPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings12PublicStructV16extMemberPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
   public func extMemberPrivate() {} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings12PublicStructV14extImplPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings12PublicStructV14extImplPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
   private func extImplPrivate() {}
 }
 
 internal extension InternalStruct {
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings14InternalStructV09extMemberC0yyF
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings14InternalStructV09extMemberC0yyF
   public func extMemberInternal() {} // expected-warning {{declaring a public instance method in an internal extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings14InternalStructV07extImplC033_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings14InternalStructV07extImplC033_5D2F2E026754A901C0FF90C404896D02LLyyF
   private func extImplInternal() {}
 }
 private extension InternalStruct {
-  // CHECK-DAG: sil private @$s22accessibility_warnings14InternalStructV16extMemberPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings14InternalStructV16extMemberPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
   public func extMemberPrivate() {} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings14InternalStructV14extImplPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings14InternalStructV14extImplPrivate33_5D2F2E026754A901C0FF90C404896D02LLyyF
   private func extImplPrivate() {}
 }
 
 
 private extension PrivateStruct {
-  // CHECK-DAG: sil private @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV09extMemberC0yyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV09extMemberC0yyF
   public func extMemberPrivate() {} // expected-warning {{declaring a public instance method in a private extension}} {{3-10=}}
-  // CHECK-DAG: sil private @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV07extImplC0yyF
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings13PrivateStruct33_5D2F2E026754A901C0FF90C404896D02LLV07extImplC0yyF
   private func extImplPrivate() {}
 }
 
@@ -104,10 +104,10 @@
 }
 
 internal struct PrivateSettersForReadOnlyInternal : PublicReadOnlyOperations {
-  // CHECK-DAG: sil hidden{{( \[.+\])*}} @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalV4sizeSivg
+  // CHECK-DAG: sil hidden{{( \[.+\])*}} [ossa] @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalV4sizeSivg
   public private(set) var size = 0
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalVyS2icig
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalVyS2icis
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalVyS2icig
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings33PrivateSettersForReadOnlyInternalVyS2icis
   internal private(set) subscript (_: Int) -> Int { // no-warning
     get { return 42 }
     set {}
@@ -118,31 +118,31 @@
 public class PublicClass {
   // CHECK-DAG: sil{{( \[.+\])*}} @$s22accessibility_warnings11PublicClassC9publicVarSivg
   public var publicVar = 0
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings11PublicClassCACycfc
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings11PublicClassCACycfc
 }
 
 internal class InternalClass {
-  // CHECK-DAG: sil hidden{{( \[.+\])*}} @$s22accessibility_warnings13InternalClassC9publicVarSivg
+  // CHECK-DAG: sil hidden{{( \[.+\])*}} [ossa] @$s22accessibility_warnings13InternalClassC9publicVarSivg
   public var publicVar = 0
 
-  // CHECK-DAG: sil hidden [transparent] @$s22accessibility_warnings13InternalClassC19publicVarPrivateSetSivg
+  // CHECK-DAG: sil hidden [transparent] [ossa] @$s22accessibility_warnings13InternalClassC19publicVarPrivateSetSivg
   public private(set) var publicVarPrivateSet = 0
 
   // expected-warning@+1 {{'public(set)' modifier is redundant for a public property}} {{10-22=}}
   public public(set) var publicVarPublicSet = 0
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings13InternalClassC16publicVarGetOnlySivg
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings13InternalClassC16publicVarGetOnlySivg
   public var publicVarGetOnly: Int { return 0 }
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings13InternalClassC15publicVarGetSetSivg
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings13InternalClassC15publicVarGetSetSivg
   public var publicVarGetSet: Int { get { return 0 } set {} }
 
-  // CHECK-DAG: sil hidden @$s22accessibility_warnings13InternalClassCACycfc
+  // CHECK-DAG: sil hidden [ossa] @$s22accessibility_warnings13InternalClassCACycfc
 }
 
 private class PrivateClass {
-  // CHECK-DAG: sil private{{( \[.+\])*}} @$s22accessibility_warnings12PrivateClass33_5D2F2E026754A901C0FF90C404896D02LLC9publicVarSivg
+  // CHECK-DAG: sil private{{( \[.+\])*}} [ossa] @$s22accessibility_warnings12PrivateClass33_5D2F2E026754A901C0FF90C404896D02LLC9publicVarSivg
   public var publicVar = 0
-  // CHECK-DAG: sil private @$s22accessibility_warnings12PrivateClass33_5D2F2E026754A901C0FF90C404896D02LLCADycfc
+  // CHECK-DAG: sil private [ossa] @$s22accessibility_warnings12PrivateClass33_5D2F2E026754A901C0FF90C404896D02LLCADycfc
 }
 
diff --git a/test/SILGen/accessors.swift b/test/SILGen/accessors.swift
index 5c5c8ea..5159458 100644
--- a/test/SILGen/accessors.swift
+++ b/test/SILGen/accessors.swift
@@ -26,7 +26,7 @@
 func test0(_ ref: A) {
   ref.array[index0()] = ref.array[index1()]
 }
-// CHECK: sil hidden @$s9accessors5test0yyAA1ACF : $@convention(thin) (@guaranteed A) -> () {
+// CHECK: sil hidden [ossa] @$s9accessors5test0yyAA1ACF : $@convention(thin) (@guaranteed A) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $A):
 // CHECK-NEXT: debug_value
 //   Formal evaluation of LHS.
@@ -69,7 +69,7 @@
 func test1(_ ref: B) {
   ref.array[index0()] = ref.array[index1()]
 }
-// CHECK-LABEL: sil hidden @$s9accessors5test1yyAA1BCF : $@convention(thin) (@guaranteed B) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s9accessors5test1yyAA1BCF : $@convention(thin) (@guaranteed B) -> () {
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $B):
 // CHECK-NEXT: debug_value
 //   Formal evaluation of LHS.
@@ -112,7 +112,7 @@
   return outer.inner[0]
 }
 // This uses the immutable addressor.
-// CHECK: sil hidden @$s9accessors8test_recySiAA8RecOuterVzF : $@convention(thin) (@inout RecOuter) -> Int {
+// CHECK: sil hidden [ossa] @$s9accessors8test_recySiAA8RecOuterVzF : $@convention(thin) (@inout RecOuter) -> Int {
 // CHECK:   function_ref @$s9accessors8RecOuterV5innerAA0B5InnerVvlu : $@convention(method) (RecOuter) -> UnsafePointer<RecInner>
 
 struct Rec2Inner {
@@ -130,39 +130,39 @@
   return outer.inner[0]
 }
 // This uses the mutable addressor.
-// CHECK: sil hidden @$s9accessors9test_rec2ySiAA9Rec2OuterVzF : $@convention(thin) (@inout Rec2Outer) -> Int {
+// CHECK: sil hidden [ossa] @$s9accessors9test_rec2ySiAA9Rec2OuterVzF : $@convention(thin) (@inout Rec2Outer) -> Int {
 // CHECK:   function_ref @$s9accessors9Rec2OuterV5innerAA0B5InnerVvau : $@convention(method) (@inout Rec2Outer) -> UnsafeMutablePointer<Rec2Inner>
 
 struct Foo {
   private subscript(privateSubscript x: Void) -> Void {
-    // CHECK-DAG: sil private @$s9accessors3FooV16privateSubscriptyyt_tc33_D7F31B09EE737C687DC580B2014D759CLlig : $@convention(method) (Foo) -> () {
+    // CHECK-DAG: sil private [ossa] @$s9accessors3FooV16privateSubscriptyyt_tc33_D7F31B09EE737C687DC580B2014D759CLlig : $@convention(method) (Foo) -> () {
     get {}
   }
   private(set) subscript(withPrivateSet x: Void) -> Void {
-    // CHECK-DAG: sil hidden @$s9accessors3FooV14withPrivateSetyyt_tcig : $@convention(method) (Foo) -> () {
+    // CHECK-DAG: sil hidden [ossa] @$s9accessors3FooV14withPrivateSetyyt_tcig : $@convention(method) (Foo) -> () {
     get {}
-    // CHECK-DAG: sil hidden @$s9accessors3FooV14withPrivateSetyyt_tcis : $@convention(method) (@inout Foo) -> () {
+    // CHECK-DAG: sil hidden [ossa] @$s9accessors3FooV14withPrivateSetyyt_tcis : $@convention(method) (@inout Foo) -> () {
     set {}
   }
   subscript(withNestedClass x: Void) -> Void {
     // Check for initializer of NestedClass
-    // CHECK-DAG: sil private @$s9accessors3FooV15withNestedClassyyt_tcig0dE0L_CAFycfc : $@convention(method) (@owned NestedClass) -> @owned NestedClass {
+    // CHECK-DAG: sil private [ossa] @$s9accessors3FooV15withNestedClassyyt_tcig0dE0L_CAFycfc : $@convention(method) (@owned NestedClass) -> @owned NestedClass {
     class NestedClass {}
   }
 
-  // CHECK-DAG: sil private @$s9accessors3FooV15privateVariable33_D7F31B09EE737C687DC580B2014D759CLLytvg : $@convention(method) (Foo) -> () {
+  // CHECK-DAG: sil private [ossa] @$s9accessors3FooV15privateVariable33_D7F31B09EE737C687DC580B2014D759CLLytvg : $@convention(method) (Foo) -> () {
   private var privateVariable: Void {
     return
   }
   private(set) var variableWithPrivateSet: Void {
-    // CHECK-DAG: sil hidden @$s9accessors3FooV22variableWithPrivateSetytvg : $@convention(method) (Foo) -> () {
+    // CHECK-DAG: sil hidden [ossa] @$s9accessors3FooV22variableWithPrivateSetytvg : $@convention(method) (Foo) -> () {
     get {}
-    // CHECK-DAG: sil hidden @$s9accessors3FooV22variableWithPrivateSetytvs : $@convention(method) (@inout Foo) -> () {
+    // CHECK-DAG: sil hidden [ossa] @$s9accessors3FooV22variableWithPrivateSetytvs : $@convention(method) (@inout Foo) -> () {
     set {}
   }
   var propertyWithNestedClass: Void {
     // Check for initializer of NestedClass
-    // CHECK-DAG: sil private @$s9accessors3FooV23propertyWithNestedClassytvg0eF0L_CAFycfc : $@convention(method) (@owned NestedClass) -> @owned NestedClass {
+    // CHECK-DAG: sil private [ossa] @$s9accessors3FooV23propertyWithNestedClassytvg0eF0L_CAFycfc : $@convention(method) (@owned NestedClass) -> @owned NestedClass {
     class NestedClass {}
   }
 }
diff --git a/test/SILGen/address_only_types.swift b/test/SILGen/address_only_types.swift
index 388309a..389048e 100644
--- a/test/SILGen/address_only_types.swift
+++ b/test/SILGen/address_only_types.swift
@@ -13,7 +13,7 @@
   var loadable_prop : Int { get }
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B9_argument{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B9_argument{{[_0-9a-zA-Z]*}}F
 func address_only_argument(_ x: Unloadable) {
   // CHECK: bb0([[XARG:%[0-9]+]] : $*Unloadable):
   // CHECK: debug_value_addr [[XARG]]
@@ -21,14 +21,14 @@
   // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B17_ignored_argument{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B17_ignored_argument{{[_0-9a-zA-Z]*}}F
 func address_only_ignored_argument(_: Unloadable) {
   // CHECK: bb0([[XARG:%[0-9]+]] : $*Unloadable):
   // CHECK-NOT: dealloc_stack {{.*}} [[XARG]]
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B7_return{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B7_return{{[_0-9a-zA-Z]*}}F
 func address_only_return(_ x: Unloadable, y: Int) -> Unloadable {
   // CHECK: bb0([[RET:%[0-9]+]] : $*Unloadable, [[XARG:%[0-9]+]] : $*Unloadable, [[YARG:%[0-9]+]] : $Builtin.Int64):
   // CHECK-NEXT: debug_value_addr [[XARG]] : $*Unloadable, let, name "x"
@@ -39,12 +39,12 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B15_missing_return{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B15_missing_return{{[_0-9a-zA-Z]*}}F
 func address_only_missing_return() -> Unloadable {
   // CHECK: unreachable
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B27_conditional_missing_return{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B27_conditional_missing_return{{[_0-9a-zA-Z]*}}F
 func address_only_conditional_missing_return(_ x: Unloadable) -> Unloadable {
   // CHECK: bb0({{%.*}} : $*Unloadable, {{%.*}} : $*Unloadable):
   // CHECK:   switch_enum {{%.*}}, case #Bool.true_!enumelt: [[TRUE:bb[0-9]+]], case #Bool.false_!enumelt: [[FALSE:bb[0-9]+]]
@@ -61,7 +61,7 @@
   // CHECK:   unreachable
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B29_conditional_missing_return_2
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B29_conditional_missing_return_2
 func address_only_conditional_missing_return_2(_ x: Unloadable) -> Unloadable {
   // CHECK: bb0({{%.*}} : $*Unloadable, {{%.*}} : $*Unloadable):
   // CHECK:   switch_enum {{%.*}}, case #Bool.true_!enumelt: [[TRUE1:bb[0-9]+]], case #Bool.false_!enumelt: [[FALSE1:bb[0-9]+]]
@@ -90,7 +90,7 @@
 func some_address_only_function_1() -> Unloadable { return crap }
 func some_address_only_function_2(_ x: Unloadable) -> () {}
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B7_call_1
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B7_call_1
 func address_only_call_1() -> Unloadable {
   // CHECK: bb0([[RET:%[0-9]+]] : $*Unloadable):
   return some_address_only_function_1()
@@ -100,7 +100,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B21_call_1_ignore_returnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B21_call_1_ignore_returnyyF
 func address_only_call_1_ignore_return() {
   // CHECK: bb0:
   some_address_only_function_1()
@@ -112,7 +112,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B7_call_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B7_call_2{{[_0-9a-zA-Z]*}}F
 func address_only_call_2(_ x: Unloadable) {
   // CHECK: bb0([[XARG:%[0-9]+]] : $*Unloadable):
   // CHECK: debug_value_addr [[XARG]] : $*Unloadable
@@ -122,7 +122,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B12_call_1_in_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B12_call_1_in_2{{[_0-9a-zA-Z]*}}F
 func address_only_call_1_in_2() {
   // CHECK: bb0:
   some_address_only_function_2(some_address_only_function_1())
@@ -135,7 +135,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B12_materialize{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B12_materialize{{[_0-9a-zA-Z]*}}F
 func address_only_materialize() -> Int {
   // CHECK: bb0:
   return some_address_only_function_1().foo()
@@ -150,7 +150,7 @@
   // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B21_assignment_from_temp{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B21_assignment_from_temp{{[_0-9a-zA-Z]*}}F
 func address_only_assignment_from_temp(_ dest: inout Unloadable) {
   // CHECK: bb0([[DEST:%[0-9]+]] : $*Unloadable):
   dest = some_address_only_function_1()
@@ -161,7 +161,7 @@
   // CHECK: dealloc_stack [[TEMP]]
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B19_assignment_from_lv{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B19_assignment_from_lv{{[_0-9a-zA-Z]*}}F
 func address_only_assignment_from_lv(_ dest: inout Unloadable, v: Unloadable) {
   var v = v
   // CHECK: bb0([[DEST:%[0-9]+]] : $*Unloadable, [[VARG:%[0-9]+]] : $*Unloadable):
@@ -184,7 +184,7 @@
   set {}
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B33_assignment_from_temp_to_property{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B33_assignment_from_temp_to_property{{[_0-9a-zA-Z]*}}F
 func address_only_assignment_from_temp_to_property() {
   // CHECK: bb0:
   global_prop = some_address_only_function_1()
@@ -194,7 +194,7 @@
   // CHECK: dealloc_stack [[TEMP]]
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B31_assignment_from_lv_to_property{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B31_assignment_from_lv_to_property{{[_0-9a-zA-Z]*}}F
 func address_only_assignment_from_lv_to_property(_ v: Unloadable) {
   // CHECK: bb0([[VARG:%[0-9]+]] : $*Unloadable):
   // CHECK: debug_value_addr [[VARG]] : $*Unloadable
@@ -206,7 +206,7 @@
   global_prop = v
 }
 
-// CHECK-LABEL: sil hidden @$s18address_only_types0a1_B4_varAA10Unloadable_pyF
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types0a1_B4_varAA10Unloadable_pyF
 func address_only_var() -> Unloadable {
   // CHECK: bb0([[RET:%[0-9]+]] : $*Unloadable):
   var x = some_address_only_function_1()
@@ -223,7 +223,7 @@
 func unloadable_to_unloadable(_ x: Unloadable) -> Unloadable { return x }
 var some_address_only_nontuple_arg_function : (Unloadable) -> Unloadable = unloadable_to_unloadable
 
-// CHECK-LABEL: sil hidden @$s18address_only_types05call_a1_B22_nontuple_arg_function{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18address_only_types05call_a1_B22_nontuple_arg_function{{[_0-9a-zA-Z]*}}F
 func call_address_only_nontuple_arg_function(_ x: Unloadable) {
   some_address_only_nontuple_arg_function(x)
 }
diff --git a/test/SILGen/addressors.swift b/test/SILGen/addressors.swift
index 863b460..091a6f1 100644
--- a/test/SILGen/addressors.swift
+++ b/test/SILGen/addressors.swift
@@ -104,7 +104,7 @@
   unsafeAddress {
     return UnsafePointer(uninitAddr)
   }
-// CHECK: sil hidden @$s10addressors6globals5Int32Vvlu : $@convention(thin) () -> UnsafePointer<Int32> {
+// CHECK-LABEL: sil hidden @$s10addressors6globals5Int32Vvlu : $@convention(thin) () -> UnsafePointer<Int32> {
 // CHECK:   [[T0:%.*]] = global_addr @$s10addressors10uninitAddrSpys5Int32VGvp : $*UnsafeMutablePointer<Int32>
 // CHECK:   [[T1:%.*]] = load [[T0]] : $*UnsafeMutablePointer<Int32>
 // CHECK:   [[T2:%.*]] = struct_extract [[T1]] : $UnsafeMutablePointer<Int32>, #UnsafeMutablePointer._rawValue
@@ -199,7 +199,7 @@
   }
 }
 // Setter.
-// SILGEN-LABEL: sil hidden [transparent] @$s10addressors1DVys5Int32VAEcis
+// SILGEN-LABEL: sil hidden [transparent] [ossa] @$s10addressors1DVys5Int32VAEcis
 // SILGEN: bb0([[VALUE:%.*]] : $Int32, [[I:%.*]] : $Int32, [[SELF:%.*]] : $*D):
 // SILGEN:   debug_value [[VALUE]] : $Int32
 // SILGEN:   debug_value [[I]] : $Int32
@@ -212,7 +212,7 @@
 // SILGEN:   [[ACCESS:%.*]] = begin_access [modify] [unsafe] [[ADDR]] : $*Int32
 // SILGEN:   assign [[VALUE]] to [[ACCESS]] : $*Int32
 
-// SILGEN-LABEL: sil hidden [transparent] @$s10addressors1DVys5Int32VAEciM
+// SILGEN-LABEL: sil hidden [transparent] [ossa] @$s10addressors1DVys5Int32VAEciM
 // SILGEN: bb0([[I:%.*]] : $Int32, [[SELF:%.*]] : $*D):
 // SILGEN:   [[SELF_ACCESS:%.*]] = begin_access [modify] [unknown] [[SELF]]
 // SILGEN:   [[T0:%.*]] = function_ref @$s10addressors1DVys5Int32VAEciau
diff --git a/test/SILGen/argument_labels.swift b/test/SILGen/argument_labels.swift
index 024f9e8..53acffe 100644
--- a/test/SILGen/argument_labels.swift
+++ b/test/SILGen/argument_labels.swift
@@ -9,7 +9,7 @@
   func doSomethingElse(x: X) { }
 }
 
-// CHECK-LABEL: sil hidden @$s15argument_labels7testFoo{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s15argument_labels7testFoo{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Foo,
 func testFoo(foo: Foo, x: X, y: Y) {
   // CHECK: class_method [[ARG0]] : $Foo, #Foo.doSomething!1 : (Foo) -> (X, Y) -> ()
diff --git a/test/SILGen/arguments.swift b/test/SILGen/arguments.swift
index 0cafa4e..d010489 100644
--- a/test/SILGen/arguments.swift
+++ b/test/SILGen/arguments.swift
@@ -19,13 +19,13 @@
 var i:Int, f:Float, c:UnicodeScalar
 
 func arg_tuple(x: Int, y: Float) {}
-// CHECK-LABEL: sil hidden @$ss9arg_tuple1x1yySi_SftF
+// CHECK-LABEL: sil hidden [ossa] @$ss9arg_tuple1x1yySi_SftF
 // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Float):
 
 arg_tuple(x: i, y: f)
 
 func arg_deep_tuples(x: Int, y: (Float, UnicodeScalar)) {}
-// CHECK-LABEL: sil hidden @$ss15arg_deep_tuples1x1yySi_Sf_ScttF
+// CHECK-LABEL: sil hidden [ossa] @$ss15arg_deep_tuples1x1yySi_Sf_ScttF
 // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y_0:%[0-9]+]] : $Float, [[Y_1:%[0-9]+]] : $UnicodeScalar):
 
 arg_deep_tuples(x:i, y:(f, c))
@@ -37,7 +37,7 @@
 arg_deep_tuples(x:i, y: named_subtuple)
 
 func arg_deep_tuples_2(x: Int, _: (y: Float, z: UnicodeScalar)) {}
-// CHECK-LABEL: sil hidden @$ss17arg_deep_tuples_21x_ySi_Sf1y_Sc1zttF
+// CHECK-LABEL: sil hidden [ossa] @$ss17arg_deep_tuples_21x_ySi_Sf1y_Sc1zttF
 // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Float, [[Z:%[0-9]+]] : $UnicodeScalar):
 
 arg_deep_tuples_2(x: i, (f, c))
@@ -48,7 +48,7 @@
 //arg_deep_tuples_2(deep_named_tuple)
 
 func arg_default_tuple(x x: Int = i, y: Float = f) {}
-// CHECK-LABEL: sil hidden @$ss17arg_default_tuple1x1yySi_SftF
+// CHECK-LABEL: sil hidden [ossa] @$ss17arg_default_tuple1x1yySi_SftF
 // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Float):
 
 arg_default_tuple()
@@ -58,7 +58,7 @@
 
 
 func variadic_arg_1(_ x: Int...) {}
-// CHECK-LABEL: sil hidden @$ss14variadic_arg_1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss14variadic_arg_1{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[X:%[0-9]+]] : $Array<Int>):
 
 variadic_arg_1()
@@ -67,7 +67,7 @@
 
 
 func variadic_arg_2(_ x: Int, _ y: Float...) {}
-// CHECK-LABEL: sil hidden @$ss14variadic_arg_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss14variadic_arg_2{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Array<Float>):
 
 variadic_arg_2(i)
@@ -75,7 +75,7 @@
 variadic_arg_2(i, f, f, f)
 
 func variadic_arg_3(_ y: Float..., x: Int) {}
-// CHECK-LABEL: sil hidden @$ss14variadic_arg_3{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss14variadic_arg_3{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[Y:%[0-9]+]] : $Array<Float>, [[X:%[0-9]+]] : $Int):
 
 variadic_arg_3(x: i)
diff --git a/test/SILGen/arguments_as_tuple_overloads.swift b/test/SILGen/arguments_as_tuple_overloads.swift
index 301fd3b..3afb290 100644
--- a/test/SILGen/arguments_as_tuple_overloads.swift
+++ b/test/SILGen/arguments_as_tuple_overloads.swift
@@ -4,58 +4,58 @@
 // subscripts correctly.
 
 public struct Pair {
-  // CHECK: sil @$s4test4PairVyACSi_SitcfC :
+  // CHECK: sil [ossa] @$s4test4PairVyACSi_SitcfC :
   public init(_ a: Int, _ b: Int) {
   }
 
-  // CHECK: sil @$s4test4PairVyACSi_Sit_tcfC :
+  // CHECK: sil [ossa] @$s4test4PairVyACSi_Sit_tcfC :
   public init(_ t: (Int, Int)) {
   }
 
-  // CHECK: sil @$s4test4PairVAAyySi_SitF :
+  // CHECK: sil [ossa] @$s4test4PairVAAyySi_SitF :
   public func test(_ a: Int, _ b: Int) {
   }
 
-  // CHECK: sil @$s4test4PairVAAyySi_Sit_tF :
+  // CHECK: sil [ossa] @$s4test4PairVAAyySi_Sit_tF :
   public func test(_ t: (Int, Int)) {
   }
 
-  // CHECK: sil @$s4test4PairVyS2i_Sitcig :
+  // CHECK: sil [ossa] @$s4test4PairVyS2i_Sitcig :
   public subscript(_:Int, _:Int) -> Int {
       get { return 0 }
   }
 
-  // CHECK: sil @$s4test4PairVyS2i_Sit_tcig :
+  // CHECK: sil [ossa] @$s4test4PairVyS2i_Sit_tcig :
   public subscript(_:(Int, Int)) -> Int {
       get { return 0 }
   }
 }
 
-// CHECK: sil @$s4testAAyySi_SitF :
+// CHECK: sil [ossa] @$s4testAAyySi_SitF :
 public func test(_ a: Int, _ b: Int) {
 }
 
-// CHECK: sil @$s4testAAyySi_Sit_tF :
+// CHECK: sil [ossa] @$s4testAAyySi_Sit_tF :
 public func test(_ t: (Int, Int)) {
 }
 
-// CHECK: sil @$s4test0A7NoLabelyySi_Sit_tF :
+// CHECK: sil [ossa] @$s4test0A7NoLabelyySi_Sit_tF :
 public func testNoLabel(_: (Int, Int)) {
 }
 
-// CHECK: sil @$s4test0A5FnArgyyySi_SitXEF :
+// CHECK: sil [ossa] @$s4test0A5FnArgyyySi_SitXEF :
 public func testFnArg(_: (Int, Int) -> Void) {
 }
 
-// CHECK: sil @$s4test0A5FnArgyyySi_Sit_tXEF :
+// CHECK: sil [ossa] @$s4test0A5FnArgyyySi_Sit_tXEF :
 public func testFnArg(_: ((Int, Int)) -> Void) {
 }
 
-// CHECK: sil @$s4test3fooyyyt_tF :
+// CHECK: sil [ossa] @$s4test3fooyyyt_tF :
 public func foo(_: ()) {
 }
 
-// CHECK: sil @$s4test3fooyyF :
+// CHECK: sil [ossa] @$s4test3fooyyF :
 public func foo() {
 }
 
diff --git a/test/SILGen/array_literal_abstraction.swift b/test/SILGen/array_literal_abstraction.swift
index 2e013100..d63c59c 100644
--- a/test/SILGen/array_literal_abstraction.swift
+++ b/test/SILGen/array_literal_abstraction.swift
@@ -4,13 +4,13 @@
 // Verify that reabstraction happens when forming container literals.
 // <rdar://problem/16039286>
 
-// CHECK-LABEL: sil hidden @$s25array_literal_abstraction0A9_of_funcsSayyycGyF
+// CHECK-LABEL: sil hidden [ossa] @$s25array_literal_abstraction0A9_of_funcsSayyycGyF
 // CHECK:         pointer_to_address {{.*}} $*@callee_guaranteed () -> @out ()
 func array_of_funcs() -> [(() -> ())] {
   return [{}, {}]
 }
 
-// CHECK-LABEL: sil hidden @$s25array_literal_abstraction13dict_of_funcsSDySiyycGyF
+// CHECK-LABEL: sil hidden [ossa] @$s25array_literal_abstraction13dict_of_funcsSDySiyycGyF
 // CHECK:         pointer_to_address {{.*}} $*(Int, @callee_guaranteed () -> @out ())
 func dict_of_funcs() -> Dictionary<Int, () -> ()> {
   return [0: {}, 1: {}]
@@ -18,7 +18,7 @@
 
 func vararg_funcs(_ fs: (() -> ())...) {}
 
-// CHECK-LABEL: sil hidden @$s25array_literal_abstraction17call_vararg_funcsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s25array_literal_abstraction17call_vararg_funcsyyF
 // CHECK:         pointer_to_address {{.*}} $*@callee_guaranteed () -> @out ()
 func call_vararg_funcs() {
   vararg_funcs({}, {})
diff --git a/test/SILGen/assignment.swift b/test/SILGen/assignment.swift
index efd0029..3b8d6d4 100644
--- a/test/SILGen/assignment.swift
+++ b/test/SILGen/assignment.swift
@@ -7,7 +7,7 @@
 
 var a = A()
 
-// CHECK-LABEL: sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
+// CHECK-LABEL: sil [ossa] @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
 // CHECK: assign {{%.*}} to {{%.*}} : $*A
 // CHECK: destroy_value {{%.*}} : $B
 // CHECK: } // end sil function 'main'
@@ -16,7 +16,7 @@
 class D { var child: C = C() }
 
 // Verify that the LHS is formally evaluated before the RHS.
-// CHECK-LABEL: sil hidden @$s10assignment5test1yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10assignment5test1yyF : $@convention(thin) () -> () {
 func test1() {
   // CHECK: [[T0:%.*]] = metatype $@thick D.Type
   // CHECK: [[CTOR:%.*]] = function_ref @$s10assignment1DC{{[_0-9a-zA-Z]*}}fC
@@ -38,7 +38,7 @@
 
 // Verify that the access to the LHS does not begin until after the
 // RHS is formally evaluated.
-// CHECK-LABEL: sil hidden @$s10assignment15copyRightToLeft1pyAA1P_pz_tF : $@convention(thin) (@inout P) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10assignment15copyRightToLeft1pyAA1P_pz_tF : $@convention(thin) (@inout P) -> () {
 func copyRightToLeft(p: inout P) {
   // CHECK: bb0(%0 : $*P):
   // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] %0 : $*P
@@ -49,3 +49,12 @@
   // CHECK:   end_access [[WRITE]] : $*P
   p.left = p.right
 }
+
+// SR-5919
+func stupidGames() -> ((), ()) {
+  return ((), ())
+}
+
+func assignToNestedVoid() {
+  let _: ((), ()) = stupidGames()
+}
\ No newline at end of file
diff --git a/test/SILGen/auto_closures.swift b/test/SILGen/auto_closures.swift
index c0b42f2..7ed92e8 100644
--- a/test/SILGen/auto_closures.swift
+++ b/test/SILGen/auto_closures.swift
@@ -4,7 +4,7 @@
 struct Bool {}
 var false_ = Bool()
 
-// CHECK-LABEL: sil hidden @$s13auto_closures05call_A8_closureyAA4BoolVADyXKF : $@convention(thin) (@noescape @callee_guaranteed () -> Bool) -> Bool
+// CHECK-LABEL: sil hidden [ossa] @$s13auto_closures05call_A8_closureyAA4BoolVADyXKF : $@convention(thin) (@noescape @callee_guaranteed () -> Bool) -> Bool
 func call_auto_closure(_ x: @autoclosure () -> Bool) -> Bool {
   // CHECK: bb0([[CLOSURE:%.*]] : $@noescape @callee_guaranteed () -> Bool):
   // CHECK: [[RET:%.*]] = apply [[CLOSURE]]()
@@ -12,7 +12,7 @@
   return x()
 }
 
-// CHECK-LABEL: sil hidden @$s13auto_closures05test_A21_closure_with_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13auto_closures05test_A21_closure_with_capture{{[_0-9a-zA-Z]*}}F
 func test_auto_closure_with_capture(_ x: Bool) -> Bool {
   // CHECK: [[CLOSURE:%.*]] = function_ref @$s13auto_closures05test_A21_closure_with_capture
   // CHECK: [[WITHCAPTURE:%.*]] = partial_apply [callee_guaranteed] [[CLOSURE]](
@@ -22,7 +22,7 @@
   return call_auto_closure(x)
 }
 
-// CHECK-LABEL: sil hidden @$s13auto_closures05test_A24_closure_without_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13auto_closures05test_A24_closure_without_capture{{[_0-9a-zA-Z]*}}F
 func test_auto_closure_without_capture() -> Bool {
   // CHECK: [[CLOSURE:%.*]] = function_ref @$s13auto_closures05test_A24_closure_without_capture
   // CHECK: [[CVT:%.*]] = convert_function [[CLOSURE]]
@@ -37,7 +37,7 @@
 }
 
 public class Sub : Base {
-  // CHECK-LABEL: sil hidden @$s13auto_closures3SubC1xAA4BoolVvg : $@convention(method) (@guaranteed Sub) -> Bool {
+  // CHECK-LABEL: sil hidden [ossa] @$s13auto_closures3SubC1xAA4BoolVvg : $@convention(method) (@guaranteed Sub) -> Bool {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $Sub):
   // CHECK: [[AUTOCLOSURE_FUNC:%.*]] = function_ref @$s13auto_closures3SubC1xAA4BoolVvgAFyXEfu_ : $@convention(thin) (@guaranteed Sub) -> Bool
   // CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -48,18 +48,18 @@
   // CHECK: return [[RET]] : $Bool
   // CHECK: }
 
-  // CHECK-LABEL: sil private [transparent] @$s13auto_closures3SubC1xAA4BoolVvgAFyXEfu_ : $@convention(thin) (@guaranteed Sub) -> Bool {
+  // CHECK-LABEL: sil private [transparent] [ossa] @$s13auto_closures3SubC1xAA4BoolVvgAFyXEfu_ : $@convention(thin) (@guaranteed Sub) -> Bool {
   // CHECK: [[SUPER:%[0-9]+]] = function_ref @$s13auto_closures4BaseC1xAA4BoolVvg : $@convention(method) (@guaranteed Base) -> Bool
   // CHECK: [[RET:%.*]] = apply [[SUPER]]({{%.*}})
   // CHECK: return [[RET]]
   override var x: Bool { return call_auto_closure(super.x) }
 }
 
-// CHECK-LABEL: sil hidden @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtF : $@convention(thin) (Bool, Bool) -> Bool {
+// CHECK-LABEL: sil hidden [ossa] @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtF : $@convention(thin) (Bool, Bool) -> Bool {
 // CHECK: }
-// CHECK-LABEL: sil private [transparent] @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtFADyXEfu_ : $@convention(thin) (Bool, Bool) -> Bool {
+// CHECK-LABEL: sil private [transparent] [ossa] @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtFADyXEfu_ : $@convention(thin) (Bool, Bool) -> Bool {
 // CHECK: }
-// CHECK-LABEL: sil private @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtFADyXEfu_A2DXEfU_ : $@convention(thin) (Bool, Bool) -> Bool {
+// CHECK-LABEL: sil private [ossa] @$s13auto_closures20closureInAutoclosureyAA4BoolVAD_ADtFADyXEfu_A2DXEfU_ : $@convention(thin) (Bool, Bool) -> Bool {
 // CHECK: }
 func compareBool(_ lhs: Bool, _ rhs: Bool) -> Bool { return false_ }
 func testBool(_ x: Bool, _ pred: (Bool) -> Bool) -> Bool {
diff --git a/test/SILGen/auto_generated_super_init_call.swift b/test/SILGen/auto_generated_super_init_call.swift
index 4b95506..29499fa 100644
--- a/test/SILGen/auto_generated_super_init_call.swift
+++ b/test/SILGen/auto_generated_super_init_call.swift
@@ -12,7 +12,7 @@
 
   override init() {
     y = 42
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned SomeDerivedClass) -> @owned SomeDerivedClass
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned SomeDerivedClass) -> @owned SomeDerivedClass
 // CHECK: integer_literal $Builtin.IntLiteral, 42
 // CHECK: [[SELFLOAD:%[0-9]+]] = load [take] [[SELF:%[0-9]+]] : $*SomeDerivedClass
 // CHECK-NEXT: [[PARENT:%[0-9]+]] = upcast [[SELFLOAD]] : $SomeDerivedClass to $Parent
@@ -25,7 +25,7 @@
   
   init(x: Int) {
     y = x
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Int, @owned SomeDerivedClass) -> @owned SomeDerivedClass
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Int, @owned SomeDerivedClass) -> @owned SomeDerivedClass
 // CHECK: function_ref @$s30auto_generated_super_init_call6ParentCACycfc : $@convention(method) (@owned Parent) -> @owned Parent
   }
 
@@ -39,7 +39,7 @@
     return
 // Check that we are emitting the super.init expr into the epilog block.
     
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Bool, @owned SomeDerivedClass) -> @owned SomeDerivedClass    
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Bool, @owned SomeDerivedClass) -> @owned SomeDerivedClass    
 // CHECK: bb5:
 // SEMANTIC ARC TODO: Another case of needing a mutable load_borrow.
 // CHECK-NEXT: [[SELFLOAD:%[0-9]+]] = load [take] [[SELF:%[0-9]+]] : $*SomeDerivedClass
@@ -64,7 +64,7 @@
     }
       
     super.init()
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Bool, Int, @owned SomeDerivedClass) -> @owned SomeDerivedClass    
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call16SomeDerivedClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Bool, Int, @owned SomeDerivedClass) -> @owned SomeDerivedClass    
 // CHECK: function_ref @$s30auto_generated_super_init_call6ParentCACycfc : $@convention(method) (@owned Parent) -> @owned Parent
 // CHECK: return
   }
@@ -73,7 +73,7 @@
 // Check that we do call super.init.
 class HasNoIVars : Parent {
   override init() {
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call10HasNoIVarsC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned HasNoIVars) -> @owned HasNoIVars
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call10HasNoIVarsC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned HasNoIVars) -> @owned HasNoIVars
 // CHECK: function_ref @$s30auto_generated_super_init_call6ParentCACycfc : $@convention(method) (@owned Parent) -> @owned Parent
   }
 }
@@ -97,7 +97,7 @@
   var y: Int
   override init() {
     y = 10
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call31ChildOfParentWithNoExplicitInitC{{[_0-9a-zA-Z]*}}fc
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call31ChildOfParentWithNoExplicitInitC{{[_0-9a-zA-Z]*}}fc
 // CHECK: function_ref @$s30auto_generated_super_init_call24ParentWithNoExplicitInitCACycfc : $@convention(method) (@owned ParentWithNoExplicitInit) -> @owned ParentWithNoExplicitInit
   }
 }
@@ -111,7 +111,7 @@
   var y: Int
   override init() {
     y = 10
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call32ChildOfParentWithNoExplicitInit2C{{[_0-9a-zA-Z]*}}fc
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call32ChildOfParentWithNoExplicitInit2C{{[_0-9a-zA-Z]*}}fc
 // CHECK: function_ref @$s30auto_generated_super_init_call25ParentWithNoExplicitInit2CACycfc : $@convention(method) (@owned ParentWithNoExplicitInit2) -> @owned ParentWithNoExplicitInit2
   }
 }
@@ -126,7 +126,7 @@
 class ChildOfParentWithNoDefaultInit : ParentWithNoDefaultInit {
   var y: Int
   init() {
-// CHECK-LABEL: sil hidden @$s30auto_generated_super_init_call30ChildOfParentWithNoDefaultInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned ChildOfParentWithNoDefaultInit) -> @owned ChildOfParentWithNoDefaultInit
+// CHECK-LABEL: sil hidden [ossa] @$s30auto_generated_super_init_call30ChildOfParentWithNoDefaultInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned ChildOfParentWithNoDefaultInit) -> @owned ChildOfParentWithNoDefaultInit
 // CHECK: bb0
 // CHECK-NOT: apply
 // CHECK: return
diff --git a/test/SILGen/borrow.swift b/test/SILGen/borrow.swift
index ada3c18..6616d8d 100644
--- a/test/SILGen/borrow.swift
+++ b/test/SILGen/borrow.swift
@@ -13,7 +13,7 @@
 
 func useD(_ d: D) {}
 
-// CHECK-LABEL: sil hidden @$s6borrow44lvalueBorrowShouldBeAtEndOfFormalAccessScope{{.*}} : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6borrow44lvalueBorrowShouldBeAtEndOfFormalAccessScope{{.*}} : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var C }, var, name "c"
 // CHECK:   [[PB_BOX:%.*]] = project_box [[BOX]]
diff --git a/test/SILGen/boxed_existentials.swift b/test/SILGen/boxed_existentials.swift
index ddce8bc..2421e58 100644
--- a/test/SILGen/boxed_existentials.swift
+++ b/test/SILGen/boxed_existentials.swift
@@ -3,7 +3,7 @@
 // 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) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials18test_type_loweringyys5Error_pF : $@convention(thin) (@guaranteed Error) -> () {
 // CHECK-NOT:         destroy_value %0 : $Error
 
 class Document {}
@@ -18,7 +18,7 @@
 func test_concrete_erasure(_ x: ClericalError) -> Error {
   return x
 }
-// CHECK-LABEL: sil hidden @$s18boxed_existentials21test_concrete_erasureys5Error_pAA08ClericalF0OF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials21test_concrete_erasureys5Error_pAA08ClericalF0OF
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $ClericalError):
 // CHECK:         [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:         [[EXISTENTIAL:%.*]] = alloc_existential_box $Error, $ClericalError
@@ -34,7 +34,7 @@
 func test_composition_erasure(_ x: HairType & Error) -> Error {
   return x
 }
-// CHECK-LABEL: sil hidden @$s18boxed_existentials24test_composition_erasureys5Error_psAC_AA8HairTypepF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials24test_composition_erasureys5Error_psAC_AA8HairTypepF
 // CHECK:         [[VALUE_ADDR:%.*]] = open_existential_addr immutable_access [[OLD_EXISTENTIAL:%.*]] : $*Error & HairType to $*[[VALUE_TYPE:@opened\(.*\) Error & HairType]]
 // CHECK:         [[NEW_EXISTENTIAL:%.*]] = alloc_existential_box $Error, $[[VALUE_TYPE]]
 // CHECK:         [[ADDR:%.*]] = project_existential_box $[[VALUE_TYPE]] in [[NEW_EXISTENTIAL]] : $Error
@@ -49,7 +49,7 @@
 func test_class_composition_erasure(_ x: HairClass & Error) -> Error {
   return x
 }
-// CHECK-LABEL: sil hidden @$s18boxed_existentials30test_class_composition_erasureys5Error_psAC_AA9HairClasspF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials30test_class_composition_erasureys5Error_psAC_AA9HairClasspF
 // CHECK:         [[VALUE:%.*]] = open_existential_ref [[OLD_EXISTENTIAL:%.*]] : $Error & HairClass to $[[VALUE_TYPE:@opened\(.*\) Error & HairClass]]
 // CHECK:         [[NEW_EXISTENTIAL:%.*]] = alloc_existential_box $Error, $[[VALUE_TYPE]]
 // CHECK:         [[ADDR:%.*]] = project_existential_box $[[VALUE_TYPE]] in [[NEW_EXISTENTIAL]] : $Error
@@ -62,7 +62,7 @@
 func test_property(_ x: Error) -> String {
   return x._domain
 }
-// CHECK-LABEL: sil hidden @$s18boxed_existentials13test_propertyySSs5Error_pF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials13test_propertyySSs5Error_pF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Error):
 // CHECK:         [[VALUE:%.*]] = open_existential_box [[ARG]] : $Error to $*[[VALUE_TYPE:@opened\(.*\) Error]]
 // FIXME: Extraneous copy here
@@ -80,7 +80,7 @@
   return x._domain
 }
 
-// CHECK-LABEL: sil hidden @$s18boxed_existentials23test_property_of_lvalueySSs5Error_pF :
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials23test_property_of_lvalueySSs5Error_pF :
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $Error):
 // CHECK:         [[VAR:%.*]] = alloc_box ${ var Error }
 // CHECK:         [[PVAR:%.*]] = project_box [[VAR]]
@@ -106,7 +106,7 @@
   func extensionMethod() { }
 }
 
-// CHECK-LABEL: sil hidden @$s18boxed_existentials21test_extension_methodyys5Error_pF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials21test_extension_methodyys5Error_pF
 func test_extension_method(_ error: Error) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Error):
   // CHECK: [[VALUE:%.*]] = open_existential_box [[ARG]]
@@ -123,8 +123,8 @@
 
 func plusOneError() -> Error { }
 
-// CHECK-LABEL: sil hidden @$s18boxed_existentials31test_open_existential_semanticsyys5Error_p_sAC_ptF
-// GUARANTEED-LABEL: sil hidden @$s18boxed_existentials31test_open_existential_semanticsyys5Error_p_sAC_ptF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials31test_open_existential_semanticsyys5Error_p_sAC_ptF
+// GUARANTEED-LABEL: sil hidden [ossa] @$s18boxed_existentials31test_open_existential_semanticsyys5Error_p_sAC_ptF
 // CHECK: bb0([[ARG0:%.*]]: @guaranteed $Error,
 // GUARANTEED: bb0([[ARG0:%.*]]: @guaranteed $Error,
 func test_open_existential_semantics(_ guaranteed: Error,
@@ -191,7 +191,7 @@
   plusOneError().extensionMethod()
 }
 
-// CHECK-LABEL: sil hidden @$s18boxed_existentials14erasure_to_anyyyps5Error_p_sAC_ptF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials14erasure_to_anyyyps5Error_p_sAC_ptF
 // CHECK:       bb0([[OUT:%.*]] : $*Any, [[GUAR:%.*]] : @guaranteed $Error,
 func erasure_to_any(_ guaranteed: Error, _ immediate: Error) -> Any {
   var immediate = immediate
@@ -231,7 +231,7 @@
 }
 
 // Make sure we don't assert on this.
-// CHECK-LABEL: sil hidden @$s18boxed_existentials4testyyF
+// CHECK-LABEL: sil hidden [ossa] @$s18boxed_existentials4testyyF
 // CHECK:  [[ERROR_ADDR:%.*]] = alloc_stack $Error
 // CHECK:  [[ARRAY_GET:%.*]] = function_ref @$sSayxSicig
 // CHECK:  apply [[ARRAY_GET]]<Error>([[ERROR_ADDR]]
diff --git a/test/SILGen/builtins.swift b/test/SILGen/builtins.swift
index 8e49c95..5ec4850 100644
--- a/test/SILGen/builtins.swift
+++ b/test/SILGen/builtins.swift
@@ -9,13 +9,13 @@
   var value: Builtin.RawPointer
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins3foo{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins3foo{{[_0-9a-zA-Z]*}}F
 func foo(_ x: Builtin.Int1, y: Builtin.Int1) -> Builtin.Int1 {
   // CHECK: builtin "cmp_eq_Int1"
   return Builtin.cmp_eq_Int1(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8load_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8load_pod{{[_0-9a-zA-Z]*}}F
 func load_pod(_ x: Builtin.RawPointer) -> Builtin.Int64 {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.Int64
   // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]]
@@ -23,7 +23,7 @@
   return Builtin.load(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8load_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8load_obj{{[_0-9a-zA-Z]*}}F
 func load_obj(_ x: Builtin.RawPointer) -> Builtin.NativeObject {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.NativeObject
   // CHECK: [[VAL:%.*]] = load [copy] [[ADDR]]
@@ -31,7 +31,7 @@
   return Builtin.load(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins12load_raw_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins12load_raw_pod{{[_0-9a-zA-Z]*}}F
 func load_raw_pod(_ x: Builtin.RawPointer) -> Builtin.Int64 {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to $*Builtin.Int64
   // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]]
@@ -39,7 +39,7 @@
   return Builtin.loadRaw(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins12load_raw_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins12load_raw_obj{{[_0-9a-zA-Z]*}}F
 func load_raw_obj(_ x: Builtin.RawPointer) -> Builtin.NativeObject {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to $*Builtin.NativeObject
   // CHECK: [[VAL:%.*]] = load [copy] [[ADDR]]
@@ -47,7 +47,7 @@
   return Builtin.loadRaw(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins18load_invariant_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18load_invariant_pod{{[_0-9a-zA-Z]*}}F
 func load_invariant_pod(_ x: Builtin.RawPointer) -> Builtin.Int64 {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [invariant] $*Builtin.Int64
   // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]]
@@ -55,7 +55,7 @@
   return Builtin.loadInvariant(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins18load_invariant_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18load_invariant_obj{{[_0-9a-zA-Z]*}}F
 func load_invariant_obj(_ x: Builtin.RawPointer) -> Builtin.NativeObject {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [invariant] $*Builtin.NativeObject
   // CHECK: [[VAL:%.*]] = load [copy] [[ADDR]]
@@ -63,14 +63,14 @@
   return Builtin.loadInvariant(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8load_gen{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8load_gen{{[_0-9a-zA-Z]*}}F
 func load_gen<T>(_ x: Builtin.RawPointer) -> T {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*T
   // CHECK: copy_addr [[ADDR]] to [initialization] {{%.*}}
   return Builtin.load(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8move_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8move_pod{{[_0-9a-zA-Z]*}}F
 func move_pod(_ x: Builtin.RawPointer) -> Builtin.Int64 {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.Int64
   // CHECK: [[VAL:%.*]] = load [trivial] [[ADDR]]
@@ -78,7 +78,7 @@
   return Builtin.take(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8move_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8move_obj{{[_0-9a-zA-Z]*}}F
 func move_obj(_ x: Builtin.RawPointer) -> Builtin.NativeObject {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.NativeObject
   // CHECK: [[VAL:%.*]] = load [take] [[ADDR]]
@@ -87,14 +87,14 @@
   return Builtin.take(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8move_gen{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8move_gen{{[_0-9a-zA-Z]*}}F
 func move_gen<T>(_ x: Builtin.RawPointer) -> T {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*T
   // CHECK: copy_addr [take] [[ADDR]] to [initialization] {{%.*}}
   return Builtin.take(x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins11destroy_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11destroy_pod{{[_0-9a-zA-Z]*}}F
 func destroy_pod(_ x: Builtin.RawPointer) {
   var x = x
   // CHECK: [[XBOX:%[0-9]+]] = alloc_box
@@ -107,21 +107,21 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins11destroy_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11destroy_obj{{[_0-9a-zA-Z]*}}F
 func destroy_obj(_ x: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.NativeObject
   // CHECK: destroy_addr [[ADDR]]
   return Builtin.destroy(Builtin.NativeObject.self, x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins11destroy_gen{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11destroy_gen{{[_0-9a-zA-Z]*}}F
 func destroy_gen<T>(_ x: Builtin.RawPointer, _: T) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*T
   // CHECK: destroy_addr [[ADDR]]
   return Builtin.destroy(T.self, x)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins10assign_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10assign_pod{{[_0-9a-zA-Z]*}}F
 func assign_pod(_ x: Builtin.Int64, y: Builtin.RawPointer) {
   var x = x
   var y = y
@@ -138,7 +138,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins10assign_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10assign_obj{{[_0-9a-zA-Z]*}}F
 func assign_obj(_ x: Builtin.NativeObject, y: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.NativeObject
   // CHECK: assign {{%.*}} to [[ADDR]]
@@ -146,7 +146,7 @@
   Builtin.assign(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins12assign_tuple{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins12assign_tuple{{[_0-9a-zA-Z]*}}F
 func assign_tuple(_ x: (Builtin.Int64, Builtin.NativeObject),
                   y: Builtin.RawPointer) {
   var x = x
@@ -160,14 +160,14 @@
   Builtin.assign(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins10assign_gen{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10assign_gen{{[_0-9a-zA-Z]*}}F
 func assign_gen<T>(_ x: T, y: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*T
   // CHECK: copy_addr [take] {{%.*}} to [[ADDR]] :
   Builtin.assign(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8init_pod{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8init_pod{{[_0-9a-zA-Z]*}}F
 func init_pod(_ x: Builtin.Int64, y: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.Int64
   // CHECK-NOT: load [[ADDR]]
@@ -176,7 +176,7 @@
   Builtin.initialize(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8init_obj{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8init_obj{{[_0-9a-zA-Z]*}}F
 func init_obj(_ x: Builtin.NativeObject, y: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*Builtin.NativeObject
   // CHECK-NOT: load [[ADDR]]
@@ -185,7 +185,7 @@
   Builtin.initialize(x, y)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8init_gen{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8init_gen{{[_0-9a-zA-Z]*}}F
 func init_gen<T>(_ x: T, y: Builtin.RawPointer) {
   // CHECK: [[ADDR:%.*]] = pointer_to_address {{%.*}} to [strict] $*T
   // CHECK: copy_addr [[OTHER_LOC:%.*]] to [initialization]  [[ADDR]]
@@ -196,7 +196,7 @@
 class C {}
 class D {}
 
-// CHECK-LABEL: sil hidden @$s8builtins22class_to_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins22class_to_native_object{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $C):
 // CHECK-NEXT:   debug_value
 // CHECK-NEXT:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -206,7 +206,7 @@
   return Builtin.castToNativeObject(c)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins32class_archetype_to_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins32class_archetype_to_native_object{{[_0-9a-zA-Z]*}}F
 func class_archetype_to_native_object<T : C>(_ t: T) -> Builtin.NativeObject {
   // CHECK: [[COPY:%.*]] = copy_value %0
   // CHECK: [[OBJ:%.*]] = unchecked_ref_cast [[COPY]] : $T to $Builtin.NativeObject
@@ -216,7 +216,7 @@
   return Builtin.castToNativeObject(t)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins34class_existential_to_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins34class_existential_to_native_object{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ClassProto):
 // CHECK-NEXT:   debug_value
 // CHECK-NEXT:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -227,7 +227,7 @@
   return Builtin.unsafeCastToNativeObject(t)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins24class_from_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins24class_from_native_object{{[_0-9a-zA-Z]*}}F
 func class_from_native_object(_ p: Builtin.NativeObject) -> C {
   // CHECK: [[COPY:%.*]] = copy_value %0
   // CHECK: [[CAST:%.*]] = unchecked_ref_cast [[COPY]] : $Builtin.NativeObject to $C
@@ -237,7 +237,7 @@
   return Builtin.castFromNativeObject(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins34class_archetype_from_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins34class_archetype_from_native_object{{[_0-9a-zA-Z]*}}F
 func class_archetype_from_native_object<T : C>(_ p: Builtin.NativeObject) -> T {
   // CHECK: [[COPY:%.*]] = copy_value %0
   // CHECK: [[CAST:%.*]] = unchecked_ref_cast [[COPY]] : $Builtin.NativeObject to $T
@@ -247,7 +247,7 @@
   return Builtin.castFromNativeObject(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins41objc_class_existential_from_native_object{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins41objc_class_existential_from_native_object{{[_0-9a-zA-Z]*}}F
 func objc_class_existential_from_native_object(_ p: Builtin.NativeObject) -> AnyObject {
   // CHECK: [[COPY:%.*]] = copy_value %0
   // CHECK: [[CAST:%.*]] = unchecked_ref_cast [[COPY]] : $Builtin.NativeObject to $AnyObject
@@ -257,7 +257,7 @@
   return Builtin.castFromNativeObject(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins20class_to_raw_pointer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20class_to_raw_pointer{{[_0-9a-zA-Z]*}}F
 func class_to_raw_pointer(_ c: C) -> Builtin.RawPointer {
   // CHECK: [[RAW:%.*]] = ref_to_raw_pointer [[C:%.*]] to $Builtin.RawPointer
   // CHECK: return [[RAW]]
@@ -274,14 +274,14 @@
   return Builtin.bridgeToRawPointer(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins18obj_to_raw_pointer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18obj_to_raw_pointer{{[_0-9a-zA-Z]*}}F
 func obj_to_raw_pointer(_ c: Builtin.NativeObject) -> Builtin.RawPointer {
   // CHECK: [[RAW:%.*]] = ref_to_raw_pointer [[C:%.*]] to $Builtin.RawPointer
   // CHECK: return [[RAW]]
   return Builtin.bridgeToRawPointer(c)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins22class_from_raw_pointer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins22class_from_raw_pointer{{[_0-9a-zA-Z]*}}F
 func class_from_raw_pointer(_ p: Builtin.RawPointer) -> C {
   // CHECK: [[C:%.*]] = raw_pointer_to_ref [[RAW:%.*]] to $C
   // CHECK: [[C_COPY:%.*]] = copy_value [[C]]
@@ -293,7 +293,7 @@
   return Builtin.bridgeFromRawPointer(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins20obj_from_raw_pointer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20obj_from_raw_pointer{{[_0-9a-zA-Z]*}}F
 func obj_from_raw_pointer(_ p: Builtin.RawPointer) -> Builtin.NativeObject {
   // CHECK: [[C:%.*]] = raw_pointer_to_ref [[RAW:%.*]] to $Builtin.NativeObject
   // CHECK: [[C_COPY:%.*]] = copy_value [[C]]
@@ -301,7 +301,7 @@
   return Builtin.bridgeFromRawPointer(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins28existential_from_raw_pointer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins28existential_from_raw_pointer{{[_0-9a-zA-Z]*}}F
 func existential_from_raw_pointer(_ p: Builtin.RawPointer) -> AnyObject {
   // CHECK: [[C:%.*]] = raw_pointer_to_ref [[RAW:%.*]] to $AnyObject
   // CHECK: [[C_COPY:%.*]] = copy_value [[C]]
@@ -309,21 +309,21 @@
   return Builtin.bridgeFromRawPointer(p)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins9gep_raw64{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins9gep_raw64{{[_0-9a-zA-Z]*}}F
 func gep_raw64(_ p: Builtin.RawPointer, i: Builtin.Int64) -> Builtin.RawPointer {
   // CHECK: [[GEP:%.*]] = index_raw_pointer
   // CHECK: return [[GEP]]
   return Builtin.gepRaw_Int64(p, i)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins9gep_raw32{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins9gep_raw32{{[_0-9a-zA-Z]*}}F
 func gep_raw32(_ p: Builtin.RawPointer, i: Builtin.Int32) -> Builtin.RawPointer {
   // CHECK: [[GEP:%.*]] = index_raw_pointer
   // CHECK: return [[GEP]]
   return Builtin.gepRaw_Int32(p, i)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins3gep{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins3gep{{[_0-9a-zA-Z]*}}F
 func gep<Elem>(_ p: Builtin.RawPointer, i: Builtin.Word, e: Elem.Type) -> Builtin.RawPointer {
   // CHECK: [[P2A:%.*]] = pointer_to_address %0
   // CHECK: [[GEP:%.*]] = index_addr [[P2A]] : $*Elem, %1 : $Builtin.Word
@@ -334,7 +334,7 @@
 
 public final class Header { }
 
-// CHECK-LABEL: sil hidden @$s8builtins20allocWithTailElems_1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20allocWithTailElems_1{{[_0-9a-zA-Z]*}}F
 func allocWithTailElems_1<T>(n: Builtin.Word, ty: T.Type) -> Header {
   // CHECK: [[M:%.*]] = metatype $@thick Header.Type
   // CHECK: [[A:%.*]] = alloc_ref [tail_elems $T * %0 : $Builtin.Word] $Header
@@ -342,7 +342,7 @@
   return Builtin.allocWithTailElems_1(Header.self, n, ty)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins20allocWithTailElems_3{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20allocWithTailElems_3{{[_0-9a-zA-Z]*}}F
 func allocWithTailElems_3<T1, T2, T3>(n1: Builtin.Word, ty1: T1.Type, n2: Builtin.Word, ty2: T2.Type, n3: Builtin.Word, ty3: T3.Type) -> Header {
   // CHECK: [[M:%.*]] = metatype $@thick Header.Type
   // CHECK: [[A:%.*]] = alloc_ref [tail_elems $T1 * %0 : $Builtin.Word] [tail_elems $T2 * %2 : $Builtin.Word] [tail_elems $T3 * %4 : $Builtin.Word] $Header
@@ -350,7 +350,7 @@
   return Builtin.allocWithTailElems_3(Header.self, n1, ty1, n2, ty2, n3, ty3)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins16projectTailElems{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins16projectTailElems{{[_0-9a-zA-Z]*}}F
 func projectTailElems<T>(h: Header, ty: T.Type) -> Builtin.RawPointer {
   // CHECK: bb0([[ARG1:%.*]] : @guaranteed $Header
   // CHECK:   [[TA:%.*]] = ref_tail_addr [[ARG1]] : $Header
@@ -360,7 +360,7 @@
 }
 // CHECK: } // end sil function '$s8builtins16projectTailElems1h2tyBpAA6HeaderC_xmtlF'
 
-// CHECK-LABEL: sil hidden @$s8builtins11getTailAddr{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11getTailAddr{{[_0-9a-zA-Z]*}}F
 func getTailAddr<T1, T2>(start: Builtin.RawPointer, i: Builtin.Word, ty1: T1.Type, ty2: T2.Type) -> Builtin.RawPointer {
   // CHECK: [[P2A:%.*]] = pointer_to_address %0
   // CHECK: [[TA:%.*]] = tail_addr [[P2A]] : $*T1, %1 : $Builtin.Word, $T2
@@ -369,7 +369,7 @@
   return Builtin.getTailAddr_Word(start, i, ty1, ty2)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins25beginUnpairedModifyAccess{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins25beginUnpairedModifyAccess{{[_0-9a-zA-Z]*}}F
 func beginUnpairedModifyAccess<T1>(address: Builtin.RawPointer, scratch: Builtin.RawPointer, ty1: T1.Type) {
   // CHECK: [[P2A_ADDR:%.*]] = pointer_to_address %0
   // CHECK: [[P2A_SCRATCH:%.*]] = pointer_to_address %1
@@ -381,7 +381,7 @@
   Builtin.beginUnpairedModifyAccess(address, scratch, ty1);
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins30performInstantaneousReadAccess{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins30performInstantaneousReadAccess{{[_0-9a-zA-Z]*}}F
 func performInstantaneousReadAccess<T1>(address: Builtin.RawPointer, scratch: Builtin.RawPointer, ty1: T1.Type) {
   // CHECK: [[P2A_ADDR:%.*]] = pointer_to_address %0
   // CHECK: [[SCRATCH:%.*]] = alloc_stack $Builtin.UnsafeValueBuffer
@@ -394,7 +394,7 @@
   Builtin.performInstantaneousReadAccess(address, ty1);
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins8condfail{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8condfail{{[_0-9a-zA-Z]*}}F
 func condfail(_ i: Builtin.Int1) {
   Builtin.condfail(i)
   // CHECK: cond_fail {{%.*}} : $Builtin.Int1
@@ -406,7 +406,7 @@
 @objc protocol OP2 {}
 protocol P {}
 
-// CHECK-LABEL: sil hidden @$s8builtins10canBeClass{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10canBeClass{{[_0-9a-zA-Z]*}}F
 func canBeClass<T>(_: T) {
   // CHECK: integer_literal $Builtin.Int8, 1
   Builtin.canBeClass(O.self)
@@ -433,7 +433,7 @@
 
 // FIXME: "T.Type.self" does not parse as an expression
 
-// CHECK-LABEL: sil hidden @$s8builtins18canBeClassMetatype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18canBeClassMetatype{{[_0-9a-zA-Z]*}}F
 func canBeClassMetatype<T>(_: T) {
   // CHECK: integer_literal $Builtin.Int8, 0
   typealias OT = O.Type
@@ -464,7 +464,7 @@
   Builtin.canBeClass(TT.self)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins11fixLifetimeyyAA1CCF : $@convention(thin) (@guaranteed C) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11fixLifetimeyyAA1CCF : $@convention(thin) (@guaranteed C) -> () {
 func fixLifetime(_ c: C) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $C):
   // CHECK:   fix_lifetime [[ARG]] : $C
@@ -472,21 +472,21 @@
 }
 // CHECK: } // end sil function '$s8builtins11fixLifetimeyyAA1CCF'
 
-// CHECK-LABEL: sil hidden @$s8builtins20assert_configuration{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20assert_configuration{{[_0-9a-zA-Z]*}}F
 func assert_configuration() -> Builtin.Int32 {
   return Builtin.assert_configuration()
   // CHECK: [[APPLY:%.*]] = builtin "assert_configuration"() : $Builtin.Int32
   // CHECK: return [[APPLY]] : $Builtin.Int32
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins17assumeNonNegativeyBwBwF
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins17assumeNonNegativeyBwBwF
 func assumeNonNegative(_ x: Builtin.Word) -> Builtin.Word {
   return Builtin.assumeNonNegative_Word(x)
   // CHECK: [[APPLY:%.*]] = builtin "assumeNonNegative_Word"(%0 : $Builtin.Word) : $Builtin.Word
   // CHECK: return [[APPLY]] : $Builtin.Word
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins11autoreleaseyyAA1OCF : $@convention(thin) (@guaranteed O) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11autoreleaseyyAA1OCF : $@convention(thin) (@guaranteed O) -> () {
 // ==> SEMANTIC ARC TODO: This will be unbalanced... should we allow it?
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $O):
 // CHECK:   unmanaged_autorelease_value [[ARG]]
@@ -498,7 +498,7 @@
 // The 'unreachable' builtin is emitted verbatim by SILGen and eliminated during
 // diagnostics.
 
-// CHECK-LABEL: sil hidden @$s8builtins11unreachable{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins11unreachable{{[_0-9a-zA-Z]*}}F
 // CHECK:         builtin "unreachable"()
 // CHECK:         return
 // CANONICAL-LABEL: sil hidden @$s8builtins11unreachableyyF : $@convention(thin) () -> () {
@@ -506,7 +506,7 @@
   Builtin.unreachable()
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins15reinterpretCast_1xBw_AA1DCAA1CCSgAGtAG_BwtF : $@convention(thin) (@guaranteed C, Builtin.Word) -> (Builtin.Word, @owned D, @owned Optional<C>, @owned C)
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins15reinterpretCast_1xBw_AA1DCAA1CCSgAGtAG_BwtF : $@convention(thin) (@guaranteed C, Builtin.Word) -> (Builtin.Word, @owned D, @owned Optional<C>, @owned C)
 // CHECK:       bb0([[ARG1:%.*]] : @guaranteed $C, [[ARG2:%.*]] : $Builtin.Word):
 // CHECK-NEXT:    debug_value
 // CHECK-NEXT:    debug_value
@@ -528,13 +528,13 @@
           Builtin.reinterpretCast(x) as C)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins19reinterpretAddrOnly{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins19reinterpretAddrOnly{{[_0-9a-zA-Z]*}}F
 func reinterpretAddrOnly<T, U>(_ t: T) -> U {
   // CHECK: unchecked_addr_cast {{%.*}} : $*T to $*U
   return Builtin.reinterpretCast(t)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins28reinterpretAddrOnlyToTrivial{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins28reinterpretAddrOnlyToTrivial{{[_0-9a-zA-Z]*}}F
 func reinterpretAddrOnlyToTrivial<T>(_ t: T) -> Int {
   // CHECK: copy_addr %0 to [initialization] [[INPUT:%.*]] : $*T
   // CHECK: [[ADDR:%.*]] = unchecked_addr_cast [[INPUT]] : $*T to $*Int
@@ -543,7 +543,7 @@
   return Builtin.reinterpretCast(t)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins27reinterpretAddrOnlyLoadable{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins27reinterpretAddrOnlyLoadable{{[_0-9a-zA-Z]*}}F
 func reinterpretAddrOnlyLoadable<T>(_ a: Int, _ b: T) -> (T, Int) {
   // CHECK: [[BUF:%.*]] = alloc_stack $Int
   // CHECK: store {{%.*}} to [trivial] [[BUF]]
@@ -555,7 +555,7 @@
           Builtin.reinterpretCast(b) as Int)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins18castToBridgeObject{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18castToBridgeObject{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[ARG_COPY:%.*]] = copy_value %0
 // CHECK:         [[BO:%.*]] = ref_to_bridge_object [[ARG_COPY]] : $C, {{%.*}} : $Builtin.Word
 // CHECK-NOT:     destroy_value [[ARG_COPY]]
@@ -564,13 +564,13 @@
   return Builtin.castToBridgeObject(c, w)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins23castRefFromBridgeObject{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins23castRefFromBridgeObject{{[_0-9a-zA-Z]*}}F
 // CHECK:         bridge_object_to_ref [[BO:%.*]] : $Builtin.BridgeObject to $C
 func castRefFromBridgeObject(_ bo: Builtin.BridgeObject) -> C {
   return Builtin.castReferenceFromBridgeObject(bo)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins30castBitPatternFromBridgeObject{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins30castBitPatternFromBridgeObject{{[_0-9a-zA-Z]*}}F
 // CHECK:         bridge_object_to_word [[BO:%.*]] : $Builtin.BridgeObject to $Builtin.Word
 // CHECK-NOT:         destroy_value [[BO]]
 func castBitPatternFromBridgeObject(_ bo: Builtin.BridgeObject) -> Builtin.Word {
@@ -582,7 +582,7 @@
 // ----------------------------------------------------------------------------
 
 // NativeObject
-// CHECK-LABEL: sil hidden @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Optional<Builtin.NativeObject>):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Optional<Builtin.NativeObject>
 // CHECK: [[BUILTIN:%.*]] = is_unique [[WRITE]] : $*Optional<Builtin.NativeObject>
@@ -592,7 +592,7 @@
 }
 
 // NativeObject nonNull
-// CHECK-LABEL: sil hidden @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Builtin.NativeObject):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK: [[BUILTIN:%.*]] = is_unique [[WRITE]] : $*Builtin.NativeObject
@@ -602,7 +602,7 @@
 }
 
 // UnknownObject (ObjC)
-// CHECK-LABEL: sil hidden @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Optional<Builtin.UnknownObject>):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK: [[BUILTIN:%.*]] = is_unique [[WRITE]] : $*Optional<Builtin.UnknownObject>
@@ -612,7 +612,7 @@
 }
 
 // UnknownObject (ObjC) nonNull
-// CHECK-LABEL: sil hidden @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Builtin.UnknownObject):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK: [[BUILTIN:%.*]] = is_unique [[WRITE]] : $*Builtin.UnknownObject
@@ -622,7 +622,7 @@
 }
 
 // BridgeObject nonNull
-// CHECK-LABEL: sil hidden @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins8isUnique{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Builtin.BridgeObject):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK: [[BUILTIN:%.*]] = is_unique [[WRITE]] : $*Builtin.BridgeObject
@@ -632,7 +632,7 @@
 }
 
 // BridgeObject nonNull native
-// CHECK-LABEL: sil hidden @$s8builtins15isUnique_native{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins15isUnique_native{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Builtin.BridgeObject):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK: [[CAST:%.*]] = unchecked_addr_cast [[WRITE]] : $*Builtin.BridgeObject to $*Builtin.NativeObject
@@ -649,13 +649,13 @@
 protocol PUnknown {}
 protocol PClass : class {}
 
-// CHECK-LABEL: sil hidden @$s8builtins19refcast_generic_any{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins19refcast_generic_any{{[_0-9a-zA-Z]*}}F
 // CHECK: unchecked_ref_cast_addr  T in %{{.*}} : $*T to AnyObject in %{{.*}} : $*AnyObject
 func refcast_generic_any<T>(_ o: T) -> AnyObject {
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins17refcast_class_anyyyXlAA1ACF :
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins17refcast_class_anyyyXlAA1ACF :
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $A):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[ARG_CASTED:%.*]] = unchecked_ref_cast [[ARG_COPY]] : $A to $AnyObject
@@ -666,13 +666,13 @@
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins20refcast_punknown_any{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20refcast_punknown_any{{[_0-9a-zA-Z]*}}F
 // CHECK: unchecked_ref_cast_addr PUnknown in %{{.*}} : $*PUnknown to AnyObject in %{{.*}} : $*AnyObject
 func refcast_punknown_any(_ o: PUnknown) -> AnyObject {
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins18refcast_pclass_anyyyXlAA6PClass_pF :
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins18refcast_pclass_anyyyXlAA6PClass_pF :
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $PClass):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[ARG_CAST:%.*]] = unchecked_ref_cast [[ARG_COPY]] : $PClass to $AnyObject
@@ -682,7 +682,7 @@
   return Builtin.castReference(o)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins20refcast_any_punknown{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins20refcast_any_punknown{{[_0-9a-zA-Z]*}}F
 // CHECK: unchecked_ref_cast_addr AnyObject in %{{.*}} : $*AnyObject to PUnknown in %{{.*}} : $*PUnknown
 func refcast_any_punknown(_ o: AnyObject) -> PUnknown {
   return Builtin.castReference(o)
@@ -690,7 +690,7 @@
 
 // => SEMANTIC ARC TODO: This function is missing a borrow + extract + copy.
 //
-// CHECK-LABEL: sil hidden @$s8builtins22unsafeGuaranteed_class{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins22unsafeGuaranteed_class{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%.*]] : @guaranteed $A):
 // CHECK:   [[P_COPY:%.*]] = copy_value  [[P]]
 // CHECK:   [[T:%.*]] = builtin "unsafeGuaranteed"<A>([[P_COPY]] : $A)
@@ -718,7 +718,7 @@
   return a
 }
 
-// CHECK_LABEL: sil hidden @$s8builtins31unsafeGuaranteed_generic_return{{[_0-9a-zA-Z]*}}F
+// CHECK_LABEL: sil hidden [ossa] @$s8builtins31unsafeGuaranteed_generic_return{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%.*]] : @guaranteed $T):
 // CHECK:   [[P_COPY:%.*]] = copy_value [[P]]
 // CHECK:   [[T:%.*]] = builtin "unsafeGuaranteed"<T>([[P_COPY]] : $T)
@@ -730,7 +730,7 @@
   return Builtin.unsafeGuaranteed(a)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins19unsafeGuaranteedEnd{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins19unsafeGuaranteedEnd{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%.*]] : $Builtin.Int8):
 // CHECK:   builtin "unsafeGuaranteedEnd"([[P]] : $Builtin.Int8)
 // CHECK:   [[S:%.*]] = tuple ()
@@ -740,7 +740,7 @@
   Builtin.unsafeGuaranteedEnd(t)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins10bindMemory{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10bindMemory{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%.*]] : $Builtin.RawPointer, [[I:%.*]] : $Builtin.Word, [[T:%.*]] : $@thick T.Type):
 // CHECK: bind_memory [[P]] : $Builtin.RawPointer, [[I]] : $Builtin.Word to $*T
 // CHECK:   return {{%.*}} : $()
@@ -755,7 +755,7 @@
 
 // SILGen test:
 //
-// CHECK-LABEL: sil hidden @$s8builtins6retain{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins6retain{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb0([[P:%.*]] : @guaranteed $Builtin.NativeObject):
 // CHECK:   unmanaged_retain_value [[P]]
 // CHECK: } // end sil function '$s8builtins6retain{{[_0-9a-zA-Z]*}}F'
@@ -773,7 +773,7 @@
 
 // SILGen test:
 //
-// CHECK-LABEL: sil hidden @$s8builtins7release{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins7release{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb0([[P:%.*]] : @guaranteed $Builtin.NativeObject):
 // CHECK:   unmanaged_release_value [[P]]
 // CHECK-NOT:   destroy_value [[P]]
@@ -799,7 +799,7 @@
 
 func once_helper() {}
 
-// CHECK-LABEL: sil hidden @$s8builtins4once7controlyBp_tF
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins4once7controlyBp_tF
 // CHECK:      [[T0:%.*]] = function_ref @$s8builtins11once_helperyyFTo : $@convention(c) () -> ()
 // CHECK-NEXT: builtin "once"(%0 : $Builtin.RawPointer, [[T0]] : $@convention(c) () -> ())
 func once(control: Builtin.RawPointer) {
@@ -807,7 +807,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s8builtins19valueToBridgeObjectyBbSuF : $@convention(thin) (UInt) -> @owned Builtin.BridgeObject {
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins19valueToBridgeObjectyBbSuF : $@convention(thin) (UInt) -> @owned Builtin.BridgeObject {
 // CHECK: bb0([[UINT:%.*]] : $UInt):
 // CHECK:   [[BI:%.*]] = struct_extract [[UINT]] : $UInt, #UInt._value
 // CHECK:   [[CAST:%.*]] = value_to_bridge_object [[BI]]
@@ -818,7 +818,7 @@
   return Builtin.valueToBridgeObject(x._value)
 }
 
-// CHECK-LABEL: sil hidden @$s8builtins10assumeTrueyyBi1_F
+// CHECK-LABEL: sil hidden [ossa] @$s8builtins10assumeTrueyyBi1_F
 // CHECK: builtin "assume_Int1"({{.*}} : $Builtin.Int1)
 // CHECK: return
 func assumeTrue(_ x: Builtin.Int1) {
diff --git a/test/SILGen/c_function_pointers.swift b/test/SILGen/c_function_pointers.swift
index 9736575..4de0ebe 100644
--- a/test/SILGen/c_function_pointers.swift
+++ b/test/SILGen/c_function_pointers.swift
@@ -3,7 +3,7 @@
 func values(_ arg: @escaping @convention(c) (Int) -> Int) -> @convention(c) (Int) -> Int {
   return arg
 }
-// CHECK-LABEL: sil hidden @$s19c_function_pointers6valuesyS2iXCS2iXCF
+// CHECK-LABEL: sil hidden [ossa] @$s19c_function_pointers6valuesyS2iXCS2iXCF
 // CHECK:       bb0(%0 : $@convention(c) (Int) -> Int):
 // CHECK:         return %0 : $@convention(c) (Int) -> Int
 
@@ -11,7 +11,7 @@
 func calls(_ arg: @convention(c) (Int) -> Int, _ x: Int) -> Int {
   return arg(x)
 }
-// CHECK-LABEL: sil hidden @$s19c_function_pointers5callsyS3iXC_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s19c_function_pointers5callsyS3iXC_SitF
 // CHECK:       bb0(%0 : $@convention(c) @noescape (Int) -> Int, %1 : $Int):
 // CHECK:         [[RESULT:%.*]] = apply %0(%1)
 // CHECK:         return [[RESULT]]
@@ -25,7 +25,7 @@
 
 func no_args() -> Int { return 42 }
 
-// CHECK-LABEL: sil hidden @$s19c_function_pointers0B19_to_swift_functionsyySiF
+// CHECK-LABEL: sil hidden [ossa] @$s19c_function_pointers0B19_to_swift_functionsyySiF
 func pointers_to_swift_functions(_ x: Int) {
 // CHECK: bb0([[X:%.*]] : $Int):
 
@@ -58,8 +58,8 @@
   calls(unsupported, x) // expected-error{{C function pointer signature '(Any) -> Int' is not compatible with expected type '@convention(c) (Int) -> Int'}}
 }
 
-// CHECK-LABEL: sil private @$s19c_function_pointers22StructWithInitializersV3fn1yyXCvpfiyycfU_ : $@convention(thin) () -> () {
-// CHECK-LABEL: sil private [thunk] @$s19c_function_pointers22StructWithInitializersV3fn1yyXCvpfiyycfU_To : $@convention(c) () -> () {
+// CHECK-LABEL: sil private [ossa] @$s19c_function_pointers22StructWithInitializersV3fn1yyXCvpfiyycfU_ : $@convention(thin) () -> () {
+// CHECK-LABEL: sil private [thunk] [ossa] @$s19c_function_pointers22StructWithInitializersV3fn1yyXCvpfiyycfU_To : $@convention(c) () -> () {
 
 struct StructWithInitializers {
   let fn1: @convention(c) () -> () = {}
diff --git a/test/SILGen/c_modify_linkage.swift b/test/SILGen/c_modify_linkage.swift
index d62c4fa..d6b655b 100644
--- a/test/SILGen/c_modify_linkage.swift
+++ b/test/SILGen/c_modify_linkage.swift
@@ -14,8 +14,8 @@
 // Make sure synthesized modify accessors have shared linkage
 // for properties imported from Clang.
 
-// CHECK-LABEL: sil shared [serializable] @$sSo7NSPointV1ySfvM
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo7NSPointV1ySfvM
 
-// CHECK-LABEL: sil shared [serializable] @$sSo16NSReferencePointC1xSfvM
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo16NSReferencePointC1xSfvM
 
-// CHECK-LABEL: sil shared [serializable] @$sSo16NSReferencePointC1ySfvM
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo16NSReferencePointC1ySfvM
diff --git a/test/SILGen/call_chain_reabstraction.swift b/test/SILGen/call_chain_reabstraction.swift
index 7402c23..234251e 100644
--- a/test/SILGen/call_chain_reabstraction.swift
+++ b/test/SILGen/call_chain_reabstraction.swift
@@ -5,7 +5,7 @@
         func g<U>(_ recur: (A, U) -> U) -> (A, U) -> U {
                 return { _, x in return x }
         }
-        // CHECK-LABEL: sil hidden @$s24call_chain_reabstraction1AV1f{{[_0-9a-zA-Z]*}}F
+        // CHECK-LABEL: sil hidden [ossa] @$s24call_chain_reabstraction1AV1f{{[_0-9a-zA-Z]*}}F
         // CHECK:         [[G:%.*]] = function_ref @$s24call_chain_reabstraction1AV1g{{[_0-9a-zA-Z]*}}F
         // CHECK:         [[G2:%.*]] = apply [[G]]<A>
         // CHECK:         [[REABSTRACT_THUNK:%.*]] = function_ref @$s24call_chain_reabstraction1AVA2CIegynr_A3CIegyyd_TR
diff --git a/test/SILGen/capture-canonicalization.swift b/test/SILGen/capture-canonicalization.swift
index ec734c8..b704129 100644
--- a/test/SILGen/capture-canonicalization.swift
+++ b/test/SILGen/capture-canonicalization.swift
@@ -5,7 +5,7 @@
 
 extension Foo where T == Bar {
   func foo(x: T) -> Bar {
-    // CHECK-LABEL: sil private @{{.*}}3foo{{.*}}4foo2{{.*}} : $@convention(thin) (Bar) -> Bar
+    // CHECK-LABEL: sil private [ossa] @{{.*}}3foo{{.*}}4foo2{{.*}} : $@convention(thin) (Bar) -> Bar
     func foo2() -> Bar {
       return x
     }
diff --git a/test/SILGen/capture-transitive.swift b/test/SILGen/capture-transitive.swift
index eafa4d6..dc346f1 100644
--- a/test/SILGen/capture-transitive.swift
+++ b/test/SILGen/capture-transitive.swift
@@ -7,9 +7,9 @@
     return cache[m] ?? {
       // Make sure cache is only captured once in the closure
       // CHECK: implicit closure #1 in recursive #1
-      // CHECK-LABEL: sil private [transparent] @{{.*}}9fibonacci{{.*}}9recursive{{.*}} : $@convention(thin) (Int, @guaranteed { var Dictionary<Int, Int> }) -> (Int, @error Error)
+      // CHECK-LABEL: sil private [transparent] [ossa] @{{.*}}9fibonacci{{.*}}9recursive{{.*}} : $@convention(thin) (Int, @guaranteed { var Dictionary<Int, Int> }) -> (Int, @error Error)
       // CHECK: closure #1 in implicit closure #1 in recursive #1
-      // CHECK-LABEL: sil private @{{.*}}9fibonacci{{.*}}9recursive{{.*}} : $@convention(thin) (Int, @guaranteed { var Dictionary<Int, Int> }) -> Int
+      // CHECK-LABEL: sil private [ossa] @{{.*}}9fibonacci{{.*}}9recursive{{.*}} : $@convention(thin) (Int, @guaranteed { var Dictionary<Int, Int> }) -> Int
       let output = m < 2 ? m : recursive(m - 1) + recursive(m - 2)
       cache[m] = output
       return output
@@ -24,17 +24,17 @@
     // Make sure that we capture dynamic self type if an explicit self isn't guaranteed
     func returnsSelf() -> Self {
         return { self.f(); return .init() }()
-        // CHECK-LABEL: sil private @{{.*}}returnsSelf{{.*}} : $@convention(thin) (@guaranteed C) -> @owned C
+        // CHECK-LABEL: sil private [ossa] @{{.*}}returnsSelf{{.*}} : $@convention(thin) (@guaranteed C) -> @owned C
     }
 
     func returnsSelf1() -> Self {
         return { [weak self] in self?.f(); return .init() }()
-        // CHECK-LABEL: sil private @{{.*}}returnsSelf{{.*}}  : $@convention(thin) (@guaranteed { var @sil_weak Optional<C> }, @thick @dynamic_self C.Type) -> @owned C
+        // CHECK-LABEL: sil private [ossa] @{{.*}}returnsSelf{{.*}}  : $@convention(thin) (@guaranteed { var @sil_weak Optional<C> }, @thick @dynamic_self C.Type) -> @owned C
     }
 
     func returnsSelf2() -> Self {
         return { [unowned self] in self.f(); return .init() }()
-        // CHECK-LABEL: sil private @{{.*}}returnsSelf{{.*}}  : $@convention(thin) (@guaranteed @sil_unowned C, @thick @dynamic_self C.Type) -> @owned C
+        // CHECK-LABEL: sil private [ossa] @{{.*}}returnsSelf{{.*}}  : $@convention(thin) (@guaranteed @sil_unowned C, @thick @dynamic_self C.Type) -> @owned C
     }
 }
 
diff --git a/test/SILGen/capture_inout.swift b/test/SILGen/capture_inout.swift
index 8244661..67eb363 100644
--- a/test/SILGen/capture_inout.swift
+++ b/test/SILGen/capture_inout.swift
@@ -2,13 +2,13 @@
 
 typealias Int = Builtin.Int64
 
-// CHECK: sil hidden @$s13capture_inout8localFoo1xyBi64_z_tF
+// CHECK: sil hidden [ossa] @$s13capture_inout8localFoo1xyBi64_z_tF
 // CHECK: bb0([[X_INOUT:%.*]] : $*Builtin.Int64):
 // CHECK-NOT: alloc_box
 // CHECK:   [[FUNC:%.*]] = function_ref [[CLOSURE:@.*]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
 // CHECK:   apply [[FUNC]]([[X_INOUT]])
 // CHECK: }
-// CHECK: sil private [[CLOSURE]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
+// CHECK: sil private [ossa] [[CLOSURE]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
 func localFoo(x: inout Int) {
   func bar() -> Int {
     return x
@@ -16,13 +16,13 @@
   bar()
 }
 
-// CHECK: sil hidden @$s13capture_inout7anonFoo1xyBi64_z_tF
+// CHECK: sil hidden [ossa] @$s13capture_inout7anonFoo1xyBi64_z_tF
 // CHECK: bb0([[X_INOUT:%.*]] : $*Builtin.Int64):
 // CHECK-NOT: alloc_box
 // CHECK:   [[FUNC:%.*]] = function_ref [[CLOSURE:@.*]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
 // CHECK:   apply [[FUNC]]([[X_INOUT]])
 // CHECK: }
-// CHECK: sil private [[CLOSURE]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
+// CHECK: sil private [ossa] [[CLOSURE]] : $@convention(thin) (@inout_aliasable Builtin.Int64) -> Builtin.Int64
 func anonFoo(x: inout Int) {
   { return x }()
 }
diff --git a/test/SILGen/capture_typealias.swift b/test/SILGen/capture_typealias.swift
index e8bc2b0..2b3fcae 100644
--- a/test/SILGen/capture_typealias.swift
+++ b/test/SILGen/capture_typealias.swift
@@ -8,7 +8,7 @@
   return f()
 }
 
-// CHECK: sil hidden @$s17capture_typealias3fooyyF : $@convention(thin) () -> () {
+// CHECK: sil hidden [ossa] @$s17capture_typealias3fooyyF : $@convention(thin) () -> () {
 // CHECK: function_ref [[CLOSURE:@\$s17capture_typealias3fooyyFBi64_yXEfU_]]
 func foo() {
   typealias X = Int
@@ -19,4 +19,4 @@
   }
 }
 
-// CHECK: sil private @$s17capture_typealias3fooyyFBi64_yXEfU_ : $@convention(thin) () -> Builtin.Int64 {
+// CHECK: sil private [ossa] @$s17capture_typealias3fooyyFBi64_yXEfU_ : $@convention(thin) () -> Builtin.Int64 {
diff --git a/test/SILGen/capture_typed_boxes.swift b/test/SILGen/capture_typed_boxes.swift
index 541e113..46906fd 100644
--- a/test/SILGen/capture_typed_boxes.swift
+++ b/test/SILGen/capture_typed_boxes.swift
@@ -5,7 +5,7 @@
   var x = x
   return { x }
 }
-// CHECK-LABEL: sil private @$s19capture_typed_boxes3fooySiycSiFSiycfU_ : $@convention(thin) (@guaranteed { var Int }) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s19capture_typed_boxes3fooySiycSiFSiycfU_ : $@convention(thin) (@guaranteed { var Int }) -> Int {
 // CHECK:       bb0(%0 : @guaranteed ${ var Int }):
 
 func closure(_ f: @escaping (Int) -> Int) -> Int {
@@ -16,7 +16,7 @@
 
   return bar(0)
 }
-// CHECK-LABEL: sil private @$s19capture_typed_boxes7closureyS3icF3barL_yS2iF : $@convention(thin) (Int, @guaranteed { var @callee_guaranteed (Int) -> Int }) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s19capture_typed_boxes7closureyS3icF3barL_yS2iF : $@convention(thin) (Int, @guaranteed { var @callee_guaranteed (Int) -> Int }) -> Int {
 // CHECK:       bb0(%0 : $Int, %1 : @guaranteed ${ var @callee_guaranteed (Int) -> Int }):
 
 func closure_generic<T>(_ f: @escaping (T) -> T, x: T) -> T {
@@ -27,6 +27,6 @@
 
   return bar(x)
 }
-// CHECK-LABEL: sil private @$s19capture_typed_boxes15closure_generic{{.*}} : $@convention(thin) <T> (@in_guaranteed T, @guaranteed <τ_0_0> { var @callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_0_0 } <T>) -> @out T {
+// CHECK-LABEL: sil private [ossa] @$s19capture_typed_boxes15closure_generic{{.*}} : $@convention(thin) <T> (@in_guaranteed T, @guaranteed <τ_0_0> { var @callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_0_0 } <T>) -> @out T {
 // CHECK-LABEL: bb0(%0 : $*T, %1 : $*T, %2 : @guaranteed $<τ_0_0> { var @callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_0_0 } <T>):
 
diff --git a/test/SILGen/casts.swift b/test/SILGen/casts.swift
index 4c911a1..e9d239c 100644
--- a/test/SILGen/casts.swift
+++ b/test/SILGen/casts.swift
@@ -4,18 +4,18 @@
 class B { }
 class D : B { }
 
-// CHECK-LABEL: sil hidden @$s5casts6upcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts6upcast{{[_0-9a-zA-Z]*}}F
 func upcast(d: D) -> B {
   // CHECK: {{%.*}} = upcast
   return d
 }
-// CHECK-LABEL: sil hidden @$s5casts8downcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts8downcast{{[_0-9a-zA-Z]*}}F
 func downcast(b: B) -> D {
   // CHECK: {{%.*}} = unconditional_checked_cast
   return b as! D
 }
 
-// CHECK-LABEL: sil hidden @$s5casts3isa{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts3isa{{[_0-9a-zA-Z]*}}F
 func isa(b: B) -> Bool {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $B):
   // CHECK:   [[COPIED_BORROWED_ARG:%.*]] = copy_value [[ARG]]
@@ -31,19 +31,19 @@
   return b is D
 }
 
-// CHECK-LABEL: sil hidden @$s5casts16upcast_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts16upcast_archetype{{[_0-9a-zA-Z]*}}F
 func upcast_archetype<T : B>(t: T) -> B {
   // CHECK: {{%.*}} = upcast
   return t
 }
 
-// CHECK-LABEL: sil hidden @$s5casts25upcast_archetype_metatype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts25upcast_archetype_metatype{{[_0-9a-zA-Z]*}}F
 func upcast_archetype_metatype<T : B>(t: T.Type) -> B.Type {
   // CHECK: {{%.*}} = upcast
   return t
 }
 
-// CHECK-LABEL: sil hidden @$s5casts18downcast_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts18downcast_archetype{{[_0-9a-zA-Z]*}}F
 func downcast_archetype<T : B>(b: B) -> T {
   // CHECK: {{%.*}} = unconditional_checked_cast
   return b as! T
@@ -52,7 +52,7 @@
 // This is making sure that we do not have the default propagating behavior in
 // the address case.
 //
-// CHECK-LABEL: sil hidden @$s5casts12is_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5casts12is_archetype{{[_0-9a-zA-Z]*}}F
 func is_archetype<T : B>(b: B, _: T) -> Bool {
   // CHECK: bb0([[ARG1:%.*]] : @guaranteed $B, [[ARG2:%.*]] : @guaranteed $T):
   // CHECK:   checked_cast_br {{%.*}}, [[YES:bb[0-9]+]], [[NO:bb[0-9]+]]
@@ -66,7 +66,7 @@
 }
 // CHECK: } // end sil function '$s5casts12is_archetype{{[_0-9a-zA-Z]*}}F'
 
-// CHECK: sil hidden @$s5casts20downcast_conditional{{[_0-9a-zA-Z]*}}F
+// CHECK: sil hidden [ossa] @$s5casts20downcast_conditional{{[_0-9a-zA-Z]*}}F
 // CHECK:   checked_cast_br {{%.*}} : $B to $D
 // CHECK:   bb{{[0-9]+}}({{.*}} : $Optional<D>)
 func downcast_conditional(b: B) -> D? {
@@ -76,7 +76,7 @@
 protocol P {}
 struct S : P {}
 
-// CHECK: sil hidden @$s5casts32downcast_existential_conditional{{[_0-9a-zA-Z]*}}F
+// CHECK: sil hidden [ossa] @$s5casts32downcast_existential_conditional{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[IN:%.*]] : $*P):
 // CHECK:   [[COPY:%.*]] = alloc_stack $P
 // CHECK:   copy_addr [[IN]] to [initialization] [[COPY]]
diff --git a/test/SILGen/cdecl.swift b/test/SILGen/cdecl.swift
index ec1a6ac..94a2ca4 100644
--- a/test/SILGen/cdecl.swift
+++ b/test/SILGen/cdecl.swift
@@ -1,37 +1,37 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden [thunk] @pear : $@convention(c)
+// CHECK-LABEL: sil hidden [thunk] [ossa] @pear : $@convention(c)
 // CHECK:         function_ref @$s5cdecl5apple{{[_0-9a-zA-Z]*}}F
-// CHECK-LABEL: sil hidden @$s5cdecl5apple{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5cdecl5apple{{[_0-9a-zA-Z]*}}F
 @_cdecl("pear")
 func apple(_ f: @convention(c) (Int) -> Int) {
 }
 
-// CHECK-LABEL: sil hidden @$s5cdecl16forceCEntryPoint{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5cdecl16forceCEntryPoint{{[_0-9a-zA-Z]*}}F
 // CHECK:         function_ref @grapefruit
 func forceCEntryPoint() {
   apple(orange)
 }
 
-// CHECK-LABEL: sil hidden [thunk] @grapefruit : $@convention(c)
+// CHECK-LABEL: sil hidden [thunk] [ossa] @grapefruit : $@convention(c)
 // CHECK:         function_ref @$s5cdecl6orange{{[_0-9a-zA-Z]*}}F
-// CHECK-LABEL: sil hidden @$s5cdecl6orange{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5cdecl6orange{{[_0-9a-zA-Z]*}}F
 @_cdecl("grapefruit")
 func orange(_ x: Int) -> Int {
   return x
 }
 
-// CHECK-LABEL: sil [thunk] @cauliflower : $@convention(c)
+// CHECK-LABEL: sil [thunk] [ossa] @cauliflower : $@convention(c)
 // CHECK:         function_ref @$s5cdecl8broccoli{{[_0-9a-zA-Z]*}}F
-// CHECK-LABEL: sil @$s5cdecl8broccoli{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s5cdecl8broccoli{{[_0-9a-zA-Z]*}}F
 @_cdecl("cauliflower")
 public func broccoli(_ x: Int) -> Int {
   return x
 }
 
-// CHECK-LABEL: sil private [thunk] @collard_greens : $@convention(c)
+// CHECK-LABEL: sil private [thunk] [ossa] @collard_greens : $@convention(c)
 // CHECK:         function_ref @$s5cdecl4kale[[PRIVATE:.*]]
-// CHECK:       sil private @$s5cdecl4kale[[PRIVATE:.*]]
+// CHECK:       sil private [ossa] @$s5cdecl4kale[[PRIVATE:.*]]
 @_cdecl("collard_greens")
 private func kale(_ x: Int) -> Int {
   return x
diff --git a/test/SILGen/cf.swift b/test/SILGen/cf.swift
index 390c2a7..2e91fc2 100644
--- a/test/SILGen/cf.swift
+++ b/test/SILGen/cf.swift
@@ -2,7 +2,7 @@
 
 import CoreCooling
 
-// CHECK: sil hidden @$s2cf8useEmAllyySo16CCMagnetismModelCF :
+// CHECK: sil hidden [ossa] @$s2cf8useEmAllyySo16CCMagnetismModelCF :
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $CCMagnetismModel):
 func useEmAll(_ model: CCMagnetismModel) {
 // CHECK: function_ref @CCPowerSupplyGetDefault : $@convention(c) () -> @autoreleased Optional<CCPowerSupply>
@@ -57,23 +57,23 @@
 
 extension CCImpedance: Impedance {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$sSo11CCImpedanceV2cf9ImpedanceA2cDP4real9ComponentQzvgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] @$sSo11CCImpedanceV4realSdvg
-// CHECK-LABEL: sil private [transparent] [thunk] @$sSo11CCImpedanceV2cf9ImpedanceA2cDP4imag9ComponentQzvgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] @$sSo11CCImpedanceV4imagSdvg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$sSo11CCImpedanceV2cf9ImpedanceA2cDP4real9ComponentQzvgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] [ossa] @$sSo11CCImpedanceV4realSdvg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$sSo11CCImpedanceV2cf9ImpedanceA2cDP4imag9ComponentQzvgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] [ossa] @$sSo11CCImpedanceV4imagSdvg
 
 class MyMagnetism : CCMagnetismModel {
-  // CHECK-LABEL: sil hidden [thunk] @$s2cf11MyMagnetismC15getRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s2cf11MyMagnetismC15getRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
   override func getRefrigerator() -> CCRefrigerator {
     return super.getRefrigerator()
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s2cf11MyMagnetismC16takeRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @owned CCRefrigerator
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s2cf11MyMagnetismC16takeRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @owned CCRefrigerator
   override func takeRefrigerator() -> CCRefrigerator {
     return super.takeRefrigerator()
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s2cf11MyMagnetismC18borrowRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s2cf11MyMagnetismC18borrowRefrigerator{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (MyMagnetism) -> @autoreleased CCRefrigerator
   override func borrowRefrigerator() -> CCRefrigerator {
     return super.borrowRefrigerator()
   }
diff --git a/test/SILGen/cf_members.swift b/test/SILGen/cf_members.swift
index ac6f248..575eab9 100644
--- a/test/SILGen/cf_members.swift
+++ b/test/SILGen/cf_members.swift
@@ -4,7 +4,7 @@
 
 func makeMetatype() -> Struct1.Type { return Struct1.self }
 
-// CHECK-LABEL: sil @$s10cf_members17importAsUnaryInityyF
+// CHECK-LABEL: sil [ossa] @$s10cf_members17importAsUnaryInityyF
 public func importAsUnaryInit() {
   // CHECK: function_ref @CCPowerSupplyCreateDangerous : $@convention(c) () -> @owned CCPowerSupply
   var a = CCPowerSupply(dangerous: ())
@@ -12,7 +12,7 @@
   a = f(())
 }
 
-// CHECK-LABEL: sil @$s10cf_members3foo{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s10cf_members3foo{{[_0-9a-zA-Z]*}}F
 public func foo(_ x: Double) {
 // CHECK: bb0([[X:%.*]] : $Double):
   // CHECK: [[GLOBALVAR:%.*]] = global_addr @IAMStruct1GlobalVar
@@ -236,42 +236,42 @@
 }
 // CHECK: } // end sil function '$s10cf_members3foo{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V5valueABSd_tcfCTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V5valueABSd_tcfCTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $@thin Struct1.Type):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1CreateSimple
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V9translate7radiansABSd_tFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V9translate7radiansABSd_tFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         store [[SELF]] to [trivial] [[TMP:%.*]] :
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1Rotate
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[TMP]], [[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V5scaleyABSdFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V5scaleyABSdFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1Scale
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]([[SELF]], [[X]])
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V12staticMethods5Int32VyFZTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V12staticMethods5Int32VyFZTO
 // CHECK:       bb0([[SELF:%.*]] : $@thin Struct1.Type):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1StaticMethod
 // CHECK:         [[RET:%.*]] = apply [[CFUNC]]()
 // CHECK:         return [[RET]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V13selfComesLast1xySd_tFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V13selfComesLast1xySd_tFTO
 // CHECK:       bb0([[X:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1SelfComesLast
 // CHECK:         apply [[CFUNC]]([[X]], [[SELF]])
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10IAMStruct1V14selfComesThird1a1b1xys5Int32V_SfSdtFTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10IAMStruct1V14selfComesThird1a1b1xys5Int32V_SfSdtFTO
 // CHECK:       bb0([[X:%.*]] : $Int32, [[Y:%.*]] : $Float, [[Z:%.*]] : $Double, [[SELF:%.*]] : $Struct1):
 // CHECK:         [[CFUNC:%.*]] = function_ref @IAMStruct1SelfComesThird
 // CHECK:         apply [[CFUNC]]([[X]], [[Y]], [[SELF]], [[Z]])
 
-// CHECK-LABEL: sil @$s10cf_members3bar{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s10cf_members3bar{{[_0-9a-zA-Z]*}}F
 public func bar(_ x: Double) {
   // CHECK: function_ref @CCPowerSupplyCreate : $@convention(c) (Double) -> @owned CCPowerSupply
   let ps = CCPowerSupply(watts: x)
@@ -292,7 +292,7 @@
   c()
 }
 
-// CHECK-LABEL: sil @$s10cf_members28importGlobalVarsAsProperties{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s10cf_members28importGlobalVarsAsProperties{{[_0-9a-zA-Z]*}}F
 public func importGlobalVarsAsProperties()
     -> (Double, CCPowerSupply, CCPowerSupply?) {
   // CHECK: global_addr @kCCPowerSupplyDC
diff --git a/test/SILGen/class_bound_protocols.swift b/test/SILGen/class_bound_protocols.swift
index fd7930f..f6c30f5 100644
--- a/test/SILGen/class_bound_protocols.swift
+++ b/test/SILGen/class_bound_protocols.swift
@@ -32,7 +32,7 @@
 
 class ConcreteSubclass : ConcreteClass { }
 
-// CHECK-LABEL: sil hidden @$ss19class_bound_generic{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss19class_bound_generic{{[_0-9a-zA-Z]*}}F
 func class_bound_generic<T : ClassBound>(x: T) -> T {
   var x = x
   // CHECK: bb0([[X:%.*]] : @guaranteed $T):
@@ -47,7 +47,7 @@
   // CHECK:   return [[X1]]
 }
 
-// CHECK-LABEL: sil hidden @$ss21class_bound_generic_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss21class_bound_generic_2{{[_0-9a-zA-Z]*}}F
 func class_bound_generic_2<T : ClassBound & NotClassBound>(x: T) -> T {
   var x = x
   // CHECK: bb0([[X:%.*]] : @guaranteed $T):
@@ -61,7 +61,7 @@
   // CHECK:   return [[X1]]
 }
 
-// CHECK-LABEL: sil hidden @$ss20class_bound_protocol{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss20class_bound_protocol{{[_0-9a-zA-Z]*}}F
 func class_bound_protocol(x: ClassBound) -> ClassBound {
   var x = x
   // CHECK: bb0([[X:%.*]] : @guaranteed $ClassBound):
@@ -75,7 +75,7 @@
   // CHECK:   return [[X1]]
 }
 
-// CHECK-LABEL: sil hidden @$ss32class_bound_protocol_composition{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss32class_bound_protocol_composition{{[_0-9a-zA-Z]*}}F
 func class_bound_protocol_composition(x: ClassBound & NotClassBound)
 -> ClassBound & NotClassBound {
   var x = x
@@ -90,14 +90,14 @@
   // CHECK:   return [[X1]]
 }
 
-// CHECK-LABEL: sil hidden @$ss19class_bound_erasure{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss19class_bound_erasure{{[_0-9a-zA-Z]*}}F
 func class_bound_erasure(x: ConcreteClass) -> ClassBound {
   return x
   // CHECK: [[PROTO:%.*]] = init_existential_ref {{%.*}} : $ConcreteClass, $ClassBound
   // CHECK: return [[PROTO]]
 }
 
-// CHECK-LABEL: sil hidden @$ss30class_bound_existential_upcast1xs10ClassBound_psAC_s0E6Bound2p_tF :
+// CHECK-LABEL: sil hidden [ossa] @$ss30class_bound_existential_upcast1xs10ClassBound_psAC_s0E6Bound2p_tF :
 func class_bound_existential_upcast(x: ClassBound & ClassBound2)
 -> ClassBound {
   return x
@@ -109,7 +109,7 @@
 }
 // CHECK: } // end sil function '$ss30class_bound_existential_upcast1xs10ClassBound_psAC_s0E6Bound2p_tF'
 
-// CHECK-LABEL: sil hidden @$ss41class_bound_to_unbound_existential_upcast1xs13NotClassBound_ps0hI0_sACp_tF :
+// CHECK-LABEL: sil hidden [ossa] @$ss41class_bound_to_unbound_existential_upcast1xs13NotClassBound_ps0hI0_sACp_tF :
 // CHECK: bb0([[ARG0:%.*]] : $*NotClassBound, [[ARG1:%.*]] : @guaranteed $ClassBound & NotClassBound):
 // CHECK:   [[X_OPENED:%.*]] = open_existential_ref [[ARG1]] : $ClassBound & NotClassBound to [[OPENED_TYPE:\$@opened(.*) ClassBound & NotClassBound]]
 // CHECK:   [[PAYLOAD_ADDR:%.*]] = init_existential_addr [[ARG0]] : $*NotClassBound, [[OPENED_TYPE]]
@@ -120,7 +120,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$ss18class_bound_method1xys10ClassBound_p_tF :
+// CHECK-LABEL: sil hidden [ossa] @$ss18class_bound_method1xys10ClassBound_p_tF :
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ClassBound):
 func class_bound_method(x: ClassBound) {
   var x = x
@@ -152,7 +152,7 @@
 
 func takesInOut<T>(_: inout T) {}
 
-// CHECK-LABEL: sil hidden @$ss27takesInheritsMutatingMethod1x1yys0bcD0_pz_s5ValueVtF : $@convention(thin) (@inout InheritsMutatingMethod, Value) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss27takesInheritsMutatingMethod1x1yys0bcD0_pz_s5ValueVtF : $@convention(thin) (@inout InheritsMutatingMethod, Value) -> () {
 func takesInheritsMutatingMethod(x: inout InheritsMutatingMethod,
                                  y: Value) {
   // CHECK:      [[X_ADDR:%.*]] = begin_access [modify] [unknown] %0 : $*InheritsMutatingMethod
diff --git a/test/SILGen/class_resilience.swift b/test/SILGen/class_resilience.swift
index fd87eb3..47e0425 100644
--- a/test/SILGen/class_resilience.swift
+++ b/test/SILGen/class_resilience.swift
@@ -9,7 +9,7 @@
 // Accessing final property of resilient class from different resilience domain
 // through accessor
 
-// CHECK-LABEL: sil @$s16class_resilience20finalPropertyOfOtheryy010resilient_A022ResilientOutsideParentCF
+// CHECK-LABEL: sil [ossa] @$s16class_resilience20finalPropertyOfOtheryy010resilient_A022ResilientOutsideParentCF
 // CHECK: function_ref @$s15resilient_class22ResilientOutsideParentC13finalPropertySSvg
 
 public func finalPropertyOfOther(_ other: ResilientOutsideParent) {
@@ -23,7 +23,7 @@
 // Accessing final property of resilient class from my resilience domain
 // directly
 
-// CHECK-LABEL: sil @$s16class_resilience19finalPropertyOfMineyyAA16MyResilientClassCF
+// CHECK-LABEL: sil [ossa] @$s16class_resilience19finalPropertyOfMineyyAA16MyResilientClassCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $MyResilientClass):
 // CHECK:   ref_element_addr [[ARG]] : $MyResilientClass, #MyResilientClass.finalProperty
 // CHECK: } // end sil function '$s16class_resilience19finalPropertyOfMineyyAA16MyResilientClassCF'
diff --git a/test/SILGen/closure_inline_initializer.swift b/test/SILGen/closure_inline_initializer.swift
index d6326ed..763df6b 100644
--- a/test/SILGen/closure_inline_initializer.swift
+++ b/test/SILGen/closure_inline_initializer.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil private @$s26closure_inline_initializer3FooV3fooSivpfiSiyXEfU_
+// CHECK-LABEL: sil private [ossa] @$s26closure_inline_initializer3FooV3fooSivpfiSiyXEfU_
 
 struct Foo {
   var foo: Int = { 2 }()
diff --git a/test/SILGen/closure_script_global_escape.swift b/test/SILGen/closure_script_global_escape.swift
index 5e6633d..afd784e 100644
--- a/test/SILGen/closure_script_global_escape.swift
+++ b/test/SILGen/closure_script_global_escape.swift
@@ -1,7 +1,7 @@
 // RUN: %target-swift-emit-silgen -module-name foo -enable-sil-ownership %s | %FileCheck %s
 // RUN: %target-swift-emit-sil -module-name foo -enable-sil-ownership -verify %s
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 
 // CHECK: [[GLOBAL:%.*]] = global_addr @$s3foo4flagSbv
 // CHECK: [[MARK:%.*]] = mark_uninitialized [var] [[GLOBAL]]
diff --git a/test/SILGen/closure_self_recursion.swift b/test/SILGen/closure_self_recursion.swift
index 0ec4455..180ed6d 100644
--- a/test/SILGen/closure_self_recursion.swift
+++ b/test/SILGen/closure_self_recursion.swift
@@ -1,15 +1,15 @@
 // RUN: %target-swift-emit-silgen -module-name foo -enable-sil-ownership %s | %FileCheck %s
 // RUN: %target-swift-emit-sil -module-name foo -enable-sil-ownership -verify %s
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 
-// CHECK-LABEL: sil private @$s3foo5recuryycvgyycfU_
+// CHECK-LABEL: sil private [ossa] @$s3foo5recuryycvgyycfU_
 var recur : () -> () {
   // CHECK-LABEL: function_ref @$s3foo5recuryycvg
   return { recur() } // expected-warning {{attempting to access 'recur' within its own getter}}
 }
 
-// CHECK-LABEL: sil private @$s3foo12recur_harderyyycyyXEcvgyycyyXEcfU_
+// CHECK-LABEL: sil private [ossa] @$s3foo12recur_harderyyycyyXEcvgyycyyXEcfU_
 var recur_harder : (() -> ()) -> (() -> ()) {
   // CHECK-LABEL: function_ref @$s3foo12recur_harderyyycyyXEcvg
   return { f in recur_harder(f) } // expected-warning {{attempting to access 'recur_harder' within its own getter}}
diff --git a/test/SILGen/closures.swift b/test/SILGen/closures.swift
index 7c5a72d..cac9108 100644
--- a/test/SILGen/closures.swift
+++ b/test/SILGen/closures.swift
@@ -7,7 +7,7 @@
 var zero = 0
 
 // <rdar://problem/15921334>
-// CHECK-LABEL: sil hidden @$s8closures46return_local_generic_function_without_captures{{[_0-9a-zA-Z]*}}F : $@convention(thin) <A, R> () -> @owned @callee_guaranteed (@in_guaranteed A) -> @out R {
+// CHECK-LABEL: sil hidden [ossa] @$s8closures46return_local_generic_function_without_captures{{[_0-9a-zA-Z]*}}F : $@convention(thin) <A, R> () -> @owned @callee_guaranteed (@in_guaranteed A) -> @out R {
 func return_local_generic_function_without_captures<A, R>() -> (A) -> R {
   func f(_: A) -> R {
     Builtin.int_trap()
@@ -26,7 +26,7 @@
   return f
 }
 
-// CHECK-LABEL: sil hidden @$s8closures17read_only_captureyS2iF : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s8closures17read_only_captureyS2iF : $@convention(thin) (Int) -> Int {
 func read_only_capture(_ x: Int) -> Int {
   var x = x
   // CHECK: bb0([[X:%[0-9]+]] : $Int):
@@ -51,7 +51,7 @@
 }
 // CHECK:   } // end sil function '$s8closures17read_only_captureyS2iF'
 
-// CHECK: sil private @[[CAP_NAME]]
+// CHECK: sil private [ossa] @[[CAP_NAME]]
 // CHECK: bb0([[XBOX:%[0-9]+]] : @guaranteed ${ var Int }):
 // CHECK: [[XADDR:%[0-9]+]] = project_box [[XBOX]]
 // CHECK: [[ACCESS:%.*]] = begin_access [read] [unknown] [[XADDR]] : $*Int
@@ -60,7 +60,7 @@
 // } // end sil function '[[CAP_NAME]]'
 
 // SEMANTIC ARC TODO: This is a place where we have again project_box too early.
-// CHECK-LABEL: sil hidden @$s8closures16write_to_captureyS2iF : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s8closures16write_to_captureyS2iF : $@convention(thin) (Int) -> Int {
 func write_to_capture(_ x: Int) -> Int {
   var x = x
   // CHECK: bb0([[X:%[0-9]+]] : $Int):
@@ -95,7 +95,7 @@
 }
 // CHECK:  } // end sil function '$s8closures16write_to_captureyS2iF'
 
-// CHECK: sil private @[[SCRIB_NAME]]
+// CHECK: sil private [ossa] @[[SCRIB_NAME]]
 // CHECK: bb0([[XBOX:%[0-9]+]] : @guaranteed ${ var Int }):
 // CHECK:   [[XADDR:%[0-9]+]] = project_box [[XBOX]]
 // CHECK:   [[ACCESS:%.*]] = begin_access [modify] [unknown] [[XADDR]] : $*Int
@@ -103,7 +103,7 @@
 // CHECK:   return
 // CHECK: } // end sil function '[[SCRIB_NAME]]'
 
-// CHECK-LABEL: sil hidden @$s8closures21multiple_closure_refs{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures21multiple_closure_refs{{[_0-9a-zA-Z]*}}F
 func multiple_closure_refs(_ x: Int) -> (() -> Int, () -> Int) {
   var x = x
   func cap() -> Int {
@@ -119,7 +119,7 @@
   // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s8closures18capture_local_funcySiycycSiF : $@convention(thin) (Int) -> @owned @callee_guaranteed () -> @owned @callee_guaranteed () -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s8closures18capture_local_funcySiycycSiF : $@convention(thin) (Int) -> @owned @callee_guaranteed () -> @owned @callee_guaranteed () -> Int {
 func capture_local_func(_ x: Int) -> () -> () -> Int {
   // CHECK: bb0([[ARG:%.*]] : $Int):
   var x = x
@@ -142,10 +142,10 @@
 }
 // CHECK: } // end sil function '$s8closures18capture_local_funcySiycycSiF'
 
-// CHECK: sil private @[[ALEPH_NAME:\$s8closures18capture_local_funcySiycycSiF5alephL_SiyF]] : $@convention(thin) (@guaranteed { var Int }) -> Int {
+// CHECK: sil private [ossa] @[[ALEPH_NAME:\$s8closures18capture_local_funcySiycycSiF5alephL_SiyF]] : $@convention(thin) (@guaranteed { var Int }) -> Int {
 // CHECK: bb0([[XBOX:%[0-9]+]] : @guaranteed ${ var Int }):
 
-// CHECK: sil private @[[BETH_NAME]] : $@convention(thin) (@guaranteed { var Int }) -> @owned @callee_guaranteed () -> Int {
+// CHECK: sil private [ossa] @[[BETH_NAME]] : $@convention(thin) (@guaranteed { var Int }) -> @owned @callee_guaranteed () -> Int {
 // CHECK: bb0([[XBOX:%[0-9]+]] : @guaranteed ${ var Int }):
 // CHECK:   [[XBOX_PB:%.*]] = project_box [[XBOX]]
 // CHECK:   [[ALEPH_REF:%[0-9]+]] = function_ref @[[ALEPH_NAME]] : $@convention(thin) (@guaranteed { var Int }) -> Int
@@ -156,7 +156,7 @@
 // CHECK:   return [[ALEPH_CLOSURE]]
 // CHECK: } // end sil function '[[BETH_NAME]]'
 
-// CHECK-LABEL: sil hidden @$s8closures22anon_read_only_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures22anon_read_only_capture{{[_0-9a-zA-Z]*}}F
 func anon_read_only_capture(_ x: Int) -> Int {
   var x = x
   // CHECK: bb0([[X:%[0-9]+]] : $Int):
@@ -172,13 +172,13 @@
   // CHECK: destroy_value [[XBOX]]
   // CHECK: return [[RET]]
 }
-// CHECK: sil private @[[CLOSURE_NAME]]
+// CHECK: sil private [ossa] @[[CLOSURE_NAME]]
 // CHECK: bb0([[XADDR:%[0-9]+]] : $*Int):
 // CHECK: [[ACCESS:%.*]] = begin_access [read] [unknown] [[XADDR]] : $*Int
 // CHECK: [[X:%[0-9]+]] = load [trivial] [[ACCESS]]
 // CHECK: return [[X]]
 
-// CHECK-LABEL: sil hidden @$s8closures21small_closure_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures21small_closure_capture{{[_0-9a-zA-Z]*}}F
 func small_closure_capture(_ x: Int) -> Int {
   var x = x
   // CHECK: bb0([[X:%[0-9]+]] : $Int):
@@ -194,14 +194,14 @@
   // CHECK: destroy_value [[XBOX]]
   // CHECK: return [[RET]]
 }
-// CHECK: sil private @[[CLOSURE_NAME]]
+// CHECK: sil private [ossa] @[[CLOSURE_NAME]]
 // CHECK: bb0([[XADDR:%[0-9]+]] : $*Int):
 // CHECK: [[ACCESS:%.*]] = begin_access [read] [unknown] [[XADDR]] : $*Int
 // CHECK: [[X:%[0-9]+]] = load [trivial] [[ACCESS]]
 // CHECK: return [[X]]
 
 
-// CHECK-LABEL: sil hidden @$s8closures35small_closure_capture_with_argument{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures35small_closure_capture_with_argument{{[_0-9a-zA-Z]*}}F
 func small_closure_capture_with_argument(_ x: Int) -> (_ y: Int) -> Int {
   var x = x
   // CHECK: [[XBOX:%[0-9]+]] = alloc_box ${ var Int }
@@ -215,7 +215,7 @@
   // CHECK: destroy_value [[XBOX]]
   // CHECK: return [[ANON_CLOSURE_APP]]
 }
-// CHECK: sil private @[[CLOSURE_NAME]] : $@convention(thin) (Int, @guaranteed { var Int }) -> Int
+// CHECK: sil private [ossa] @[[CLOSURE_NAME]] : $@convention(thin) (Int, @guaranteed { var Int }) -> Int
 // CHECK: bb0([[DOLLAR0:%[0-9]+]] : $Int, [[XBOX:%[0-9]+]] : @guaranteed ${ var Int }):
 // CHECK: [[XADDR:%[0-9]+]] = project_box [[XBOX]]
 // CHECK: [[INTTYPE:%[0-9]+]] = metatype $@thin Int.Type
@@ -226,17 +226,17 @@
 // CHECK: [[RET:%[0-9]+]] = apply [[PLUS]]([[LHS]], [[DOLLAR0]], [[INTTYPE]])
 // CHECK: return [[RET]]
 
-// CHECK-LABEL: sil hidden @$s8closures24small_closure_no_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures24small_closure_no_capture{{[_0-9a-zA-Z]*}}F
 func small_closure_no_capture() -> (_ y: Int) -> Int {
   // CHECK:   [[ANON:%[0-9]+]] = function_ref @[[CLOSURE_NAME:\$s8closures24small_closure_no_captureS2icyFS2icfU_]] : $@convention(thin) (Int) -> Int
   // CHECK:   [[ANON_THICK:%[0-9]+]] = thin_to_thick_function [[ANON]] : ${{.*}} to $@callee_guaranteed (Int) -> Int
   // CHECK:   return [[ANON_THICK]]
   return { $0 }
 }
-// CHECK: sil private @[[CLOSURE_NAME]] : $@convention(thin) (Int) -> Int
+// CHECK: sil private [ossa] @[[CLOSURE_NAME]] : $@convention(thin) (Int) -> Int
 // CHECK: bb0([[YARG:%[0-9]+]] : $Int):
 
-// CHECK-LABEL: sil hidden @$s8closures17uncaptured_locals{{[_0-9a-zA-Z]*}}F :
+// CHECK-LABEL: sil hidden [ossa] @$s8closures17uncaptured_locals{{[_0-9a-zA-Z]*}}F :
 func uncaptured_locals(_ x: Int) -> (Int, Int) {
   var x = x
   // -- locals without captures are stack-allocated
@@ -276,11 +276,11 @@
     var z = { _ = T.self } ()
   }
 
-  // CHECK-LABEL: sil private @$s8closures16SomeGenericClassCfdSiyXEfU_ : $@convention(thin) (@inout_aliasable Int) -> Int
+  // CHECK-LABEL: sil private [ossa] @$s8closures16SomeGenericClassCfdSiyXEfU_ : $@convention(thin) (@inout_aliasable Int) -> Int
 
-  // CHECK-LABEL: sil private @$s8closures16SomeGenericClassCfdSiyXEfU0_ : $@convention(thin) () -> Int
+  // CHECK-LABEL: sil private [ossa] @$s8closures16SomeGenericClassCfdSiyXEfU0_ : $@convention(thin) () -> Int
 
-  // CHECK-LABEL: sil private @$s8closures16SomeGenericClassCfdyyXEfU1_ : $@convention(thin) <T> () -> ()
+  // CHECK-LABEL: sil private [ossa] @$s8closures16SomeGenericClassCfdyyXEfU1_ : $@convention(thin) <T> () -> ()
 }
 
 // This is basically testing that the constraint system ranking
@@ -292,7 +292,7 @@
   takesSomeClassGenerator({ x })
 }
 
-// CHECK-LABEL: sil private @$s8closures20generateWithConstantyyAA17SomeSpecificClassCFAA0eG0CyXEfU_ : $@convention(thin) (@guaranteed SomeSpecificClass) -> @owned SomeClass {
+// CHECK-LABEL: sil private [ossa] @$s8closures20generateWithConstantyyAA17SomeSpecificClassCFAA0eG0CyXEfU_ : $@convention(thin) (@guaranteed SomeSpecificClass) -> @owned SomeClass {
 // CHECK: bb0([[T0:%.*]] : @guaranteed $SomeSpecificClass):
 // CHECK:   debug_value [[T0]] : $SomeSpecificClass, let, name "x", argno 1
 // CHECK:   [[T0_COPY:%.*]] = copy_value [[T0]]
@@ -310,7 +310,7 @@
 class SelfCapturedInInit : Base {
   var foo : () -> SelfCapturedInInit
 
-  // CHECK-LABEL: sil hidden @$s8closures18SelfCapturedInInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned SelfCapturedInInit) -> @owned SelfCapturedInInit {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures18SelfCapturedInInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned SelfCapturedInInit) -> @owned SelfCapturedInInit {
   // CHECK: bb0([[SELF:%.*]] : @owned $SelfCapturedInInit):
   //
   // First create our initial value for self.
@@ -375,7 +375,7 @@
 
 // The let property needs to be captured into a temporary stack slot so that it
 // is loadable even though we capture the value.
-// CHECK-LABEL: sil private @$s8closures18closeOverLetLValueyyFSiyXEfU_ : $@convention(thin) (@guaranteed ClassWithIntProperty) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s8closures18closeOverLetLValueyyFSiyXEfU_ : $@convention(thin) (@guaranteed ClassWithIntProperty) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ClassWithIntProperty):
 // CHECK:   [[TMP_CLASS_ADDR:%.*]] = alloc_stack $ClassWithIntProperty, let, name "a", argno 1
 // CHECK:   [[COPY_ARG:%.*]] = copy_value [[ARG]]
@@ -390,7 +390,7 @@
 // CHECK:   return [[INT_IN_CLASS]]
 // CHECK: } // end sil function '$s8closures18closeOverLetLValueyyFSiyXEfU_'
 
-// GUARANTEED-LABEL: sil private @$s8closures18closeOverLetLValueyyFSiyXEfU_ : $@convention(thin) (@guaranteed ClassWithIntProperty) -> Int {
+// GUARANTEED-LABEL: sil private [ossa] @$s8closures18closeOverLetLValueyyFSiyXEfU_ : $@convention(thin) (@guaranteed ClassWithIntProperty) -> Int {
 // GUARANTEED: bb0(%0 : @guaranteed $ClassWithIntProperty):
 // GUARANTEED:   [[TMP:%.*]] = alloc_stack $ClassWithIntProperty
 // GUARANTEED:   [[COPY:%.*]] = copy_value %0 : $ClassWithIntProperty
@@ -416,13 +416,13 @@
 
 // Check that the address of self is passed in, but not the refcount pointer.
 
-// CHECK-LABEL: sil hidden @$s8closures24StructWithMutatingMethodV08mutatingE0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8closures24StructWithMutatingMethodV08mutatingE0{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*StructWithMutatingMethod):
 // CHECK: [[CLOSURE:%[0-9]+]] = function_ref @$s8closures24StructWithMutatingMethodV08mutatingE0{{.*}} : $@convention(thin) (@inout_aliasable StructWithMutatingMethod) -> Int
 // CHECK: partial_apply [callee_guaranteed] [[CLOSURE]](%0) : $@convention(thin) (@inout_aliasable StructWithMutatingMethod) -> Int
 
 // Check that the closure body only takes the pointer.
-// CHECK-LABEL: sil private @$s8closures24StructWithMutatingMethodV08mutatingE0{{.*}} : $@convention(thin) (@inout_aliasable StructWithMutatingMethod) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s8closures24StructWithMutatingMethodV08mutatingE0{{.*}} : $@convention(thin) (@inout_aliasable StructWithMutatingMethod) -> Int {
 // CHECK:       bb0(%0 : $*StructWithMutatingMethod):
 
 class SuperBase {
@@ -431,13 +431,13 @@
 class SuperSub : SuperBase {
   override func boom() {}
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1ayyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1ayyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1a[_0-9a-zA-Z]*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   apply [[INNER]]([[SELF]])
   // CHECK: } // end sil function '$s8closures8SuperSubC1ayyF'
   func a() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[CLASS_METHOD:%.*]] = class_method [[ARG]] : $SuperSub, #SuperSub.boom!1
     // CHECK:   = apply [[CLASS_METHOD]]([[ARG]])
@@ -454,19 +454,19 @@
     a1()
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1byyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1byyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1b[_0-9a-zA-Z]*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   = apply [[INNER]]([[SELF]])
   // CHECK: } // end sil function '$s8closures8SuperSubC1byyF'
   func b() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_2:\$s8closures8SuperSubC1b.*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
     // CHECK:   = apply [[INNER]]([[ARG]])
     // CHECK: } // end sil function '[[INNER_FUNC_1]]'
     func b1() {
-      // CHECK: sil private @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+      // CHECK: sil private [ossa] @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> () {
       // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
       // CHECK:   [[CLASS_METHOD:%.*]] = class_method [[ARG]] : $SuperSub, #SuperSub.boom!1
       // CHECK:   = apply [[CLASS_METHOD]]([[ARG]]) : $@convention(method) (@guaranteed SuperSub) -> ()
@@ -485,7 +485,7 @@
     b1()
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1cyyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1cyyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1c[_0-9a-zA-Z]*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -500,7 +500,7 @@
   // CHECK:   destroy_value [[PA]]
   // CHECK: } // end sil function '$s8closures8SuperSubC1cyyF'
   func c() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> ()
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> ()
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[CLASS_METHOD:%.*]] = class_method [[ARG]] : $SuperSub, #SuperSub.boom!1
     // CHECK:   = apply [[CLASS_METHOD]]([[ARG]]) : $@convention(method) (@guaranteed SuperSub) -> ()
@@ -517,7 +517,7 @@
     c1()
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1dyyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1dyyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1d[_0-9a-zA-Z]*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -532,13 +532,13 @@
   // CHECK:   destroy_value [[PA]]
   // CHECK: } // end sil function '$s8closures8SuperSubC1dyyF'
   func d() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_2:\$s8closures8SuperSubC1d.*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
     // CHECK:   = apply [[INNER]]([[ARG]])
     // CHECK: } // end sil function '[[INNER_FUNC_1]]'
     let d1 = { () -> Void in
-      // CHECK: sil private @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+      // CHECK: sil private [ossa] @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> () {
       // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
       // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
       // CHECK:   [[ARG_COPY_SUPER:%.*]] = upcast [[ARG_COPY]] : $SuperSub to $SuperBase
@@ -554,13 +554,13 @@
     d1()
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1eyyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1eyyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK: [[INNER:%.*]] = function_ref @[[INNER_FUNC_NAME1:\$s8closures8SuperSubC1e[_0-9a-zA-Z]*]] : $@convention(thin)
   // CHECK: = apply [[INNER]]([[SELF]])
   // CHECK: } // end sil function '$s8closures8SuperSubC1eyyF'
   func e() {
-    // CHECK: sil private @[[INNER_FUNC_NAME1]] : $@convention(thin)
+    // CHECK: sil private [ossa] @[[INNER_FUNC_NAME1]] : $@convention(thin)
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_NAME2:\$s8closures8SuperSubC1e.*]] : $@convention(thin)
     // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -575,7 +575,7 @@
     // CHECK:   destroy_value [[PA]]
     // CHECK: } // end sil function '[[INNER_FUNC_NAME1]]'
     func e1() {
-      // CHECK: sil private @[[INNER_FUNC_NAME2]] : $@convention(thin)
+      // CHECK: sil private [ossa] @[[INNER_FUNC_NAME2]] : $@convention(thin)
       // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
       // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
       // CHECK:   [[ARG_COPY_SUPERCAST:%.*]] = upcast [[ARG_COPY]] : $SuperSub to $SuperBase
@@ -592,7 +592,7 @@
     e1()
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1fyyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1fyyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1fyyFyycfU_]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -600,7 +600,7 @@
   // CHECK:   destroy_value [[PA]]
   // CHECK: } // end sil function '$s8closures8SuperSubC1fyyF'
   func f() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> () {
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_2:\$s8closures8SuperSubC1fyyFyycfU_yyKXEfu_]] : $@convention(thin) (@guaranteed SuperSub) -> @error Error
     // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -613,7 +613,7 @@
     // CHECK: [[NORMAL_BB]]{{.*}}
     // CHECK: } // end sil function '[[INNER_FUNC_1]]'
     let f1 = {
-      // CHECK: sil private [transparent] @[[INNER_FUNC_2]]
+      // CHECK: sil private [transparent] [ossa] @[[INNER_FUNC_2]]
       // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
       // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
       // CHECK:   [[ARG_COPY_SUPER:%.*]] = upcast [[ARG_COPY]] : $SuperSub to $SuperBase
@@ -625,13 +625,13 @@
     }
   }
 
-  // CHECK-LABEL: sil hidden @$s8closures8SuperSubC1gyyF : $@convention(method) (@guaranteed SuperSub) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s8closures8SuperSubC1gyyF : $@convention(method) (@guaranteed SuperSub) -> () {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SuperSub):
   // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_1:\$s8closures8SuperSubC1g[_0-9a-zA-Z]*]] : $@convention(thin) (@guaranteed SuperSub) -> ()
   // CHECK:   = apply [[INNER]]([[SELF]])
   // CHECK: } // end sil function '$s8closures8SuperSubC1gyyF'
   func g() {
-    // CHECK: sil private @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> ()
+    // CHECK: sil private [ossa] @[[INNER_FUNC_1]] : $@convention(thin) (@guaranteed SuperSub) -> ()
     // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
     // CHECK:   [[INNER:%.*]] = function_ref @[[INNER_FUNC_2:\$s8closures8SuperSubC1g.*]] : $@convention(thin) (@guaranteed SuperSub) -> @error Error
     // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -644,7 +644,7 @@
     // CHECK: [[NORMAL_BB]]{{.*}}
     // CHECK: } // end sil function '[[INNER_FUNC_1]]'
     func g1() {
-      // CHECK: sil private [transparent] @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> @error Error {
+      // CHECK: sil private [transparent] [ossa] @[[INNER_FUNC_2]] : $@convention(thin) (@guaranteed SuperSub) -> @error Error {
       // CHECK: bb0([[ARG:%.*]] : @guaranteed $SuperSub):
       // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
       // CHECK:   [[ARG_COPY_SUPER:%.*]] = upcast [[ARG_COPY]] : $SuperSub to $SuperBase
@@ -658,7 +658,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s8closures24UnownedSelfNestedCaptureC06nestedE0{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed UnownedSelfNestedCapture) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8closures24UnownedSelfNestedCaptureC06nestedE0{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed UnownedSelfNestedCapture) -> ()
 // -- We enter with an assumed strong +1.
 // CHECK:  bb0([[SELF:%.*]] : @guaranteed $UnownedSelfNestedCapture):
 // CHECK:         [[OUTER_SELF_CAPTURE:%.*]] = alloc_box ${ var @sil_unowned UnownedSelfNestedCapture }
@@ -699,7 +699,7 @@
 
 // -- outer closure
 // -- strong +0, unowned +1
-// CHECK: sil private @[[OUTER_CLOSURE_FUN:\$s8closures24UnownedSelfNestedCaptureC06nestedE0yyFACycyXEfU_]] : $@convention(thin) (@guaranteed @sil_unowned UnownedSelfNestedCapture) -> @owned @callee_guaranteed () -> @owned UnownedSelfNestedCapture {
+// CHECK: sil private [ossa] @[[OUTER_CLOSURE_FUN:\$s8closures24UnownedSelfNestedCaptureC06nestedE0yyFACycyXEfU_]] : $@convention(thin) (@guaranteed @sil_unowned UnownedSelfNestedCapture) -> @owned @callee_guaranteed () -> @owned UnownedSelfNestedCapture {
 // CHECK: bb0([[CAPTURED_SELF:%.*]] : @guaranteed $@sil_unowned UnownedSelfNestedCapture):
 // -- strong +0, unowned +2
 // CHECK:         [[CAPTURED_SELF_COPY:%.*]] = copy_value [[CAPTURED_SELF]] :
@@ -711,7 +711,7 @@
 
 // -- inner closure
 // -- strong +0, unowned +1
-// CHECK: sil private @[[INNER_CLOSURE_FUN:\$s8closures24UnownedSelfNestedCaptureC06nestedE0yyFACycyXEfU_ACycfU_]] : $@convention(thin) (@guaranteed @sil_unowned UnownedSelfNestedCapture) -> @owned UnownedSelfNestedCapture {
+// CHECK: sil private [ossa] @[[INNER_CLOSURE_FUN:\$s8closures24UnownedSelfNestedCaptureC06nestedE0yyFACycyXEfU_ACycfU_]] : $@convention(thin) (@guaranteed @sil_unowned UnownedSelfNestedCapture) -> @owned UnownedSelfNestedCapture {
 // CHECK: bb0([[CAPTURED_SELF:%.*]] : @guaranteed $@sil_unowned UnownedSelfNestedCapture):
 // -- strong +1, unowned +1
 // CHECK:         [[SELF:%.*]] = copy_unowned_value [[CAPTURED_SELF:%.*]] :
@@ -731,7 +731,7 @@
   func swim() {}
 }
 
-// CHECK-LABEL: sil private @$s8closures14GenericDerivedC4swimyyFyyXEfU_ : $@convention(thin) <Ocean> (@guaranteed GenericDerived<Ocean>) -> ()
+// CHECK-LABEL: sil private [ossa] @$s8closures14GenericDerivedC4swimyyFyyXEfU_ : $@convention(thin) <Ocean> (@guaranteed GenericDerived<Ocean>) -> ()
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $GenericDerived<Ocean>):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[ARG_COPY_SUPER:%.*]] = upcast [[ARG_COPY]] : $GenericDerived<Ocean> to $ConcreteBase
@@ -777,7 +777,7 @@
 }
 
 //   DI will turn this into a direct capture of the specific stored property.
-// CHECK-LABEL: sil hidden @$s8closures16r29810997_helperyS3iXEF : $@convention(thin) (@noescape @callee_guaranteed (Int) -> Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s8closures16r29810997_helperyS3iXEF : $@convention(thin) (@noescape @callee_guaranteed (Int) -> Int) -> Int
 
 // rdar://problem/37790062
 
diff --git a/test/SILGen/closures_callee_guaranteed.swift b/test/SILGen/closures_callee_guaranteed.swift
index 5c63bed..5c20a65 100644
--- a/test/SILGen/closures_callee_guaranteed.swift
+++ b/test/SILGen/closures_callee_guaranteed.swift
@@ -1,7 +1,7 @@
 // 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)
+// CHECK-LABEL: sil [ossa] @{{.*}}apply{{.*}} : $@convention(thin) (@noescape @callee_guaranteed () -> Int)
 // bb0(%0 : $@noescape @callee_guaranteed () -> Int):
 //   [[B1:%.*]] = begin_borrow %0 : $@noescape @callee_guaranteed () -> Int
 //   [[C1:%.*]] = copy_value %2 : $@noescape @callee_guaranteed () -> Int
@@ -20,7 +20,7 @@
   return f()
 }
 
-// CHECK-LABEL: sil @{{.*}}test{{.*}} : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [ossa] @{{.*}}test{{.*}} : $@convention(thin) () -> ()
 // CHECK:   [[C1:%.*]] = function_ref @{{.*}}test{{.*}} : $@convention(thin) () -> Int
 // CHECK:   [[C2:%.*]] = convert_function [[C1]] : $@convention(thin) () -> Int to $@convention(thin) @noescape () -> Int
 // CHECK:   [[C3:%.*]] = thin_to_thick_function [[C2]] : $@convention(thin) @noescape () -> Int to $@noescape @callee_guaranteed () -> Int
diff --git a/test/SILGen/codable/struct_codable_member_type_lookup.swift b/test/SILGen/codable/struct_codable_member_type_lookup.swift
index 27bc423..2d57318 100644
--- a/test/SILGen/codable/struct_codable_member_type_lookup.swift
+++ b/test/SILGen/codable/struct_codable_member_type_lookup.swift
@@ -2,7 +2,7 @@
 
 // Make sure we have an int, not a float.
 //
-// CHECK-LABEL: sil hidden @$s33struct_codable_member_type_lookup32StaticInstanceNameDisambiguationV6encode2to{{.*}}F : $@convention(method) (@in_guaranteed Encoder, StaticInstanceNameDisambiguation) -> @error Error {
+// CHECK-LABEL: sil hidden [ossa] @$s33struct_codable_member_type_lookup32StaticInstanceNameDisambiguationV6encode2to{{.*}}F : $@convention(method) (@in_guaranteed Encoder, StaticInstanceNameDisambiguation) -> @error Error {
 // CHECK: bb0([[ENCODER:%.*]] : $*Encoder, [[INPUT:%.*]] : $StaticInstanceNameDisambiguation):
 // CHECK:   [[INT_VALUE:%.*]] = struct_extract [[INPUT]]
 // CHECK:   [[FUNC:%.*]] = function_ref @$ss22KeyedEncodingContainerV6encode_6forKeyySi_xtKF : $@convention(method) <τ_0_0 where τ_0_0 : CodingKey> (Int, @in_guaranteed τ_0_0, @inout KeyedEncodingContainer<τ_0_0>) -> @error Error
diff --git a/test/SILGen/collection_downcast.swift b/test/SILGen/collection_downcast.swift
index 8d8c92d..9e38ce0 100644
--- a/test/SILGen/collection_downcast.swift
+++ b/test/SILGen/collection_downcast.swift
@@ -41,7 +41,7 @@
 
 func == (x: BridgedSwift, y: BridgedSwift) -> Bool { return true }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast17testArrayDowncast{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast17testArrayDowncast{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>):
 func testArrayDowncast(_ array: [AnyObject]) -> [BridgedObjC] {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -50,21 +50,21 @@
   return array as! [BridgedObjC]
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast27testArrayDowncastFromObject{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast27testArrayDowncastFromObject{{.*}}F
 // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
 func testArrayDowncastFromObject(_ obj: AnyObject) -> [BridgedObjC] {
   // CHECK: unconditional_checked_cast_addr AnyObject in [[OBJECT_ALLOC:%[0-9]+]] : $*AnyObject to Array<BridgedObjC> in [[VALUE_ALLOC:%[0-9]+]] : $*Array<BridgedObjC>
   return obj as! [BridgedObjC]
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast28testArrayDowncastFromNSArray{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast28testArrayDowncastFromNSArray{{.*}}F
 // CHECK: bb0([[NSARRAY_OBJ:%[0-9]+]] : @guaranteed $NSArray):
 func testArrayDowncastFromNSArray(_ obj: NSArray) -> [BridgedObjC] {
   // CHECK: unconditional_checked_cast_addr NSArray in [[OBJECT_ALLOC:%[0-9]+]] : $*NSArray to Array<BridgedObjC> in [[VALUE_ALLOC:%[0-9]+]] : $*Array<BridgedObjC>
   return obj as! [BridgedObjC]
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast28testArrayDowncastConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast28testArrayDowncastConditional{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>):
 func testArrayDowncastConditional(_ array: [AnyObject]) -> [BridgedObjC]? {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -74,7 +74,7 @@
 }
 // CHECK: } // end sil function '$s19collection_downcast28testArrayDowncastConditional{{.*}}F'
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast12testArrayIsa{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast12testArrayIsa{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>)
 func testArrayIsa(_ array: [AnyObject]) -> Bool {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -84,7 +84,7 @@
   return array is [BridgedObjC] ? true : false
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast24testArrayDowncastBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast24testArrayDowncastBridged{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>):
 func testArrayDowncastBridged(_ array: [AnyObject]) -> [BridgedSwift] {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -94,7 +94,7 @@
   return array as! [BridgedSwift]
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast35testArrayDowncastBridgedConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast35testArrayDowncastBridgedConditional{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>):
 func testArrayDowncastBridgedConditional(_ array: [AnyObject]) -> [BridgedSwift]?{
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -104,7 +104,7 @@
   return array as? [BridgedSwift]
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast19testArrayIsaBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast19testArrayIsaBridged{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<AnyObject>)
 func testArrayIsaBridged(_ array: [AnyObject]) -> Bool {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -114,7 +114,7 @@
   return array is [BridgedSwift] ? true : false
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast32testDictionaryDowncastFromObject{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast32testDictionaryDowncastFromObject{{.*}}F
 // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
 func testDictionaryDowncastFromObject(_ obj: AnyObject) 
        -> Dictionary<BridgedObjC, BridgedObjC> {
@@ -122,7 +122,7 @@
   return obj as! Dictionary<BridgedObjC, BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast22testDictionaryDowncast{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast22testDictionaryDowncast{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncast(_ dict: Dictionary<NSObject, AnyObject>) 
        -> Dictionary<BridgedObjC, BridgedObjC> {
@@ -133,7 +133,7 @@
   return dict as! Dictionary<BridgedObjC, BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast33testDictionaryDowncastConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast33testDictionaryDowncastConditional{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncastConditional(_ dict: Dictionary<NSObject, AnyObject>) 
 -> Dictionary<BridgedObjC, BridgedObjC>? {
@@ -144,7 +144,7 @@
   return dict as? Dictionary<BridgedObjC, BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast41testDictionaryDowncastBridgedVConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast41testDictionaryDowncastBridgedVConditional{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncastBridgedVConditional(_ dict: Dictionary<NSObject, AnyObject>) 
        -> Dictionary<BridgedObjC, BridgedSwift>? {
@@ -155,7 +155,7 @@
   return dict as? Dictionary<BridgedObjC, BridgedSwift>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast41testDictionaryDowncastBridgedKConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast41testDictionaryDowncastBridgedKConditional{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncastBridgedKConditional(_ dict: Dictionary<NSObject, AnyObject>) 
 -> Dictionary<BridgedSwift, BridgedObjC>? {
@@ -166,7 +166,7 @@
   return dict as? Dictionary<BridgedSwift, BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast31testDictionaryDowncastBridgedKV{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast31testDictionaryDowncastBridgedKV{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncastBridgedKV(_ dict: Dictionary<NSObject, AnyObject>) 
 -> Dictionary<BridgedSwift, BridgedSwift> {
@@ -177,7 +177,7 @@
   return dict as! Dictionary<BridgedSwift, BridgedSwift>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast42testDictionaryDowncastBridgedKVConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast42testDictionaryDowncastBridgedKVConditional{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<NSObject, AnyObject>)
 func testDictionaryDowncastBridgedKVConditional(_ dict: Dictionary<NSObject, AnyObject>) 
        -> Dictionary<BridgedSwift, BridgedSwift>? {
@@ -188,7 +188,7 @@
   return dict as? Dictionary<BridgedSwift, BridgedSwift>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast25testSetDowncastFromObject{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast25testSetDowncastFromObject{{.*}}F
 // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
 func testSetDowncastFromObject(_ obj: AnyObject) 
        -> Set<BridgedObjC> {
@@ -196,7 +196,7 @@
   return obj as! Set<BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast15testSetDowncast{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast15testSetDowncast{{.*}}F
 // CHECK: bb0([[SET:%[0-9]+]] : @guaranteed $Set<NSObject>)
 func testSetDowncast(_ dict: Set<NSObject>) 
        -> Set<BridgedObjC> {
@@ -207,7 +207,7 @@
   return dict as! Set<BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast26testSetDowncastConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast26testSetDowncastConditional{{.*}}F
 // CHECK: bb0([[SET:%[0-9]+]] : @guaranteed $Set<NSObject>)
 func testSetDowncastConditional(_ dict: Set<NSObject>) 
        -> Set<BridgedObjC>? {
@@ -218,7 +218,7 @@
   return dict as? Set<BridgedObjC>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast22testSetDowncastBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast22testSetDowncastBridged{{.*}}F
 // CHECK: bb0([[SET:%[0-9]+]] : @guaranteed $Set<NSObject>)
 func testSetDowncastBridged(_ dict: Set<NSObject>) 
        -> Set<BridgedSwift> {
@@ -229,7 +229,7 @@
   return dict as! Set<BridgedSwift>
 }
 
-// CHECK-LABEL: sil hidden @$s19collection_downcast33testSetDowncastBridgedConditional{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19collection_downcast33testSetDowncastBridgedConditional{{.*}}F
 // CHECK: bb0([[SET:%[0-9]+]] : @guaranteed $Set<NSObject>)
 func testSetDowncastBridgedConditional(_ dict: Set<NSObject>) 
        -> Set<BridgedSwift>? {
diff --git a/test/SILGen/collection_subtype_downcast.swift b/test/SILGen/collection_subtype_downcast.swift
index 911d106..c628304 100644
--- a/test/SILGen/collection_subtype_downcast.swift
+++ b/test/SILGen/collection_subtype_downcast.swift
@@ -3,7 +3,7 @@
 
 struct S { var x, y: Int }
 
-// CHECK-LABEL: sil hidden @$s27collection_subtype_downcast06array_C00D0SayAA1SVGSgSayypG_tF :
+// CHECK-LABEL: sil hidden [ossa] @$s27collection_subtype_downcast06array_C00D0SayAA1SVGSgSayypG_tF :
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Array<Any>):
 // CHECK-NEXT: debug_value [[ARG]]
 // CHECK-NEXT: [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -27,7 +27,7 @@
 }
 
 // FIXME: This entrypoint name should not be bridging-specific
-// CHECK-LABEL:      sil hidden @$s27collection_subtype_downcast05dict_C00D0SDyAA1SVSiGSgSDyAEypG_tF :
+// CHECK-LABEL:      sil hidden [ossa] @$s27collection_subtype_downcast05dict_C00D0SDyAA1SVSiGSgSDyAEypG_tF :
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Dictionary<S, Any>):
 // CHECK: debug_value [[ARG]]
 // CHECK: [[ARG_COPY:%.*]] = copy_value [[ARG]]
diff --git a/test/SILGen/collection_subtype_upcast.swift b/test/SILGen/collection_subtype_upcast.swift
index f118d43..b5fb6c0 100644
--- a/test/SILGen/collection_subtype_upcast.swift
+++ b/test/SILGen/collection_subtype_upcast.swift
@@ -3,7 +3,7 @@
 
 struct S { var x, y: Int }
 
-// CHECK-LABEL: sil hidden @$s25collection_subtype_upcast06array_C00D0SayypGSayAA1SVG_tF :
+// CHECK-LABEL: sil hidden [ossa] @$s25collection_subtype_upcast06array_C00D0SayypGSayAA1SVG_tF :
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Array<S>):
 // CHECK: debug_value [[ARG]]
 // CHECK: [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -27,7 +27,7 @@
 }
 
 // FIXME: This entrypoint name should not be bridging-specific
-// CHECK-LABEL:      sil hidden @$s25collection_subtype_upcast05dict_C00D0SDyAA1SVypGSDyAESiG_tF :
+// CHECK-LABEL:      sil hidden [ossa] @$s25collection_subtype_upcast05dict_C00D0SDyAA1SVypGSDyAESiG_tF :
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Dictionary<S, Int>):
 // CHECK: debug_value [[ARG]]
 // CHECK: [[ARG_COPY:%.*]] = copy_value [[ARG]]
diff --git a/test/SILGen/collection_upcast.swift b/test/SILGen/collection_upcast.swift
index 5abbc51..6a2d7fd 100644
--- a/test/SILGen/collection_upcast.swift
+++ b/test/SILGen/collection_upcast.swift
@@ -1,8 +1,7 @@
 
-// RUN: %target-swift-emit-silgen -module-name collection_upcast -sdk %S/Inputs -I %S/Inputs -enable-source-import %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -module-name collection_upcast -sdk %S/Inputs -I %S/Inputs -enable-source-import %s -enable-objc-interop -disable-objc-attr-requires-foundation-module | %FileCheck %s
 
 // FIXME: rdar://problem/19648117 Needs splitting objc parts out
-// XFAIL: linux
 
 import Foundation
 
@@ -42,7 +41,7 @@
 
 func == (x: BridgedSwift, y: BridgedSwift) -> Bool { return true }
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast15testArrayUpcast{{.*}}F :
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast15testArrayUpcast{{.*}}F :
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<BridgedObjC>): 
 func testArrayUpcast(_ array: [BridgedObjC]) {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -54,7 +53,7 @@
 }
 // CHECK: } // end sil function '$s17collection_upcast15testArrayUpcast{{.*}}F'
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast22testArrayUpcastBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast22testArrayUpcastBridged{{.*}}F
 // CHECK: bb0([[ARRAY:%[0-9]+]] : @guaranteed $Array<BridgedSwift>):
 func testArrayUpcastBridged(_ array: [BridgedSwift]) {
   // CHECK: [[ARRAY_COPY:%.*]] = copy_value [[ARRAY]]
@@ -66,7 +65,7 @@
 }
 // CHECK: } // end sil function '$s17collection_upcast22testArrayUpcastBridged{{.*}}F'
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast20testDictionaryUpcast{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast20testDictionaryUpcast{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<BridgedObjC, BridgedObjC>):
 func testDictionaryUpcast(_ dict: Dictionary<BridgedObjC, BridgedObjC>) {
   // CHECK: [[DICT_COPY:%.*]] = copy_value [[DICT]]
@@ -77,7 +76,7 @@
   let anyObjectDict: Dictionary<NSObject, AnyObject> = dict
 }
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast27testDictionaryUpcastBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast27testDictionaryUpcastBridged{{.*}}F
 // CHECK: bb0([[DICT:%[0-9]+]] : @guaranteed $Dictionary<BridgedSwift, BridgedSwift>):
 func testDictionaryUpcastBridged(_ dict: Dictionary<BridgedSwift, BridgedSwift>) {
   // CHECK: [[DICT_COPY:%.*]] = copy_value [[DICT]]
@@ -88,7 +87,7 @@
   let anyObjectDict = dict as Dictionary<NSObject, AnyObject>
 }
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast13testSetUpcast{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast13testSetUpcast{{.*}}F
 // CHECK: bb0([[SET:%[0-9]+]] : @guaranteed $Set<BridgedObjC>):
 func testSetUpcast(_ dict: Set<BridgedObjC>) {
   // CHECK: [[SET_COPY:%.*]] = copy_value [[SET]]
@@ -99,7 +98,7 @@
   let anyObjectSet: Set<NSObject> = dict
 }
 
-// CHECK-LABEL: sil hidden @$s17collection_upcast20testSetUpcastBridged{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17collection_upcast20testSetUpcastBridged{{.*}}F
 // CHECK: bb0([[SET:%.*]] : @guaranteed $Set<BridgedSwift>):
 func testSetUpcastBridged(_ set: Set<BridgedSwift>) {
   // CHECK: [[SET_COPY:%.*]] = copy_value [[SET]]
diff --git a/test/SILGen/complete_object_init.swift b/test/SILGen/complete_object_init.swift
index d2bd23f..7192cc4 100644
--- a/test/SILGen/complete_object_init.swift
+++ b/test/SILGen/complete_object_init.swift
@@ -3,7 +3,7 @@
 struct X { }
 
 class A {
-// CHECK-LABEL: sil hidden @$s20complete_object_init1AC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick A.Type) -> @owned A
+// CHECK-LABEL: sil hidden [ossa] @$s20complete_object_init1AC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick A.Type) -> @owned A
 // CHECK: bb0([[SELF_META:%[0-9]+]] : $@thick A.Type):
 // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var A }
 // CHECK:   [[UNINIT_SELF:%[0-9]+]] = mark_uninitialized [delegatingself] [[SELF_BOX]] : ${ var A }
diff --git a/test/SILGen/conditional_conformance.swift b/test/SILGen/conditional_conformance.swift
index 6c651a0..b8e9d25 100644
--- a/test/SILGen/conditional_conformance.swift
+++ b/test/SILGen/conditional_conformance.swift
@@ -20,7 +20,7 @@
 // This is defined below but is emitted before any witness tables.
 // Just make sure it does not have a generic signature.
 //
-// CHECK-LABEL: sil private [transparent] [thunk] @$s23conditional_conformance16SameTypeConcreteVyxGAA2P1AASiRszlAaEP6normalyyFTW : $@convention(witness_method: P1) (@in_guaranteed SameTypeConcrete<Int>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s23conditional_conformance16SameTypeConcreteVyxGAA2P1AASiRszlAaEP6normalyyFTW : $@convention(witness_method: P1) (@in_guaranteed SameTypeConcrete<Int>) -> ()
 
 
 // CHECK-LABEL: sil_witness_table hidden <A where A : P2> Conformance<A>: P1 module conditional_conformance {
diff --git a/test/SILGen/conditionally_unreachable.swift b/test/SILGen/conditionally_unreachable.swift
index d593977..0f7ae91 100644
--- a/test/SILGen/conditionally_unreachable.swift
+++ b/test/SILGen/conditionally_unreachable.swift
@@ -16,7 +16,7 @@
   }
 }
 
-// RAW-LABEL: sil hidden @$s25conditionally_unreachable15condUnreachableyyF 
+// RAW-LABEL: sil hidden [ossa] @$s25conditionally_unreachable15condUnreachableyyF 
 // RAW:         cond_br {{%.*}}, [[YEA:bb[0-9]+]], [[NAY:bb[0-9]+]]
 // RAW:       [[YEA]]:
 // RAW:         function_ref @foo
diff --git a/test/SILGen/constrained_extensions.swift b/test/SILGen/constrained_extensions.swift
index ad5e5a8..a959099 100644
--- a/test/SILGen/constrained_extensions.swift
+++ b/test/SILGen/constrained_extensions.swift
@@ -4,14 +4,14 @@
 // RUN: %target-swift-emit-ir -module-name constrained_extensions -primary-file %s > /dev/null
 
 extension Array where Element == Int {
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE1xSaySiGyt_tcfC : $@convention(method) (@thin Array<Int>.Type) -> @owned Array<Int>
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE1xSaySiGyt_tcfC : $@convention(method) (@thin Array<Int>.Type) -> @owned Array<Int>
   public init(x: ()) {
     self.init()
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE16instancePropertySivg : $@convention(method) (@guaranteed Array<Int>) -> Int
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE16instancePropertySivs : $@convention(method) (Int, @inout Array<Int>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$sSa22constrained_extensionsSiRszlE16instancePropertySivM : $@yield_once @convention(method) (@inout Array<Int>) -> @yields @inout Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE16instancePropertySivg : $@convention(method) (@guaranteed Array<Int>) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE16instancePropertySivs : $@convention(method) (Int, @inout Array<Int>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$sSa22constrained_extensionsSiRszlE16instancePropertySivM : $@yield_once @convention(method) (@inout Array<Int>) -> @yields @inout Int
 
   public var instanceProperty: Element {
     get {
@@ -22,38 +22,38 @@
     }
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE14instanceMethodSiyF : $@convention(method) (@guaranteed Array<Int>) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE14instanceMethodSiyF : $@convention(method) (@guaranteed Array<Int>) -> Int
   public func instanceMethod() -> Element {
     return instanceProperty
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE14instanceMethod1eS2i_tF : $@convention(method) (Int, @guaranteed Array<Int>) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE14instanceMethod1eS2i_tF : $@convention(method) (Int, @guaranteed Array<Int>) -> Int
   public func instanceMethod(e: Element) -> Element {
     return e
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE14staticPropertySivgZ : $@convention(method) (@thin Array<Int>.Type) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE14staticPropertySivgZ : $@convention(method) (@thin Array<Int>.Type) -> Int
   public static var staticProperty: Element {
     return Array(x: ()).instanceProperty
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE12staticMethodSiyFZ : $@convention(method) (@thin Array<Int>.Type) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE12staticMethodSiyFZ : $@convention(method) (@thin Array<Int>.Type) -> Int
   public static func staticMethod() -> Element {
     return staticProperty
   }
 
-  // CHECK-LABEL: sil non_abi [serialized] @$sSa22constrained_extensionsSiRszlE12staticMethod1eS2iSg_tFZfA_ : $@convention(thin) () -> Optional<Int>
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE12staticMethod1eS2iSg_tFZ : $@convention(method) (Optional<Int>, @thin Array<Int>.Type) -> Int
+  // CHECK-LABEL: sil non_abi [serialized] [ossa] @$sSa22constrained_extensionsSiRszlE12staticMethod1eS2iSg_tFZfA_ : $@convention(thin) () -> Optional<Int>
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE12staticMethod1eS2iSg_tFZ : $@convention(method) (Optional<Int>, @thin Array<Int>.Type) -> Int
   public static func staticMethod(e: Element? = nil) -> Element {
     return e!
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlEySiyt_tcig : $@convention(method) (@guaranteed Array<Int>) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlEySiyt_tcig : $@convention(method) (@guaranteed Array<Int>) -> Int
   public subscript(i: ()) -> Element {
     return self[0]
   }
 
-  // CHECK-LABEL: sil @$sSa22constrained_extensionsSiRszlE21inoutAccessOfPropertyyyF : $@convention(method) (@inout Array<Int>) -> ()
+  // CHECK-LABEL: sil [ossa] @$sSa22constrained_extensionsSiRszlE21inoutAccessOfPropertyyyF : $@convention(method) (@inout Array<Int>) -> ()
   public mutating func inoutAccessOfProperty() {
     func increment(x: inout Element) {
       x += 1
@@ -64,14 +64,14 @@
 }
 
 extension Dictionary where Key == Int {
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE1xSDySiq_Gyt_tcfC : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @owned Dictionary<Int, Value> {
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE1xSDySiq_Gyt_tcfC : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @owned Dictionary<Int, Value> {
   public init(x: ()) {
     self.init()
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vg : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vs : $@convention(method) <Key, Value where Key == Int> (@in Value, @inout Dictionary<Int, Value>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vM : $@yield_once @convention(method) <Key, Value where Key == Int> (@inout Dictionary<Int, Value>) -> @yields @inout Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vg : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vs : $@convention(method) <Key, Value where Key == Int> (@in Value, @inout Dictionary<Int, Value>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$sSD22constrained_extensionsSiRszrlE16instancePropertyq_vM : $@yield_once @convention(method) <Key, Value where Key == Int> (@inout Dictionary<Int, Value>) -> @yields @inout Value
   public var instanceProperty: Value {
     get {
       return self[0]!
@@ -81,49 +81,49 @@
     }
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE14instanceMethodq_yF : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE14instanceMethodq_yF : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
   public func instanceMethod() -> Value {
     return instanceProperty
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE14instanceMethod1vq_q__tF : $@convention(method) <Key, Value where Key == Int> (@in_guaranteed Value, @guaranteed Dictionary<Int, Value>) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE14instanceMethod1vq_q__tF : $@convention(method) <Key, Value where Key == Int> (@in_guaranteed Value, @guaranteed Dictionary<Int, Value>) -> @out Value
   public func instanceMethod(v: Value) -> Value {
     return v
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE12staticMethodSiyFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE12staticMethodSiyFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> Int
   public static func staticMethod() -> Key {
     return staticProperty
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE14staticPropertySivgZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> Int
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE14staticPropertySivgZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> Int
   public static var staticProperty: Key {
     return 0
   }
 
-  // CHECK-LABEL: sil non_abi [serialized] @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZfA_ : $@convention(thin) <Key, Value where Key == Int> () -> Optional<Int>
-  // CHECK-LABEL: sil non_abi [serialized] @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZfA0_ : $@convention(thin) <Key, Value where Key == Int> () -> @out Optional<Value>
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZ : $@convention(method) <Key, Value where Key == Int> (Optional<Int>, @in_guaranteed Optional<Value>, @thin Dictionary<Int, Value>.Type) -> @out Value
+  // CHECK-LABEL: sil non_abi [serialized] [ossa] @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZfA_ : $@convention(thin) <Key, Value where Key == Int> () -> Optional<Int>
+  // CHECK-LABEL: sil non_abi [serialized] [ossa] @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZfA0_ : $@convention(thin) <Key, Value where Key == Int> () -> @out Optional<Value>
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE12staticMethod1k1vq_SiSg_q_SgtFZ : $@convention(method) <Key, Value where Key == Int> (Optional<Int>, @in_guaranteed Optional<Value>, @thin Dictionary<Int, Value>.Type) -> @out Value
   public static func staticMethod(k: Key? = nil, v: Value? = nil) -> Value {
     return v!
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE17callsStaticMethodq_yFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE17callsStaticMethodq_yFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @out Value
   public static func callsStaticMethod() -> Value {
     return staticMethod()
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE16callsConstructorq_yFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE16callsConstructorq_yFZ : $@convention(method) <Key, Value where Key == Int> (@thin Dictionary<Int, Value>.Type) -> @out Value
   public static func callsConstructor() -> Value {
     return Dictionary(x: ()).instanceMethod()
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlEyq_yt_tcig : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlEyq_yt_tcig : $@convention(method) <Key, Value where Key == Int> (@guaranteed Dictionary<Int, Value>) -> @out Value
   public subscript(i: ()) -> Value {
     return self[0]!
   }
 
-  // CHECK-LABEL: sil @$sSD22constrained_extensionsSiRszrlE21inoutAccessOfPropertyyyF : $@convention(method) <Key, Value where Key == Int> (@inout Dictionary<Int, Value>) -> ()
+  // CHECK-LABEL: sil [ossa] @$sSD22constrained_extensionsSiRszrlE21inoutAccessOfPropertyyyF : $@convention(method) <Key, Value where Key == Int> (@inout Dictionary<Int, Value>) -> ()
   public mutating func inoutAccessOfProperty() {
     func increment(x: inout Value) { }
 
@@ -134,33 +134,33 @@
 public class GenericClass<X, Y> {}
 
 extension GenericClass where Y == () {
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @yields @inout X
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvs : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5valuexvM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @yields @inout X
   public var value: X {
     get { while true {} }
     set {}
   }
 
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvs : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) ->  @yields @inout ()
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvg : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvs : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlE5emptyytvM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) ->  @yields @inout ()
   public var empty: Y {
     get { return () }
     set {}
   }
 
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tcig : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tcis : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tciM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) ->  @yields @inout X
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tcig : $@convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) -> @out X
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tcis : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyxyt_tciM : $@yield_once @convention(method) <X, Y where Y == ()> (@guaranteed GenericClass<X, ()>) ->  @yields @inout X
   public subscript(_: Y) -> X {
     get { while true {} }
     set {}
   }
 
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxcig : $@convention(method) <X, Y where Y == ()> (@in_guaranteed X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxcis : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
-  // CHECK-LABEL: sil [transparent] [serialized] @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxciM : $@yield_once @convention(method) <X, Y where Y == ()> (@in_guaranteed X, @guaranteed GenericClass<X, ()>) ->  @yields @inout ()
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxcig : $@convention(method) <X, Y where Y == ()> (@in_guaranteed X, @guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxcis : $@convention(method) <X, Y where Y == ()> (@in X, @guaranteed GenericClass<X, ()>) -> ()
+  // CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s22constrained_extensions12GenericClassCAAytRs_rlEyyxciM : $@yield_once @convention(method) <X, Y where Y == ()> (@in_guaranteed X, @guaranteed GenericClass<X, ()>) ->  @yields @inout ()
   public subscript(_: X) -> Y {
     get { while true {} }
     set {}
@@ -170,12 +170,12 @@
 protocol VeryConstrained {}
 
 struct AnythingGoes<T> {
-  // CHECK-LABEL: sil hidden [transparent] @$s22constrained_extensions12AnythingGoesV13meaningOfLifexSgvpfi : $@convention(thin) <T> () -> @out Optional<T>
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s22constrained_extensions12AnythingGoesV13meaningOfLifexSgvpfi : $@convention(thin) <T> () -> @out Optional<T>
   var meaningOfLife: T? = nil
 }
 
 extension AnythingGoes where T : VeryConstrained {
-  // CHECK-LABEL: sil hidden @$s22constrained_extensions12AnythingGoesVA2A15VeryConstrainedRzlE13fromExtensionACyxGyt_tcfC : $@convention(method) <T where T : VeryConstrained> (@thin AnythingGoes<T>.Type) -> @out AnythingGoes<T> {
+  // CHECK-LABEL: sil hidden [ossa] @$s22constrained_extensions12AnythingGoesVA2A15VeryConstrainedRzlE13fromExtensionACyxGyt_tcfC : $@convention(method) <T where T : VeryConstrained> (@thin AnythingGoes<T>.Type) -> @out AnythingGoes<T> {
 
   // CHECK: [[INIT:%.*]] = function_ref @$s22constrained_extensions12AnythingGoesV13meaningOfLifexSgvpfi : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0>
   // CHECK: [[RESULT:%.*]] = alloc_stack $Optional<T>
@@ -186,11 +186,11 @@
 
 extension Array where Element == Int {
   struct Nested {
-    // CHECK-LABEL: sil hidden [transparent] @$sSa22constrained_extensionsSiRszlE6NestedV1eSiSgvpfi : $@convention(thin) () -> Optional<Int>
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$sSa22constrained_extensionsSiRszlE6NestedV1eSiSgvpfi : $@convention(thin) () -> Optional<Int>
     var e: Element? = nil
 
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsSiRszlE6NestedV10hasDefault1eySiSg_tFfA_ : $@convention(thin) () -> Optional<Int>
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsSiRszlE6NestedV10hasDefault1eySiSg_tF : $@convention(method) (Optional<Int>, @inout Array<Int>.Nested) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsSiRszlE6NestedV10hasDefault1eySiSg_tFfA_ : $@convention(thin) () -> Optional<Int>
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsSiRszlE6NestedV10hasDefault1eySiSg_tF : $@convention(method) (Optional<Int>, @inout Array<Int>.Nested) -> ()
     mutating func hasDefault(e: Element? = nil) {
       self.e = e
     }
@@ -199,17 +199,17 @@
 
 extension Array where Element == AnyObject {
   class NestedClass {
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsyXlRszlE11NestedClassCfd : $@convention(method) (@guaranteed Array<AnyObject>.NestedClass) -> @owned Builtin.NativeObject
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsyXlRszlE11NestedClassCfD : $@convention(method) (@owned Array<AnyObject>.NestedClass) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE11NestedClassCfd : $@convention(method) (@guaranteed Array<AnyObject>.NestedClass) -> @owned Builtin.NativeObject
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE11NestedClassCfD : $@convention(method) (@owned Array<AnyObject>.NestedClass) -> ()
     deinit { }
 
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsyXlRszlE11NestedClassCACyyXl_GycfC : $@convention(method) (@thick Array<AnyObject>.NestedClass.Type) -> @owned Array<AnyObject>.NestedClass
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsyXlRszlE11NestedClassCACyyXl_Gycfc : $@convention(method) (@owned Array<AnyObject>.NestedClass) -> @owned Array<AnyObject>.NestedClass
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE11NestedClassCACyyXl_GycfC : $@convention(method) (@thick Array<AnyObject>.NestedClass.Type) -> @owned Array<AnyObject>.NestedClass
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE11NestedClassCACyyXl_Gycfc : $@convention(method) (@owned Array<AnyObject>.NestedClass) -> @owned Array<AnyObject>.NestedClass
   }
 
   class DerivedClass : NestedClass {
-    // CHECK-LABEL: sil hidden [transparent] @$sSa22constrained_extensionsyXlRszlE12DerivedClassC1eyXlSgvpfi : $@convention(thin) () -> @owned Optional<AnyObject>
-    // CHECK-LABEL: sil hidden @$sSa22constrained_extensionsyXlRszlE12DerivedClassCfE : $@convention(method) (@guaranteed Array<AnyObject>.DerivedClass) -> ()
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$sSa22constrained_extensionsyXlRszlE12DerivedClassC1eyXlSgvpfi : $@convention(thin) () -> @owned Optional<AnyObject>
+    // CHECK-LABEL: sil hidden [ossa] @$sSa22constrained_extensionsyXlRszlE12DerivedClassCfE : $@convention(method) (@guaranteed Array<AnyObject>.DerivedClass) -> ()
     var e: Element? = nil
   }
 }
diff --git a/test/SILGen/convenience_init_peer_delegation.swift b/test/SILGen/convenience_init_peer_delegation.swift
index 9556856..407bef3 100644
--- a/test/SILGen/convenience_init_peer_delegation.swift
+++ b/test/SILGen/convenience_init_peer_delegation.swift
@@ -5,30 +5,30 @@
   }
 
   // Convenience inits must dynamically dispatch designated inits...
-  // CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation1XC0A0ACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation1XC0A0ACyt_tcfC
   // CHECK:         class_method {{%.*}}, #X.init!allocator.1
   convenience init(convenience: ()) {
     self.init()
   }
 
   // ...but can statically invoke peer convenience inits
-  // CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation1XC17doubleConvenienceACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation1XC17doubleConvenienceACyt_tcfC
   // CHECK:         function_ref @$s32convenience_init_peer_delegation1XC0A0ACyt_tcfC
   convenience init(doubleConvenience: ()) {
     self.init(convenience: ())
   }
 
-  // CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation1XC8requiredACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation1XC8requiredACyt_tcfC
   required init(required: ()) {
   }
 
-  // CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation1XC19requiredConvenienceACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation1XC19requiredConvenienceACyt_tcfC
   required convenience init(requiredConvenience: ()) {
     self.init(required: ())
   }
 
   // Convenience inits must dynamically dispatch required peer convenience inits
-  // CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation1XC25requiredDoubleConvenienceACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation1XC25requiredDoubleConvenienceACyt_tcfC
   // CHECK:         class_method {{%.*}}, #X.init!allocator.1
   required convenience init(requiredDoubleConvenience: ()) {
     self.init(requiredDoubleConvenience: ())
@@ -54,7 +54,7 @@
   required init(requiredDoubleConvenience: ()) { super.init() }
 }
 
-// CHECK-LABEL: sil hidden @$s32convenience_init_peer_delegation11invocations2xtyAA1XCm_tF
+// CHECK-LABEL: sil hidden [ossa] @$s32convenience_init_peer_delegation11invocations2xtyAA1XCm_tF
 func invocations(xt: X.Type) {
   // CHECK: function_ref @$s32convenience_init_peer_delegation1XCACycfC
   _ = X()
diff --git a/test/SILGen/copy_lvalue_peepholes.swift b/test/SILGen/copy_lvalue_peepholes.swift
index 31ba196..ac8c66d 100644
--- a/test/SILGen/copy_lvalue_peepholes.swift
+++ b/test/SILGen/copy_lvalue_peepholes.swift
@@ -7,7 +7,7 @@
 var zero = getInt()
 func getInt() -> Int { return zero }
 
-// CHECK-LABEL: sil hidden @$s21copy_lvalue_peepholes014init_var_from_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21copy_lvalue_peepholes014init_var_from_B0{{[_0-9a-zA-Z]*}}F
 // CHECK:   [[X:%.*]] = alloc_box ${ var Builtin.Int64 }
 // CHECK:   [[PBX:%.*]] = project_box [[X]]
 // CHECK:   [[Y:%.*]] = alloc_box ${ var Builtin.Int64 }
@@ -28,7 +28,7 @@
   set {}
 }
 
-// CHECK-LABEL: sil hidden @$s21copy_lvalue_peepholes023init_var_from_computed_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21copy_lvalue_peepholes023init_var_from_computed_B0{{[_0-9a-zA-Z]*}}F
 // CHECK:   [[GETTER:%.*]] = function_ref @$s21copy_lvalue_peepholes8computedBi64_vg
 // CHECK:   [[GOTTEN:%.*]] = apply [[GETTER]]()
 // CHECK:   store [[GOTTEN]] to [trivial] {{%.*}}
@@ -36,7 +36,7 @@
   var y = computed
 }
 
-// CHECK-LABEL: sil hidden @$s21copy_lvalue_peepholes021assign_computed_from_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21copy_lvalue_peepholes021assign_computed_from_B0{{[_0-9a-zA-Z]*}}F
 // CHECK:   [[Y:%.*]] = alloc_box
 // CHECK:   [[PBY:%.*]] = project_box [[Y]]
 // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] [[PBY]]
@@ -48,7 +48,7 @@
   computed = y
 }
 
-// CHECK-LABEL: sil hidden @$s21copy_lvalue_peepholes24assign_var_from_computed{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21copy_lvalue_peepholes24assign_var_from_computed{{[_0-9a-zA-Z]*}}F
 // CHECK:   [[WRITE:%.*]] = begin_access [modify] [unknown] %0
 // CHECK:   assign {{%.*}} to [[WRITE]]
 func assign_var_from_computed(x: inout Int) {
diff --git a/test/SILGen/decls.swift b/test/SILGen/decls.swift
index 4a4002a..1da8881 100644
--- a/test/SILGen/decls.swift
+++ b/test/SILGen/decls.swift
@@ -1,23 +1,23 @@
 // RUN: %target-swift-emit-silgen -Xllvm -sil-full-demangle -parse-as-library %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s5decls11void_returnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s5decls11void_returnyyF
 // CHECK: = tuple
 // CHECK: return
 func void_return() {
 }
 
-// CHECK-LABEL: sil hidden @$s5decls14typealias_declyyF
+// CHECK-LABEL: sil hidden [ossa] @$s5decls14typealias_declyyF
 func typealias_decl() {
   typealias a = Int
 }
 
-// CHECK-LABEL: sil hidden @$s5decls15simple_patternsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s5decls15simple_patternsyyF
 func simple_patterns() {
   _ = 4
   var _ : Int
 }
 
-// CHECK-LABEL: sil hidden @$s5decls13named_patternSiyF
+// CHECK-LABEL: sil hidden [ossa] @$s5decls13named_patternSiyF
 func named_pattern() -> Int {
   var local_var : Int = 4
 
@@ -28,7 +28,7 @@
 
 func MRV() -> (Int, Float, (), Double) {}
 
-// CHECK-LABEL: sil hidden @$s5decls14tuple_patternsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s5decls14tuple_patternsyyF
 func tuple_patterns() {
   var (a, b) : (Int, Float)
   // CHECK: [[ABOX:%[0-9]+]] = alloc_box ${ var Int }
@@ -82,7 +82,7 @@
   var (j,_,k,_) : (Int, Float, (), Double) = MRV()
 }
 
-// CHECK-LABEL: sil hidden @$s5decls16simple_arguments{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5decls16simple_arguments{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $Int, %1 : $Int):
 // CHECK: [[X:%[0-9]+]] = alloc_box ${ var Int }
 // CHECK-NEXT: [[PBX:%.*]] = project_box [[X]]
@@ -96,14 +96,14 @@
   return x+y
 }
 
-// CHECK-LABEL: sil hidden @$s5decls14tuple_argument{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5decls14tuple_argument{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $Int, %1 : $Float):
 // CHECK: [[UNIT:%[0-9]+]] = tuple ()
 // CHECK: [[TUPLE:%[0-9]+]] = tuple (%0 : $Int, %1 : $Float, [[UNIT]] : $())
 func tuple_argument(x: (Int, Float, ())) {
 }
 
-// CHECK-LABEL: sil hidden @$s5decls14inout_argument{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5decls14inout_argument{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*Int, %1 : $Int):
 // CHECK: [[X_LOCAL:%[0-9]+]] = alloc_box ${ var Int }
 // CHECK: [[PBX:%.*]] = project_box [[X_LOCAL]]
@@ -114,7 +114,7 @@
 
 var global = 42
 
-// CHECK-LABEL: sil hidden @$s5decls16load_from_global{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5decls16load_from_global{{[_0-9a-zA-Z]*}}F
 func load_from_global() -> Int {
   return global
   // CHECK: [[ACCESSOR:%[0-9]+]] = function_ref @$s5decls6globalSivau
@@ -125,7 +125,7 @@
   // CHECK: return [[VALUE]]
 }
 
-// CHECK-LABEL: sil hidden @$s5decls15store_to_global{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s5decls15store_to_global{{[_0-9a-zA-Z]*}}F
 func store_to_global(x: Int) {
   var x = x
   global = x
@@ -145,7 +145,7 @@
 struct S {
   var x:Int
 
-  // CHECK-LABEL: sil hidden @$s5decls1SVACycfC
+  // CHECK-LABEL: sil hidden [ossa] @$s5decls1SVACycfC
   init() {
     x = 219
   }
diff --git a/test/SILGen/default_arguments.swift b/test/SILGen/default_arguments.swift
index a795fa0..419aefe 100644
--- a/test/SILGen/default_arguments.swift
+++ b/test/SILGen/default_arguments.swift
@@ -3,11 +3,11 @@
 // 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
+// CHECK-LABEL: sil [ossa] @main
 // CHECK:         string_literal utf8 "default_arguments"
 
 // Default argument for first parameter.
-// CHECK-LABEL: sil hidden @$s17default_arguments7defarg11i1d1sySi_SdSStFfA_ : $@convention(thin) () -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments7defarg11i1d1sySi_SdSStFfA_ : $@convention(thin) () -> Int
 // CHECK: [[INT:%[0-9]+]] = metatype $@thin Int.Type
 // CHECK: [[LIT:%[0-9]+]] = integer_literal $Builtin.IntLiteral, 17
 // CHECK: [[CVT:%[0-9]+]] = function_ref @$sSi22_builtinIntegerLiteralSiBI_tcfC
@@ -15,7 +15,7 @@
 // CHECK: return [[RESULT]] : $Int
 
 // Default argument for third parameter.
-// CHECK-LABEL: sil hidden @$s17default_arguments7defarg11i1d1sySi_SdSStFfA1_ : $@convention(thin) () -> @owned String
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments7defarg11i1d1sySi_SdSStFfA1_ : $@convention(thin) () -> @owned String
 // CHECK: [[LIT:%[0-9]+]] = string_literal utf8 "Hello"
 // CHECK: [[LEN:%[0-9]+]] = integer_literal $Builtin.Word, 5
 // CHECK: [[STRING:%[0-9]+]] = metatype $@thin String.Type
@@ -24,7 +24,7 @@
 // CHECK: return [[RESULT]] : $String
 func defarg1(i: Int = 17, d: Double, s: String = "Hello") { }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments15testDefaultArg1yyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments15testDefaultArg1yyF
 func testDefaultArg1() {
   // CHECK: [[FLOAT64:%[0-9]+]] = metatype $@thin Double.Type
   // CHECK: [[FLOATLIT:%[0-9]+]] = float_literal $Builtin.FPIEEE{{64|80}}, {{0x4009000000000000|0x4000C800000000000000}}
@@ -41,7 +41,7 @@
 
 func defarg2(_ i: Int, d: Double = 3.125, s: String = "Hello") { }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments15testDefaultArg2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments15testDefaultArg2{{[_0-9a-zA-Z]*}}F
 func testDefaultArg2() {
 // CHECK:  [[INT64:%[0-9]+]] = metatype $@thin Int.Type
 // CHECK:  [[INTLIT:%[0-9]+]] = integer_literal $Builtin.IntLiteral, 5
@@ -58,12 +58,12 @@
 
 func autocloseFile(x: @autoclosure () -> String = #file,
                    y: @autoclosure () -> Int = #line) { }
-// CHECK-LABEL: sil hidden @$s17default_arguments17testAutocloseFileyyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments17testAutocloseFileyyF
 func testAutocloseFile() {
-  // CHECK-LABEL: sil private [transparent] @$s17default_arguments17testAutocloseFileyyFSSyXEfu_ : $@convention(thin) () -> @owned String
+  // CHECK-LABEL: sil private [transparent] [ossa] @$s17default_arguments17testAutocloseFileyyFSSyXEfu_ : $@convention(thin) () -> @owned String
   // CHECK: string_literal utf8{{.*}}default_arguments.swift
 
-  // CHECK-LABEL: sil private [transparent] @$s17default_arguments17testAutocloseFileyyFSiyXEfu0_ : $@convention(thin) () -> Int
+  // CHECK-LABEL: sil private [transparent] [ossa] @$s17default_arguments17testAutocloseFileyyFSiyXEfu0_ : $@convention(thin) () -> Int
   // CHECK: integer_literal $Builtin.IntLiteral, [[@LINE+1]]
   autocloseFile()
 }
@@ -76,23 +76,23 @@
 // Check that default argument generator functions don't leak information about
 // user's source.
 //
-// NEGATIVE-NOT: sil hidden @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA_
+// NEGATIVE-NOT: sil hidden [ossa] @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA_
 //
-// NEGATIVE-NOT: sil hidden @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA0_
+// NEGATIVE-NOT: sil hidden [ossa] @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA0_
 //
-// NEGATIVE-NOT: sil hidden @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA1_
+// NEGATIVE-NOT: sil hidden [ossa] @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA1_
 //
-// NEGATIVE-NOT: sil hidden @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA2_
+// NEGATIVE-NOT: sil hidden [ossa] @$s17default_arguments17testMagicLiteralsySS4file_SS8functionSi4lineSi6columntFfA2_
 
 func closure(_: () -> ()) {}
 func autoclosure(_: @autoclosure () -> ()) {}
 
-// CHECK-LABEL: sil hidden @$s17default_arguments25testCallWithMagicLiteralsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments25testCallWithMagicLiteralsyyF
 // CHECK:         string_literal utf8 "testCallWithMagicLiterals()"
 // CHECK:         string_literal utf8 "testCallWithMagicLiterals()"
-// CHECK-LABEL: sil private @$s17default_arguments25testCallWithMagicLiteralsyyFyyXEfU_
+// CHECK-LABEL: sil private [ossa] @$s17default_arguments25testCallWithMagicLiteralsyyFyyXEfU_
 // CHECK:         string_literal utf8 "testCallWithMagicLiterals()"
-// CHECK-LABEL: sil private [transparent] @$s17default_arguments25testCallWithMagicLiteralsyyFyyXEfu_
+// CHECK-LABEL: sil private [transparent] [ossa] @$s17default_arguments25testCallWithMagicLiteralsyyFyyXEfu_
 // CHECK:         string_literal utf8 "testCallWithMagicLiterals()"
 func testCallWithMagicLiterals() {
   testMagicLiterals()
@@ -101,7 +101,7 @@
   autoclosure(testMagicLiterals())
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments25testPropWithMagicLiteralsSivg
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments25testPropWithMagicLiteralsSivg
 // CHECK:         string_literal utf8 "testPropWithMagicLiterals"
 var testPropWithMagicLiterals: Int {
   testMagicLiterals()
@@ -112,7 +112,7 @@
 
 class Foo {
 
-  // CHECK-LABEL: sil hidden @$s17default_arguments3FooC3int6stringACSi_SStcfc : $@convention(method) (Int, @owned String, @owned Foo) -> @owned Foo
+  // CHECK-LABEL: sil hidden [ossa] @$s17default_arguments3FooC3int6stringACSi_SStcfc : $@convention(method) (Int, @owned String, @owned Foo) -> @owned Foo
   // CHECK:         string_literal utf8 "init(int:string:)"
   init(int: Int, string: String = #function) {
     testMagicLiterals()
@@ -120,7 +120,7 @@
     autoclosure(testMagicLiterals())
   }
 
-  // CHECK-LABEL: sil hidden @$s17default_arguments3FooCfd
+  // CHECK-LABEL: sil hidden [ossa] @$s17default_arguments3FooCfd
   // CHECK:         string_literal utf8 "deinit"
   deinit {
     testMagicLiterals()
@@ -128,7 +128,7 @@
     autoclosure(testMagicLiterals())
   }
 
-  // CHECK-LABEL: sil hidden @$s17default_arguments3FooCyS2icig
+  // CHECK-LABEL: sil hidden [ossa] @$s17default_arguments3FooCyS2icig
   // CHECK:         string_literal utf8 "subscript(_:)"
   subscript(x: Int) -> Int {
     testMagicLiterals()
@@ -137,7 +137,7 @@
     return x
   }
  
-  // CHECK-LABEL: sil private @globalinit_33_E52D764B1F2009F2390B2B8DF62DAEB8_func0
+  // CHECK-LABEL: sil private [ossa] @globalinit_33_E52D764B1F2009F2390B2B8DF62DAEB8_func0
   // CHECK:         string_literal utf8 "Foo" 
   static let x = Foo(int:0)
 
@@ -151,13 +151,13 @@
 // CHECK: string_literal utf8 "default_arguments"
 let y : String = #function 
 
-// CHECK-LABEL: sil hidden @$s17default_arguments16testSelectorCall_17withMagicLiteralsySi_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments16testSelectorCall_17withMagicLiteralsySi_SitF
 // CHECK:         string_literal utf8 "testSelectorCall(_:withMagicLiterals:)"
 func testSelectorCall(_ x: Int, withMagicLiterals y: Int) {
   testMagicLiterals()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments32testSelectorCallWithUnnamedPieceyySi_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments32testSelectorCallWithUnnamedPieceyySi_SitF
 // CHECK:         string_literal utf8 "testSelectorCallWithUnnamedPiece(_:_:)"
 func testSelectorCallWithUnnamedPiece(_ x: Int, _ y: Int) {
   testMagicLiterals()
@@ -168,13 +168,13 @@
   init(int i: Int = 10) { }
 }
 
-// CHECK: sil hidden @$s17default_arguments11SuperDefArgC3intACSi_tcfcfA_ : $@convention(thin) () -> Int
+// CHECK: sil hidden [ossa] @$s17default_arguments11SuperDefArgC3intACSi_tcfcfA_ : $@convention(thin) () -> Int
 
-// CHECK-NOT: sil hidden @$s17default_arguments9SubDefArgCAC3intSi_tcfcfA_ : $@convention(thin) () -> Int
+// CHECK-NOT: sil hidden [ossa] @$s17default_arguments9SubDefArgCAC3intSi_tcfcfA_ : $@convention(thin) () -> Int
 
 class SubDefArg : SuperDefArg { }
 
-// CHECK: sil hidden @$s17default_arguments13testSubDefArgAA0deF0CyF : $@convention(thin) () -> @owned SubDefArg
+// CHECK: sil hidden [ossa] @$s17default_arguments13testSubDefArgAA0deF0CyF : $@convention(thin) () -> @owned SubDefArg
 func testSubDefArg() -> SubDefArg {
   // CHECK: function_ref @$s17default_arguments11SuperDefArgC3intACSi_tcfcfA_
   // CHECK: function_ref @$s17default_arguments9SubDefArgC{{[_0-9a-zA-Z]*}}fC
@@ -182,12 +182,12 @@
   return SubDefArg()
 }
 
-// CHECK-NOT: sil hidden @$s17default_arguments9SubDefArgCACSi3int_tcfcfA_ : $@convention(thin) () -> Int
+// CHECK-NOT: sil hidden [ossa] @$s17default_arguments9SubDefArgCACSi3int_tcfcfA_ : $@convention(thin) () -> Int
 
 // <rdar://problem/17379550>
 func takeDefaultArgUnnamed(_ x: Int = 5) { }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments25testTakeDefaultArgUnnamed{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments25testTakeDefaultArgUnnamed{{[_0-9a-zA-Z]*}}F
 func testTakeDefaultArgUnnamed(_ i: Int) {
   // CHECK: bb0([[I:%[0-9]+]] : $Int):
   // CHECK:   [[FN:%[0-9]+]] = function_ref @$s17default_arguments21takeDefaultArgUnnamedyySiF : $@convention(thin) (Int) -> ()
@@ -197,7 +197,7 @@
 
 func takeDSOHandle(_ handle: UnsafeRawPointer = #dsohandle) { }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments13testDSOHandleyyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments13testDSOHandleyyF
 func testDSOHandle() {
   // CHECK: [[DSO_HANDLE:%[0-9]+]] = global_addr @__dso_handle : $*Builtin.RawPointer
   takeDSOHandle()
@@ -215,7 +215,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments32testDefaultArgumentReabstractionyyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments32testDefaultArgumentReabstractionyyF
 // function_ref default_arguments.ReabstractDefaultArgument.__allocating_init <A>(default_arguments.ReabstractDefaultArgument<A>.Type)(a : (A, A) -> Swift.Bool) -> default_arguments.ReabstractDefaultArgument<A>
 // CHECK: [[FN:%.*]] = function_ref @$s17default_arguments25ReabstractDefaultArgument{{.*}} : $@convention(thin) <τ_0_0> () -> @owned @callee_guaranteed (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool
 // CHECK-NEXT: [[RESULT:%.*]] = apply [[FN]]<Int>() : $@convention(thin) <τ_0_0> () -> @owned @callee_guaranteed (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool
@@ -235,7 +235,7 @@
 }
 
 // <rdar://problem/20494437> SILGen crash handling default arguments
-// CHECK-LABEL: sil hidden @$s17default_arguments18r20494437onSuccessyyAA25r20494437ExecutionContext_pF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments18r20494437onSuccessyyAA25r20494437ExecutionContext_pF
 // CHECK: function_ref @$s17default_arguments19r20494437onCompleteyyAA25r20494437ExecutionContext_pF
 // <rdar://problem/20494437> SILGen crash handling default arguments
 protocol r20494437ExecutionContext {}
@@ -248,10 +248,10 @@
 // <rdar://problem/18400194> Parenthesized function expression crashes the compiler
 func r18400194(_ a: Int, x: Int = 97) {}
 
-// CHECK-LABEL: sil hidden @$s17default_arguments9r18400194_1xySi_SitFfA0_
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments9r18400194_1xySi_SitFfA0_
 // CHECK: integer_literal $Builtin.IntLiteral, 97
 
-// CHECK-LABEL: sil hidden @$s17default_arguments14test_r18400194yyF
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments14test_r18400194yyF
 // CHECK: integer_literal $Builtin.IntLiteral, 1
 // CHECK:  function_ref @$s17default_arguments9r18400194_1xySi_SitFfA0_ : $@convention(thin) () -> Int
 // CHECK: function_ref @$s17default_arguments9r18400194_1xySi_SitF : $@convention(thin) (Int, Int) -> (){{.*}}
@@ -268,50 +268,50 @@
   }
   bar()
 }
-// CHECK-LABEL: sil private @$s17default_arguments27localFunctionWithDefaultArgyyF3barL_yySiSgFfA_
+// CHECK-LABEL: sil private [ossa] @$s17default_arguments27localFunctionWithDefaultArgyyF3barL_yySiSgFfA_
 // CHECK-SAME: $@convention(thin) () -> Optional<Int>
 
-// CHECK-LABEL: sil hidden @$s17default_arguments15throwingDefault7closureySbyKXE_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments15throwingDefault7closureySbyKXE_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
 func throwingDefault(closure: () throws -> Bool  = {  return true }) throws {
   try _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments26throwingAutoclosureDefault7closureySbyKXK_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments26throwingAutoclosureDefault7closureySbyKXK_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
 func throwingAutoclosureDefault(closure: @autoclosure () throws -> Bool  = true ) throws {
   try _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments0A3Arg7closureySbyXE_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments0A3Arg7closureySbyXE_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
 func defaultArg(closure: () -> Bool  = {  return true }) {
   _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments21autoclosureDefaultArg7closureySbyXK_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments21autoclosureDefaultArg7closureySbyXK_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
 func autoclosureDefaultArg(closure: @autoclosure () -> Bool  = true ) {
   _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments23throwingDefaultEscaping7closureySbyKc_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments23throwingDefaultEscaping7closureySbyKc_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
 func throwingDefaultEscaping(closure: @escaping () throws -> Bool  = {  return true }) throws {
   try _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments34throwingAutoclosureDefaultEscaping7closureySbyKXA_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments34throwingAutoclosureDefaultEscaping7closureySbyKXA_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
 func throwingAutoclosureDefaultEscaping(closure: @escaping @autoclosure () throws -> Bool  = true ) throws {
   try _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments0A8Escaping7closureySbyc_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments0A8Escaping7closureySbyc_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool
 func defaultEscaping(closure: @escaping () -> Bool  = {  return true }) {
   _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @$s17default_arguments26autoclosureDefaultEscaping7closureySbyXA_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool {
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments26autoclosureDefaultEscaping7closureySbyXA_tFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> Bool {
 func autoclosureDefaultEscaping(closure: @escaping @autoclosure () -> Bool  = true ) {
   _ = closure()
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}callThem{{.*}} : $@convention(thin) () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}callThem{{.*}} : $@convention(thin) () -> @error Error
 
 // CHECK:  [[F:%.*]] = function_ref @$s17default_arguments15throwingDefault7closureySbyKXE_tKFfA_ : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
 // CHECK:  [[C:%.*]] = apply [[F]]() : $@convention(thin) () -> @owned @callee_guaranteed () -> (Bool, @error Error)
@@ -367,3 +367,19 @@
    defaultEscaping()
    autoclosureDefaultEscaping()
 }
+
+func tupleDefaultArg(x: (Int, Int) = (1, 2)) {}
+
+// CHECK-LABEL: sil hidden [ossa] @$s17default_arguments19callTupleDefaultArgyyF : $@convention(thin) () -> ()
+// CHECK: function_ref @$s17default_arguments15tupleDefaultArg1xySi_Sit_tFfA_ : $@convention(thin) () -> (Int, Int)
+// CHECK: function_ref @$s17default_arguments15tupleDefaultArg1xySi_Sit_tF : $@convention(thin) (Int, Int) -> ()
+// CHECK: return
+func callTupleDefaultArg() {
+  tupleDefaultArg()
+}
+
+// FIXME: Should this be banned?
+func stupidGames(x: Int = 3) -> Int {
+  return x
+}
+stupidGames(x:)()
diff --git a/test/SILGen/default_arguments_generic.swift b/test/SILGen/default_arguments_generic.swift
index a79df8d..d0562d3 100644
--- a/test/SILGen/default_arguments_generic.swift
+++ b/test/SILGen/default_arguments_generic.swift
@@ -11,7 +11,7 @@
   static func zang<U: ExpressibleByFloatLiteral>(_: U.Type, _ x: T = 0, y: U = 0.5) { }
 }
 
-// CHECK-LABEL: sil hidden @$s25default_arguments_generic3baryyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s25default_arguments_generic3baryyF : $@convention(thin) () -> () {
 func bar() {
   // CHECK: [[FOO_DFLT:%.*]] = function_ref @$s25default_arguments_generic3foo
   // CHECK: apply [[FOO_DFLT]]<Int>
@@ -38,7 +38,7 @@
 struct InitializableImpl: Initializable {
   init() {}
 }
-// CHECK-LABEL: sil hidden @$s25default_arguments_generic17testInitializableyyF
+// CHECK-LABEL: sil hidden [ossa] @$s25default_arguments_generic17testInitializableyyF
 func testInitializable() {
   // Previously the metatype construction crashed in the type checker
   // and the ".init" form crashed in SILGen. Test both forms.
@@ -57,7 +57,7 @@
 
 // Local generic functions with default arguments
 
-// CHECK-LABEL: sil hidden @$s25default_arguments_generic5outer1tyx_tlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s25default_arguments_generic5outer1tyx_tlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
 func outer<T>(t: T) {
   func inner1(x: Int = 0) {}
 
diff --git a/test/SILGen/default_arguments_imported.swift b/test/SILGen/default_arguments_imported.swift
index 84a8d22..dbb6e5c 100644
--- a/test/SILGen/default_arguments_imported.swift
+++ b/test/SILGen/default_arguments_imported.swift
@@ -6,14 +6,14 @@
 
 import gizmo
 
-// CHECK-LABEL: sil hidden @$s26default_arguments_imported9testGizmo{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26default_arguments_imported9testGizmo{{[_0-9a-zA-Z]*}}F
 func testGizmo(gizmo: Gizmo) {
   // CHECK: enum $Optional<@callee_guaranteed (@guaranteed Optional<Gizmo>) -> ()>, #Optional.none!enumelt
   // CHECK: objc_method [[SELF:%[0-9]+]] : $Gizmo, #Gizmo.enumerateSubGizmos!1.foreign
   gizmo.enumerateSubGizmos()
 } // CHECK: } // end sil function '$s26default_arguments_imported9testGizmo5gizmoySo0E0C_tF'
 
-// CHECK-LABEL: sil hidden @$s26default_arguments_imported21testNonnullDictionary5gizmoySo5GizmoC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s26default_arguments_imported21testNonnullDictionary5gizmoySo5GizmoC_tF
 func testNonnullDictionary(gizmo: Gizmo) {
   // CHECK-NOT: nilLiteral
   // CHECK: function_ref @$sSD17dictionaryLiteralSDyxq_Gx_q_td_tcfC
@@ -21,7 +21,7 @@
   gizmo.doTheThing()
 } // CHECK: } // end sil function '$s26default_arguments_imported21testNonnullDictionary5gizmoySo5GizmoC_tF'
 
-// CHECK-LABEL: sil hidden @$s26default_arguments_imported22testNullableDictionary5gizmoySo5GizmoC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s26default_arguments_imported22testNullableDictionary5gizmoySo5GizmoC_tF
 func testNullableDictionary(gizmo: Gizmo) {
   // CHECK-NOT: dictionaryLiteral
   // CHECK: enum $Optional<Dictionary<AnyHashable, Any>>, #Optional.none!enumelt
diff --git a/test/SILGen/default_arguments_inherited.swift b/test/SILGen/default_arguments_inherited.swift
index 3f209e3..d4ed382 100644
--- a/test/SILGen/default_arguments_inherited.swift
+++ b/test/SILGen/default_arguments_inherited.swift
@@ -18,7 +18,7 @@
   class Shark<U> : Puppy<T, U> {}
 }
 
-// CHECK-LABEL: sil hidden @$s27default_arguments_inherited4doItyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s27default_arguments_inherited4doItyyF : $@convention(thin) () -> () {
 func doIt() {
   // CHECK: [[ARG1:%.*]] = function_ref @$s27default_arguments_inherited5PuppyC1t1uACyxq_GxSg_q_SgtcfcfA_
   // CHECK: apply [[ARG1]]<Int, String>({{.*}})
diff --git a/test/SILGen/default_arguments_serialized.swift b/test/SILGen/default_arguments_serialized.swift
index 9fe86db..1cb9b2d 100644
--- a/test/SILGen/default_arguments_serialized.swift
+++ b/test/SILGen/default_arguments_serialized.swift
@@ -10,16 +10,16 @@
 
 import default_arguments_other
 
-// CHECK-LABEL: sil @$s28default_arguments_serialized0A6StringSSyF : $@convention(thin) () -> @owned String
+// CHECK-LABEL: sil [ossa] @$s28default_arguments_serialized0A6StringSSyF : $@convention(thin) () -> @owned String
 public func defaultString() -> String { return "hi" }
 
-// CHECK-LABEL: sil non_abi [serialized] @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA_ : $@convention(thin) () -> Int
+// CHECK-LABEL: sil non_abi [serialized] [ossa] @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA_ : $@convention(thin) () -> Int
 
-// CHECK-LABEL: sil non_abi [serialized] @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA0_ : $@convention(thin) () -> @owned String
+// CHECK-LABEL: sil non_abi [serialized] [ossa] @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA0_ : $@convention(thin) () -> @owned String
 
 public func hasDefaultArguments(x: Int = 0, y: String = defaultString()) {}
 
-// CHECK-LABEL: sil @$s28default_arguments_serialized21callsDefaultArgumentsyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [ossa] @$s28default_arguments_serialized21callsDefaultArgumentsyyF : $@convention(thin) () -> ()
 // CHECK: function_ref @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA_ : $@convention(thin) () -> Int
 // CHECK: function_ref @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStFfA0_ : $@convention(thin) () -> @owned String
 // CHECK: function_ref @$s28default_arguments_serialized19hasDefaultArguments1x1yySi_SStF : $@convention(thin) (Int, @guaranteed String) -> ()
@@ -33,7 +33,7 @@
 // that was built in Swift 4 mode, we should always treat it as serialized,
 // even if *this* module is built in Swift 3 mode.
 
-// CHECK-LABEL: sil @$s28default_arguments_serialized26callsOtherDefaultArgumentsyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [ossa] @$s28default_arguments_serialized26callsOtherDefaultArgumentsyyF : $@convention(thin) () -> ()
 // CHECK: function_ref @$s23default_arguments_other0C16DefaultArguments1xySi_tFfA_ : $@convention(thin) () -> Int
 // CHECK: function_ref @$s23default_arguments_other0C16DefaultArguments1xySi_tF : $@convention(thin) (Int) -> ()
 // CHECK: apply
diff --git a/test/SILGen/default_constructor.swift b/test/SILGen/default_constructor.swift
index 965e65d..d5ac319 100644
--- a/test/SILGen/default_constructor.swift
+++ b/test/SILGen/default_constructor.swift
@@ -14,7 +14,7 @@
   var (i, j) : (Int, Double) = (2, 3.5)
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s19default_constructor1DV1iSivpfi : $@convention(thin) () -> (Int, Double)
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s19default_constructor1DV1iSivpfi : $@convention(thin) () -> (Int, Double)
 // CHECK:      [[METATYPE:%.*]] = metatype $@thin Int.Type
 // CHECK-NEXT: [[VALUE:%.*]] = integer_literal $Builtin.IntLiteral, 2
 // CHECK:      [[FN:%.*]] = function_ref @$sSi22_builtinIntegerLiteralSiBI_tcfC : $@convention(method) (Builtin.IntLiteral, @thin Int.Type) -> Int
@@ -27,7 +27,7 @@
 // CHECK-NEXT: return [[RESULT]] : $(Int, Double)
 
 
-// CHECK-LABEL: sil hidden @$s19default_constructor1DV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin D.Type) -> D
+// CHECK-LABEL: sil hidden [ossa] @$s19default_constructor1DV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin D.Type) -> D
 // CHECK: [[THISBOX:%[0-9]+]] = alloc_box ${ var D }
 // CHECK: [[THIS:%[0-9]+]] = mark_uninit
 // CHECK: [[PB_THIS:%.*]] = project_box [[THIS]]
@@ -43,7 +43,7 @@
   var i = Int64()
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s19default_constructor1EC1is5Int64Vvpfi : $@convention(thin) () -> Int64
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s19default_constructor1EC1is5Int64Vvpfi : $@convention(thin) () -> Int64
 // CHECK:      [[IADDR:%[0-9]+]] = alloc_stack $Int64
 // CHECK:      [[INTTYPE:%[0-9]+]] = metatype $@thick Int64.Type
 // CHECK:      [[INIT:%[0-9]+]] = function_ref @$sSzsExycfC : $@convention(method)
@@ -52,7 +52,7 @@
 // CHECK-NEXT: dealloc_stack [[IADDR]]
 // CHECK-NEXT: return [[VALUE]] : $Int64
 
-// CHECK-LABEL: sil hidden @$s19default_constructor1EC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned E) -> @owned E
+// CHECK-LABEL: sil hidden [ossa] @$s19default_constructor1EC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned E) -> @owned E
 // CHECK: bb0([[SELFIN:%[0-9]+]] : @owned $E)
 // CHECK: [[SELF:%[0-9]+]] = mark_uninitialized
 // CHECK: [[INIT:%[0-9]+]] = function_ref @$s19default_constructor1EC1is5Int64Vvpfi : $@convention(thin) () -> Int64
@@ -69,7 +69,7 @@
 
 class F : E { }
 
-// CHECK-LABEL: sil hidden @$s19default_constructor1FCACycfc : $@convention(method) (@owned F) -> @owned F
+// CHECK-LABEL: sil hidden [ossa] @$s19default_constructor1FCACycfc : $@convention(method) (@owned F) -> @owned F
 // CHECK: bb0([[ORIGSELF:%[0-9]+]] : @owned $F)
 // CHECK-NEXT: [[SELF_BOX:%[0-9]+]] = alloc_box ${ var F }
 // CHECK-NEXT: [[SELF:%[0-9]+]] = mark_uninitialized [derivedself] [[SELF_BOX]]
@@ -96,13 +96,13 @@
 
 // CHECK-NOT: default_constructor.G.init()
 // CHECK-LABEL: default_constructor.G.init(bar: Swift.Optional<Swift.Int32>)
-// CHECK-NEXT: sil hidden @$s19default_constructor1GV{{[_0-9a-zA-Z]*}}fC
+// CHECK-NEXT: sil hidden [ossa] @$s19default_constructor1GV{{[_0-9a-zA-Z]*}}fC
 // CHECK-NOT: default_constructor.G.init()
 
 struct H<T> {
   var opt: T?
 
-  // CHECK-LABEL: sil hidden @$s19default_constructor1HVyACyxGqd__clufC : $@convention(method) <T><U> (@in U, @thin H<T>.Type) -> @out H<T> {
+  // CHECK-LABEL: sil hidden [ossa] @$s19default_constructor1HVyACyxGqd__clufC : $@convention(method) <T><U> (@in U, @thin H<T>.Type) -> @out H<T> {
   // CHECK: [[INIT_FN:%[0-9]+]] = function_ref @$s19default_constructor1HV3optxSgvpfi : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0>
   // CHECK-NEXT: [[OPT_T:%[0-9]+]] = alloc_stack $Optional<T>
   // CHECK-NEXT: apply [[INIT_FN]]<T>([[OPT_T]]) : $@convention(thin) <τ_0_0> () -> @out Optional<τ_0_0>
@@ -114,7 +114,7 @@
 struct I {
   var x: Int = 0
 
-  // CHECK-LABEL: sil hidden @$s19default_constructor1IVyACxclufC : $@convention(method) <T> (@in T, @thin I.Type) -> I {
+  // CHECK-LABEL: sil hidden [ossa] @$s19default_constructor1IVyACxclufC : $@convention(method) <T> (@in T, @thin I.Type) -> I {
   // CHECK: [[INIT_FN:%[0-9]+]] = function_ref @$s19default_constructor1IV1xSivpfi : $@convention(thin) () -> Int
   // CHECK: [[RESULT:%[0-9]+]] = apply [[INIT_FN]]() : $@convention(thin) () -> Int
   // CHECK: [[X_ADDR:%[0-9]+]] = struct_element_addr {{.*}} : $*I, #I.x
diff --git a/test/SILGen/dependent_member_lowering.swift b/test/SILGen/dependent_member_lowering.swift
index f01dc5a..920752b 100644
--- a/test/SILGen/dependent_member_lowering.swift
+++ b/test/SILGen/dependent_member_lowering.swift
@@ -10,13 +10,13 @@
   typealias A = T.Type
 
   func f(_ t: T.Type) {}
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s25dependent_member_lowering3FooVyxGAA1PA2aEP1fyy1AQzFTW : $@convention(witness_method: P) <τ_0_0> (@in_guaranteed @thick τ_0_0.Type, @in_guaranteed Foo<τ_0_0>) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s25dependent_member_lowering3FooVyxGAA1PA2aEP1fyy1AQzFTW : $@convention(witness_method: P) <τ_0_0> (@in_guaranteed @thick τ_0_0.Type, @in_guaranteed Foo<τ_0_0>) -> ()
   // CHECK:       bb0(%0 : $*@thick τ_0_0.Type, %1 : $*Foo<τ_0_0>):
 }
 struct Bar<T>: P {
   typealias A = (Int) -> T
 
   func f(_ t: @escaping (Int) -> T) {}
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s25dependent_member_lowering3BarVyxGAA1PA2aEP1fyy1AQzFTW : $@convention(witness_method: P) <τ_0_0> (@in_guaranteed @callee_guaranteed (@in_guaranteed Int) -> @out τ_0_0, @in_guaranteed Bar<τ_0_0>) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s25dependent_member_lowering3BarVyxGAA1PA2aEP1fyy1AQzFTW : $@convention(witness_method: P) <τ_0_0> (@in_guaranteed @callee_guaranteed (@in_guaranteed Int) -> @out τ_0_0, @in_guaranteed Bar<τ_0_0>) -> ()
   // CHECK:       bb0(%0 : $*@callee_guaranteed (@in_guaranteed Int) -> @out τ_0_0, %1 : $*Bar<τ_0_0>):
 }
diff --git a/test/SILGen/downcast_reabstraction.swift b/test/SILGen/downcast_reabstraction.swift
index 129b8ef..0aafdd1 100644
--- a/test/SILGen/downcast_reabstraction.swift
+++ b/test/SILGen/downcast_reabstraction.swift
@@ -1,7 +1,7 @@
 
 // RUN: %target-swift-emit-silgen -module-name downcast_reabstraction %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s22downcast_reabstraction19condFunctionFromAnyyyypF
+// CHECK-LABEL: sil hidden [ossa] @$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]+]]
 // CHECK:       [[YES]]:
 // CHECK:         [[ORIG_VAL:%.*]] = load [take] [[OUT]]
@@ -14,7 +14,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s22downcast_reabstraction21uncondFunctionFromAnyyyypF : $@convention(thin) (@in_guaranteed Any) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s22downcast_reabstraction21uncondFunctionFromAnyyyypF : $@convention(thin) (@in_guaranteed Any) -> () {
 // CHECK:         unconditional_checked_cast_addr Any in [[IN:%.*]] : $*Any to () -> () in [[OUT:%.*]] : $*@callee_guaranteed () -> @out ()
 // CHECK:         [[ORIG_VAL:%.*]] = load [take] [[OUT]]
 // CHECK:         [[REABSTRACT:%.*]] = function_ref @$sytIegr_Ieg_TR
diff --git a/test/SILGen/dso_handle.swift b/test/SILGen/dso_handle.swift
index 507daa2..e20b3ac 100644
--- a/test/SILGen/dso_handle.swift
+++ b/test/SILGen/dso_handle.swift
@@ -2,7 +2,7 @@
 
 // CHECK: sil_global [[DSO:@__dso_handle]] : $Builtin.RawPointer
 
-// CHECK-LABEL: sil @main : $@convention(c)
+// CHECK-LABEL: sil [ossa] @main : $@convention(c)
 // CHECK: bb0
 // CHECK: [[DSOAddr:%[0-9]+]] = global_addr [[DSO]] : $*Builtin.RawPointer
 // CHECK-NEXT: [[DSOPtr:%[0-9]+]] = address_to_pointer [[DSOAddr]] : $*Builtin.RawPointer to $Builtin.RawPointer
diff --git a/test/SILGen/dynamic.swift b/test/SILGen/dynamic.swift
index 1db1cf0..f06cb31 100644
--- a/test/SILGen/dynamic.swift
+++ b/test/SILGen/dynamic.swift
@@ -61,82 +61,82 @@
 // ObjC entry points for @objc and dynamic entry points
 
 // normal and @objc initializing ctors can be statically dispatched
-// CHECK-LABEL: sil hidden @$s7dynamic3FooC{{.*}}tcfC
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic3FooC{{.*}}tcfC
 // CHECK:         function_ref @$s7dynamic3FooC{{.*}}tcfc
 
-// CHECK-LABEL: sil hidden @$s7dynamic3FooC{{.*}}tcfC
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic3FooC{{.*}}tcfC
 // CHECK:         function_ref @$s7dynamic3FooC{{.*}}tcfc
 
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooC10objcMethod{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [transparent] [thunk] @$s7dynamic3FooC8objcPropSivgTo
-// CHECK-LABEL: sil hidden [transparent] [thunk] @$s7dynamic3FooC8objcPropSivsTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooC4objcSiyXl_tcigTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooC4objcSiyXl_tcisTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooC10objcMethod{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s7dynamic3FooC8objcPropSivgTo
+// CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s7dynamic3FooC8objcPropSivsTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooC4objcSiyXl_tcigTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooC4objcSiyXl_tcisTo
 
 // TODO: dynamic initializing ctor must be objc dispatched
-// CHECK-LABEL: sil hidden @$s7dynamic3{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic3{{[_0-9a-zA-Z]*}}fC
 // CHECK:         function_ref @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.init!initializer.1.foreign :
 
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooC0A6Method{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [transparent] [thunk] @$s7dynamic3FooC0A4PropSivgTo
-// CHECK-LABEL: sil hidden [transparent] [thunk] @$s7dynamic3FooC0A4PropSivsTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooCAAS2i_tcigTo
-// CHECK-LABEL: sil hidden [thunk] @$s7dynamic3FooCAAS2i_tcisTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3{{[_0-9a-zA-Z]*}}fcTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooC0A6Method{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s7dynamic3FooC0A4PropSivgTo
+// CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s7dynamic3FooC0A4PropSivsTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooCAAS2i_tcigTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s7dynamic3FooCAAS2i_tcisTo
 
 // Protocol witnesses use best appropriate dispatch
 
 // Native witnesses use vtable dispatch:
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP12nativeMethod{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP12nativeMethod{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.nativeMethod!1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP10nativePropSivgTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP10nativePropSivgTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.nativeProp!getter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP10nativePropSivsTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP10nativePropSivsTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.nativeProp!setter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP6nativeS2i_tcigTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP6nativeS2i_tcigTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!getter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP6nativeS2i_tcisTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP6nativeS2i_tcisTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!setter.1 :
 
 // @objc witnesses use vtable dispatch:
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP10objcMethod{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP10objcMethod{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.objcMethod!1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP8objcPropSivgTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP8objcPropSivgTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.objcProp!getter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP8objcPropSivsTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP8objcPropSivsTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.objcProp!setter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP4objcSiyXl_tcigTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP4objcSiyXl_tcigTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!getter.1 :
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP4objcSiyXl_tcisTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP4objcSiyXl_tcisTW
 // CHECK:         class_method {{%.*}} : $Foo, #Foo.subscript!setter.1 :
 
 // Dynamic witnesses use objc dispatch:
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP0A6Method{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP0A6Method{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         function_ref @$s7dynamic3FooC0A6Method{{[_0-9a-zA-Z]*}}FTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3FooC0A6Method{{[_0-9a-zA-Z]*}}FTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3FooC0A6Method{{[_0-9a-zA-Z]*}}FTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.dynamicMethod!1.foreign :
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP0A4PropSivgTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP0A4PropSivgTW
 // CHECK:         function_ref @$s7dynamic3FooC0A4PropSivgTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3FooC0A4PropSivgTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3FooC0A4PropSivgTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.dynamicProp!getter.1.foreign :
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDP0A4PropSivsTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDP0A4PropSivsTW
 // CHECK:         function_ref @$s7dynamic3FooC0A4PropSivsTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3FooC0A4PropSivsTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3FooC0A4PropSivsTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.dynamicProp!setter.1.foreign :
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDPAAS2i_tcigTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDPAAS2i_tcigTW
 // CHECK:         function_ref @$s7dynamic3FooCAAS2i_tcigTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3FooCAAS2i_tcigTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3FooCAAS2i_tcigTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.subscript!getter.1.foreign :
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s7dynamic3FooCAA5ProtoA2aDPAAS2i_tcisTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s7dynamic3FooCAA5ProtoA2aDPAAS2i_tcisTW
 // CHECK:         function_ref @$s7dynamic3FooCAAS2i_tcisTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s7dynamic3FooCAAS2i_tcisTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s7dynamic3FooCAAS2i_tcisTD
 // CHECK:         objc_method {{%.*}} : $Foo, #Foo.subscript!setter.1.foreign :
 
 // Superclass dispatch
@@ -145,60 +145,60 @@
   override init(native: Int) {
     super.init(native: native)
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC{{[_0-9a-zA-Z]*}}fC
   // CHECK:         function_ref @$s7dynamic8SubclassC{{[_0-9a-zA-Z]*}}fc
 
   override func nativeMethod() {
     super.nativeMethod()
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC12nativeMethod{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC12nativeMethod{{[_0-9a-zA-Z]*}}F
   // CHECK:         function_ref @$s7dynamic3FooC12nativeMethodyyF : $@convention(method) (@guaranteed Foo) -> ()
 
   override var nativeProp: Int {
     get { return super.nativeProp }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC10nativePropSivg
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC10nativePropSivg
     // CHECK:         function_ref @$s7dynamic3FooC10nativePropSivg : $@convention(method) (@guaranteed Foo) -> Int
     set { super.nativeProp = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC10nativePropSivs
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC10nativePropSivs
     // CHECK:         function_ref @$s7dynamic3FooC10nativePropSivs : $@convention(method) (Int, @guaranteed Foo) -> ()
   }
 
   override subscript(native native: Int) -> Int {
     get { return super[native: native] }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC6nativeS2i_tcig
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC6nativeS2i_tcig
     // CHECK:         function_ref @$s7dynamic3FooC6nativeS2i_tcig : $@convention(method) (Int, @guaranteed Foo) -> Int
     set { super[native: native] = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC6nativeS2i_tcis
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC6nativeS2i_tcis
     // CHECK:         function_ref @$s7dynamic3FooC6nativeS2i_tcis : $@convention(method) (Int, Int, @guaranteed Foo) -> ()
   }
 
   override init(objc: Int) {
     super.init(objc: objc)
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC4objcACSi_tcfc
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC4objcACSi_tcfc
   // CHECK:         function_ref @$s7dynamic3FooC4objcACSi_tcfc : $@convention(method) (Int, @owned Foo) -> @owned Foo
 
   override func objcMethod() {
     super.objcMethod()
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC10objcMethod{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC10objcMethod{{[_0-9a-zA-Z]*}}F
   // CHECK:         function_ref @$s7dynamic3FooC10objcMethodyyF : $@convention(method) (@guaranteed Foo) -> ()
 
   override var objcProp: Int {
     get { return super.objcProp }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC8objcPropSivg
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC8objcPropSivg
     // CHECK:         function_ref @$s7dynamic3FooC8objcPropSivg : $@convention(method) (@guaranteed Foo) -> Int
     set { super.objcProp = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC8objcPropSivs
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC8objcPropSivs
     // CHECK:         function_ref @$s7dynamic3FooC8objcPropSivs : $@convention(method) (Int, @guaranteed Foo) -> ()
   }
 
   override subscript(objc objc: AnyObject) -> Int {
     get { return super[objc: objc] }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC4objcSiyXl_tcig
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC4objcSiyXl_tcig
     // CHECK:         function_ref @$s7dynamic3FooC4objcSiyXl_tcig : $@convention(method) (@guaranteed AnyObject, @guaranteed Foo) -> Int
     set { super[objc: objc] = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC4objcSiyXl_tcis
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC4objcSiyXl_tcis
     // CHECK:         function_ref @$s7dynamic3FooC4objcSiyXl_tcis : $@convention(method) (Int, @owned AnyObject, @guaranteed Foo) -> ()
   }
 
@@ -206,30 +206,30 @@
   override init(dynamic: Int) {
     super.init(dynamic: dynamic)
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC{{[_0-9a-zA-Z]*}}fc
   // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.init!initializer.1.foreign :
 
   override func dynamicMethod() {
     super.dynamicMethod()
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC0A6Method{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC0A6Method{{[_0-9a-zA-Z]*}}F
   // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.dynamicMethod!1.foreign :
 
   override var dynamicProp: Int {
     get { return super.dynamicProp }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC0A4PropSivg
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC0A4PropSivg
     // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.dynamicProp!getter.1.foreign :
     set { super.dynamicProp = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassC0A4PropSivs
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassC0A4PropSivs
     // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.dynamicProp!setter.1.foreign :
   }
 
   override subscript(dynamic dynamic: Int) -> Int {
     get { return super[dynamic: dynamic] }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassCAAS2i_tcig
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassCAAS2i_tcig
     // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.subscript!getter.1.foreign :
     set { super[dynamic: dynamic] = newValue }
-    // CHECK-LABEL: sil hidden @$s7dynamic8SubclassCAAS2i_tcis
+    // CHECK-LABEL: sil hidden [ossa] @$s7dynamic8SubclassCAAS2i_tcis
     // CHECK:         objc_super_method {{%.*}} : $Subclass, #Foo.subscript!setter.1.foreign :
   }
 
@@ -237,11 +237,11 @@
 }
 
 class SubclassWithInheritedInits: Foo {
-  // CHECK-LABEL: sil hidden @$s7dynamic26SubclassWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic26SubclassWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
   // CHECK:         objc_super_method {{%.*}} : $SubclassWithInheritedInits, #Foo.init!initializer.1.foreign :
 }
 class GrandchildWithInheritedInits: SubclassWithInheritedInits {
-  // CHECK-LABEL: sil hidden @$s7dynamic28GrandchildWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic28GrandchildWithInheritedInitsC{{[_0-9a-zA-Z]*}}fc
   // CHECK:         objc_super_method {{%.*}} : $GrandchildWithInheritedInits, #SubclassWithInheritedInits.init!initializer.1.foreign :
 }
 class GrandchildOfInheritedInits: SubclassWithInheritedInits {
@@ -249,11 +249,11 @@
   override init(dynamic: Int) {
     super.init(dynamic: dynamic)
   }
-  // CHECK-LABEL: sil hidden @$s7dynamic26GrandchildOfInheritedInitsC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic26GrandchildOfInheritedInitsC{{[_0-9a-zA-Z]*}}fc
   // CHECK:         objc_super_method {{%.*}} : $GrandchildOfInheritedInits, #SubclassWithInheritedInits.init!initializer.1.foreign :
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic20nativeMethodDispatchyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic20nativeMethodDispatchyyF : $@convention(thin) () -> ()
 func nativeMethodDispatch() {
   // CHECK: function_ref @$s7dynamic3{{[_0-9a-zA-Z]*}}fC
   let c = Foo(native: 0)
@@ -269,7 +269,7 @@
   c[native: 0] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic18objcMethodDispatchyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic18objcMethodDispatchyyF : $@convention(thin) () -> ()
 func objcMethodDispatch() {
   // CHECK: function_ref @$s7dynamic3{{[_0-9a-zA-Z]*}}fC
   let c = Foo(objc: 0)
@@ -285,7 +285,7 @@
   c[objc: 0 as NSNumber] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic0A14MethodDispatchyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic0A14MethodDispatchyyF : $@convention(thin) () -> ()
 func dynamicMethodDispatch() {
   // CHECK: function_ref @$s7dynamic3{{[_0-9a-zA-Z]*}}fC
   let c = Foo(dynamic: 0)
@@ -301,7 +301,7 @@
   c[dynamic: 0] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic15managedDispatchyyAA3FooCF
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic15managedDispatchyyAA3FooCF
 func managedDispatch(_ c: Foo) {
   // CHECK: objc_method {{%.*}} : $Foo, #Foo.managedProp!getter.1.foreign 
   let x = c.managedProp
@@ -309,7 +309,7 @@
   c.managedProp = x
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic21foreignMethodDispatchyyF
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic21foreignMethodDispatchyyF
 func foreignMethodDispatch() {
   // CHECK: function_ref @$sSo9GuisemeauC{{[_0-9a-zA-Z]*}}fC
   let g = Guisemeau()!
@@ -328,19 +328,19 @@
 }
 
 extension Gizmo {
-  // CHECK-LABEL: sil hidden @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
   // CHECK:         objc_method {{%.*}} : $Gizmo, #Gizmo.init!initializer.1.foreign
   convenience init(convenienceInExtension: Int) {
     self.init(bellsOn: convenienceInExtension)
   }
 
-  // CHECK-LABEL: sil hidden @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
   // CHECK:         objc_method {{%.*}} : $@objc_metatype Gizmo.Type, #Gizmo.init!allocator.1.foreign
   convenience init(foreignClassFactory x: Int) {
     self.init(stuff: x)
   }
 
-  // CHECK-LABEL: sil hidden @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo5GizmoC7dynamicE{{[_0-9a-zA-Z]*}}fC
   // CHECK:         objc_method {{%.*}} : $@objc_metatype Gizmo.Type, #Gizmo.init!allocator.1.foreign
   convenience init(foreignClassExactFactory x: Int) {
     self.init(exactlyStuff: x)
@@ -350,7 +350,7 @@
   @objc dynamic func foreignDynamicExtension() { }
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic24foreignExtensionDispatchyySo5GizmoCF
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic24foreignExtensionDispatchyySo5GizmoCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Gizmo):
 func foreignExtensionDispatch(_ g: Gizmo) {
   // CHECK: objc_method [[ARG]] : $Gizmo, #Gizmo.foreignObjCExtension!1.foreign : (Gizmo)
@@ -360,7 +360,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s7dynamic33nativeMethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic33nativeMethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
 func nativeMethodDispatchFromOtherFile() {
   // CHECK: function_ref @$s7dynamic13FromOtherFile{{[_0-9a-zA-Z]*}}fC
   let c = FromOtherFile(native: 0)
@@ -376,7 +376,7 @@
   c[native: 0] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic31objcMethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic31objcMethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
 func objcMethodDispatchFromOtherFile() {
   // CHECK: function_ref @$s7dynamic13FromOtherFile{{[_0-9a-zA-Z]*}}fC
   let c = FromOtherFile(objc: 0)
@@ -392,7 +392,7 @@
   c[objc: 0] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic0A27MethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic0A27MethodDispatchFromOtherFileyyF : $@convention(thin) () -> ()
 func dynamicMethodDispatchFromOtherFile() {
   // CHECK: function_ref @$s7dynamic13FromOtherFile{{[_0-9a-zA-Z]*}}fC
   let c = FromOtherFile(dynamic: 0)
@@ -408,7 +408,7 @@
   c[dynamic: 0] = y
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic28managedDispatchFromOtherFileyyAA0deF0CF
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic28managedDispatchFromOtherFileyyAA0deF0CF
 func managedDispatchFromOtherFile(_ c: FromOtherFile) {
   // CHECK: objc_method {{%.*}} : $FromOtherFile, #FromOtherFile.managedProp!getter.1.foreign
   let x = c.managedProp
@@ -416,7 +416,7 @@
   c.managedProp = x
 }
 
-// CHECK-LABEL: sil hidden @$s7dynamic0A16ExtensionMethodsyyAA13ObjCOtherFileCF
+// CHECK-LABEL: sil hidden [ossa] @$s7dynamic0A16ExtensionMethodsyyAA13ObjCOtherFileCF
 func dynamicExtensionMethods(_ obj: ObjCOtherFile) {
   // CHECK: objc_method {{%.*}} : $ObjCOtherFile, #ObjCOtherFile.extensionMethod!1.foreign
   obj.extensionMethod()
@@ -442,7 +442,7 @@
 }
 
 public class Sub : Base {
-  // CHECK-LABEL: sil hidden @$s7dynamic3SubC1xSbvg : $@convention(method) (@guaranteed Sub) -> Bool {
+  // CHECK-LABEL: sil hidden [ossa] @$s7dynamic3SubC1xSbvg : $@convention(method) (@guaranteed Sub) -> Bool {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $Sub):
   // CHECK:     [[AUTOCLOSURE:%.*]] = function_ref @$s7dynamic3SubC1xSbvgSbyKXEfu_ : $@convention(thin) (@guaranteed Sub) -> (Bool, @error Error)
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -450,7 +450,7 @@
   // CHECK:     return {{%.*}} : $Bool
   // CHECK: } // end sil function '$s7dynamic3SubC1xSbvg'
 
-  // CHECK-LABEL: sil private [transparent] @$s7dynamic3SubC1xSbvgSbyKXEfu_ : $@convention(thin) (@guaranteed Sub) -> (Bool, @error Error) {
+  // CHECK-LABEL: sil private [transparent] [ossa] @$s7dynamic3SubC1xSbvgSbyKXEfu_ : $@convention(thin) (@guaranteed Sub) -> (Bool, @error Error) {
   // CHECK: bb0([[VALUE:%.*]] : @guaranteed $Sub):
   // CHECK:     [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK:     [[CAST_VALUE_COPY:%.*]] = upcast [[VALUE_COPY]]
@@ -490,7 +490,7 @@
 // so after re-abstracting the signature we must dispatch to the dynamic
 // thunk.
 
-// CHECK-LABEL: sil private @$s7dynamic15ConcreteDerivedC6methodyySiFAA11GenericBaseCADyyxFTV : $@convention(method) (@in_guaranteed Int, @guaranteed ConcreteDerived) -> ()
+// CHECK-LABEL: sil private [ossa] @$s7dynamic15ConcreteDerivedC6methodyySiFAA11GenericBaseCADyyxFTV : $@convention(method) (@in_guaranteed Int, @guaranteed ConcreteDerived) -> ()
 // CHECK: bb0(%0 : $*Int, %1 : @guaranteed $ConcreteDerived):
 // CHECK-NEXT:  [[VALUE:%.*]] = load [trivial] %0 : $*Int
 // CHECK:       [[DYNAMIC_THUNK:%.*]] = function_ref @$s7dynamic15ConcreteDerivedC6methodyySiFTD : $@convention(method) (Int, @guaranteed ConcreteDerived) -> ()
diff --git a/test/SILGen/dynamic_accessors.swift b/test/SILGen/dynamic_accessors.swift
index f0f47fa..001c29c 100644
--- a/test/SILGen/dynamic_accessors.swift
+++ b/test/SILGen/dynamic_accessors.swift
@@ -5,24 +5,24 @@
 
 public class MyObjCClass {
   @objc public dynamic var a: Int {
-    // CHECK-LABEL: sil [thunk] @$s17dynamic_accessors11MyObjCClassC1aSivgTo : $@convention(objc_method) (MyObjCClass) -> Int {
+    // CHECK-LABEL: sil [thunk] [ossa] @$s17dynamic_accessors11MyObjCClassC1aSivgTo : $@convention(objc_method) (MyObjCClass) -> Int {
     // CHECK:  function_ref @$s17dynamic_accessors11MyObjCClassC1aSivg
     // CHECK: }
     get { return 4 }
 
-    // CHECK-LABEL sil [thunk] @$s17dynamic_accessors11MyObjCClassC1aSivsTo : $@convention(objc_method) (Int, MyObjCClass) -> () {
+    // CHECK-LABEL sil [thunk] [ossa] @$s17dynamic_accessors11MyObjCClassC1aSivsTo : $@convention(objc_method) (Int, MyObjCClass) -> () {
     // CHECK: function_ref @$s17dynamic_accessors11MyObjCClassC1aSivs
     // CHECK: }
     set {}
   }
 
   @objc public dynamic subscript(x: Int) -> Int {
-    // CHECK-LABEL: sil [thunk] @$s17dynamic_accessors11MyObjCClassCyS2icigTo : $@convention(objc_method) (Int, MyObjCClass) -> Int {
+    // CHECK-LABEL: sil [thunk] [ossa] @$s17dynamic_accessors11MyObjCClassCyS2icigTo : $@convention(objc_method) (Int, MyObjCClass) -> Int {
     // CHECK: function_ref @$s17dynamic_accessors11MyObjCClassCyS2icig
     // CHECK: }
     get { return x }
 
-    // CHECK-LABEL: sil [thunk] @$s17dynamic_accessors11MyObjCClassCyS2icisTo : $@convention(objc_method) (Int, Int, MyObjCClass) -> () {
+    // CHECK-LABEL: sil [thunk] [ossa] @$s17dynamic_accessors11MyObjCClassCyS2icisTo : $@convention(objc_method) (Int, Int, MyObjCClass) -> () {
     // CHECK: function_ref @$s17dynamic_accessors11MyObjCClassCyS2icis
     // CHECK: }
     set {}
diff --git a/test/SILGen/dynamic_callable_attribute.swift b/test/SILGen/dynamic_callable_attribute.swift
index 30e6f96..e450151 100644
--- a/test/SILGen/dynamic_callable_attribute.swift
+++ b/test/SILGen/dynamic_callable_attribute.swift
@@ -17,7 +17,7 @@
   a(1, 2, 3, label: 4)
 }
 
-// CHECK-LABEL: sil @foo
+// CHECK-LABEL: sil [ossa] @foo
 // CHECK: bb0(%0 : $Callable):
 // CHECK: [[DYN_CALL_1:%.*]] = function_ref @$s26dynamic_callable_attribute8CallableV15dynamicallyCall13withArgumentsySaySiG_tF
 // CHECK-NEXT: apply [[DYN_CALL_1]]
diff --git a/test/SILGen/dynamic_init.swift b/test/SILGen/dynamic_init.swift
index c4fa979..3dd6f20 100644
--- a/test/SILGen/dynamic_init.swift
+++ b/test/SILGen/dynamic_init.swift
@@ -4,7 +4,7 @@
   required init() { }
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_init15testDynamicInit{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_init15testDynamicInit{{[_0-9a-zA-Z]*}}F
 func testDynamicInit(cm: C.Type) {
   // CHECK: bb0([[CM:%[0-9]+]] : $@thick C.Type):
   // CHECK:   [[METHOD:%[0-9]+]] = class_method [[CM]] : $@thick C.Type, #C.init!allocator.1 : (C.Type) -> () -> C, $@convention(method) (@thick C.Type) -> @owned C
@@ -15,7 +15,7 @@
   cm.init()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_init14testStaticInit{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_init14testStaticInit{{[_0-9a-zA-Z]*}}F
 func testStaticInit() {
   // CHECK-NOT: class_method
   // CHECK: function_ref @$s12dynamic_init1CC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick C.Type) -> @owned C
diff --git a/test/SILGen/dynamic_lookup.swift b/test/SILGen/dynamic_lookup.swift
index d20c387..1c19ff7 100644
--- a/test/SILGen/dynamic_lookup.swift
+++ b/test/SILGen/dynamic_lookup.swift
@@ -20,7 +20,7 @@
   func g()
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup15direct_to_class{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup15direct_to_class{{[_0-9a-zA-Z]*}}F
 func direct_to_class(_ obj: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject):
   // CHECK: [[OPENED_ARG:%[0-9]+]] = open_existential_ref [[ARG]] : $AnyObject to $@opened({{.*}}) AnyObject
@@ -32,7 +32,7 @@
 }
 // CHECK: } // end sil function '$s14dynamic_lookup15direct_to_class{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup18direct_to_protocol{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup18direct_to_protocol{{[_0-9a-zA-Z]*}}F
 func direct_to_protocol(_ obj: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject):
   // CHECK:   [[OPENED_ARG:%[0-9]+]] = open_existential_ref [[ARG]] : $AnyObject to $@opened({{.*}}) AnyObject
@@ -44,7 +44,7 @@
 }
 // CHECK: } // end sil function '$s14dynamic_lookup18direct_to_protocol{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup23direct_to_static_method{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup23direct_to_static_method{{[_0-9a-zA-Z]*}}F
 func direct_to_static_method(_ obj: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject):
   var obj = obj
@@ -64,7 +64,7 @@
 }
 // } // end sil function '_TF14dynamic_lookup23direct_to_static_method{{.*}}'
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup12opt_to_class{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup12opt_to_class{{[_0-9a-zA-Z]*}}F
 func opt_to_class(_ obj: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject):
   var obj = obj
@@ -109,13 +109,13 @@
   // CHECK:   return [[RESULT]] : $()
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup20forced_without_outer{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup20forced_without_outer{{[_0-9a-zA-Z]*}}F
 func forced_without_outer(_ obj: AnyObject) {
   // CHECK: dynamic_method_br
   var f = obj.f!
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup20opt_to_static_method{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup20opt_to_static_method{{[_0-9a-zA-Z]*}}F
 func opt_to_static_method(_ obj: AnyObject) {
   var obj = obj
   // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
@@ -135,7 +135,7 @@
   var optF: (() -> ())! = type(of: obj).staticF
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup15opt_to_property{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup15opt_to_property{{[_0-9a-zA-Z]*}}F
 func opt_to_property(_ obj: AnyObject) {
   var obj = obj
   // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
@@ -166,7 +166,7 @@
 }
 // CHECK: } // end sil function '$s14dynamic_lookup15opt_to_property{{[_0-9a-zA-Z]*}}F'
 
-// GUARANTEED-LABEL: sil hidden @$s14dynamic_lookup15opt_to_property{{[_0-9a-zA-Z]*}}F
+// GUARANTEED-LABEL: sil hidden [ossa] @$s14dynamic_lookup15opt_to_property{{[_0-9a-zA-Z]*}}F
   // GUARANTEED: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
   // GUARANTEED:   [[OBJ_BOX:%[0-9]+]] = alloc_box ${ var AnyObject }
   // GUARANTEED:   [[PBOBJ:%[0-9]+]] = project_box [[OBJ_BOX]]
@@ -192,7 +192,7 @@
   // GUARANTEED:   destroy_value [[BOUND_METHOD]]
   // GUARANTEED:   br bb3
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup19direct_to_subscript{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup19direct_to_subscript{{[_0-9a-zA-Z]*}}F
 func direct_to_subscript(_ obj: AnyObject, i: Int) {
   var obj = obj
   var i = i
@@ -229,7 +229,7 @@
 }
 // CHECK: } // end sil function '$s14dynamic_lookup19direct_to_subscript{{[_0-9a-zA-Z]*}}F'
 
-// GUARANTEED-LABEL: sil hidden @$s14dynamic_lookup19direct_to_subscript{{[_0-9a-zA-Z]*}}F
+// GUARANTEED-LABEL: sil hidden [ossa] @$s14dynamic_lookup19direct_to_subscript{{[_0-9a-zA-Z]*}}F
   // GUARANTEED: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject, [[I:%[0-9]+]] : $Int):
   // GUARANTEED:   [[OBJ_BOX:%[0-9]+]] = alloc_box ${ var AnyObject }
   // GUARANTEED:   [[PBOBJ:%[0-9]+]] = project_box [[OBJ_BOX]]
@@ -260,7 +260,7 @@
   // GUARANTEED:   destroy_value [[GETTER_WITH_SELF]]
   // GUARANTEED:   br bb3
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup16opt_to_subscript{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup16opt_to_subscript{{[_0-9a-zA-Z]*}}F
 func opt_to_subscript(_ obj: AnyObject, i: Int) {
   var obj = obj
   var i = i
@@ -294,7 +294,7 @@
   obj[i]
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup8downcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup8downcast{{[_0-9a-zA-Z]*}}F
 func downcast(_ obj: AnyObject) -> X {
   var obj = obj
   // CHECK: bb0([[OBJ:%[0-9]+]] : @guaranteed $AnyObject):
@@ -316,7 +316,7 @@
   @objc optional var juice: Juice { get }
 }
 
-// CHECK-LABEL: sil hidden @$s14dynamic_lookup7consumeyyAA5Fruit_pF
+// CHECK-LABEL: sil hidden [ossa] @$s14dynamic_lookup7consumeyyAA5Fruit_pF
 // CHECK: bb0(%0 : @guaranteed $Fruit):
 // CHECK:        [[BOX:%.*]] = alloc_stack $Optional<Juice>
 // CHECK:        dynamic_method_br [[SELF:%.*]] : $@opened("{{.*}}") Fruit, #Fruit.juice!getter.1.foreign, bb1, bb2
diff --git a/test/SILGen/dynamic_lookup_throws.swift b/test/SILGen/dynamic_lookup_throws.swift
index 3fbf321..8b77aaf 100644
--- a/test/SILGen/dynamic_lookup_throws.swift
+++ b/test/SILGen/dynamic_lookup_throws.swift
@@ -12,7 +12,7 @@
    @objc func blub() throws {}
 }
 
-// CHECK-LABEL: sil hidden @$s21dynamic_lookup_throws8testBlub1ayyXl_tKF : $@convention(thin) (@guaranteed AnyObject) -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s21dynamic_lookup_throws8testBlub1ayyXl_tKF : $@convention(thin) (@guaranteed AnyObject) -> @error Error
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $AnyObject):
 func testBlub(a: AnyObject) throws {
   // CHECK:   [[ANYOBJECT_REF:%.*]] = open_existential_ref [[ARG]] : $AnyObject to $@opened("[[OPENED:.*]]") AnyObject
diff --git a/test/SILGen/dynamic_self.swift b/test/SILGen/dynamic_self.swift
index 3f1c40d..06fa6c7 100644
--- a/test/SILGen/dynamic_self.swift
+++ b/test/SILGen/dynamic_self.swift
@@ -13,10 +13,10 @@
 class X : P, CP {
   required init(int i: Int) { }
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self1XC1f{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed X) -> @owned
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self1XC1f{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed X) -> @owned
   func f() -> Self { return self }
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self1XC7factory{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (Int, @thick X.Type) -> @owned X
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self1XC7factory{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (Int, @thick X.Type) -> @owned X
   // CHECK: bb0([[I:%[0-9]+]] : $Int, [[SELF:%[0-9]+]] : $@thick X.Type):
   // CHECK: [[DYNAMIC_SELF:%[0-9]+]] = unchecked_trivial_bit_cast [[SELF]] : $@thick X.Type to $@thick @dynamic_self X.Type
   // CHECK: [[STATIC_SELF:%[0-9]+]] = upcast [[DYNAMIC_SELF]] : $@thick @dynamic_self X.Type to $@thick X.Type
@@ -37,7 +37,7 @@
 
 class GY<T> : GX<[T]> { }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self23testDynamicSelfDispatch{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Y) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self23testDynamicSelfDispatch{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Y) -> ()
 // CHECK: bb0([[Y:%[0-9]+]] : @guaranteed $Y):
 // CHECK:   [[Y_AS_X:%[0-9]+]] = upcast [[Y]] : $Y to $X
 // CHECK:   [[X_F:%[0-9]+]] = class_method [[Y_AS_X]] : $X, #X.f!1 : (X) -> () -> @dynamic_self X, $@convention(method) (@guaranteed X) -> @owned X
@@ -48,7 +48,7 @@
   _ = y.f()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self30testDynamicSelfDispatchGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed GY<Int>) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self30testDynamicSelfDispatchGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed GY<Int>) -> ()
 func testDynamicSelfDispatchGeneric(gy: GY<Int>) {
   // CHECK: bb0([[GY:%[0-9]+]] : @guaranteed $GY<Int>):
   // CHECK:   [[GY_AS_GX:%[0-9]+]] = upcast [[GY]] : $GY<Int> to $GX<Array<Int>>
@@ -59,7 +59,7 @@
   _ = gy.f()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self21testArchetypeDispatch{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self21testArchetypeDispatch{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P> (@in_guaranteed T) -> ()
 func testArchetypeDispatch<T: P>(t: T) {
   // CHECK: bb0([[T:%[0-9]+]] : $*T):
   // CHECK:   [[T_RESULT:%[0-9]+]] = alloc_stack $T
@@ -68,7 +68,7 @@
   _ = t.f()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self23testExistentialDispatch{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self23testExistentialDispatch{{[_0-9a-zA-Z]*}}F
 func testExistentialDispatch(p: P) {
 // CHECK: bb0([[P:%[0-9]+]] : $*P):
 // CHECK:   [[PCOPY_ADDR:%[0-9]+]] = open_existential_addr immutable_access [[P]] : $*P to $*@opened([[N:".*"]]) P
@@ -81,7 +81,7 @@
   _ = p.f()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self28testExistentialDispatchClass{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed CP) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self28testExistentialDispatchClass{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed CP) -> ()
 // CHECK: bb0([[CP:%[0-9]+]] : @guaranteed $CP):
 // CHECK:   [[CP_ADDR:%[0-9]+]] = open_existential_ref [[CP]] : $CP to $@opened([[N:".*"]]) CP
 // CHECK:   [[CP_F:%[0-9]+]] = witness_method $@opened([[N]]) CP, #CP.f!1 : {{.*}}, [[CP_ADDR]]{{.*}} : $@convention(witness_method: CP) <τ_0_0 where τ_0_0 : CP> (@guaranteed τ_0_0) -> @owned τ_0_0
@@ -96,7 +96,7 @@
   @objc func method() -> Self { return self }
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self21testAnyObjectDispatch1oyyXl_tF : $@convention(thin) (@guaranteed AnyObject) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self21testAnyObjectDispatch1oyyXl_tF : $@convention(thin) (@guaranteed AnyObject) -> () {
 func testAnyObjectDispatch(o: AnyObject) {
   // CHECK: dynamic_method_br [[O_OBJ:%[0-9]+]] : $@opened({{.*}}) AnyObject, #ObjC.method!1.foreign, bb1, bb2
 
@@ -113,7 +113,7 @@
   @objc dynamic required init() { }
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self12testObjCInit{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@thick ObjCInit.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self12testObjCInit{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@thick ObjCInit.Type) -> ()
 func testObjCInit(meta: ObjCInit.Type) {
 // CHECK: bb0([[THICK_META:%[0-9]+]] : $@thick ObjCInit.Type):
 // CHECK:   [[OBJC_META:%[0-9]+]] = thick_to_objc_metatype [[THICK_META]] : $@thick ObjCInit.Type to $@objc_metatype ObjCInit.Type
@@ -129,7 +129,7 @@
   func foo() -> Self? { return self }
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self14OptionalResultC3fooACXDSgyF : $@convention(method) (@guaranteed OptionalResult) -> @owned Optional<OptionalResult> {
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self14OptionalResultC3fooACXDSgyF : $@convention(method) (@guaranteed OptionalResult) -> @owned Optional<OptionalResult> {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $OptionalResult):
 // CHECK-NEXT: debug_value [[SELF]] : $OptionalResult
 // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -145,7 +145,7 @@
   v.foo()?.bar()
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self18testOptionalResult1vyAA0dE9InheritorC_tF : $@convention(thin) (@guaranteed OptionalResultInheritor) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self18testOptionalResult1vyAA0dE9InheritorC_tF : $@convention(thin) (@guaranteed OptionalResultInheritor) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $OptionalResultInheritor):
 // CHECK:      [[CAST_ARG:%.*]] = upcast [[ARG]]
 // CHECK:      [[T0:%.*]] = class_method [[CAST_ARG]] : $OptionalResult, #OptionalResult.foo!1 : (OptionalResult) -> () -> @dynamic_self OptionalResult?, $@convention(method) (@guaranteed OptionalResult) -> @owned Optional<OptionalResult>
@@ -158,7 +158,7 @@
 
   required init() {}
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self1ZC23testDynamicSelfCaptures1xACXDSi_tF : $@convention(method) (Int, @guaranteed Z) -> @owned Z {
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self1ZC23testDynamicSelfCaptures1xACXDSi_tF : $@convention(method) (Int, @guaranteed Z) -> @owned Z {
   func testDynamicSelfCaptures(x: Int) -> Self {
     // CHECK: bb0({{.*}}, [[SELF:%.*]] : @guaranteed $Z):
 
@@ -247,7 +247,7 @@
   static func staticNewInstance() -> Self { return self.init() }
 }
 
-// CHECK-LABEL: sil hidden @$s12dynamic_self22partialApplySelfReturn1c1tyAA7FactoryC_AFmtF : $@convention(thin) (@guaranteed Factory, @thick Factory.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self22partialApplySelfReturn1c1tyAA7FactoryC_AFmtF : $@convention(thin) (@guaranteed Factory, @thick Factory.Type) -> ()
 func partialApplySelfReturn(c: Factory, t: Factory.Type) {
   // CHECK: function_ref @$s12dynamic_self7FactoryC11newInstanceACXDyFTc : $@convention(thin) (@guaranteed Factory) -> @owned @callee_guaranteed () -> @owned Factory
   _ = c.newInstance
@@ -274,7 +274,7 @@
 
 class FactoryFactory {
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self07FactoryC0C11newInstanceACXDyFZ : $@convention(method) (@thick FactoryFactory.Type) -> @owned FactoryFactory
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self07FactoryC0C11newInstanceACXDyFZ : $@convention(method) (@thick FactoryFactory.Type) -> @owned FactoryFactory
   static func newInstance() -> Self {
     // CHECK: bb0(%0 : $@thick FactoryFactory.Type):
 
@@ -301,7 +301,7 @@
 }
 
 class Derived : Base {
-  // CHECK-LABEL: sil hidden @$s12dynamic_self7DerivedC9superCallyyF : $@convention(method) (@guaranteed Derived) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self7DerivedC9superCallyyF : $@convention(method) (@guaranteed Derived) -> ()
   // CHECK: [[SELF:%.*]] = copy_value %0
   // CHECK: [[SUPER:%.*]] = upcast [[SELF]] : $Derived to $Base
   // CHECK: [[METHOD:%.*]] = function_ref @$s12dynamic_self4BaseC11returnsSelfACXDyF
@@ -311,7 +311,7 @@
     _ = super.returnsSelf()
   }
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self7DerivedC15superCallStaticyyFZ : $@convention(method) (@thick Derived.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self7DerivedC15superCallStaticyyFZ : $@convention(method) (@thick Derived.Type) -> ()
   // CHECK: [[SUPER:%.*]] = upcast %0 : $@thick Derived.Type to $@thick Base.Type
   // CHECK: [[METHOD:%.*]] = function_ref @$s12dynamic_self4BaseC17returnsSelfStaticACXDyFZ
   // CHECK: apply [[METHOD]]([[SUPER]])
@@ -320,7 +320,7 @@
     _ = super.returnsSelfStatic()
   }
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self7DerivedC32superCallFromMethodReturningSelfACXDyF : $@convention(method) (@guaranteed Derived) -> @owned Derived
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self7DerivedC32superCallFromMethodReturningSelfACXDyF : $@convention(method) (@guaranteed Derived) -> @owned Derived
   // CHECK: [[SELF:%.*]] = copy_value %0
   // CHECK: [[SUPER:%.*]] = upcast [[SELF]] : $Derived to $Base
   // CHECK: [[METHOD:%.*]] = function_ref @$s12dynamic_self4BaseC11returnsSelfACXDyF
@@ -331,7 +331,7 @@
     return self
   }
 
-  // CHECK-LABEL: sil hidden @$s12dynamic_self7DerivedC38superCallFromMethodReturningSelfStaticACXDyFZ : $@convention(method) (@thick Derived.Type) -> @owned Derived
+  // CHECK-LABEL: sil hidden [ossa] @$s12dynamic_self7DerivedC38superCallFromMethodReturningSelfStaticACXDyFZ : $@convention(method) (@thick Derived.Type) -> @owned Derived
   // CHECK; [[DYNAMIC_SELF:%.*]] = unchecked_trivial_bit_cast %0 : $@thick Derived.Type to $@thick @synamic_self Derived.Type
   // CHECK: [[SUPER:%.*]] = upcast [[DYNAMIC_SELF]] : $@thick @dynamic_self Derived.Type to $@thick Base.Type
   // CHECK: [[METHOD:%.*]] = function_ref @$s12dynamic_self4BaseC17returnsSelfStaticACXDyFZ
@@ -346,20 +346,20 @@
 class Generic<T> {
   // Examples where we have to add a special argument to capture Self's metadata
   func t1() -> Self {
-    // CHECK-LABEL: sil private @$s12dynamic_self7GenericC2t1ACyxGXDyFAEXDSgycfU_ : $@convention(thin) <T> (@guaranteed <τ_0_0> { var @sil_weak Optional<Generic<τ_0_0>> } <T>, @thick @dynamic_self Generic<T>.Type) -> @owned Optional<Generic<T>>
+    // CHECK-LABEL: sil private [ossa] @$s12dynamic_self7GenericC2t1ACyxGXDyFAEXDSgycfU_ : $@convention(thin) <T> (@guaranteed <τ_0_0> { var @sil_weak Optional<Generic<τ_0_0>> } <T>, @thick @dynamic_self Generic<T>.Type) -> @owned Optional<Generic<T>>
     _ = {[weak self] in self }
     return self
   }
 
   func t2() -> Self {
-    // CHECK-LABEL: sil private @$s12dynamic_self7GenericC2t2ACyxGXDyFAEXD_AEXDtycfU_ : $@convention(thin) <T> (@guaranteed (Generic<T>, Generic<T>), @thick @dynamic_self Generic<T>.Type) -> (@owned Generic<T>, @owned Generic<T>)
+    // CHECK-LABEL: sil private [ossa] @$s12dynamic_self7GenericC2t2ACyxGXDyFAEXD_AEXDtycfU_ : $@convention(thin) <T> (@guaranteed (Generic<T>, Generic<T>), @thick @dynamic_self Generic<T>.Type) -> (@owned Generic<T>, @owned Generic<T>)
     let selves = (self, self)
     _ = { selves }
     return self
   }
 
   func t3() -> Self {
-    // CHECK-LABEL: sil private @$s12dynamic_self7GenericC2t3ACyxGXDyFAEXDycfU_ : $@convention(thin) <T> (@guaranteed @sil_unowned Generic<T>, @thick @dynamic_self Generic<T>.Type) -> @owned Generic<T> 
+    // CHECK-LABEL: sil private [ossa] @$s12dynamic_self7GenericC2t3ACyxGXDyFAEXDycfU_ : $@convention(thin) <T> (@guaranteed @sil_unowned Generic<T>, @thick @dynamic_self Generic<T>.Type) -> @owned Generic<T> 
     _ = {[unowned self] in self }
     return self
   }
diff --git a/test/SILGen/dynamic_self_reference_storage.swift b/test/SILGen/dynamic_self_reference_storage.swift
index a30a802..1a8691d 100644
--- a/test/SILGen/dynamic_self_reference_storage.swift
+++ b/test/SILGen/dynamic_self_reference_storage.swift
@@ -1,7 +1,7 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class Foo {
-  // CHECK-LABEL: sil hidden @$s30dynamic_self_reference_storage3FooC0A4Self{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s30dynamic_self_reference_storage3FooC0A4Self{{[_0-9a-zA-Z]*}}F
   func dynamicSelf() -> Self {
     // CHECK: debug_value {{%.*}} : $Foo
     let managedSelf = self
diff --git a/test/SILGen/dynamic_witness_other_module.swift b/test/SILGen/dynamic_witness_other_module.swift
index cc42960..cd5e140 100644
--- a/test/SILGen/dynamic_witness_other_module.swift
+++ b/test/SILGen/dynamic_witness_other_module.swift
@@ -17,6 +17,6 @@
 // Make sure we emit a direct reference to the witness's materializeForSet
 // instead of dispatching via class_method.
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s029dynamic_witness_other_module_C025ExtremeLateBindingCounterC0a1_b1_c1_D008EvenMoreefgH0A2dEP7counterSivMTW : $@yield_once @convention(witness_method: EvenMoreExtremeLateBindingCounter) (@inout ExtremeLateBindingCounter) -> @yields @inout Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s029dynamic_witness_other_module_C025ExtremeLateBindingCounterC0a1_b1_c1_D008EvenMoreefgH0A2dEP7counterSivMTW : $@yield_once @convention(witness_method: EvenMoreExtremeLateBindingCounter) (@inout ExtremeLateBindingCounter) -> @yields @inout Int {
 // CHECK: function_ref @$s029dynamic_witness_other_module_C025ExtremeLateBindingCounterC7counterSivM : $@yield_once @convention(method) (@guaranteed ExtremeLateBindingCounter) -> @yields @inout Int
 // CHECK: return
diff --git a/test/SILGen/dynamically_replaceable.swift b/test/SILGen/dynamically_replaceable.swift
index a661d57..9551d12 100644
--- a/test/SILGen/dynamically_replaceable.swift
+++ b/test/SILGen/dynamically_replaceable.swift
@@ -1,21 +1,21 @@
 // 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) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s23dynamically_replaceable014maybe_dynamic_B0yyF : $@convention(thin) () -> () {
+// IMPLICIT-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable014maybe_dynamic_B0yyF : $@convention(thin) () -> () {
 func maybe_dynamic_replaceable() {
 }
 
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable08dynamic_B0yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable08dynamic_B0yyF : $@convention(thin) () -> () {
 dynamic func dynamic_replaceable() {
 }
 
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktV1xACSi_tcfC : $@convention(method) (Int, @thin Strukt.Type) -> Strukt
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktV08dynamic_B0yyF : $@convention(method) (Strukt) -> () {
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktV08dynamic_B4_varSivg
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktV08dynamic_B4_varSivs
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktVyS2icig : $@convention(method) (Int, Strukt) -> Int
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6StruktVyS2icis : $@convention(method) (Int, Int, @inout Strukt) -> ()
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktV1xACSi_tcfC : $@convention(method) (Int, @thin Strukt.Type) -> Strukt
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktV08dynamic_B0yyF : $@convention(method) (Strukt) -> () {
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktV08dynamic_B4_varSivg
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktV08dynamic_B4_varSivs
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktVyS2icig : $@convention(method) (Int, Strukt) -> Int
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6StruktVyS2icis : $@convention(method) (Int, Int, @inout Strukt) -> ()
 struct Strukt {
   dynamic init(x: Int) {
   }
@@ -38,12 +38,12 @@
     }
   }
 }
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassC1xACSi_tcfC : $@convention(method) (Int, @thick Klass.Type) -> @owned Klass
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassC08dynamic_B0yyF : $@convention(method) (@guaranteed Klass) -> () {
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassC08dynamic_B4_varSivg
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassC08dynamic_B4_varSivs
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassCyS2icig : $@convention(method) (Int, @guaranteed Klass) -> Int
-// CHECK_LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable5KlassCyS2icis : $@convention(method) (Int, Int, @guaranteed Klass) -> ()
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassC1xACSi_tcfC : $@convention(method) (Int, @thick Klass.Type) -> @owned Klass
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassC08dynamic_B0yyF : $@convention(method) (@guaranteed Klass) -> () {
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassC08dynamic_B4_varSivg
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassC08dynamic_B4_varSivs
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassCyS2icig : $@convention(method) (Int, @guaranteed Klass) -> Int
+// CHECK_LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable5KlassCyS2icis : $@convention(method) (Int, Int, @guaranteed Klass) -> ()
 class Klass {
   dynamic init(x: Int) {
   }
@@ -67,12 +67,12 @@
   }
 }
 
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable6globalSivg : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable6globalSivg : $@convention(thin) () -> Int {
 dynamic var global : Int {
   return 1
 }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable08dynamic_B0yyF"] @$s23dynamically_replaceable11replacementyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable08dynamic_B0yyF"] [ossa] @$s23dynamically_replaceable11replacementyyF : $@convention(thin) () -> () {
 @_dynamicReplacement(for: dynamic_replaceable())
 func replacement() {
 }
@@ -81,7 +81,7 @@
   // Calls to the replaced function inside the replacing function should be
   // statically dispatched.
 
-  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B0yyF"] @$s23dynamically_replaceable5KlassC11replacementyyF : $@convention(method) (@guaranteed Klass) -> () {
+  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B0yyF"] [ossa] @$s23dynamically_replaceable5KlassC11replacementyyF : $@convention(method) (@guaranteed Klass) -> () {
   // CHECK: [[FN:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable5KlassC11replacementyyF
   // CHECK: apply [[FN]](%0) : $@convention(method) (@guaranteed Klass) -> ()
   // CHECK: [[METHOD:%.*]] = class_method %0 : $Klass, #Klass.dynamic_replaceable2!1
@@ -93,7 +93,7 @@
     dynamic_replaceable2()
   }
 
-  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC1xACSi_tcfC"] @$s23dynamically_replaceable5KlassC1yACSi_tcfC : $@convention(method) (Int, @thick Klass.Type) -> @owned Klass {
+  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC1xACSi_tcfC"] [ossa] @$s23dynamically_replaceable5KlassC1yACSi_tcfC : $@convention(method) (Int, @thick Klass.Type) -> @owned Klass {
   // CHECK:  [[FUN:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable5KlassC1yACSi_tcfC
   // CHECK:  apply [[FUN]]({{.*}}, %1)
   @_dynamicReplacement(for: init(x:))
@@ -101,12 +101,12 @@
     self.init(x: y + 1)
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B4_varSivg"] @$s23dynamically_replaceable5KlassC1rSivg : $@convention(method) (@guaranteed Klass) -> Int {
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B4_varSivg"] [ossa] @$s23dynamically_replaceable5KlassC1rSivg : $@convention(method) (@guaranteed Klass) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Klass):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref  @$s23dynamically_replaceable5KlassC1rSivg
 // CHECK:   apply [[ORIG]]([[ARG]]) : $@convention(method) (@guaranteed Klass) -> Int
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B4_varSivs"] @$s23dynamically_replaceable5KlassC1rSivs : $@convention(method) (Int, @guaranteed Klass) -> () {
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassC08dynamic_B4_varSivs"] [ossa] @$s23dynamically_replaceable5KlassC1rSivs : $@convention(method) (Int, @guaranteed Klass) -> () {
 // CHECK: bb0({{.*}} : $Int, [[SELF:%.*]] : @guaranteed $Klass):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable5KlassC1rSivs
 // CHECK:   apply [[ORIG]]({{.*}}, [[SELF]]) : $@convention(method)
@@ -120,12 +120,12 @@
     }
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassCyS2icig"] @$s23dynamically_replaceable5KlassC1xS2i_tcig
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassCyS2icig"] [ossa] @$s23dynamically_replaceable5KlassC1xS2i_tcig
 // CHECK: bb0({{.*}} : $Int, [[SELF:%.*]] : @guaranteed $Klass):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable5KlassC1xS2i_tcig
 // CHECK:   apply [[ORIG]]({{.*}}, [[SELF]]) : $@convention(method) (Int, @guaranteed Klass) -> Int
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassCyS2icis"] @$s23dynamically_replaceable5KlassC1xS2i_tcis
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable5KlassCyS2icis"] [ossa] @$s23dynamically_replaceable5KlassC1xS2i_tcis
 // CHECK: bb0({{.*}} : $Int, {{.*}} : $Int, [[SELF:%.*]] : @guaranteed $Klass):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable5KlassC1xS2i_tcis
 // CHECK:   apply [[ORIG]]({{.*}}, {{.*}}, [[SELF]]) : $@convention(method) (Int, Int, @guaranteed Klass) -> ()
@@ -143,14 +143,14 @@
 
 extension Strukt {
 
-  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B0yyF"] @$s23dynamically_replaceable6StruktV11replacementyyF : $@convention(method) (Strukt) -> () {
+  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B0yyF"] [ossa] @$s23dynamically_replaceable6StruktV11replacementyyF : $@convention(method) (Strukt) -> () {
   // CHECK:   [[FUN:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV11replacementyyF
   // CHECK:   apply [[FUN]](%0) : $@convention(method) (Strukt) -> ()
   @_dynamicReplacement(for: dynamic_replaceable())
   func replacement() {
     dynamic_replaceable()
   }
-  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV1xACSi_tcfC"] @$s23dynamically_replaceable6StruktV1yACSi_tcfC : $@convention(method) (Int, @thin Strukt.Type) -> Strukt {
+  // CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV1xACSi_tcfC"] [ossa] @$s23dynamically_replaceable6StruktV1yACSi_tcfC : $@convention(method) (Int, @thin Strukt.Type) -> Strukt {
   // CHECK: [[FUN:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV1yACSi_tcfC
   // CHECK: apply [[FUN]]({{.*}}, %1)
   @_dynamicReplacement(for: init(x:))
@@ -158,12 +158,12 @@
     self.init(x: y + 1)
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B4_varSivg"] @$s23dynamically_replaceable6StruktV1rSivg
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B4_varSivg"] [ossa] @$s23dynamically_replaceable6StruktV1rSivg
 // CHECK: bb0([[ARG:%.*]] : $Strukt):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV1rSivg
 // CHECK:   apply [[ORIG]]([[ARG]]) : $@convention(method) (Strukt) -> Int
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B4_varSivs"] @$s23dynamically_replaceable6StruktV1rSivs
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktV08dynamic_B4_varSivs"] [ossa] @$s23dynamically_replaceable6StruktV1rSivs
 // CHECK: bb0({{.*}} : $Int, [[ARG:%.*]] : $*Strukt):
 // CHECK:   [[BA:%.*]] = begin_access [modify] [unknown] [[ARG]] : $*Strukt
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV1rSivs
@@ -179,12 +179,12 @@
     }
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktVyS2icig"] @$s23dynamically_replaceable6StruktV1xS2i_tcig
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktVyS2icig"] [ossa] @$s23dynamically_replaceable6StruktV1xS2i_tcig
 // CHECK: bb0({{.*}} : $Int, [[SELF:%.*]] : $Strukt):
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV1xS2i_tcig
 // CHECK:   apply [[ORIG]]({{.*}}, [[SELF]]) : $@convention(method) (Int, Strukt) -> Int
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktVyS2icis"] @$s23dynamically_replaceable6StruktV1xS2i_tcis
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable6StruktVyS2icis"] [ossa] @$s23dynamically_replaceable6StruktV1xS2i_tcis
 // CHECK: bb0({{.*}} : $Int, {{.*}} : $Int, [[SELF:%.*]] : $*Strukt):
 // CHECK:   [[BA:%.*]] = begin_access [modify] [unknown] [[SELF]] : $*Strukt
 // CHECK:   [[ORIG:%.*]] = prev_dynamic_function_ref @$s23dynamically_replaceable6StruktV1xS2i_tcis
@@ -228,23 +228,23 @@
 
 extension GenericS {
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B0yyF"] @$s23dynamically_replaceable8GenericSV11replacementyyF
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B0yyF"] [ossa] @$s23dynamically_replaceable8GenericSV11replacementyyF
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV11replacementyyF
   @_dynamicReplacement(for: dynamic_replaceable())
   func replacement() {
     dynamic_replaceable()
   }
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV1xACyxGSi_tcfC"] @$s23dynamically_replaceable8GenericSV1yACyxGSi_tcfC
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV1xACyxGSi_tcfC"] [ossa] @$s23dynamically_replaceable8GenericSV1yACyxGSi_tcfC
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV1yACyxGSi_tcfC
   @_dynamicReplacement(for: init(x:))
   init(y: Int) {
     self.init(x: y + 1)
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B4_varSivg"] @$s23dynamically_replaceable8GenericSV1rSivg
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B4_varSivg"] [ossa] @$s23dynamically_replaceable8GenericSV1rSivg
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV1rSivg
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B4_varSivs"] @$s23dynamically_replaceable8GenericSV1rSivs
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSV08dynamic_B4_varSivs"] [ossa] @$s23dynamically_replaceable8GenericSV1rSivs
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV1rSivs
   @_dynamicReplacement(for: dynamic_replaceable_var)
   var r : Int {
@@ -256,10 +256,10 @@
     }
   }
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSVyS2icig"] @$s23dynamically_replaceable8GenericSV1xS2i_tcig
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSVyS2icig"] [ossa] @$s23dynamically_replaceable8GenericSV1xS2i_tcig
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV1xS2i_tcig
 
-// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSVyS2icis"] @$s23dynamically_replaceable8GenericSV1xS2i_tcis
+// CHECK-LABEL: sil hidden [dynamic_replacement_for "$s23dynamically_replaceable8GenericSVyS2icis"] [ossa] @$s23dynamically_replaceable8GenericSV1xS2i_tcis
 // CHECK: prev_dynamic_function_ref @$s23dynamically_replaceable8GenericSV1xS2i_tcis
  @_dynamicReplacement(for: subscript(_:))
  subscript(x y: Int) -> Int {
@@ -273,9 +273,9 @@
 }
 
 dynamic var globalX = 0
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable7globalXSivg : $@convention(thin) () -> Int
-// CHECK-LABEL: sil hidden [dynamically_replacable] @$s23dynamically_replaceable7globalXSivs : $@convention(thin) (Int) -> ()
-// CHECK-LABEL: sil hidden @$s23dynamically_replaceable7getsetXyS2iF
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable7globalXSivg : $@convention(thin) () -> Int
+// CHECK-LABEL: sil hidden [dynamically_replacable] [ossa] @$s23dynamically_replaceable7globalXSivs : $@convention(thin) (Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s23dynamically_replaceable7getsetXyS2iF
 // CHECK: dynamic_function_ref @$s23dynamically_replaceable7globalXSivs
 // CHECK: dynamic_function_ref @$s23dynamically_replaceable7globalXSivg
 func getsetX(_ x: Int) -> Int {
diff --git a/test/SILGen/effectsattr.swift b/test/SILGen/effectsattr.swift
index ad98e5f..3e87e34 100644
--- a/test/SILGen/effectsattr.swift
+++ b/test/SILGen/effectsattr.swift
@@ -1,14 +1,14 @@
 // RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
 
-//CHECK: [readonly] @func1
+//CHECK: [readonly] [ossa] @func1
 @_effects(readonly) @_silgen_name("func1") func func1() { }
 
-//CHECK: [readnone] @func2
+//CHECK: [readnone] [ossa] @func2
 @_effects(readnone) @_silgen_name("func2") func func2() { }
 
-//CHECK: [readwrite] @func3
+//CHECK: [readwrite] [ossa] @func3
 @_effects(readwrite) @_silgen_name("func3") func func3() { }
 
-//CHECK: [releasenone] @func4
+//CHECK: [releasenone] [ossa] @func4
 @_effects(releasenone) @_silgen_name("func4") func func4() { }
diff --git a/test/SILGen/enum.swift b/test/SILGen/enum.swift
index 17077e4..bf4e8f7 100644
--- a/test/SILGen/enum.swift
+++ b/test/SILGen/enum.swift
@@ -13,7 +13,7 @@
   case truthy
 }
 
-// CHECK-LABEL: sil hidden @$ss13Boolish_casesyyF
+// CHECK-LABEL: sil hidden [ossa] @$ss13Boolish_casesyyF
 func Boolish_cases() {
   // CHECK:       [[BOOLISH:%[0-9]+]] = metatype $@thin Boolish.Type
   // CHECK-NEXT:  [[FALSY:%[0-9]+]] = enum $Boolish, #Boolish.falsy!enumelt
@@ -31,7 +31,7 @@
   case mere(Int)
 }
 
-// CHECK-LABEL: sil hidden @$ss16Optionable_casesyySiF
+// CHECK-LABEL: sil hidden [ossa] @$ss16Optionable_casesyySiF
 func Optionable_cases(_ x: Int) {
 
   // CHECK:       [[METATYPE:%.*]] = metatype $@thin Optionable.Type
@@ -45,13 +45,13 @@
   _ = Optionable.mere(x)
 }
 
-// CHECK-LABEL: sil shared [transparent] [thunk] @$ss10OptionableO4mereyABSicABmF
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$ss10OptionableO4mereyABSicABmF
 // CHECK:        [[FN:%.*]] = function_ref @$ss10OptionableO4mereyABSicABmF
 // CHECK-NEXT:   [[METHOD:%.*]] = partial_apply [callee_guaranteed] [[FN]](%0)
 // CHECK-NEXT:   return [[METHOD]]
 // CHECK-NEXT: }
 
-// CHECK-LABEL: sil shared [transparent] @$ss10OptionableO4mereyABSicABmF
+// CHECK-LABEL: sil shared [transparent] [ossa] @$ss10OptionableO4mereyABSicABmF
 // CHECK:        [[RES:%.*]] = enum $Optionable, #Optionable.mere!enumelt.1, %0 : $Int
 // CHECK-NEXT:   return [[RES]] : $Optionable
 // CHECK-NEXT: }
@@ -65,7 +65,7 @@
   case phantom(S)
 }
 
-// CHECK-LABEL: sil hidden @$ss17AddressOnly_casesyys1SVF
+// CHECK-LABEL: sil hidden [ossa] @$ss17AddressOnly_casesyys1SVF
 func AddressOnly_cases(_ s: S) {
 
   // CHECK:       [[METATYPE:%.*]] = metatype $@thin AddressOnly.Type
@@ -105,7 +105,7 @@
   // CHECK:       return
 }
 
-// CHECK-LABEL: sil shared [transparent] [thunk] @$ss11AddressOnlyO4mereyABs1P_pcABmF
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$ss11AddressOnlyO4mereyABs1P_pcABmF
 // CHECK:       [[FN:%.*]] = function_ref @$ss11AddressOnlyO4mereyABs1P_pcABmF
 // CHECK-NEXT:  [[METHOD:%.*]] = partial_apply [callee_guaranteed] [[FN]](%0)
 // CHECK-NEXT:  // function_ref
@@ -114,7 +114,7 @@
 // CHECK-NEXT:  return [[CANONICAL_THUNK]] : $@callee_guaranteed (@in_guaranteed P) -> @out AddressOnly
 // CHECK-NEXT: }
 
-// CHECK-LABEL: sil shared [transparent] @$ss11AddressOnlyO4mereyABs1P_pcABmF : $@convention
+// CHECK-LABEL: sil shared [transparent] [ossa] @$ss11AddressOnlyO4mereyABs1P_pcABmF : $@convention
 // CHECK: bb0([[ARG0:%.*]] : $*AddressOnly, [[ARG1:%.*]] : $*P, [[ARG2:%.*]] : $@thin AddressOnly.Type):
 // CHECK:        [[RET_DATA:%.*]] = init_enum_data_addr [[ARG0]] : $*AddressOnly, #AddressOnly.mere!enumelt.1
 // CHECK-NEXT:   copy_addr [take] [[ARG1]] to [initialization] [[RET_DATA]] : $*P
@@ -127,7 +127,7 @@
   case mere(T)
 }
 
-// CHECK-LABEL: sil hidden @$ss20PolyOptionable_casesyyxlF
+// CHECK-LABEL: sil hidden [ossa] @$ss20PolyOptionable_casesyyxlF
 func PolyOptionable_cases<T>(_ t: T) {
 
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin PolyOptionable<T>.Type
@@ -154,7 +154,7 @@
 
 // The substituted type is loadable and trivial here
 
-// CHECK-LABEL: sil hidden @$ss32PolyOptionable_specialized_casesyySiF
+// CHECK-LABEL: sil hidden [ossa] @$ss32PolyOptionable_specialized_casesyySiF
 func PolyOptionable_specialized_cases(_ t: Int) {
 
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin PolyOptionable<Int>.Type
@@ -178,7 +178,7 @@
 
 // Curry Thunk for Foo.A(_:)
 //
-// CHECK-LABEL: sil shared [transparent] [thunk] @$ss3FooO1AyABs1P_p_SStcABmF
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$ss3FooO1AyABs1P_p_SStcABmF
 // CHECK:         [[FN:%.*]] = function_ref @$ss3FooO1AyABs1P_p_SStcABmF
 // CHECK-NEXT:    [[METHOD:%.*]] = partial_apply [callee_guaranteed] [[FN]](%0)
 // CHECK-NEXT:    // function_ref
@@ -188,7 +188,7 @@
 // CHECK-NEXT:  }
 
 // Foo.A(_:)
-// CHECK-LABEL: sil shared [transparent] @$ss3FooO1AyABs1P_p_SStcABmF
+// CHECK-LABEL: sil shared [transparent] [ossa] @$ss3FooO1AyABs1P_p_SStcABmF
 // CHECK: bb0([[ARG0:%.*]] : $*Foo, [[ARG1:%.*]] : $*P, [[ARG2:%.*]] : @owned $String, [[ARG3:%.*]] : $@thin Foo.Type):
 // CHECK:         [[PAYLOAD:%.*]] = init_enum_data_addr [[ARG0]] : $*Foo, #Foo.A!enumelt.1
 // CHECK-NEXT:    [[LEFT:%.*]] = tuple_element_addr [[PAYLOAD]] : $*(P, String), 0
diff --git a/test/SILGen/enum_curry_thunks.swift b/test/SILGen/enum_curry_thunks.swift
new file mode 100644
index 0000000..dec9e86
--- /dev/null
+++ b/test/SILGen/enum_curry_thunks.swift
@@ -0,0 +1,51 @@
+// RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
+
+enum PartialApplyEnumPayload<T, U> {
+  case Left(T)
+  case Both(T, U)
+
+  case LeftWithLabel(left: T)
+  case BothWithLabel(left: T, right: U)
+
+  case TupleWithLabel(both: (T, U))
+
+  // Note: SILGen can emit these thunks correctly, but we disabled
+  // the feature since calling the constructor directly (without a
+  // thunk) doesn't work yet.
+  /* case Variadic(_: Int...)
+  case VariadicWithLabel(indices: Int...)
+  case VariadicTuple(_: (Int, Int)...)
+  case VariadicWithOther(String, _: Int...) */
+
+  case Autoclosure(@autoclosure () -> ())
+}
+
+struct S {}
+struct C {}
+
+func partialApplyEnumCases(_ x: S, y: C) {
+  _ = PartialApplyEnumPayload<S, C>.Left
+  _ = PartialApplyEnumPayload<S, C>.Both
+  _ = PartialApplyEnumPayload<S, C>.LeftWithLabel
+  _ = PartialApplyEnumPayload<S, C>.TupleWithLabel
+  /* _ = PartialApplyEnumPayload<S, C>.Variadic
+  _ = PartialApplyEnumPayload<S, C>.VariadicWithLabel
+  _ = PartialApplyEnumPayload<S, C>.VariadicTuple
+  _ = PartialApplyEnumPayload<S, C>.VariadicWithOther */
+  _ = PartialApplyEnumPayload<S, C>.Autoclosure
+}
+
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4LeftyACyxq_GxcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4LeftyACyxq_GxcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> {
+
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4BothyACyxq_Gx_q_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO4BothyACyxq_Gx_q_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> {
+
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13LeftWithLabelyACyxq_Gx_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out PartialApplyEnumPayload<T, U> {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO13LeftWithLabelyACyxq_Gx_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> {
+
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14TupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@in_guaranteed T, @in_guaranteed U) -> @out PartialApplyEnumPayload<T, U> {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO14TupleWithLabelyACyxq_Gx_q_t_tcAEmr0_lF : $@convention(method) <T, U> (@in T, @in U, @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> {
+
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11AutoclosureyACyxq_GyyXAcAEmr0_lFTc : $@convention(thin) <T, U> (@thin PartialApplyEnumPayload<T, U>.Type) -> @owned @callee_guaranteed (@guaranteed @callee_guaranteed () -> ()) -> @out PartialApplyEnumPayload<T, U> {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$s17enum_curry_thunks23PartialApplyEnumPayloadO11AutoclosureyACyxq_GyyXAcAEmr0_lF : $@convention(method) <T, U> (@owned @callee_guaranteed () -> (), @thin PartialApplyEnumPayload<T, U>.Type) -> @out PartialApplyEnumPayload<T, U> {
diff --git a/test/SILGen/enum_generic_raw_value.swift b/test/SILGen/enum_generic_raw_value.swift
index aadd337..711baa6 100644
--- a/test/SILGen/enum_generic_raw_value.swift
+++ b/test/SILGen/enum_generic_raw_value.swift
@@ -1,11 +1,11 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s22enum_generic_raw_value1EO
+// CHECK-LABEL: sil hidden [ossa] @$s22enum_generic_raw_value1EO
 enum E<T>: Int {
   case A = 1
 }
 
-// CHECK-LABEL: sil hidden @$s22enum_generic_raw_value1FO
+// CHECK-LABEL: sil hidden [ossa] @$s22enum_generic_raw_value1FO
 enum F<T: ExpressibleByIntegerLiteral>: T where T: Equatable {
   case A = 1
 }
diff --git a/test/SILGen/enum_raw_representable.swift b/test/SILGen/enum_raw_representable.swift
index 2a6a48c..b352c27 100644
--- a/test/SILGen/enum_raw_representable.swift
+++ b/test/SILGen/enum_raw_representable.swift
@@ -5,12 +5,12 @@
   case a, b, c
 }
 
-// CHECK-LABEL: sil [serialized] @$s22enum_raw_representable1EO0B5ValueACSgSi_tcfC
+// CHECK-LABEL: sil [serialized] [ossa] @$s22enum_raw_representable1EO0B5ValueACSgSi_tcfC
 
-// CHECK-LABEL: sil [serialized] @$s22enum_raw_representable1EO0B5ValueSivg
+// CHECK-LABEL: sil [serialized] [ossa] @$s22enum_raw_representable1EO0B5ValueSivg
 // CHECK: switch_enum %0 : $E
 // CHECK: end sil function '$s22enum_raw_representable1EO0B5ValueSivg'
 
 
-// CHECK-RESILIENT-DAG: sil @$s22enum_raw_representable1EO0B5ValueACSgSi_tcfC
-// CHECK-RESILIENT-DAG: sil @$s22enum_raw_representable1EO0B5ValueSivg
+// CHECK-RESILIENT-DAG: sil [ossa] @$s22enum_raw_representable1EO0B5ValueACSgSi_tcfC
+// CHECK-RESILIENT-DAG: sil [ossa] @$s22enum_raw_representable1EO0B5ValueSivg
diff --git a/test/SILGen/enum_raw_representable_objc.swift b/test/SILGen/enum_raw_representable_objc.swift
index 6a3bccd..26921c6 100644
--- a/test/SILGen/enum_raw_representable_objc.swift
+++ b/test/SILGen/enum_raw_representable_objc.swift
@@ -1,21 +1,28 @@
 // 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
 
+#if os(Windows) && arch(x86_64)
+@objc public enum CLike: Int32 {
+  case a, b, c
+}
+#else
 @objc public enum CLike: Int {
   case a, b, c
 }
+#endif
 
-// CHECK-LABEL: sil [serialized] @$s27enum_raw_representable_objc5CLikeO0B5ValueACSgSi_tcfC
+// CHECK-LABEL: sil [serialized] [ossa] @$s27enum_raw_representable_objc5CLikeO0B5ValueACSg{{Si|s5Int32V}}_tcfC
 
-// CHECK-LABEL: sil [serialized] @$s27enum_raw_representable_objc5CLikeO0B5ValueSivg
+// CHECK-LABEL: sil [serialized] [ossa] @$s27enum_raw_representable_objc5CLikeO0B5Value{{Si|s5Int32V}}vg
 // CHECK-DAG: [[RESULT_BOX:%.+]] = alloc_stack $Int
 // CHECK-DAG: [[INPUT_BOX:%.+]] = alloc_stack $CLike
-// CHECK: [[RAW_TYPE:%.+]] = metatype $@thick Int.Type
+// CHECK: [[RAW_TYPE:%.+]] = metatype $@thick Int{{(32)?}}.Type
 // CHECK: [[CAST_FUNC:%.+]] = function_ref @$ss13unsafeBitCast_2toq_x_q_mtr0_lF
-// CHECK: = apply [[CAST_FUNC]]<CLike, Int>([[RESULT_BOX]], [[INPUT_BOX]], [[RAW_TYPE]])
+// CHECK: = apply [[CAST_FUNC]]<CLike, Int{{(32)?}}>([[RESULT_BOX]], [[INPUT_BOX]], [[RAW_TYPE]])
 // CHECK: [[RESULT:%.+]] = load [trivial] [[RESULT_BOX]]
 // CHECK: return [[RESULT]]
-// CHECK: end sil function '$s27enum_raw_representable_objc5CLikeO0B5ValueSivg'
+// CHECK: end sil function '$s27enum_raw_representable_objc5CLikeO0B5Value{{Si|s5Int32V}}vg'
 
-// CHECK-RESILIENT-DAG: sil @$s27enum_raw_representable_objc5CLikeO0B5ValueSivg
-// CHECK-RESILIENT-DAG: sil @$s27enum_raw_representable_objc5CLikeO0B5ValueACSgSi_tcfC
+// CHECK-RESILIENT-DAG: sil [ossa] @$s27enum_raw_representable_objc5CLikeO0B5Value{{Si|s5Int32V}}vg
+// CHECK-RESILIENT-DAG: sil [ossa] @$s27enum_raw_representable_objc5CLikeO0B5ValueACSg{{Si|s5Int32V}}_tcfC
+
diff --git a/test/SILGen/enum_resilience.swift b/test/SILGen/enum_resilience.swift
index 099d0f3..051b8f7 100644
--- a/test/SILGen/enum_resilience.swift
+++ b/test/SILGen/enum_resilience.swift
@@ -9,7 +9,7 @@
 // Resilient enums are always address-only, and switches must include
 // a default case
 
-// CHECK-LABEL: sil hidden @$s15enum_resilience15resilientSwitchyy0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15enum_resilience15resilientSwitchyy0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> ()
 // CHECK:         [[BOX:%.*]] = alloc_stack $Medium
 // CHECK-NEXT:    copy_addr %0 to [initialization] [[BOX]]
 // CHECK-NEXT:    switch_enum_addr [[BOX]] : $*Medium, case #Medium.Paper!enumelt: bb1, case #Medium.Canvas!enumelt: bb2, case #Medium.Pamphlet!enumelt.1: bb3, case #Medium.Postcard!enumelt.1: bb4, default bb5
@@ -51,7 +51,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s15enum_resilience22resilientSwitchDefaultys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
+// CHECK-LABEL: sil hidden [ossa] @$s15enum_resilience22resilientSwitchDefaultys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
 func resilientSwitchDefault(_ m: Medium) -> Int32 {
   // CHECK: switch_enum_addr %2 : $*Medium, case #Medium.Paper!enumelt: [[PAPER:[^ ]+]], case #Medium.Canvas!enumelt: [[CANVAS:[^ ]+]], default [[DEFAULT:[^ ]+]]
   switch m {
@@ -67,7 +67,7 @@
   }
 } // CHECK: end sil function '$s15enum_resilience22resilientSwitchDefaultys5Int32V0c1_A06MediumOF'
 
-// CHECK-LABEL: sil hidden @$s15enum_resilience26resilientSwitchUnknownCaseys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
+// CHECK-LABEL: sil hidden [ossa] @$s15enum_resilience26resilientSwitchUnknownCaseys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
 func resilientSwitchUnknownCase(_ m: Medium) -> Int32 {
   // CHECK: switch_enum_addr %2 : $*Medium, case #Medium.Paper!enumelt: [[PAPER:[^ ]+]], case #Medium.Canvas!enumelt: [[CANVAS:[^ ]+]], default [[DEFAULT:[^ ]+]]
   switch m {
@@ -83,7 +83,7 @@
   }
 } // CHECK: end sil function '$s15enum_resilience26resilientSwitchUnknownCaseys5Int32V0c1_A06MediumOF'
 
-// CHECK-LABEL: sil hidden @$s15enum_resilience36resilientSwitchUnknownCaseExhaustiveys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
+// CHECK-LABEL: sil hidden [ossa] @$s15enum_resilience36resilientSwitchUnknownCaseExhaustiveys5Int32V0c1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> Int32 {
 func resilientSwitchUnknownCaseExhaustive(_ m: Medium) -> Int32 {
   // CHECK: switch_enum_addr %2 : $*Medium, case #Medium.Paper!enumelt: [[PAPER:[^ ]+]], case #Medium.Canvas!enumelt: [[CANVAS:[^ ]+]], case #Medium.Pamphlet!enumelt.1: [[PAMPHLET:[^ ]+]], case #Medium.Postcard!enumelt.1: [[POSTCARD:[^ ]+]], default [[DEFAULT:[^ ]+]]
   switch m {
@@ -109,7 +109,7 @@
 // as part of the value, so we cannot resiliently make assumptions about the
 // enum's size
 
-// CHECK-LABEL: sil hidden @$s15enum_resilience21indirectResilientEnumyy010resilient_A016IndirectApproachOF : $@convention(thin) (@in_guaranteed IndirectApproach) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15enum_resilience21indirectResilientEnumyy010resilient_A016IndirectApproachOF : $@convention(thin) (@in_guaranteed IndirectApproach) -> ()
 func indirectResilientEnum(_ ia: IndirectApproach) {}
 
 public enum MyResilientEnum {
@@ -117,7 +117,7 @@
   case loki
 }
 
-// CHECK-LABEL: sil @$s15enum_resilience15resilientSwitchyyAA15MyResilientEnumOF : $@convention(thin) (@in_guaranteed MyResilientEnum) -> ()
+// CHECK-LABEL: sil [ossa] @$s15enum_resilience15resilientSwitchyyAA15MyResilientEnumOF : $@convention(thin) (@in_guaranteed MyResilientEnum) -> ()
 // CHECK:      switch_enum_addr %2 : $*MyResilientEnum, case #MyResilientEnum.kevin!enumelt: bb1, case #MyResilientEnum.loki!enumelt: bb2 //
 // CHECK:      return
 public func resilientSwitch(_ e: MyResilientEnum) {
@@ -129,7 +129,7 @@
 
 // Inlinable functions must lower the switch as if it came from outside the module
 
-// CHECK-LABEL: sil [serialized] @$s15enum_resilience15inlinableSwitchyyAA15MyResilientEnumOF : $@convention(thin) (@in_guaranteed MyResilientEnum) -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s15enum_resilience15inlinableSwitchyyAA15MyResilientEnumOF : $@convention(thin) (@in_guaranteed MyResilientEnum) -> ()
 // CHECK:      switch_enum_addr %2 : $*MyResilientEnum, case #MyResilientEnum.kevin!enumelt: bb1, case #MyResilientEnum.loki!enumelt: bb2, default bb3
 // CHECK:      return
 @inlinable public func inlinableSwitch(_ e: MyResilientEnum) {
diff --git a/test/SILGen/enum_resilience_testable.swift b/test/SILGen/enum_resilience_testable.swift
index a82d41d..de56ff3 100644
--- a/test/SILGen/enum_resilience_testable.swift
+++ b/test/SILGen/enum_resilience_testable.swift
@@ -14,7 +14,7 @@
 // Resilient enums are always address-only, and switches must include
 // a default case
 
-// CHECK-LABEL: sil hidden @$s24enum_resilience_testable15resilientSwitchyy0d1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24enum_resilience_testable15resilientSwitchyy0d1_A06MediumOF : $@convention(thin) (@in_guaranteed Medium) -> ()
 // CHECK:         [[BOX:%.*]] = alloc_stack $Medium
 // CHECK-NEXT:    copy_addr %0 to [initialization] [[BOX]]
 // CHECK-NEXT:    switch_enum_addr [[BOX]] : $*Medium, case #Medium.Paper!enumelt: bb1, case #Medium.Canvas!enumelt: bb2, case #Medium.Pamphlet!enumelt.1: bb3, case #Medium.Postcard!enumelt.1: bb4, default bb5
diff --git a/test/SILGen/errors.swift b/test/SILGen/errors.swift
index b0ed1ad..ab4016b 100644
--- a/test/SILGen/errors.swift
+++ b/test/SILGen/errors.swift
@@ -13,7 +13,7 @@
 func someValidPointer<T>() -> UnsafePointer<T> { fatalError() }
 func someValidPointer<T>() -> UnsafeMutablePointer<T> { fatalError() }
 
-// CHECK: sil hidden @$s6errors10make_a_cat{{.*}}F : $@convention(thin) () -> (@owned Cat, @error Error) {
+// CHECK: sil hidden [ossa] @$s6errors10make_a_cat{{.*}}F : $@convention(thin) () -> (@owned Cat, @error Error) {
 // CHECK:      [[T1:%.*]] = metatype $@thick Cat.Type 
 // CHECK:      [[T0:%.*]] = function_ref @$s6errors3Cat{{.*}} : $@convention(method) (@thick Cat.Type) -> @owned Cat
 // CHECK-NEXT: [[T2:%.*]] = apply [[T0]]([[T1]])
@@ -22,7 +22,7 @@
   return Cat()
 }
 
-// CHECK: sil hidden @$s6errors15dont_make_a_cat{{.*}}F : $@convention(thin) () -> (@owned Cat, @error Error) {
+// CHECK: sil hidden [ossa] @$s6errors15dont_make_a_cat{{.*}}F : $@convention(thin) () -> (@owned Cat, @error Error) {
 // CHECK:      [[T0:%.*]] = metatype $@thin HomeworkError.Type
 // CHECK-NEXT: [[T1:%.*]] = enum $HomeworkError, #HomeworkError.TooHard!enumelt
 // CHECK-NEXT: [[BOX:%.*]] = alloc_existential_box $Error, $HomeworkError
@@ -37,7 +37,7 @@
   throw HomeworkError.TooHard
 }
 
-// CHECK: sil hidden @$s6errors11dont_return{{.*}}F : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @error Error) {
+// CHECK: sil hidden [ossa] @$s6errors11dont_return{{.*}}F : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @error Error) {
 // CHECK:      [[T0:%.*]] = metatype $@thin HomeworkError.Type
 // CHECK-NEXT: [[T1:%.*]] = enum $HomeworkError, #HomeworkError.TooMuch!enumelt
 // CHECK-NEXT: [[BOX:%.*]] = alloc_existential_box $Error, $HomeworkError
@@ -52,7 +52,7 @@
   throw HomeworkError.TooMuch
 }
 
-// CHECK:    sil hidden @$s6errors16all_together_nowyAA3CatCSbF : $@convention(thin) (Bool) -> @owned Cat {
+// CHECK:    sil hidden [ossa] @$s6errors16all_together_nowyAA3CatCSbF : $@convention(thin) (Bool) -> @owned Cat {
 // CHECK:    bb0(%0 : $Bool):
 // CHECK:      [[RET_TEMP:%.*]] = alloc_stack $Cat
 
@@ -167,7 +167,7 @@
 // Make sure that if we catch an error in a throwing function we borrow the
 // error and only consume the error in the rethrow block.
 //
-// CHECK-LABEL: sil hidden @$s6errors20all_together_now_twoyAA3CatCSgSbKF : $@convention(thin) (Bool) -> (@owned Optional<Cat>, @error Error) {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors20all_together_now_twoyAA3CatCSgSbKF : $@convention(thin) (Bool) -> (@owned Optional<Cat>, @error Error) {
 // CHECK: bb0(
 // CHECK-NOT: bb1
 // CHECK:   try_apply {{.*}}, normal [[NORMAL_BB:bb[0-9]+]], error [[ERROR_BB:bb[0-9]+]]
@@ -204,7 +204,7 @@
 
 // Same as the previous test, but with multiple cases instead of just one.
 //
-// CHECK-LABEL: sil hidden @$s6errors22all_together_now_threeyAA3CatCSgSbKF : $@convention(thin) (Bool) -> (@owned Optional<Cat>, @error Error) {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors22all_together_now_threeyAA3CatCSgSbKF : $@convention(thin) (Bool) -> (@owned Optional<Cat>, @error Error) {
 // CHECK: bb0(
 // CHECK-NOT: bb1
 // CHECK:   try_apply {{.*}}, normal [[NORMAL_BB:bb[0-9]+]], error [[ERROR_BB:bb[0-9]+]]
@@ -242,7 +242,7 @@
 }
 
 //   Catch in non-throwing context.
-// CHECK-LABEL: sil hidden @$s6errors11catch_a_catAA3CatCyF : $@convention(thin) () -> @owned Cat
+// CHECK-LABEL: sil hidden [ossa] @$s6errors11catch_a_catAA3CatCyF : $@convention(thin) () -> @owned Cat
 // CHECK-NEXT: bb0:
 // CHECK-NEXT: [[M:%.*]] = metatype $@thick Cat.Type
 // CHECK:      [[F:%.*]] = function_ref @$s6errors3Cat{{.*}} : $@convention(method) (@thick Cat.Type) -> @owned Cat
@@ -262,7 +262,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s6errors15HasThrowingInit{{.*}} : $@convention(method) (Int, @thick HasThrowingInit.Type) -> (@owned HasThrowingInit, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s6errors15HasThrowingInit{{.*}} : $@convention(method) (Int, @thick HasThrowingInit.Type) -> (@owned HasThrowingInit, @error Error)
 // CHECK:      [[SELF:%.*]] = alloc_ref $HasThrowingInit
 // CHECK:      [[T0:%.*]] = function_ref @$s6errors15HasThrowingInit{{.*}}c : $@convention(method) (Int, @owned HasThrowingInit) -> (@owned HasThrowingInit, @error Error)
 // CHECK-NEXT: try_apply [[T0]](%0, [[SELF]]) : $@convention(method) (Int, @owned HasThrowingInit) -> (@owned HasThrowingInit, @error Error), normal bb1, error bb2
@@ -272,7 +272,7 @@
 // CHECK-NEXT: builtin "willThrow"
 // CHECK-NEXT: throw [[ERROR]]
 
-// CHECK-LABEL: sil hidden @$s6errors15HasThrowingInit{{.*}} : $@convention(method) (Int, @owned HasThrowingInit) -> (@owned HasThrowingInit, @error Error) {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors15HasThrowingInit{{.*}} : $@convention(method) (Int, @owned HasThrowingInit) -> (@owned HasThrowingInit, @error Error) {
 // CHECK:      [[T0:%.*]] = mark_uninitialized [rootself] %1 : $HasThrowingInit
 // CHECK-NEXT: [[BORROWED_T0:%.*]] = begin_borrow [[T0]]
 // CHECK-NEXT: [[T1:%.*]] = ref_element_addr [[BORROWED_T0]] : $HasThrowingInit
@@ -289,7 +289,7 @@
   case Red, Green, Blue
 }
 
-//CHECK-LABEL: sil hidden @$s6errors6IThrows5Int32VyKF
+//CHECK-LABEL: sil hidden [ossa] @$s6errors6IThrows5Int32VyKF
 //CHECK: builtin "willThrow"
 //CHECK-NEXT: dealloc_stack
 //CHECK-NEXT: throw
@@ -299,7 +299,7 @@
 }
 
 // Make sure that we are not emitting calls to 'willThrow' on rethrow sites.
-//CHECK-LABEL: sil hidden @$s6errors12DoesNotThrows5Int32VyKF
+//CHECK-LABEL: sil hidden [ossa] @$s6errors12DoesNotThrows5Int32VyKF
 //CHECK-NOT: builtin "willThrow"
 //CHECK: return
 func DoesNotThrow() throws -> Int32 {
@@ -312,7 +312,7 @@
   func check() throws
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6errors12DoomedStructVAA0B0A2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed DoomedStruct) -> @error Error
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6errors12DoomedStructVAA0B0A2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed DoomedStruct) -> @error Error
 // CHECK:      [[SELF:%.*]] = load [trivial] %0 : $*DoomedStruct
 // CHECK:      [[T0:%.*]] = function_ref @$s6errors12DoomedStructV5checkyyKF : $@convention(method) (DoomedStruct) -> @error Error
 // CHECK-NEXT: try_apply [[T0]]([[SELF]])
@@ -326,7 +326,7 @@
   func check() throws {}
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6errors11DoomedClassCAA0B0A2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed DoomedClass) -> @error Error {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6errors11DoomedClassCAA0B0A2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed DoomedClass) -> @error Error {
 // CHECK:      [[BORROWED_SELF:%.*]] = load_borrow %0
 // CHECK:      [[T0:%.*]] = class_method [[BORROWED_SELF]] : $DoomedClass, #DoomedClass.check!1 : (DoomedClass) -> () throws -> (), $@convention(method) (@guaranteed DoomedClass) -> @error Error
 // CHECK-NEXT: try_apply [[T0]]([[BORROWED_SELF]])
@@ -342,7 +342,7 @@
   func check() throws {}
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6errors11HappyStructVAA6DoomedA2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed HappyStruct) -> @error Error
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6errors11HappyStructVAA6DoomedA2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed HappyStruct) -> @error Error
 // CHECK:      [[T0:%.*]] = function_ref @$s6errors11HappyStructV5checkyyF : $@convention(method) (HappyStruct) -> ()
 // CHECK:      [[T1:%.*]] = apply [[T0]](%1)
 // CHECK:      [[T1:%.*]] = tuple ()
@@ -351,7 +351,7 @@
   func check() {}
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6errors10HappyClassCAA6DoomedA2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed HappyClass) -> @error Error
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6errors10HappyClassCAA6DoomedA2aDP5checkyyKFTW : $@convention(witness_method: Doomed) (@in_guaranteed HappyClass) -> @error Error
 // CHECK:      [[SELF:%.*]] = load_borrow %0 : $*HappyClass
 // CHECK:      [[T0:%.*]] = class_method [[SELF]] : $HappyClass, #HappyClass.check!1 : (HappyClass) -> () -> (), $@convention(method) (@guaranteed HappyClass) -> ()
 // CHECK:      [[T1:%.*]] = apply [[T0]]([[SELF]])
@@ -368,7 +368,7 @@
 func testThunk(_ fn: () throws -> Int) throws -> Int {
   return try create(fn)
 }
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSis5Error_pIgdzo_SisAA_pIegrzo_TR : $@convention(thin) (@noescape @callee_guaranteed () -> (Int, @error Error)) -> (@out Int, @error Error)
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSis5Error_pIgdzo_SisAA_pIegrzo_TR : $@convention(thin) (@noescape @callee_guaranteed () -> (Int, @error Error)) -> (@out Int, @error Error)
 // CHECK: bb0(%0 : $*Int, %1 : $@noescape @callee_guaranteed () -> (Int, @error Error)):
 // CHECK:   try_apply %1()
 // CHECK: bb1([[T0:%.*]] : $Int):
@@ -383,7 +383,7 @@
 func testForceTry(_ fn: () -> Int) {
   try! createInt(fn)
 }
-// CHECK-LABEL: sil hidden @$s6errors12testForceTryyySiyXEF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s6errors12testForceTryyySiyXEF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> ()
 // CHECK: bb0([[ARG:%.*]] : $@noescape @callee_guaranteed () -> Int):
 // CHECK: [[FUNC:%.*]] = function_ref @$s6errors9createIntyySiyXEKF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> @error Error
 // CHECK: try_apply [[FUNC]]([[ARG]])
@@ -395,7 +395,7 @@
   _ = try! (make_a_cat(), make_a_cat())
 }
 
-// CHECK-LABEL: sil hidden @$s6errors20testForceTryMultipleyyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors20testForceTryMultipleyyF
 // CHECK-NEXT: bb0:
 // CHECK: [[FN_1:%.+]] = function_ref @$s6errors10make_a_catAA3CatCyKF
 // CHECK-NEXT: try_apply [[FN_1]]() : $@convention(thin) () -> (@owned Cat, @error Error), normal [[SUCCESS_1:[^ ]+]], error [[CLEANUPS_1:[^ ]+]],
@@ -438,7 +438,7 @@
     return 1
   }
 }
-// CHECK-LABEL: sil hidden @$s6errors7feedCatSiyKF : $@convention(thin) () -> (Int, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s6errors7feedCatSiyKF : $@convention(thin) () -> (Int, @error Error)
 // CHECK: debug_value undef : $Error, var, name "$error", argno 1
 // CHECK:   %1 = function_ref @$s6errors13preferredFoodAA03CatC0OyKF : $@convention(thin) () -> (CatFood, @error Error)
 // CHECK:   try_apply %1() : $@convention(thin) () -> (CatFood, @error Error), normal bb1, error bb5
@@ -457,7 +457,7 @@
   }
 }
 // errors.getHungryCat throws (errors.CatFood) -> errors.Cat
-// CHECK-LABEL: sil hidden @$s6errors12getHungryCatyAA0D0CAA0D4FoodOKF : $@convention(thin) (CatFood) -> (@owned Cat, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s6errors12getHungryCatyAA0D0CAA0D4FoodOKF : $@convention(thin) (CatFood) -> (@owned Cat, @error Error)
 // CHECK: bb0(%0 : $CatFood):
 // CHECK:   debug_value undef : $Error, var, name "$error", argno 2
 // CHECK:   switch_enum %0 : $CatFood, case #CatFood.Canned!enumelt: bb1, case #CatFood.Dry!enumelt: bb3
@@ -479,7 +479,7 @@
   try take_many_cats(make_a_cat(), cat, make_a_cat(), make_a_cat())
 }
 
-// CHECK-LABEL: sil hidden @$s6errors13test_variadicyyAA3CatCKF : $@convention(thin) (@guaranteed Cat) -> @error Error {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors13test_variadicyyAA3CatCKF : $@convention(thin) (@guaranteed Cat) -> @error Error {
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $Cat):
 // CHECK:         debug_value undef : $Error, var, name "$error", argno 2
 // CHECK:         [[N:%.*]] = integer_literal $Builtin.Word, 4
@@ -562,7 +562,7 @@
     try super.init(value: value)
   }
 }
-// CHECK: sil hidden @$s6errors16BaseThrowingInit{{.*}}c : $@convention(method) (Int, Int, @owned BaseThrowingInit) -> (@owned BaseThrowingInit, @error Error)
+// CHECK: sil hidden [ossa] @$s6errors16BaseThrowingInit{{.*}}c : $@convention(method) (Int, Int, @owned BaseThrowingInit) -> (@owned BaseThrowingInit, @error Error)
 // CHECK:      [[BOX:%.*]] = alloc_box ${ var BaseThrowingInit }
 // CHECK:      [[MARKED_BOX:%.*]] = mark_uninitialized [derivedself] [[BOX]]
 // CHECK:      [[PB:%.*]] = project_box [[MARKED_BOX]]
@@ -592,7 +592,7 @@
 func supportFirstStructure<B: Buildable>(_ b: inout B) throws {
   try b.firstStructure.support()
 }
-// CHECK-LABEL: sil hidden @$s6errors21supportFirstStructure{{.*}}F : $@convention(thin) <B where B : Buildable> (@inout B) -> @error Error {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors21supportFirstStructure{{.*}}F : $@convention(thin) <B where B : Buildable> (@inout B) -> @error Error {
 // CHECK: [[MODIFY:%.*]] = witness_method $B, #Buildable.firstStructure!modify.1 :
 // CHECK: ([[T1:%.*]], [[TOKEN:%.*]]) = begin_apply [[MODIFY]]<B>([[BASE:%[0-9]*]])
 // CHECK: [[SUPPORT:%.*]] = witness_method $B.Structure, #Supportable.support!1 :
@@ -612,7 +612,7 @@
   try b[name].support()
 }
 
-// CHECK-LABEL: sil hidden @$s6errors16supportStructure_4nameyxz_SStKAA9BuildableRzlF : $@convention(thin) <B where B : Buildable> (@inout B, @guaranteed String) -> @error Error {
+// CHECK-LABEL: sil hidden [ossa] @$s6errors16supportStructure_4nameyxz_SStKAA9BuildableRzlF : $@convention(thin) <B where B : Buildable> (@inout B, @guaranteed String) -> @error Error {
 // CHECK: bb0({{.*}}, [[INDEX:%.*]] : @guaranteed $String):
 // CHECK:   [[INDEX_COPY:%.*]] = copy_value [[INDEX]] : $String
 // CHECK:   [[BORROWED_INDEX_COPY:%.*]] = begin_borrow [[INDEX_COPY]]
@@ -651,7 +651,7 @@
 func supportStructure(_ b: inout Bridge, name: String) throws {
   try b[name].support()
 }
-// CHECK:    sil hidden @$s6errors16supportStructure_4nameyAA6BridgeVz_SStKF : $@convention(thin) (@inout Bridge, @guaranteed String) -> @error Error {
+// CHECK:    sil hidden [ossa] @$s6errors16supportStructure_4nameyAA6BridgeVz_SStKF : $@convention(thin) (@inout Bridge, @guaranteed String) -> @error Error {
 // CHECK:    bb0([[ARG1:%.*]] : $*Bridge, [[ARG2:%.*]] : @guaranteed $String):
 // CHECK:      [[INDEX_COPY_1:%.*]] = copy_value [[ARG2]] : $String
 // CHECK-NEXT: [[WRITE:%.*]] = begin_access [modify] [unknown] [[ARG1]] : $*Bridge
@@ -702,7 +702,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s6errors15testOptionalTryyyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors15testOptionalTryyyF
 // CHECK-NEXT: bb0:
 // CHECK: [[FN:%.+]] = function_ref @$s6errors10make_a_catAA3CatCyKF
 // CHECK-NEXT: try_apply [[FN]]() : $@convention(thin) () -> (@owned Cat, @error Error), normal [[SUCCESS:[^ ]+]], error [[CLEANUPS:[^ ]+]],
@@ -724,14 +724,14 @@
 
 func sudo_make_a_cat() {}
 
-// CHECK-LABEL: sil hidden @{{.*}}testOptionalTryThatNeverThrows
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testOptionalTryThatNeverThrows
 func testOptionalTryThatNeverThrows() {
   guard let _ = try? sudo_make_a_cat() else { // expected-warning{{no calls to throwing}}
     return
   }
 }
 
-// CHECK-LABEL: sil hidden @$s6errors18testOptionalTryVaryyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors18testOptionalTryVaryyF
 // CHECK-NEXT: bb0:
 // CHECK-NEXT: [[BOX:%.+]] = alloc_box ${ var Optional<Cat> }
 // CHECK-NEXT: [[PB:%.*]] = project_box [[BOX]]
@@ -754,7 +754,7 @@
   var cat = try? make_a_cat() // expected-warning {{initialization of variable 'cat' was never used; consider replacing with assignment to '_' or removing it}}
 }
 
-// CHECK-LABEL: sil hidden @$s6errors26testOptionalTryAddressOnly{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6errors26testOptionalTryAddressOnly{{.*}}F
 // CHECK: bb0(%0 : $*T):
 // CHECK: [[BOX:%.+]] = alloc_stack $Optional<T>
 // CHECK-NEXT: [[BOX_DATA:%.+]] = init_enum_data_addr [[BOX]] : $*Optional<T>, #Optional.some!enumelt.1
@@ -778,7 +778,7 @@
   _ = try? dont_return(obj)
 }
 
-// CHECK-LABEL: sil hidden @$s6errors29testOptionalTryAddressOnlyVar{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6errors29testOptionalTryAddressOnlyVar{{.*}}F
 // CHECK: bb0(%0 : $*T):
 // CHECK: [[BOX:%.+]] = alloc_box $<τ_0_0> { var Optional<τ_0_0> } <T>
 // CHECK-NEXT: [[PB:%.*]] = project_box [[BOX]]
@@ -802,7 +802,7 @@
   var copy = try? dont_return(obj) // expected-warning {{initialization of variable 'copy' was never used; consider replacing with assignment to '_' or removing it}}
 }
 
-// CHECK-LABEL: sil hidden @$s6errors23testOptionalTryMultipleyyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors23testOptionalTryMultipleyyF
 // CHECK: bb0:
 // CHECK: [[FN_1:%.+]] = function_ref @$s6errors10make_a_catAA3CatCyKF
 // CHECK-NEXT: try_apply [[FN_1]]() : $@convention(thin) () -> (@owned Cat, @error Error), normal [[SUCCESS_1:[^ ]+]], error [[CLEANUPS_1:[^ ]+]],
@@ -831,7 +831,7 @@
   _ = try? (make_a_cat(), make_a_cat())
 }
 
-// CHECK-LABEL: sil hidden @$s6errors25testOptionalTryNeverFailsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors25testOptionalTryNeverFailsyyF
 // CHECK: bb0:
 // CHECK-NEXT:   [[VALUE:%.+]] = tuple ()
 // CHECK-NEXT:   = enum $Optional<()>, #Optional.some!enumelt.1, [[VALUE]]
@@ -842,7 +842,7 @@
   _ = try? () // expected-warning {{no calls to throwing functions occur within 'try' expression}}
 }
 
-// CHECK-LABEL: sil hidden @$s6errors28testOptionalTryNeverFailsVaryyF
+// CHECK-LABEL: sil hidden [ossa] @$s6errors28testOptionalTryNeverFailsVaryyF
 // CHECK: bb0:
 // CHECK-NEXT:   [[BOX:%.+]] = alloc_box ${ var Optional<()> }
 // CHECK-NEXT:   [[PB:%.*]] = project_box [[BOX]]
@@ -857,7 +857,7 @@
   var unit: ()? = try? () // expected-warning {{no calls to throwing functions occur within 'try' expression}} expected-warning {{variable 'unit' was never used; consider replacing with '_' or removing it}}
 }
 
-// CHECK-LABEL: sil hidden @$s6errors36testOptionalTryNeverFailsAddressOnly{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6errors36testOptionalTryNeverFailsAddressOnly{{.*}}F
 // CHECK: bb0(%0 : $*T):
 // CHECK:   [[BOX:%.+]] = alloc_stack $Optional<T>
 // CHECK-NEXT:   [[BOX_DATA:%.+]] = init_enum_data_addr [[BOX]] : $*Optional<T>, #Optional.some!enumelt.1
@@ -873,7 +873,7 @@
   _ = try? obj // expected-warning {{no calls to throwing functions occur within 'try' expression}}
 }
 
-// CHECK-LABEL: sil hidden @$s6errors39testOptionalTryNeverFailsAddressOnlyVar{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6errors39testOptionalTryNeverFailsAddressOnlyVar{{.*}}F
 // CHECK: bb0(%0 : $*T):
 // CHECK:   [[BOX:%.+]] = alloc_box $<τ_0_0> { var Optional<τ_0_0> } <T>
 // CHECK-NEXT:   [[PB:%.*]] = project_box [[BOX]]
diff --git a/test/SILGen/existential_erasure.swift b/test/SILGen/existential_erasure.swift
index b0a18ba..e520c1d 100644
--- a/test/SILGen/existential_erasure.swift
+++ b/test/SILGen/existential_erasure.swift
@@ -23,7 +23,7 @@
 
 func throwingFunc() throws -> Bool { return true }
 
-// CHECK-LABEL: sil hidden @$s19existential_erasure5PQtoPyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s19existential_erasure5PQtoPyyF : $@convention(thin) () -> () {
 func PQtoP() {
   // CHECK: [[PQ_PAYLOAD:%.*]] = open_existential_addr immutable_access [[PQ:%.*]] : $*P & Q to $*[[OPENED_TYPE:@opened(.*) P & Q]]
   // CHECK: [[P_PAYLOAD:%.*]] = init_existential_addr [[P:%.*]] : $*P, $[[OPENED_TYPE]]
@@ -39,7 +39,7 @@
 // Make sure uninitialized existentials are properly deallocated when we
 // have an early return.
 
-// CHECK-LABEL: sil hidden @$s19existential_erasure19openExistentialToP1yyAA1P_pKF
+// CHECK-LABEL: sil hidden [ossa] @$s19existential_erasure19openExistentialToP1yyAA1P_pKF
 func openExistentialToP1(_ p: P) throws {
 // CHECK: bb0(%0 : $*P):
 // CHECK:   [[OPEN:%.*]] = open_existential_addr immutable_access %0 : $*P to $*[[OPEN_TYPE:@opened\(.*\) P]]
@@ -61,7 +61,7 @@
   try useP(p.downgrade(throwingFunc()))
 }
 
-// CHECK-LABEL: sil hidden @$s19existential_erasure19openExistentialToP2yyAA1P_pKF
+// CHECK-LABEL: sil hidden [ossa] @$s19existential_erasure19openExistentialToP2yyAA1P_pKF
 func openExistentialToP2(_ p: P) throws {
 // CHECK: bb0(%0 : $*P):
 // CHECK:   [[OPEN:%.*]] = open_existential_addr immutable_access %0 : $*P to $*[[OPEN_TYPE:@opened\(.*\) P]]
@@ -90,7 +90,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s19existential_erasure12errorHandlerys5Error_psAC_pKF
+// CHECK-LABEL: sil hidden [ossa] @$s19existential_erasure12errorHandlerys5Error_psAC_pKF
 func errorHandler(_ e: Error) throws -> Error {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Error):
 // CHECK:  debug_value [[ARG]] : $Error
@@ -119,7 +119,7 @@
 class EraseDynamicSelf {
   required init() {}
 
-// CHECK-LABEL: sil hidden @$s19existential_erasure16EraseDynamicSelfC7factoryACXDyFZ : $@convention(method) (@thick EraseDynamicSelf.Type) -> @owned EraseDynamicSelf
+// CHECK-LABEL: sil hidden [ossa] @$s19existential_erasure16EraseDynamicSelfC7factoryACXDyFZ : $@convention(method) (@thick EraseDynamicSelf.Type) -> @owned EraseDynamicSelf
 // CHECK:  [[ANY:%.*]] = alloc_stack $Any
 // CHECK:  init_existential_addr [[ANY]] : $*Any, $@dynamic_self EraseDynamicSelf
 //
diff --git a/test/SILGen/existential_metatypes.swift b/test/SILGen/existential_metatypes.swift
index bcfd60b..4000253 100644
--- a/test/SILGen/existential_metatypes.swift
+++ b/test/SILGen/existential_metatypes.swift
@@ -19,7 +19,7 @@
   static var value: Value { return Value() }
 }
 
-// CHECK-LABEL: sil hidden @$s21existential_metatypes0A8MetatypeyyAA1P_pF
+// CHECK-LABEL: sil hidden [ossa] @$s21existential_metatypes0A8MetatypeyyAA1P_pF
 // CHECK: bb0([[X:%.*]] : $*P):
 func existentialMetatype(_ x: P) {
   // CHECK: [[TYPE1:%.*]] = existential_metatype $@thick P.Type, [[X]]
@@ -45,7 +45,7 @@
 protocol PP: P {}
 protocol Q {}
 
-// CHECK-LABEL: sil hidden @$s21existential_metatypes0A15MetatypeUpcast1yAA1P_pXpAA2PP_pXpF
+// CHECK-LABEL: sil hidden [ossa] @$s21existential_metatypes0A15MetatypeUpcast1yAA1P_pXpAA2PP_pXpF
 // CHECK:         [[OPENED:%.*]] = open_existential_metatype %0
 // CHECK:         [[NEW:%.*]] = init_existential_metatype [[OPENED]]
 // CHECK:         return [[NEW]]
@@ -53,7 +53,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s21existential_metatypes0A15MetatypeUpcast2yAA1P_pXpAaC_AA1QpXpF
+// CHECK-LABEL: sil hidden [ossa] @$s21existential_metatypes0A15MetatypeUpcast2yAA1P_pXpAaC_AA1QpXpF
 // CHECK:         [[OPENED:%.*]] = open_existential_metatype %0
 // CHECK:         [[NEW:%.*]] = init_existential_metatype [[OPENED]]
 // CHECK:         return [[NEW]]
@@ -62,7 +62,7 @@
 }
 
 // rdar://32288618
-// CHECK-LABEL: sil hidden @$s21existential_metatypes0A19MetatypeVarPropertyAA5ValueVyF : $@convention(thin) () -> Value
+// CHECK-LABEL: sil hidden [ossa] @$s21existential_metatypes0A19MetatypeVarPropertyAA5ValueVyF : $@convention(thin) () -> Value
 func existentialMetatypeVarProperty() -> Value {
   // CHECK:      [[BOX:%.*]] = alloc_box ${ var @thick P.Type }
   // CHECK:      [[ADDR:%.*]] = project_box [[BOX]] : ${ var @thick P.Type }, 0
@@ -77,7 +77,7 @@
 }
 
 // rdar://45956703
-// CHECK-LABEL: sil hidden @$s21existential_metatypes31getterResultStaticStorageAccessyyF
+// CHECK-LABEL: sil hidden [ossa] @$s21existential_metatypes31getterResultStaticStorageAccessyyF
 var _type: P.Type { get {return S.self } set {} }
 func getterResultStaticStorageAccess() {
   // CHECK:      [[GET_TYPE:%.*]] = function_ref @$s21existential_metatypes5_typeAA1P_pXpvg
diff --git a/test/SILGen/expressions.swift b/test/SILGen/expressions.swift
index ddc90cc..7e9cb28 100644
--- a/test/SILGen/expressions.swift
+++ b/test/SILGen/expressions.swift
@@ -52,7 +52,7 @@
   var d = "foö"
   var e:SillyString = "foo"
 }
-// CHECK-LABEL: sil hidden @$s11expressions8literalsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions8literalsyyF
 // CHECK: integer_literal $Builtin.IntLiteral, 1
 // CHECK: float_literal $Builtin.FPIEEE{{64|80}}, {{0x3FF4000000000000|0x3FFFA000000000000000}}
 // CHECK: string_literal utf8 "foö"
@@ -65,7 +65,7 @@
   bar(42);
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions8call_oneyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions8call_oneyyF
 // CHECK: [[FORTYTWO:%[0-9]+]] = integer_literal {{.*}} 42
 // CHECK: [[FORTYTWO_CONVERTED:%[0-9]+]] = apply {{.*}}([[FORTYTWO]], {{.*}})
 // CHECK: [[BAR:%[0-9]+]] = function_ref @$s11expressions3bar{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Int) -> ()
@@ -75,7 +75,7 @@
   bar(42, 219)
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions8call_twoyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions8call_twoyyF
 // CHECK: [[FORTYTWO:%[0-9]+]] = integer_literal {{.*}} 42
 // CHECK: [[FORTYTWO_CONVERTED:%[0-9]+]] = apply {{.*}}([[FORTYTWO]], {{.*}})
 // CHECK: [[TWONINETEEN:%[0-9]+]] = integer_literal {{.*}} 219
@@ -89,7 +89,7 @@
   var T1 : (a: Int16, b: Int) = (b : 42, a : 777)
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions6tuplesyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions6tuplesyyF
 
 
 class C {
@@ -102,7 +102,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions7classesyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions7classesyyF
 func classes() {
   // CHECK: function_ref @$s11expressions1CC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick C.Type) -> @owned C
   var a = C()
@@ -120,7 +120,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions7structsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions7structsyyF
 func structs() {
   // CHECK: function_ref @$s11expressions1SV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S.Type) -> S
   var a = S()
@@ -144,7 +144,7 @@
   func a() {}
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions5callsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions5callsyyF
 // CHECK: [[METHOD:%[0-9]+]] = function_ref @$s11expressions10SomeStructV1a{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout SomeStruct) -> ()
 // CHECK: apply [[METHOD]]({{.*}})
 func calls() {
@@ -152,7 +152,7 @@
   a.a()
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions11module_path{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions11module_path{{[_0-9a-zA-Z]*}}F
 func module_path() -> Int {
   return FooBar.x
   // CHECK: [[x_GET:%[0-9]+]] = function_ref @$s6FooBar1xSivau
@@ -161,7 +161,7 @@
 
 func default_args(_ x: Int, y: Int = 219, z: Int = 20721) {}
 
-// CHECK-LABEL: sil hidden @$s11expressions19call_default_args_1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions19call_default_args_1{{[_0-9a-zA-Z]*}}F
 func call_default_args_1(_ x: Int) {
   default_args(x)
   // CHECK: [[YFUNC:%[0-9]+]] = function_ref @$s11expressions12default_args{{[_0-9a-zA-Z]*}}A0_
@@ -172,7 +172,7 @@
   // CHECK: apply [[FUNC]]({{.*}}, [[Y]], [[Z]])
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions19call_default_args_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions19call_default_args_2{{[_0-9a-zA-Z]*}}F
 func call_default_args_2(_ x: Int, z: Int) {
   default_args(x, z:z)
   // CHECK: [[DEFFN:%[0-9]+]] = function_ref @$s11expressions12default_args{{[_0-9a-zA-Z]*}}A0_
@@ -185,7 +185,7 @@
   var mono_member:Int
   var typevar_member:T
 
-  // CHECK-LABEL: sil hidden @$s11expressions7GenericV13type_variable{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s11expressions7GenericV13type_variable{{[_0-9a-zA-Z]*}}F
   mutating
   func type_variable() -> T.Type {
     return T.self
@@ -193,17 +193,17 @@
     // CHECK: return [[METATYPE]]
   }
 
-  // CHECK-LABEL: sil hidden @$s11expressions7GenericV19copy_typevar_member{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s11expressions7GenericV19copy_typevar_member{{[_0-9a-zA-Z]*}}F
   mutating
   func copy_typevar_member(_ x: Generic<T>) {
     typevar_member = x.typevar_member
   }
 
-  // CHECK-LABEL: sil hidden @$s11expressions7GenericV12class_method{{[_0-9a-zA-Z]*}}FZ
+  // CHECK-LABEL: sil hidden [ossa] @$s11expressions7GenericV12class_method{{[_0-9a-zA-Z]*}}FZ
   static func class_method() {}
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions18generic_member_ref{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions18generic_member_ref{{[_0-9a-zA-Z]*}}F
 func generic_member_ref<T>(_ x: Generic<T>) -> Int {
   // CHECK: bb0([[XADDR:%[0-9]+]] : $*Generic<T>):
   return x.mono_member
@@ -211,7 +211,7 @@
   // CHECK: load [trivial] [[MEMBER_ADDR]]
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions24bound_generic_member_ref{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions24bound_generic_member_ref{{[_0-9a-zA-Z]*}}F
 func bound_generic_member_ref(_ x: Generic<UnicodeScalar>) -> Int {
   var x = x
   // CHECK: bb0([[XADDR:%[0-9]+]] : $Generic<Unicode.Scalar>):
@@ -220,7 +220,7 @@
   // CHECK: load [trivial] [[MEMBER_ADDR]]
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions6coerce{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions6coerce{{[_0-9a-zA-Z]*}}F
 func coerce(_ x: Int32) -> Int64 {
   return 0
 }
@@ -231,26 +231,26 @@
 class D : B {
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions8downcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions8downcast{{[_0-9a-zA-Z]*}}F
 func downcast(_ x: B) -> D {
   return x as! D
   // CHECK: unconditional_checked_cast %{{[0-9]+}} : {{.*}} to $D
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions6upcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions6upcast{{[_0-9a-zA-Z]*}}F
 func upcast(_ x: D) -> B {
   return x
   // CHECK: upcast %{{[0-9]+}} : ${{.*}} to $B
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions14generic_upcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions14generic_upcast{{[_0-9a-zA-Z]*}}F
 func generic_upcast<T : B>(_ x: T) -> B {
   return x
   // CHECK: upcast %{{.*}} to $B
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions16generic_downcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions16generic_downcast{{[_0-9a-zA-Z]*}}F
 func generic_downcast<T : B>(_ x: T, y: B) -> T {
   return y as! T
   // CHECK: unconditional_checked_cast %{{[0-9]+}} : {{.*}} to $T
@@ -259,14 +259,14 @@
 
 // TODO: generic_downcast
 
-// CHECK-LABEL: sil hidden @$s11expressions15metatype_upcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions15metatype_upcast{{[_0-9a-zA-Z]*}}F
 func metatype_upcast() -> B.Type {
   return D.self
   // CHECK: metatype $@thick D
   // CHECK-NEXT: upcast
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions19interpolated_string{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions19interpolated_string{{[_0-9a-zA-Z]*}}F
 func interpolated_string(_ x: Int, y: String) -> String {
   return "The \(x) Million Dollar \(y)"
 }
@@ -290,7 +290,7 @@
 protocol Bendable { }
 protocol Wibbleable { }
 
-// CHECK-LABEL: sil hidden @$s11expressions20archetype_member_ref{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions20archetype_member_ref{{[_0-9a-zA-Z]*}}F
 func archetype_member_ref<T : Runcible>(_ x: T) {
   var x = x
   x.free_method()
@@ -311,7 +311,7 @@
   // CHECK-NEXT: apply
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions22existential_member_ref{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions22existential_member_ref{{[_0-9a-zA-Z]*}}F
 func existential_member_ref(_ x: Mincible) {
   x.free_method()
   // CHECK: open_existential_addr
@@ -351,7 +351,7 @@
 
   func free_method() -> Int {}
 
-  // CHECK-LABEL: sil hidden @$s11expressions3HatV17associated_method{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s11expressions3HatV17associated_method{{[_0-9a-zA-Z]*}}F
   mutating
   func associated_method() -> U.Type {
     return U.self
@@ -362,20 +362,20 @@
   static func static_method() {}
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions7erasure{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions7erasure{{[_0-9a-zA-Z]*}}F
 func erasure(_ x: Spoon) -> Mincible {
   return x
   // CHECK: init_existential_addr
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions19declref_to_metatypeAA5SpoonVmyF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions19declref_to_metatypeAA5SpoonVmyF
 func declref_to_metatype() -> Spoon.Type {
   return Spoon.self
   // CHECK: metatype $@thin Spoon.Type
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions27declref_to_generic_metatype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions27declref_to_generic_metatype{{[_0-9a-zA-Z]*}}F
 func declref_to_generic_metatype() -> Generic<UnicodeScalar>.Type {
   // FIXME parsing of T<U> in expression context
   typealias GenericChar = Generic<UnicodeScalar>
@@ -388,7 +388,7 @@
 
 func tuple() -> (Int, Float) { return (1, 1.0) }
 
-// CHECK-LABEL: sil hidden @$s11expressions13tuple_element{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions13tuple_element{{[_0-9a-zA-Z]*}}F
 func tuple_element(_ x: (Int, Float)) {
   var x = x
   // CHECK: [[XADDR:%.*]] = alloc_box ${ var (Int, Float) }
@@ -413,12 +413,12 @@
   // CHECK: apply {{.*}}([[ONE]])
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions10containers{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions10containers{{[_0-9a-zA-Z]*}}F
 func containers() -> ([Int], Dictionary<String, Int>) {
   return ([1, 2, 3], ["Ankeny": 1, "Burnside": 2, "Couch": 3])
 }
 
-// CHECK-LABEL: sil hidden @$s11expressions7if_expr{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions7if_expr{{[_0-9a-zA-Z]*}}F
 func if_expr(_ a: Bool, b: Bool, x: Int, y: Int, z: Int) -> Int {
   var a = a
   var b = b
@@ -444,7 +444,7 @@
     : z
   // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] [[PBA]]
   // CHECK:   [[A:%[0-9]+]] = load [trivial] [[READ]]
-  // CHECK:   [[ACOND:%[0-9]+]] = apply {{.*}}([[A]])
+  // CHECK:   [[ACOND:%[0-9]+]] = struct_extract [[A]] : $Bool, #Bool._value
   // CHECK:   cond_br [[ACOND]], [[IF_A:bb[0-9]+]], [[ELSE_A:bb[0-9]+]]
   // CHECK: [[IF_A]]:
   // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] [[PBX]]
@@ -453,7 +453,7 @@
   // CHECK: [[ELSE_A]]:
   // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] [[PBB]]
   // CHECK:   [[B:%[0-9]+]] = load [trivial] [[READ]]
-  // CHECK:   [[BCOND:%[0-9]+]] = apply {{.*}}([[B]])
+  // CHECK:   [[BCOND:%[0-9]+]] = struct_extract [[B]] : $Bool, #Bool._value
   // CHECK:   cond_br [[BCOND]], [[IF_B:bb[0-9]+]], [[ELSE_B:bb[0-9]+]]
   // CHECK: [[IF_B]]:
   // CHECK:   [[READ:%.*]] = begin_access [read] [unknown] [[PBY]]
@@ -473,7 +473,7 @@
 // Test that magic identifiers expand properly.  We test #column here because
 // it isn't affected as this testcase slides up and down the file over time.
 func magic_identifier_expansion(_ a: Int = #column) {
-  // CHECK-LABEL: sil hidden @{{.*}}magic_identifier_expansion
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}magic_identifier_expansion
   
   // This should expand to the column number of the first _.
   var tmp = #column
@@ -653,7 +653,7 @@
 
 
 // <rdar://problem/18851497> Swiftc fails to compile nested destructuring tuple binding
-// CHECK-LABEL: sil hidden @$s11expressions21implodeRecursiveTupleyySi_Sit_SitSgF
+// CHECK-LABEL: sil hidden [ossa] @$s11expressions21implodeRecursiveTupleyySi_Sit_SitSgF
 // CHECK: bb0(%0 : $Optional<((Int, Int), Int)>):
 func implodeRecursiveTuple(_ expr: ((Int, Int), Int)?) {
 
diff --git a/test/SILGen/extensions.swift b/test/SILGen/extensions.swift
index df0da75..39ac013 100644
--- a/test/SILGen/extensions.swift
+++ b/test/SILGen/extensions.swift
@@ -1,29 +1,29 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class Foo {
-  // CHECK-LABEL: sil hidden @$s10extensions3FooC3zim{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10extensions3FooC3zim{{[_0-9a-zA-Z]*}}F
   func zim() {}
 }
 
 extension Foo {
-  // CHECK-LABEL: sil hidden @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
   func zang() {}
 
-  // CHECK-LABEL: sil hidden @$s10extensions3FooC7zippitySivg
+  // CHECK-LABEL: sil hidden [ossa] @$s10extensions3FooC7zippitySivg
   var zippity: Int { return 0 }
 }
 
 struct Bar {
-  // CHECK-LABEL: sil hidden @$s10extensions3BarV4zung{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10extensions3BarV4zung{{[_0-9a-zA-Z]*}}F
   func zung() {}
 }
 
 extension Bar {
-  // CHECK-LABEL: sil hidden @$s10extensions3BarV4zoom{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10extensions3BarV4zoom{{[_0-9a-zA-Z]*}}F
   func zoom() {}
 }
 
-// CHECK-LABEL: sil hidden @$s10extensions19extensionReferencesyyAA3FooCF
+// CHECK-LABEL: sil hidden [ossa] @$s10extensions19extensionReferencesyyAA3FooCF
 func extensionReferences(_ x: Foo) {
   // Non-objc extension methods are statically dispatched.
   // CHECK: function_ref @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
@@ -37,12 +37,12 @@
   _ = x.zang
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
 // CHECK:         function_ref @$s10extensions3FooC4zang{{[_0-9a-zA-Z]*}}F
 
 // Extensions of generic types with stored property initializers
 
-// CHECK-LABEL: sil hidden [transparent] @$s10extensions3BoxV1txSgvpfi : $@convention(thin) <T> () -> @out Optional<T>
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s10extensions3BoxV1txSgvpfi : $@convention(thin) <T> () -> @out Optional<T>
 // CHECK:      bb0(%0 : $*Optional<T>):
 // CHECK-NEXT: [[METATYPE:%.*]] = metatype $@thin Optional<T>.Type
 // CHECK:      inject_enum_addr %0 : $*Optional<T>, #Optional.none!enumelt
@@ -53,7 +53,7 @@
   let t: T? = nil
 }
 
-// CHECK-LABEL: sil hidden @$s10extensions3BoxV1tACyxGx_tcfC : $@convention(method) <T> (@in T, @thin Box<T>.Type) -> @out Box<T>
+// CHECK-LABEL: sil hidden [ossa] @$s10extensions3BoxV1tACyxGx_tcfC : $@convention(method) <T> (@in T, @thin Box<T>.Type) -> @out Box<T>
 // CHECK:      [[SELF_BOX:%.*]] = alloc_box $<τ_0_0> { var Box<τ_0_0> } <T>
 // CHECK-NEXT: [[UNINIT_SELF_BOX:%.*]] = mark_uninitialized [rootself] [[SELF_BOX]]
 // CHECK-NEXT: [[SELF_ADDR:%.*]] = project_box [[UNINIT_SELF_BOX]] : $<τ_0_0> { var Box<τ_0_0> } <T>
diff --git a/test/SILGen/extensions_multifile.swift b/test/SILGen/extensions_multifile.swift
index 508c6d4..5823d9c 100644
--- a/test/SILGen/extensions_multifile.swift
+++ b/test/SILGen/extensions_multifile.swift
@@ -1,7 +1,7 @@
 // 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-LABEL: sil hidden [ossa] @$s20extensions_multifile12HasInitValueV1zACSi_tcfC : $@convention(method) (Int, @thin HasInitValue.Type) -> @owned HasInitValue {
 // CHECK: function_ref @$s20extensions_multifile12HasInitValueV1xSivpfi : $@convention(thin) () -> Int
 
 // CHECK-LABEL: sil hidden_external [transparent] @$s20extensions_multifile12HasInitValueV1xSivpfi : $@convention(thin) () -> Int
diff --git a/test/SILGen/extensions_objc.swift b/test/SILGen/extensions_objc.swift
index d5bdc23..3a289ac 100644
--- a/test/SILGen/extensions_objc.swift
+++ b/test/SILGen/extensions_objc.swift
@@ -12,7 +12,7 @@
   @objc dynamic var cox: Int { return 0 }
 }
 
-// CHECK-LABEL: sil hidden @$s15extensions_objc19extensionReferencesyyAA3FooCF
+// CHECK-LABEL: sil hidden [ossa] @$s15extensions_objc19extensionReferencesyyAA3FooCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Foo):
 func extensionReferences(_ x: Foo) {
   // dynamic extension methods are still dynamically dispatched.
@@ -28,9 +28,9 @@
   _ = x.kay
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s15extensions_objc3FooC3kayyyFTc
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s15extensions_objc3FooC3kayyyFTc
 // CHECK:         function_ref @$s15extensions_objc3FooC3kayyyFTD
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s15extensions_objc3FooC3kayyyFTD
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s15extensions_objc3FooC3kayyyFTD
 // CHECK:         bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK:           [[SELF_COPY:%.*]] = copy_value [[SELF]]
 // CHECK:           objc_method [[SELF_COPY]] : $Foo, #Foo.kay!1.foreign
diff --git a/test/SILGen/external-keypath.swift b/test/SILGen/external-keypath.swift
index d3cf0f0..f05739e 100644
--- a/test/SILGen/external-keypath.swift
+++ b/test/SILGen/external-keypath.swift
@@ -9,7 +9,7 @@
   var y: String
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}16externalKeyPaths
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}16externalKeyPaths
 func externalKeyPaths<T: Hashable, U>(_ x: T, _ y: U, _ z: Int) {
   // CHECK: keypath $WritableKeyPath<External<Int>, Int>, (root $External<Int>; {{.*}} external #External.property<Int>)
   _ = \External<Int>.property
@@ -68,7 +68,7 @@
   _ = \External<Int>.[privateSet: 0]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testProtocolRequirement
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testProtocolRequirement
 func testProtocolRequirement<T: ExternalProto>(_: T.Type) {
   // CHECK: keypath $WritableKeyPath<T, Int>,
   // CHECK-NOT: external #ExternalProto.protoReqt
diff --git a/test/SILGen/external_definitions.swift b/test/SILGen/external_definitions.swift
index 1be7221..a8ef3c6 100644
--- a/test/SILGen/external_definitions.swift
+++ b/test/SILGen/external_definitions.swift
@@ -8,7 +8,7 @@
 
 hasNoPrototype()
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 // -- Foreign function is referenced with C calling conv and ownership semantics
 // CHECK:   [[NSOBJECT_CTOR:%.*]] = function_ref @$sSo8NSObjectC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick NSObject.Type) -> @owned NSObject
 // CHECK:   [[ANSIBLE_CTOR:%.*]] = function_ref @$sSo7AnsibleC{{[_0-9a-zA-Z]*}}fC
@@ -23,13 +23,13 @@
 // CHECK:   apply [[NOPROTO]]()
 
 // -- Constructors for imported NSObject
-// CHECK-LABEL: sil shared [serializable] @$sSo8NSObjectC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick NSObject.Type) -> @owned NSObject
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo8NSObjectC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick NSObject.Type) -> @owned NSObject
 
 // -- Constructors for imported Ansible
-// CHECK-LABEL: sil shared [serializable] @$sSo7AnsibleC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@in Optional<Any>, @thick Ansible.Type) -> @owned Optional<Ansible>
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo7AnsibleC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@in Optional<Any>, @thick Ansible.Type) -> @owned Optional<Ansible>
 
 // -- Native Swift thunk for NSAnse
-// CHECK: sil shared [serializable] [thunk] @$sSo6NSAnseySo7AnsibleCSgADFTO : $@convention(thin) (@guaranteed Optional<Ansible>) -> @owned Optional<Ansible> {
+// CHECK: sil shared [serializable] [thunk] [ossa] @$sSo6NSAnseySo7AnsibleCSgADFTO : $@convention(thin) (@guaranteed Optional<Ansible>) -> @owned Optional<Ansible> {
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Optional<Ansible>):
 // CHECK:   [[ARG0_COPY:%.*]] = copy_value [[ARG0]]
 // CHECK:   [[FUNC:%.*]] = function_ref @NSAnse : $@convention(c) (Optional<Ansible>) -> @autoreleased Optional<Ansible>
@@ -39,5 +39,5 @@
 // CHECK: }
 
 // -- Constructor for imported Ansible was unused, should not be emitted.
-// CHECK-NOT: sil {{.*}} @$sSo7AnsibleC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick Ansible.Type) -> @owned Ansible
+// CHECK-NOT: sil {{.*}} [ossa] @$sSo7AnsibleC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick Ansible.Type) -> @owned Ansible
 
diff --git a/test/SILGen/final.swift b/test/SILGen/final.swift
index 8782796..8b98246 100644
--- a/test/SILGen/final.swift
+++ b/test/SILGen/final.swift
@@ -19,7 +19,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @{{.*}}testDirectDispatch{{.*}} : $@convention(thin) (@guaranteed TestClass) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testDirectDispatch{{.*}} : $@convention(thin) (@guaranteed TestClass) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $TestClass):
 // CHECK: [[FINALMETH:%[0-9]+]] = function_ref @$s5final9TestClassC0A6Method{{[_0-9a-zA-Z]*}}F
 // CHECK: apply [[FINALMETH]]([[ARG]])
diff --git a/test/SILGen/fixed_layout_attribute.swift b/test/SILGen/fixed_layout_attribute.swift
index ab0c710..46206d6 100644
--- a/test/SILGen/fixed_layout_attribute.swift
+++ b/test/SILGen/fixed_layout_attribute.swift
@@ -10,7 +10,7 @@
   var storedProperty = global
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s22fixed_layout_attribute14InternalStructV14storedPropertySivpfi : $@convention(thin) () -> Int
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s22fixed_layout_attribute14InternalStructV14storedPropertySivpfi : $@convention(thin) () -> Int
 //
 //    ... okay to directly reference the addressor here:
 // CHECK: function_ref @$s22fixed_layout_attribute6globalSivau
@@ -20,8 +20,8 @@
   public var storedProperty = global
 }
 
-// FRAGILE-LABEL: sil [transparent] @$s22fixed_layout_attribute14NonFixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
-// RESILIENT-LABEL: sil hidden [transparent] @$s22fixed_layout_attribute14NonFixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
+// FRAGILE-LABEL: sil [transparent] [ossa] @$s22fixed_layout_attribute14NonFixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
+// RESILIENT-LABEL: sil hidden [transparent] [ossa] @$s22fixed_layout_attribute14NonFixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
 //
 //    ... okay to directly reference the addressor here:
 // CHECK: function_ref @$s22fixed_layout_attribute6globalSivau
@@ -32,7 +32,7 @@
   public var storedProperty = global
 }
 
-// CHECK-LABEL: sil non_abi [transparent] [serialized] @$s22fixed_layout_attribute11FixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
+// CHECK-LABEL: sil non_abi [transparent] [serialized] [ossa] @$s22fixed_layout_attribute11FixedStructV14storedPropertySivpfi : $@convention(thin) () -> Int
 //
 //    ... a fragile build can still reference the addressor:
 // FRAGILE: function_ref @$s22fixed_layout_attribute6globalSivau
@@ -57,14 +57,14 @@
   public static var staticProperty: Int = 0
 }
 
-// CHECK-LABEL: sil @$s22fixed_layout_attribute18usesStaticPropertyyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [ossa] @$s22fixed_layout_attribute18usesStaticPropertyyyF : $@convention(thin) () -> ()
 // CHECK: function_ref @$s22fixed_layout_attribute17HasStaticPropertyV06staticF0Sivau : $@convention(thin) () -> Builtin.RawPointer
 // CHECK: return
 public func usesStaticProperty() {
   _ = HasStaticProperty.staticProperty
 }
 
-// CHECK-LABEL: sil [serialized] @$s22fixed_layout_attribute27usesStaticPropertyInlinableyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s22fixed_layout_attribute27usesStaticPropertyInlinableyyF : $@convention(thin) () -> ()
 
 @inlinable
 public func usesStaticPropertyInlinable() {
diff --git a/test/SILGen/force_cast_chained_optional.swift b/test/SILGen/force_cast_chained_optional.swift
index c10133b..b40b138 100644
--- a/test/SILGen/force_cast_chained_optional.swift
+++ b/test/SILGen/force_cast_chained_optional.swift
@@ -12,7 +12,7 @@
 class C {}
 class D: C {}
 
-// CHECK-LABEL: sil hidden @$s27force_cast_chained_optional4testyAA1DCAA3FooCF
+// CHECK-LABEL: sil hidden [ossa] @$s27force_cast_chained_optional4testyAA1DCAA3FooCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Foo):
 // CHECK:   class_method [[ARG]] : $Foo, #Foo.bar!getter.1 : (Foo) -> () -> Bar?, $@convention(method) (@guaranteed Foo) ->
 // CHECK:   select_enum_addr {{%.*}}
diff --git a/test/SILGen/foreach.swift b/test/SILGen/foreach.swift
index 355fd15..4e38d8c 100644
--- a/test/SILGen/foreach.swift
+++ b/test/SILGen/foreach.swift
@@ -50,7 +50,7 @@
 // Trivial Struct
 //===----------------------------------------------------------------------===//
 
-// CHECK-LABEL: sil hidden @$s7foreach13trivialStructyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach13trivialStructyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
 // CHECK: bb0([[ARRAY:%.*]] : @guaranteed $Array<Int>):
 // CHECK:   [[ITERATOR_BOX:%.*]] = alloc_box ${ var IndexingIterator<Array<Int>> }, var, name "$x$generator"
 // CHECK:   [[PROJECT_ITERATOR_BOX:%.*]] = project_box [[ITERATOR_BOX]]
@@ -102,7 +102,7 @@
   funcEnd()
 }
 
-// CHECK-LABEL: sil hidden @$s7foreach26trivialStructContinueBreakyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach26trivialStructContinueBreakyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
 // CHECK: bb0([[ARRAY:%.*]] : @guaranteed $Array<Int>):
 // CHECK:   [[ITERATOR_BOX:%.*]] = alloc_box ${ var IndexingIterator<Array<Int>> }, var, name "$x$generator"
 // CHECK:   [[PROJECT_ITERATOR_BOX:%.*]] = project_box [[ITERATOR_BOX]]
@@ -202,7 +202,7 @@
   funcEnd()
 }
 
-// CHECK-LABEL: sil hidden @$s7foreach24existentialContinueBreakyySayAA1P_pGF : $@convention(thin) (@guaranteed Array<P>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach24existentialContinueBreakyySayAA1P_pGF : $@convention(thin) (@guaranteed Array<P>) -> () {
 // CHECK: bb0([[ARRAY:%.*]] : @guaranteed $Array<P>):
 // CHECK:   [[ITERATOR_BOX:%.*]] = alloc_box ${ var IndexingIterator<Array<P>> }, var, name "$x$generator"
 // CHECK:   [[PROJECT_ITERATOR_BOX:%.*]] = project_box [[ITERATOR_BOX]]
@@ -362,7 +362,7 @@
   funcEnd()
 }
 
-// CHECK-LABEL: sil hidden @$s7foreach26genericStructContinueBreakyySayAA07GenericC0VyxGGlF : $@convention(thin) <T> (@guaranteed Array<GenericStruct<T>>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach26genericStructContinueBreakyySayAA07GenericC0VyxGGlF : $@convention(thin) <T> (@guaranteed Array<GenericStruct<T>>) -> () {
 // CHECK: bb0([[ARRAY:%.*]] : @guaranteed $Array<GenericStruct<T>>):
 // CHECK:   [[ITERATOR_BOX:%.*]] = alloc_box $<τ_0_0> { var IndexingIterator<Array<GenericStruct<τ_0_0>>> } <T>, var, name "$x$generator"
 // CHECK:   [[PROJECT_ITERATOR_BOX:%.*]] = project_box [[ITERATOR_BOX]]
@@ -470,7 +470,7 @@
   funcEnd()
 }
 
-// CHECK-LABEL: sil hidden @$s7foreach30genericCollectionContinueBreakyyxSlRzlF : $@convention(thin) <T where T : Collection> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach30genericCollectionContinueBreakyyxSlRzlF : $@convention(thin) <T where T : Collection> (@in_guaranteed T) -> () {
 // CHECK: bb0([[COLLECTION:%.*]] : $*T):
 // CHECK:   [[ITERATOR_BOX:%.*]] = alloc_box $<τ_0_0 where τ_0_0 : Collection> { var τ_0_0.Iterator } <T>, var, name "$x$generator"
 // CHECK:   [[PROJECT_ITERATOR_BOX:%.*]] = project_box [[ITERATOR_BOX]]
@@ -545,7 +545,7 @@
 // Pattern Match Tests
 //===----------------------------------------------------------------------===//
 
-// CHECK-LABEL: sil hidden @$s7foreach13tupleElementsyySayAA1CC_ADtGF
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach13tupleElementsyySayAA1CC_ADtGF
 func tupleElements(_ xx: [(C, C)]) {
   // CHECK: bb{{.*}}([[PAYLOAD:%.*]] : @owned $(C, C)):
   // CHECK: ([[A:%.*]], [[B:%.*]]) = destructure_tuple [[PAYLOAD]]
@@ -577,7 +577,7 @@
 // Make sure that when we have an unused value, we properly iterate over the
 // loop rather than run through the loop once.
 //
-// CHECK-LABEL: sil hidden @$s7foreach16unusedArgPatternyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s7foreach16unusedArgPatternyySaySiGF : $@convention(thin) (@guaranteed Array<Int>) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Array<Int>):
 // CHECK:   br [[LOOP_DEST:bb[0-9]+]]
 //
diff --git a/test/SILGen/foreign_errors.swift b/test/SILGen/foreign_errors.swift
index 6ea4efb..e49be29 100644
--- a/test/SILGen/foreign_errors.swift
+++ b/test/SILGen/foreign_errors.swift
@@ -8,7 +8,7 @@
 import Foundation
 import errors
 
-// CHECK-LABEL: sil hidden @$s14foreign_errors5test0yyKF : $@convention(thin) () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors5test0yyKF : $@convention(thin) () -> @error Error
 func test0() throws {
   //   Create a strong temporary holding nil before we perform any further parts of function emission.
   // CHECK: [[ERR_TEMP0:%.*]] = alloc_stack $Optional<NSError>
@@ -58,7 +58,7 @@
   @objc func abort() throws {
     throw NSError(domain: "", code: 1, userInfo: [:])
   }
-// CHECK-LABEL: sil hidden [thunk] @$sSo8NSObjectC14foreign_errorsE5abortyyKFTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> ObjCBool
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSObjectC14foreign_errorsE5abortyyKFTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> ObjCBool
 // CHECK: [[T0:%.*]] = function_ref @$sSo8NSObjectC14foreign_errorsE5abortyyKF : $@convention(method) (@guaranteed NSObject) -> @error Error
 // CHECK: try_apply [[T0]](
 // CHECK: bb1(
@@ -92,7 +92,7 @@
   @objc func badDescription() throws -> String {
     throw NSError(domain: "", code: 1, userInfo: [:])
   }
-// CHECK-LABEL: sil hidden [thunk] @$sSo8NSObjectC14foreign_errorsE14badDescriptionSSyKFTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> @autoreleased Optional<NSString> {
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSObjectC14foreign_errorsE14badDescriptionSSyKFTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> @autoreleased Optional<NSString> {
 // CHECK: bb0([[UNOWNED_ARG0:%.*]] : $Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, [[UNOWNED_ARG1:%.*]] : @unowned $NSObject):
 // CHECK: [[ARG1:%.*]] = copy_value [[UNOWNED_ARG1]]
 // CHECK: [[BORROWED_ARG1:%.*]] = begin_borrow [[ARG1]]
@@ -135,11 +135,11 @@
 // CHECK:   destroy_value [[ARG1]]
 // CHECK:   return [[T0]] : $Optional<NSString>
 
-// CHECK-LABEL: sil hidden [thunk] @$sSo8NSObjectC14foreign_errorsE7takeIntyySiKFTo : $@convention(objc_method) (Int, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> ObjCBool
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSObjectC14foreign_errorsE7takeIntyySiKFTo : $@convention(objc_method) (Int, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, NSObject) -> ObjCBool
 // CHECK: bb0([[I:%[0-9]+]] : $Int, [[ERROR:%[0-9]+]] : $Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, [[SELF:%[0-9]+]] : @unowned $NSObject)
   @objc func takeInt(_ i: Int) throws { }
 
-// CHECK-LABEL: sil hidden [thunk] @$sSo8NSObjectC14foreign_errorsE10takeDouble_3int7closureySd_S3iXEtKFTo : $@convention(objc_method) (Double, Int, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @convention(block) @noescape (Int) -> Int, NSObject) -> ObjCBool
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSObjectC14foreign_errorsE10takeDouble_3int7closureySd_S3iXEtKFTo : $@convention(objc_method) (Double, Int, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @convention(block) @noescape (Int) -> Int, NSObject) -> ObjCBool
 // CHECK: bb0([[D:%[0-9]+]] : $Double, [[INT:%[0-9]+]] : $Int, [[ERROR:%[0-9]+]] : $Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, [[CLOSURE:%[0-9]+]] : @unowned $@convention(block) @noescape (Int) -> Int, [[SELF:%[0-9]+]] : @unowned $NSObject):
   @objc func takeDouble(_ d: Double, int: Int, closure: (Int) -> Int) throws {
     throw NSError(domain: "", code: 1, userInfo: [:])
@@ -147,12 +147,12 @@
 }
 
 let fn = ErrorProne.fail
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10ErrorProneC4failyyKFZTcTO : $@convention(thin) (@thick ErrorProne.Type) -> @owned @callee_guaranteed () -> @error Error
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10ErrorProneC4failyyKFZTcTO : $@convention(thin) (@thick ErrorProne.Type) -> @owned @callee_guaranteed () -> @error Error
 // CHECK:      [[T0:%.*]] = function_ref @$sSo10ErrorProneC4failyyKFZTO : $@convention(method) (@thick ErrorProne.Type) -> @error Error
 // CHECK-NEXT: [[T1:%.*]] = partial_apply [callee_guaranteed] [[T0]](%0)
 // CHECK-NEXT: return [[T1]]
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo10ErrorProneC4failyyKFZTO : $@convention(method) (@thick ErrorProne.Type) -> @error Error {
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo10ErrorProneC4failyyKFZTO : $@convention(method) (@thick ErrorProne.Type) -> @error Error {
 // CHECK:      [[SELF:%.*]] = thick_to_objc_metatype %0 : $@thick ErrorProne.Type to $@objc_metatype ErrorProne.Type
 // CHECK:      [[METHOD:%.*]] = objc_method [[T0]] : $@objc_metatype ErrorProne.Type, #ErrorProne.fail!1.foreign : (ErrorProne.Type) -> () throws -> (), $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> ObjCBool
 // CHECK:      [[TEMP:%.*]] = alloc_stack $Optional<NSError>
@@ -166,14 +166,14 @@
 func testArgs() throws {
   try ErrorProne.consume(nil)
 }
-// CHECK-LABEL: sil hidden @$s14foreign_errors8testArgsyyKF : $@convention(thin) () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors8testArgsyyKF : $@convention(thin) () -> @error Error
 // CHECK:   debug_value undef : $Error, var, name "$error", argno 1
 // CHECK:   objc_method {{.*}} : $@objc_metatype ErrorProne.Type, #ErrorProne.consume!1.foreign : (ErrorProne.Type) -> (Any?) throws -> (), $@convention(objc_method) (Optional<AnyObject>, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> ObjCBool
 
 func testBridgedResult() throws {
   let array = try ErrorProne.collection(withCount: 0)
 }
-// CHECK-LABEL: sil hidden @$s14foreign_errors17testBridgedResultyyKF : $@convention(thin) () -> @error Error {
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors17testBridgedResultyyKF : $@convention(thin) () -> @error Error {
 // CHECK:   debug_value undef : $Error, var, name "$error", argno 1
 // CHECK:   objc_method {{.*}} : $@objc_metatype ErrorProne.Type, #ErrorProne.collection!1.foreign : (ErrorProne.Type) -> (Int) throws -> [Any], $@convention(objc_method) (Int, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> @autoreleased Optional<NSArray>
 
@@ -189,7 +189,7 @@
 // on than is being tested here, we should consider adding FileCheck tests for
 // it.
 
-// CHECK-LABEL:    sil hidden @$s14foreign_errors14VeryErrorProneC7withTwoACyXlSg_tKcfc
+// CHECK-LABEL:    sil hidden [ossa] @$s14foreign_errors14VeryErrorProneC7withTwoACyXlSg_tKcfc
 // CHECK:    bb0([[ARG1:%.*]] : @owned $Optional<AnyObject>, [[ARG2:%.*]] : @owned $VeryErrorProne):
 // CHECK:      [[BOX:%.*]] = alloc_box ${ var VeryErrorProne }
 // CHECK:      [[MARKED_BOX:%.*]] = mark_uninitialized [derivedself] [[BOX]]
@@ -208,7 +208,7 @@
 // CHECK:      apply [[T2]]([[ARG1_COPY]], {{%.*}}, [[T1]])
 
 // rdar://21051021
-// CHECK: sil hidden @$s14foreign_errors12testProtocolyySo010ErrorProneD0_pKF : $@convention(thin) (@guaranteed ErrorProneProtocol) -> @error Error
+// CHECK: sil hidden [ossa] @$s14foreign_errors12testProtocolyySo010ErrorProneD0_pKF : $@convention(thin) (@guaranteed ErrorProneProtocol) -> @error Error
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $ErrorProneProtocol):
 func testProtocol(_ p: ErrorProneProtocol) throws {
   // CHECK:   [[T0:%.*]] = open_existential_ref [[ARG0]] : $ErrorProneProtocol to $[[OPENED:@opened(.*) ErrorProneProtocol]]
@@ -226,14 +226,14 @@
 class ExtremelyErrorProne : ErrorProne {
   override func conflict3(_ obj: Any, error: ()) throws {}
 }
-// CHECK-LABEL: sil hidden @$s14foreign_errors19ExtremelyErrorProneC9conflict3_5erroryyp_yttKF
-// CHECK-LABEL: sil hidden [thunk] @$s14foreign_errors19ExtremelyErrorProneC9conflict3_5erroryyp_yttKFTo : $@convention(objc_method) (AnyObject, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, ExtremelyErrorProne) -> ObjCBool
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors19ExtremelyErrorProneC9conflict3_5erroryyp_yttKF
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14foreign_errors19ExtremelyErrorProneC9conflict3_5erroryyp_yttKFTo : $@convention(objc_method) (AnyObject, Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, ExtremelyErrorProne) -> ObjCBool
 
 // These conventions are usable because of swift_error. rdar://21715350
 func testNonNilError() throws -> Float {
   return try ErrorProne.bounce()
 }
-// CHECK-LABEL: sil hidden @$s14foreign_errors15testNonNilErrorSfyKF :
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors15testNonNilErrorSfyKF :
 // CHECK:   [[OPTERR:%.*]] = alloc_stack $Optional<NSError>
 // CHECK:   [[T0:%.*]] = metatype $@objc_metatype ErrorProne.Type
 // CHECK:   [[T1:%.*]] = objc_method [[T0]] : $@objc_metatype ErrorProne.Type, #ErrorProne.bounce!1.foreign : (ErrorProne.Type) -> () throws -> Float, $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> Float
@@ -249,7 +249,7 @@
 func testPreservedResult() throws -> CInt {
   return try ErrorProne.ounce()
 }
-// CHECK-LABEL: sil hidden @$s14foreign_errors19testPreservedResults5Int32VyKF
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors19testPreservedResults5Int32VyKF
 // CHECK:   [[OPTERR:%.*]] = alloc_stack $Optional<NSError>
 // CHECK:   [[T0:%.*]] = metatype $@objc_metatype ErrorProne.Type
 // CHECK:   [[T1:%.*]] = objc_method [[T0]] : $@objc_metatype ErrorProne.Type, #ErrorProne.ounce!1.foreign : (ErrorProne.Type) -> () throws -> Int32, $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> Int32
@@ -267,7 +267,7 @@
   return try ErrorProne.ounceWord()
 }
 
-// CHECK-LABEL: sil hidden @$s14foreign_errors26testPreservedResultBridgedSiyKF
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors26testPreservedResultBridgedSiyKF
 // CHECK:   [[OPTERR:%.*]] = alloc_stack $Optional<NSError>
 // CHECK:   [[T0:%.*]] = metatype $@objc_metatype ErrorProne.Type
 // CHECK:   [[T1:%.*]] = objc_method [[T0]] : $@objc_metatype ErrorProne.Type, #ErrorProne.ounceWord!1.foreign : (ErrorProne.Type) -> () throws -> Int, $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> Int
@@ -285,7 +285,7 @@
   try ErrorProne.once()
 }
 
-// CHECK-LABEL: sil hidden @$s14foreign_errors27testPreservedResultInvertedyyKF
+// CHECK-LABEL: sil hidden [ossa] @$s14foreign_errors27testPreservedResultInvertedyyKF
 // CHECK:   [[OPTERR:%.*]] = alloc_stack $Optional<NSError>
 // CHECK:   [[T0:%.*]] = metatype $@objc_metatype ErrorProne.Type
 // CHECK:   [[T1:%.*]] = objc_method [[T0]] : $@objc_metatype ErrorProne.Type, #ErrorProne.once!1.foreign : (ErrorProne.Type) -> () throws -> (), $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @objc_metatype ErrorProne.Type) -> Int32
diff --git a/test/SILGen/function_conversion.swift b/test/SILGen/function_conversion.swift
index 1308e0e..9f91376 100644
--- a/test/SILGen/function_conversion.swift
+++ b/test/SILGen/function_conversion.swift
@@ -6,7 +6,7 @@
 
 // ==== Representation conversions
 
-// CHECK-LABEL: sil hidden @$s19function_conversion7cToFuncyS2icS2iXCF : $@convention(thin) (@convention(c) (Int) -> Int) -> @owned @callee_guaranteed (Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion7cToFuncyS2icS2iXCF : $@convention(thin) (@convention(c) (Int) -> Int) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK:         [[THUNK:%.*]] = function_ref @$sS2iIetCyd_S2iIegyd_TR
 // CHECK:         [[FUNC:%.*]] = partial_apply [callee_guaranteed] [[THUNK]](%0)
 // CHECK:         return [[FUNC]]
@@ -14,7 +14,7 @@
   return arg
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion8cToBlockyS2iXBS2iXCF : $@convention(thin) (@convention(c) (Int) -> Int) -> @owned @convention(block) (Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion8cToBlockyS2iXBS2iXCF : $@convention(thin) (@convention(c) (Int) -> Int) -> @owned @convention(block) (Int) -> Int
 // CHECK:         [[BLOCK_STORAGE:%.*]] = alloc_stack $@block_storage
 // CHECK:         [[BLOCK:%.*]] = init_block_storage_header [[BLOCK_STORAGE]]
 // CHECK:         [[COPY:%.*]] = copy_block [[BLOCK]] : $@convention(block) (Int) -> Int
@@ -25,7 +25,7 @@
 
 // ==== Throws variance
 
-// CHECK-LABEL: sil hidden @$s19function_conversion12funcToThrowsyyyKcyycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion12funcToThrowsyyyKcyycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @callee_guaranteed () -> @error Error
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $@callee_guaranteed () -> ()):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[FUNC:%.*]] = convert_function [[ARG_COPY]] : $@callee_guaranteed () -> () to $@callee_guaranteed () -> @error Error
@@ -35,7 +35,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion12thinToThrowsyyyKXfyyXfF : $@convention(thin) (@convention(thin) () -> ()) -> @convention(thin) () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion12thinToThrowsyyyKXfyyXfF : $@convention(thin) (@convention(thin) () -> ()) -> @convention(thin) () -> @error Error
 // CHECK:         [[FUNC:%.*]] = convert_function %0 : $@convention(thin) () -> () to $@convention(thin) () -> @error Error
 // CHECK:         return [[FUNC]] : $@convention(thin) () -> @error Error
 func thinToThrows(_ x: @escaping @convention(thin) () -> ()) -> @convention(thin) () throws -> () {
@@ -56,7 +56,7 @@
 class Feral {}
 class Domesticated : Feral {}
 
-// CHECK-LABEL: sil hidden @$s19function_conversion12funcToUpcastyAA5FeralCycAA12DomesticatedCycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> @owned Domesticated) -> @owned @callee_guaranteed () -> @owned Feral {
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion12funcToUpcastyAA5FeralCycAA12DomesticatedCycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> @owned Domesticated) -> @owned @callee_guaranteed () -> @owned Feral {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $@callee_guaranteed () -> @owned Domesticated):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[FUNC:%.*]] = convert_function [[ARG_COPY]] : $@callee_guaranteed () -> @owned Domesticated to $@callee_guaranteed () -> @owned Feral
@@ -66,7 +66,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion12funcToUpcastyyAA12DomesticatedCcyAA5FeralCcF : $@convention(thin) (@guaranteed @callee_guaranteed (@guaranteed Feral) -> ()) -> @owned @callee_guaranteed (@guaranteed Domesticated) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion12funcToUpcastyyAA12DomesticatedCcyAA5FeralCcF : $@convention(thin) (@guaranteed @callee_guaranteed (@guaranteed Feral) -> ()) -> @owned @callee_guaranteed (@guaranteed Domesticated) -> ()
 // CHECK: bb0([[ARG:%.*]] :
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[FUNC:%.*]] = convert_function [[ARG_COPY]] : $@callee_guaranteed (@guaranteed Feral) -> () to $@callee_guaranteed (@guaranteed Domesticated) -> (){{.*}}
@@ -113,7 +113,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion19convOptionalTrivialyyAA0E0VADSgcF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion19convOptionalTrivialyyAA0E0VADSgcF
 func convOptionalTrivial(_ t1: @escaping (Trivial?) -> Trivial) {
 // CHECK:         function_ref @$s19function_conversion7TrivialVSgACIegyd_AcDIegyd_TR
 // CHECK:         partial_apply
@@ -124,18 +124,18 @@
   let _: (Trivial?) -> Trivial? = t1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion7TrivialVSgACIegyd_AcDIegyd_TR : $@convention(thin) (Trivial, @guaranteed @callee_guaranteed (Optional<Trivial>) -> Trivial) -> Optional<Trivial>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion7TrivialVSgACIegyd_AcDIegyd_TR : $@convention(thin) (Trivial, @guaranteed @callee_guaranteed (Optional<Trivial>) -> Trivial) -> Optional<Trivial>
 // CHECK:         [[ENUM:%.*]] = enum $Optional<Trivial>
 // CHECK-NEXT:    apply %1([[ENUM]])
 // CHECK-NEXT:    enum $Optional<Trivial>
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion7TrivialVSgACIegyd_A2DIegyd_TR : $@convention(thin) (Optional<Trivial>, @guaranteed @callee_guaranteed (Optional<Trivial>) -> Trivial) -> Optional<Trivial>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion7TrivialVSgACIegyd_A2DIegyd_TR : $@convention(thin) (Optional<Trivial>, @guaranteed @callee_guaranteed (Optional<Trivial>) -> Trivial) -> Optional<Trivial>
 // CHECK:         apply %1(%0)
 // CHECK-NEXT:    enum $Optional<Trivial>
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil hidden @$s19function_conversion20convOptionalLoadableyyAA0E0VADSgcF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion20convOptionalLoadableyyAA0E0VADSgcF
 func convOptionalLoadable(_ l1: @escaping (Loadable?) -> Loadable) {
 // CHECK:         function_ref @$s19function_conversion8LoadableVSgACIeggo_AcDIeggo_TR
 // CHECK:         partial_apply
@@ -146,19 +146,19 @@
   let _: (Loadable?) -> Loadable? = l1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion8LoadableVSgACIeggo_A2DIeggo_TR : $@convention(thin) (@guaranteed Optional<Loadable>, @guaranteed @callee_guaranteed (@guaranteed Optional<Loadable>) -> @owned Loadable) -> @owned Optional<Loadable>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion8LoadableVSgACIeggo_A2DIeggo_TR : $@convention(thin) (@guaranteed Optional<Loadable>, @guaranteed @callee_guaranteed (@guaranteed Optional<Loadable>) -> @owned Loadable) -> @owned Optional<Loadable>
 // CHECK:         apply %1(%0)
 // CHECK-NEXT:    enum $Optional<Loadable>
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil hidden @$s19function_conversion20convOptionalAddrOnlyyyAA0eF0VADSgcF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion20convOptionalAddrOnlyyyAA0eF0VADSgcF
 func convOptionalAddrOnly(_ a1: @escaping (AddrOnly?) -> AddrOnly) {
 // CHECK:         function_ref @$s19function_conversion8AddrOnlyVSgACIegnr_A2DIegnr_TR
 // CHECK:         partial_apply
   let _: (AddrOnly?) -> AddrOnly? = a1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion8AddrOnlyVSgACIegnr_A2DIegnr_TR : $@convention(thin) (@in_guaranteed Optional<AddrOnly>, @guaranteed @callee_guaranteed (@in_guaranteed Optional<AddrOnly>) -> @out AddrOnly) -> @out Optional<AddrOnly>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion8AddrOnlyVSgACIegnr_A2DIegnr_TR : $@convention(thin) (@in_guaranteed Optional<AddrOnly>, @guaranteed @callee_guaranteed (@in_guaranteed Optional<AddrOnly>) -> @out AddrOnly) -> @out Optional<AddrOnly>
 // CHECK:         [[TEMP:%.*]] = alloc_stack $AddrOnly
 // CHECK-NEXT:    apply %2([[TEMP]], %1)
 // CHECK-NEXT:    init_enum_data_addr %0 : $*Optional<AddrOnly>
@@ -180,7 +180,7 @@
 extension Loadable : P {}
 extension AddrOnly : P {}
 
-// CHECK-LABEL: sil hidden @$s19function_conversion22convExistentialTrivial_2t3yAA0E0VAA1Q_pc_AeaF_pSgctF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion22convExistentialTrivial_2t3yAA0E0VAA1Q_pc_AeaF_pSgctF
 func convExistentialTrivial(_ t2: @escaping (Q) -> Trivial, t3: @escaping (Q?) -> Trivial) {
 // CHECK:         function_ref @$s19function_conversion1Q_pAA7TrivialVIegnd_AdA1P_pIegyr_TR
 // CHECK:         partial_apply
@@ -195,7 +195,7 @@
   let _: (P) -> P = t2
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pAA7TrivialVIegnd_AdA1P_pIegyr_TR : $@convention(thin) (Trivial, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> Trivial) -> @out P
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pAA7TrivialVIegnd_AdA1P_pIegyr_TR : $@convention(thin) (Trivial, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> Trivial) -> @out P
 // CHECK:         alloc_stack $Q
 // CHECK-NEXT:    init_existential_addr
 // CHECK-NEXT:    store
@@ -204,7 +204,7 @@
 // CHECK-NEXT:    store
 // CHECK:         return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pSgAA7TrivialVIegnd_AESgAA1P_pIegyr_TR
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pSgAA7TrivialVIegnd_AESgAA1P_pIegyr_TR
 // CHECK:         switch_enum
 // CHECK: bb1([[TRIVIAL:%.*]] : $Trivial):
 // CHECK:         init_existential_addr
@@ -219,7 +219,7 @@
 // CHECK:         store
 // CHECK:         return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pAA7TrivialVIegnd_AA1P_pAaE_pIegnr_TR : $@convention(thin) (@in_guaranteed P, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> Trivial) -> @out P
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pAA7TrivialVIegnd_AA1P_pAaE_pIegnr_TR : $@convention(thin) (@in_guaranteed P, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> Trivial) -> @out P
 // CHECK:         [[TMP:%.*]] = alloc_stack $Q
 // CHECK-NEXT:    open_existential_addr immutable_access %1 : $*P
 // CHECK-NEXT:    init_existential_addr [[TMP]] : $*Q
@@ -232,7 +232,7 @@
 
 // ==== Existential metatypes
 
-// CHECK-LABEL: sil hidden @$s19function_conversion23convExistentialMetatypeyyAA7TrivialVmAA1Q_pXpSgcF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion23convExistentialMetatypeyyAA7TrivialVmAA1Q_pXpSgcF
 func convExistentialMetatype(_ em: @escaping (Q.Type?) -> Trivial.Type) {
 // CHECK:         function_ref @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AEXMtAA1P_pXmTIegyd_TR
 // CHECK:         partial_apply
@@ -247,7 +247,7 @@
   let _: (P.Type) -> P.Type = em
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AEXMtAA1P_pXmTIegyd_TR : $@convention(thin) (@thin Trivial.Type, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AEXMtAA1P_pXmTIegyd_TR : $@convention(thin) (@thin Trivial.Type, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
 // CHECK:         [[META:%.*]] = metatype $@thick Trivial.Type
 // CHECK-NEXT:    init_existential_metatype [[META]] : $@thick Trivial.Type, $@thick Q.Type
 // CHECK-NEXT:    enum $Optional<@thick Q.Type>
@@ -256,7 +256,7 @@
 // CHECK-NEXT:    init_existential_metatype {{.*}} : $@thick Trivial.Type, $@thick P.Type
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AEXMtSgAA1P_pXmTIegyd_TR : $@convention(thin) (Optional<@thin Trivial.Type>, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AEXMtSgAA1P_pXmTIegyd_TR : $@convention(thin) (Optional<@thin Trivial.Type>, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
 // CHECK:         switch_enum %0 : $Optional<@thin Trivial.Type>
 // CHECK: bb1([[META:%.*]] : $@thin Trivial.Type):
 // CHECK-NEXT:    metatype $@thick Trivial.Type
@@ -270,7 +270,7 @@
 // CHECK-NEXT:    init_existential_metatype {{.*}} : $@thick Trivial.Type, $@thick P.Type
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AA1P_pXmTAaF_pXmTIegyd_TR : $@convention(thin) (@thick P.Type, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pXmTSgAA7TrivialVXMtIegyd_AA1P_pXmTAaF_pXmTIegyd_TR : $@convention(thin) (@thick P.Type, @guaranteed @callee_guaranteed (Optional<@thick Q.Type>) -> @thin Trivial.Type) -> @thick P.Type
 // CHECK:         open_existential_metatype %0 : $@thick P.Type to $@thick (@opened({{.*}}) P).Type
 // CHECK-NEXT:    init_existential_metatype %2 : $@thick (@opened({{.*}}) P).Type, $@thick Q.Type
 // CHECK-NEXT:    enum $Optional<@thick Q.Type>
@@ -287,7 +287,7 @@
 // Note: we add a Trivial => Trivial? conversion here to force a thunk
 // to be generated
 
-// CHECK-LABEL: sil hidden @$s19function_conversion18convUpcastMetatype_2c5yAA5ChildCmAA6ParentCm_AA7TrivialVSgtc_AEmAGmSg_AJtctF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion18convUpcastMetatype_2c5yAA5ChildCmAA6ParentCm_AA7TrivialVSgtc_AEmAGmSg_AJtctF
 func convUpcastMetatype(_ c4: @escaping (Parent.Type, Trivial?) -> Child.Type,
                         c5: @escaping (Parent.Type?, Trivial?) -> Child.Type) {
 // CHECK:         function_ref @$s19function_conversion6ParentCXMTAA7TrivialVSgAA5ChildCXMTIegyyd_AHXMTAeCXMTIegyyd_TR
@@ -303,20 +303,20 @@
   let _: (Child.Type?, Trivial) -> Parent.Type? = c5
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion6ParentCXMTAA7TrivialVSgAA5ChildCXMTIegyyd_AHXMTAeCXMTIegyyd_TR : $@convention(thin) (@thick Child.Type, Trivial, @guaranteed @callee_guaranteed (@thick Parent.Type, Optional<Trivial>) -> @thick Child.Type) -> @thick Parent.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion6ParentCXMTAA7TrivialVSgAA5ChildCXMTIegyyd_AHXMTAeCXMTIegyyd_TR : $@convention(thin) (@thick Child.Type, Trivial, @guaranteed @callee_guaranteed (@thick Parent.Type, Optional<Trivial>) -> @thick Child.Type) -> @thick Parent.Type
 // CHECK:         upcast %0 : $@thick Child.Type to $@thick Parent.Type
 // CHECK:         apply
 // CHECK:         upcast {{.*}} : $@thick Child.Type to $@thick Parent.Type
 // CHECK:         return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion6ParentCXMTSgAA7TrivialVSgAA5ChildCXMTIegyyd_AIXMTAfCXMTIegyyd_TR : $@convention(thin) (@thick Child.Type, Trivial, @guaranteed @callee_guaranteed (Optional<@thick Parent.Type>, Optional<Trivial>) -> @thick Child.Type) -> @thick Parent.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion6ParentCXMTSgAA7TrivialVSgAA5ChildCXMTIegyyd_AIXMTAfCXMTIegyyd_TR : $@convention(thin) (@thick Child.Type, Trivial, @guaranteed @callee_guaranteed (Optional<@thick Parent.Type>, Optional<Trivial>) -> @thick Child.Type) -> @thick Parent.Type
 // CHECK:         upcast %0 : $@thick Child.Type to $@thick Parent.Type
 // CHECK:         enum $Optional<@thick Parent.Type>
 // CHECK:         apply
 // CHECK:         upcast {{.*}} : $@thick Child.Type to $@thick Parent.Type
 // CHECK:         return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion6ParentCXMTSgAA7TrivialVSgAA5ChildCXMTIegyyd_AIXMTSgAfDIegyyd_TR : $@convention(thin) (Optional<@thick Child.Type>, Trivial, @guaranteed @callee_guaranteed (Optional<@thick Parent.Type>, Optional<Trivial>) -> @thick Child.Type) -> Optional<@thick Parent.Type>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion6ParentCXMTSgAA7TrivialVSgAA5ChildCXMTIegyyd_AIXMTSgAfDIegyyd_TR : $@convention(thin) (Optional<@thick Child.Type>, Trivial, @guaranteed @callee_guaranteed (Optional<@thick Parent.Type>, Optional<Trivial>) -> @thick Child.Type) -> Optional<@thick Parent.Type>
 // CHECK:         unchecked_trivial_bit_cast %0 : $Optional<@thick Child.Type> to $Optional<@thick Parent.Type>
 // CHECK:         apply
 // CHECK:         upcast {{.*}} : $@thick Child.Type to $@thick Parent.Type
@@ -325,7 +325,7 @@
 
 // ==== Function to existential -- make sure we maximally abstract it
 
-// CHECK-LABEL: sil hidden @$s19function_conversion19convFuncExistentialyyS2icypcF : $@convention(thin) (@guaranteed @callee_guaranteed (@in_guaranteed Any) -> @owned @callee_guaranteed (Int) -> Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion19convFuncExistentialyyS2icypcF : $@convention(thin) (@guaranteed @callee_guaranteed (@in_guaranteed Any) -> @owned @callee_guaranteed (Int) -> Int) -> ()
 // CHECK: bb0([[ARG:%.*]] :
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
 // CHECK:   [[REABSTRACT_THUNK:%.*]] = function_ref @$sypS2iIegyd_Iegno_S2iIegyd_ypIeggr_TR :
@@ -336,7 +336,7 @@
   let _: (@escaping (Int) -> Int) -> Any = f1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypS2iIegyd_Iegno_S2iIegyd_ypIeggr_TR : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> Int, @guaranteed @callee_guaranteed (@in_guaranteed Any) -> @owned @callee_guaranteed (Int) -> Int) -> @out Any {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypS2iIegyd_Iegno_S2iIegyd_ypIeggr_TR : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> Int, @guaranteed @callee_guaranteed (@in_guaranteed Any) -> @owned @callee_guaranteed (Int) -> Int) -> @out Any {
 // CHECK:         alloc_stack $Any
 // CHECK:         function_ref @$sS2iIegyd_S2iIegnr_TR
 // CHECK-NEXT:    [[COPIED_VAL:%.*]] = copy_value
@@ -350,7 +350,7 @@
 // CHECK-NEXT:    store {{.*}} to {{.*}} : $*@callee_guaranteed (@in_guaranteed Int) -> @out Int
 // CHECK:         return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIegyd_S2iIegnr_TR : $@convention(thin) (@in_guaranteed Int, @guaranteed @callee_guaranteed (Int) -> Int) -> @out Int
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIegyd_S2iIegnr_TR : $@convention(thin) (@in_guaranteed Int, @guaranteed @callee_guaranteed (Int) -> Int) -> @out Int
 // CHECK:         [[LOADED:%.*]] = load [trivial] %1 : $*Int
 // CHECK-NEXT:    apply %2([[LOADED]])
 // CHECK-NEXT:    store {{.*}} to [trivial] %0
@@ -359,14 +359,14 @@
 
 // ==== Class-bound archetype upcast
 
-// CHECK-LABEL: sil hidden @$s19function_conversion29convClassBoundArchetypeUpcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion29convClassBoundArchetypeUpcast{{[_0-9a-zA-Z]*}}F
 func convClassBoundArchetypeUpcast<T : Parent>(_ f1: @escaping (Parent) -> (T, Trivial)) {
 // CHECK:         function_ref @$s19function_conversion6ParentCxAA7TrivialVIeggod_xAcESgIeggod_ACRbzlTR
 // CHECK:         partial_apply
   let _: (T) -> (Parent, Trivial?) = f1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion6ParentCxAA7TrivialVIeggod_xAcESgIeggod_ACRbzlTR : $@convention(thin) <T where T : Parent> (@guaranteed T, @guaranteed @callee_guaranteed (@guaranteed Parent) -> (@owned T, Trivial)) -> (@owned Parent, Optional<Trivial>)
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion6ParentCxAA7TrivialVIeggod_xAcESgIeggod_ACRbzlTR : $@convention(thin) <T where T : Parent> (@guaranteed T, @guaranteed @callee_guaranteed (@guaranteed Parent) -> (@owned T, Trivial)) -> (@owned Parent, Optional<Trivial>)
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T, [[CLOSURE:%.*]] : @guaranteed $@callee_guaranteed (@guaranteed Parent) -> (@owned T, Trivial)):
 // CHECK:    [[CASTED_ARG:%.*]] = upcast [[ARG]] : $T to $Parent
 // CHECK:    [[RESULT:%.*]] = apply %1([[CASTED_ARG]])
@@ -377,14 +377,14 @@
 // CHECK:    return [[RESULT]]
 // CHECK: } // end sil function '$s19function_conversion6ParentCxAA7TrivialVIeggod_xAcESgIeggod_ACRbzlTR'
 
-// CHECK-LABEL: sil hidden @$s19function_conversion37convClassBoundMetatypeArchetypeUpcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion37convClassBoundMetatypeArchetypeUpcast{{[_0-9a-zA-Z]*}}F
 func convClassBoundMetatypeArchetypeUpcast<T : Parent>(_ f1: @escaping (Parent.Type) -> (T.Type, Trivial)) {
 // CHECK:         function_ref @$s19function_conversion6ParentCXMTxXMTAA7TrivialVIegydd_xXMTACXMTAESgIegydd_ACRbzlTR
 // CHECK:         partial_apply
   let _: (T.Type) -> (Parent.Type, Trivial?) = f1
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion6ParentCXMTxXMTAA7TrivialVIegydd_xXMTACXMTAESgIegydd_ACRbzlTR : $@convention(thin) <T where T : Parent> (@thick T.Type, @guaranteed @callee_guaranteed (@thick Parent.Type) -> (@thick T.Type, Trivial)) -> (@thick Parent.Type, Optional<Trivial>)
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion6ParentCXMTxXMTAA7TrivialVIegydd_xXMTACXMTAESgIegydd_ACRbzlTR : $@convention(thin) <T where T : Parent> (@thick T.Type, @guaranteed @callee_guaranteed (@thick Parent.Type) -> (@thick T.Type, Trivial)) -> (@thick Parent.Type, Optional<Trivial>)
 // CHECK: bb0([[META:%.*]] : 
 // CHECK:         upcast %0 : $@thick T.Type
 // CHECK-NEXT:    apply
@@ -396,14 +396,14 @@
 
 // ==== Make sure we destructure one-element tuples
 
-// CHECK-LABEL: sil hidden @$s19function_conversion15convTupleScalar_2f22f3yyAA1Q_pc_yAaE_pcySi_SitSgctF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion15convTupleScalar_2f22f3yyAA1Q_pc_yAaE_pcySi_SitSgctF
 // CHECK:         function_ref @$s19function_conversion1Q_pIegn_AA1P_pIegn_TR
 // CHECK:         function_ref @$s19function_conversion1Q_pIegn_AA1P_pIegn_TR
 // CHECK:         function_ref @$sSi_SitSgIegy_S2iIegyy_TR
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s19function_conversion1Q_pIegn_AA1P_pIegn_TR : $@convention(thin) (@in_guaranteed P, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s19function_conversion1Q_pIegn_AA1P_pIegn_TR : $@convention(thin) (@in_guaranteed P, @guaranteed @callee_guaranteed (@in_guaranteed Q) -> ()) -> ()
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSi_SitSgIegy_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (Optional<(Int, Int)>) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSi_SitSgIegy_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (Optional<(Int, Int)>) -> ()) -> ()
 
 func convTupleScalar(_ f1: @escaping (Q) -> (),
                      f2: @escaping (_ parent: Q) -> (),
@@ -417,7 +417,7 @@
   return f
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion25convTupleToOptionalDirectySi_SitSgSicSi_SitSicF : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> (Int, Int)) -> @owned @callee_guaranteed (Int) -> Optional<(Int, Int)>
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion25convTupleToOptionalDirectySi_SitSgSicSi_SitSicF : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> (Int, Int)) -> @owned @callee_guaranteed (Int) -> Optional<(Int, Int)>
 // CHECK:         bb0([[ARG:%.*]] : @guaranteed $@callee_guaranteed (Int) -> (Int, Int)):
 // CHECK:           [[FN:%.*]] = copy_value [[ARG]]
 // CHECK:           [[THUNK_FN:%.*]] = function_ref @$sS3iIegydd_S2i_SitSgIegyd_TR
@@ -425,7 +425,7 @@
 // CHECK-NEXT:      return [[THUNK]]
 // CHECK-NEXT: } // end sil function '$s19function_conversion25convTupleToOptionalDirectySi_SitSgSicSi_SitSicF'
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS3iIegydd_S2i_SitSgIegyd_TR : $@convention(thin) (Int, @guaranteed @callee_guaranteed (Int) -> (Int, Int)) -> Optional<(Int, Int)>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS3iIegydd_S2i_SitSgIegyd_TR : $@convention(thin) (Int, @guaranteed @callee_guaranteed (Int) -> (Int, Int)) -> Optional<(Int, Int)>
 // CHECK:         bb0(%0 : $Int, %1 : @guaranteed $@callee_guaranteed (Int) -> (Int, Int)):
 // CHECK:           [[RESULT:%.*]] = apply %1(%0)
 // CHECK-NEXT:      ([[LEFT:%.*]], [[RIGHT:%.*]]) = destructure_tuple [[RESULT]]
@@ -438,7 +438,7 @@
   return f
 }
 
-// CHECK-LABEL: sil hidden @$s19function_conversion27convTupleToOptionalIndirectyx_xtSgxcx_xtxclF : $@convention(thin) <T> (@guaranteed @callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out Optional<(T, T)>
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion27convTupleToOptionalIndirectyx_xtSgxcx_xtxclF : $@convention(thin) <T> (@guaranteed @callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out Optional<(T, T)>
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $@callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)):
 // CHECK:          [[FN:%.*]] = copy_value [[ARG]]
 // CHECK:          [[THUNK_FN:%.*]] = function_ref @$sxxxIegnrr_xx_xtSgIegnr_lTR
@@ -446,7 +446,7 @@
 // CHECK-NEXT:     return [[THUNK]]
 // CHECK-NEXT: } // end sil function '$s19function_conversion27convTupleToOptionalIndirectyx_xtSgxcx_xtxclF'
 
-// CHECK:       sil shared [transparent] [serializable] [reabstraction_thunk] @$sxxxIegnrr_xx_xtSgIegnr_lTR : $@convention(thin) <T> (@in_guaranteed T, @guaranteed @callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)) -> @out Optional<(T, T)>
+// CHECK:       sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxxxIegnrr_xx_xtSgIegnr_lTR : $@convention(thin) <T> (@in_guaranteed T, @guaranteed @callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)) -> @out Optional<(T, T)>
 // CHECK:       bb0(%0 : $*Optional<(T, T)>, %1 : $*T, %2 : @guaranteed $@callee_guaranteed (@in_guaranteed T) -> (@out T, @out T)):
 // CHECK:         [[OPTIONAL:%.*]] = init_enum_data_addr %0 : $*Optional<(T, T)>, #Optional.some!enumelt.1
 // CHECK-NEXT:    [[LEFT:%.*]] = tuple_element_addr [[OPTIONAL]] : $*(T, T), 0
@@ -462,11 +462,11 @@
 
 // ==== Make sure we support AnyHashable erasure
 
-// CHECK-LABEL: sil hidden @$s19function_conversion15convAnyHashable1tyx_tSHRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion15convAnyHashable1tyx_tSHRzlF
 // CHECK:         function_ref @$s19function_conversion15convAnyHashable1tyx_tSHRzlFSbs0dE0V_AEtcfU_
 // CHECK:         function_ref @$ss11AnyHashableVABSbIegnnd_xxSbIegnnd_SHRzlTR
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$ss11AnyHashableVABSbIegnnd_xxSbIegnnd_SHRzlTR : $@convention(thin) <T where T : Hashable> (@in_guaranteed T, @in_guaranteed T, @guaranteed @callee_guaranteed (@in_guaranteed AnyHashable, @in_guaranteed AnyHashable) -> Bool) -> Bool
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$ss11AnyHashableVABSbIegnnd_xxSbIegnnd_SHRzlTR : $@convention(thin) <T where T : Hashable> (@in_guaranteed T, @in_guaranteed T, @guaranteed @callee_guaranteed (@in_guaranteed AnyHashable, @in_guaranteed AnyHashable) -> Bool) -> Bool
 // CHECK:         alloc_stack $AnyHashable
 // CHECK:         function_ref @$ss21_convertToAnyHashableys0cD0VxSHRzlF
 // CHECK:         apply {{.*}}<T>
@@ -483,7 +483,7 @@
 
 // ==== Convert exploded tuples to Any or Optional<Any>
 
-// CHECK-LABEL: sil hidden @$s19function_conversion12convTupleAnyyyyyc_Si_SitycyypcyypSgctF
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion12convTupleAnyyyyyc_Si_SitycyypcyypSgctF
 // CHECK:         function_ref @$sIeg_ypIegr_TR
 // CHECK:         partial_apply
 // CHECK:         function_ref @$sIeg_ypSgIegr_TR
@@ -512,13 +512,13 @@
   let _: ((Int, Int)) -> () = f4
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIeg_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @out Any
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIeg_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @out Any
 // CHECK:         init_existential_addr %0 : $*Any, $()
 // CHECK-NEXT:    apply %1()
 // CHECK-NEXT:    tuple ()
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIeg_ypSgIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @out Optional<Any>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIeg_ypSgIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @out Optional<Any>
 // CHECK:         [[ENUM_PAYLOAD:%.*]] = init_enum_data_addr %0 : $*Optional<Any>, #Optional.some!enumelt.1
 // CHECK-NEXT:    init_existential_addr [[ENUM_PAYLOAD]] : $*Any, $()
 // CHECK-NEXT:    apply %1()
@@ -526,7 +526,7 @@
 // CHECK-NEXT:    tuple ()
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIegdd_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> (Int, Int)) -> @out Any
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIegdd_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> (Int, Int)) -> @out Any
 // CHECK:         [[ANY_PAYLOAD:%.*]] = init_existential_addr %0
 // CHECK-NEXT:    [[LEFT_ADDR:%.*]] = tuple_element_addr [[ANY_PAYLOAD]]
 // CHECK-NEXT:    [[RIGHT_ADDR:%.*]] = tuple_element_addr [[ANY_PAYLOAD]]
@@ -537,7 +537,7 @@
 // CHECK-NEXT:    tuple ()
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIegdd_ypSgIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> (Int, Int)) -> @out Optional<Any> {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIegdd_ypSgIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> (Int, Int)) -> @out Optional<Any> {
 // CHECK:         [[OPTIONAL_PAYLOAD:%.*]] = init_enum_data_addr %0
 // CHECK-NEXT:    [[ANY_PAYLOAD:%.*]] = init_existential_addr [[OPTIONAL_PAYLOAD]]
 // CHECK-NEXT:    [[LEFT_ADDR:%.*]] = tuple_element_addr [[ANY_PAYLOAD]]
@@ -550,7 +550,7 @@
 // CHECK-NEXT:    tuple ()
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypIegn_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (@in_guaranteed Any) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypIegn_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (@in_guaranteed Any) -> ()) -> ()
 // CHECK:         [[ANY_VALUE:%.*]] = alloc_stack $Any
 // CHECK-NEXT:    [[ANY_PAYLOAD:%.*]] = init_existential_addr [[ANY_VALUE]]
 // CHECK-NEXT:    [[LEFT_ADDR:%.*]] = tuple_element_addr [[ANY_PAYLOAD]]
@@ -563,7 +563,7 @@
 // CHECK-NEXT:    dealloc_stack [[ANY_VALUE]]
 // CHECK-NEXT:    return
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypSgIegn_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (@in_guaranteed Optional<Any>) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypSgIegn_S2iIegyy_TR : $@convention(thin) (Int, Int, @guaranteed @callee_guaranteed (@in_guaranteed Optional<Any>) -> ()) -> ()
 // CHECK:         [[ANY_VALUE:%.*]] = alloc_stack $Any
 // CHECK-NEXT:    [[ANY_PAYLOAD:%.*]] = init_existential_addr [[ANY_VALUE]]
 // CHECK-NEXT:    [[LEFT_ADDR:%.*]] = tuple_element_addr [[ANY_PAYLOAD]]
@@ -659,7 +659,7 @@
   }
 }
 
-// CHECK: sil {{.*}} @$sS4SIgggoo_S2Ss11AnyHashableVyps5Error_pIegggrrzo_TR
+// CHECK: sil {{.*}} [ossa] @$sS4SIgggoo_S2Ss11AnyHashableVyps5Error_pIegggrrzo_TR
 // CHECK:  [[TUPLE:%.*]] = apply %4(%2, %3) : $@noescape @callee_guaranteed (@guaranteed String, @guaranteed String) -> (@owned String, @owned String)
 // CHECK:  ([[LHS:%.*]], [[RHS:%.*]]) = destructure_tuple [[TUPLE]]
 // CHECK:  [[ADDR:%.*]] = alloc_stack $String
diff --git a/test/SILGen/function_conversion_objc.swift b/test/SILGen/function_conversion_objc.swift
index 78e659a..2e68e4b 100644
--- a/test/SILGen/function_conversion_objc.swift
+++ b/test/SILGen/function_conversion_objc.swift
@@ -4,14 +4,14 @@
 
 // ==== Metatype to object conversions
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc20convMetatypeToObjectyySo8NSObjectCmADcF
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc20convMetatypeToObjectyySo8NSObjectCmADcF
 func convMetatypeToObject(_ f: @escaping (NSObject) -> NSObject.Type) {
 // CHECK:         function_ref @$sSo8NSObjectCABXMTIeggd_AByXlIeggo_TR
 // CHECK:         partial_apply
   let _: (NSObject) -> AnyObject = f
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSo8NSObjectCABXMTIeggd_AByXlIeggo_TR : $@convention(thin) (@guaranteed NSObject, @guaranteed @callee_guaranteed (@guaranteed NSObject) -> @thick NSObject.Type) -> @owned AnyObject {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSo8NSObjectCABXMTIeggd_AByXlIeggo_TR : $@convention(thin) (@guaranteed NSObject, @guaranteed @callee_guaranteed (@guaranteed NSObject) -> @thick NSObject.Type) -> @owned AnyObject {
 // CHECK:         apply %1(%0)
 // CHECK:         thick_to_objc_metatype {{.*}} : $@thick NSObject.Type to $@objc_metatype NSObject.Type
 // CHECK:         objc_metatype_to_object {{.*}} : $@objc_metatype NSObject.Type to $AnyObject
@@ -19,27 +19,27 @@
 
 @objc protocol NSBurrito {}
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc31convExistentialMetatypeToObjectyyAA9NSBurrito_pXpAaC_pcF
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc31convExistentialMetatypeToObjectyyAA9NSBurrito_pXpAaC_pcF
 func convExistentialMetatypeToObject(_ f: @escaping (NSBurrito) -> NSBurrito.Type) {
 // CHECK:         function_ref @$s24function_conversion_objc9NSBurrito_pAaB_pXmTIeggd_AaB_pyXlIeggo_TR
 // CHECK:         partial_apply
   let _: (NSBurrito) -> AnyObject = f
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s24function_conversion_objc9NSBurrito_pAaB_pXmTIeggd_AaB_pyXlIeggo_TR : $@convention(thin) (@guaranteed NSBurrito, @guaranteed @callee_guaranteed (@guaranteed NSBurrito) -> @thick NSBurrito.Type) -> @owned AnyObject
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s24function_conversion_objc9NSBurrito_pAaB_pXmTIeggd_AaB_pyXlIeggo_TR : $@convention(thin) (@guaranteed NSBurrito, @guaranteed @callee_guaranteed (@guaranteed NSBurrito) -> @thick NSBurrito.Type) -> @owned AnyObject
 // CHECK:         apply %1(%0)
 // CHECK:         thick_to_objc_metatype {{.*}} : $@thick NSBurrito.Type to $@objc_metatype NSBurrito.Type
 // CHECK:         objc_existential_metatype_to_object {{.*}} : $@objc_metatype NSBurrito.Type to $AnyObject
 // CHECK:         return
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc28convProtocolMetatypeToObjectyyAA9NSBurrito_pmycF
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc28convProtocolMetatypeToObjectyyAA9NSBurrito_pmycF
 func convProtocolMetatypeToObject(_ f: @escaping () -> NSBurrito.Protocol) {
 // CHECK:         function_ref @$s24function_conversion_objc9NSBurrito_pXMtIegd_So8ProtocolCIego_TR
 // CHECK:         partial_apply
   let _: () -> Protocol = f
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s24function_conversion_objc9NSBurrito_pXMtIegd_So8ProtocolCIego_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> @thin NSBurrito.Protocol) -> @owned Protocol
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s24function_conversion_objc9NSBurrito_pXMtIegd_So8ProtocolCIego_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> @thin NSBurrito.Protocol) -> @owned Protocol
 // CHECK:         apply %0() : $@callee_guaranteed () -> @thin NSBurrito.Protocol
 // CHECK:         objc_protocol #NSBurrito : $Protocol
 // CHECK:         copy_value
@@ -47,7 +47,7 @@
 
 // ==== Representation conversions
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc11funcToBlockyyyXByycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @convention(block) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc11funcToBlockyyyXByycF : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> @owned @convention(block) () -> ()
 // CHECK:         [[BLOCK_STORAGE:%.*]] = alloc_stack $@block_storage
 // CHECK:         [[BLOCK:%.*]] = init_block_storage_header [[BLOCK_STORAGE]]
 // CHECK:         [[COPY:%.*]] = copy_block [[BLOCK]] : $@convention(block) () -> ()
@@ -56,7 +56,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc11blockToFuncyyycyyXBF : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> @owned @callee_guaranteed () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc11blockToFuncyyycyyXBF : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> @owned @callee_guaranteed () -> ()
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $@convention(block) () -> ()):
 // CHECK:   [[COPIED:%.*]] = copy_block [[ARG]]
 // CHECK:   [[BORROWED_COPIED:%.*]] = begin_borrow [[COPIED]]
@@ -73,7 +73,7 @@
 
 // ==== Representation change + function type conversion
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc22blockToFuncExistentialyypycSiyXBF : $@convention(thin) (@guaranteed @convention(block) () -> Int) -> @owned @callee_guaranteed () -> @out Any
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc22blockToFuncExistentialyypycSiyXBF : $@convention(thin) (@guaranteed @convention(block) () -> Int) -> @owned @callee_guaranteed () -> @out Any
 // CHECK:         function_ref @$sSiIeyBd_SiIegd_TR
 // CHECK:         partial_apply
 // CHECK:         function_ref @$sSiIegd_ypIegr_TR
@@ -83,16 +83,16 @@
   return x
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSiIeyBd_SiIegd_TR : $@convention(thin) (@guaranteed @convention(block) () -> Int) -> Int
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSiIeyBd_SiIegd_TR : $@convention(thin) (@guaranteed @convention(block) () -> Int) -> Int
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSiIegd_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> Int) -> @out Any
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSiIegd_ypIegr_TR : $@convention(thin) (@guaranteed @callee_guaranteed () -> Int) -> @out Any
 
 // C function pointer conversions
 
 class A : NSObject {}
 class B : A {}
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc18cFuncPtrConversionyyAA1BCXCyAA1ACXCF
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc18cFuncPtrConversionyyAA1BCXCyAA1ACXCF
 func cFuncPtrConversion(_ x: @escaping @convention(c) (A) -> ()) -> @convention(c) (B) -> () {
 // CHECK:         convert_function %0 : $@convention(c) (A) -> () to $@convention(c) (B) -> ()
 // CHECK:         return
@@ -101,7 +101,7 @@
 
 func cFuncPtr(_ a: A) {}
 
-// CHECK-LABEL: sil hidden @$s24function_conversion_objc19cFuncDeclConversionyAA1BCXCyF
+// CHECK-LABEL: sil hidden [ossa] @$s24function_conversion_objc19cFuncDeclConversionyAA1BCXCyF
 func cFuncDeclConversion() -> @convention(c) (B) -> () {
 // CHECK:         function_ref @$s24function_conversion_objc8cFuncPtryyAA1ACFTo : $@convention(c) (A) -> ()
 // CHECK:         convert_function %0 : $@convention(c) (A) -> () to $@convention(c) (B) -> ()
diff --git a/test/SILGen/function_conversion_se0110.swift b/test/SILGen/function_conversion_se0110.swift
index e952453..ee87725 100644
--- a/test/SILGen/function_conversion_se0110.swift
+++ b/test/SILGen/function_conversion_se0110.swift
@@ -12,7 +12,7 @@
 }
 
 // reabstraction thunk helper from @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any) -> () to @escaping @callee_guaranteed (@unowned Swift.Int, @unowned Swift.Int) -> ()
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypypIgnn_S2iIegyy_TR : $@convention(thin) (Int, Int, @noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypypIgnn_S2iIegyy_TR : $@convention(thin) (Int, Int, @noescape @callee_guaranteed (@in_guaranteed Any, @in_guaranteed Any) -> ()) -> ()
 
 
 func takesTwoGeneric<T>(_: (T) -> ()) -> T {}
@@ -22,7 +22,7 @@
 }
 
 // reabstraction thunk helper from @callee_guaranteed (@unowned Swift.Int, @unowned Swift.Int) -> () to @escaping @callee_guaranteed (@in_guaranteed (Swift.Int, Swift.Int)) -> ()
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIgyy_Si_SitIegn_TR : $@convention(thin) (@in_guaranteed (Int, Int), @noescape @callee_guaranteed (Int, Int) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIgyy_Si_SitIegn_TR : $@convention(thin) (@in_guaranteed (Int, Int), @noescape @callee_guaranteed (Int, Int) -> ()) -> ()
 
 
 // Use a silly trick to bind T := (Int, Int) here
@@ -35,21 +35,21 @@
 }
 
 // reabstraction thunk helper from @callee_guaranteed () -> () to @escaping @callee_guaranteed (@in_guaranteed ()) -> ()
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIg_ytIegn_TR : $@convention(thin) (@in_guaranteed (), @noescape @callee_guaranteed () -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIg_ytIegn_TR : $@convention(thin) (@in_guaranteed (), @noescape @callee_guaranteed () -> ()) -> ()
 
 
 // "Tuple splat" still works if there are __owned parameters.
 // Make sure the memory management is correct also.
 
-// CHECK-LABEL: sil hidden @$s19function_conversion17takesTwoAnyObjectyyyyXl_yXlt_tXEF : $@convention(thin) (@noescape @callee_guaranteed (@guaranteed AnyObject, @guaranteed AnyObject) -> ()) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion17takesTwoAnyObjectyyyyXl_yXlt_tXEF : $@convention(thin) (@noescape @callee_guaranteed (@guaranteed AnyObject, @guaranteed AnyObject) -> ()) -> ()
 func takesTwoAnyObject(_: ((AnyObject, AnyObject)) -> ()) {}
 
-// CHECK-LABEL: sil hidden @$s19function_conversion22givesTwoAnyObjectOwnedyyyyXln_yXlntXEF : $@convention(thin) (@noescape @callee_guaranteed (@owned AnyObject, @owned AnyObject) -> ()) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s19function_conversion22givesTwoAnyObjectOwnedyyyyXln_yXlntXEF : $@convention(thin) (@noescape @callee_guaranteed (@owned AnyObject, @owned AnyObject) -> ()) -> ()
 func givesTwoAnyObjectOwned(_ fn: (__owned AnyObject, __owned AnyObject) -> ()) {
   takesTwoAnyObject(fn)
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$syXlyXlIgxx_yXlyXlIeggg_TR : $@convention(thin) (@guaranteed AnyObject, @guaranteed AnyObject, @noescape @callee_guaranteed (@owned AnyObject, @owned AnyObject) -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$syXlyXlIgxx_yXlyXlIeggg_TR : $@convention(thin) (@guaranteed AnyObject, @guaranteed AnyObject, @noescape @callee_guaranteed (@owned AnyObject, @owned AnyObject) -> ()) -> () {
 // CHECK: bb0(%0 : @guaranteed $AnyObject, %1 : @guaranteed $AnyObject, %2 : $@noescape @callee_guaranteed (@owned AnyObject, @owned AnyObject) -> ()):
 // CHECK-NEXT: [[FIRST:%.*]] = copy_value %0
 // CHECK-NEXT: [[SECOND:%.*]] = copy_value %1
diff --git a/test/SILGen/functions.swift b/test/SILGen/functions.swift
index 2a6d067..e26dfaf 100644
--- a/test/SILGen/functions.swift
+++ b/test/SILGen/functions.swift
@@ -41,18 +41,18 @@
   // -- Constructors and methods are uncurried in 'self'
   // -- Instance methods use 'method' cc
 
-  // CHECK-LABEL: sil hidden @$s9functions9SomeClassC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (Builtin.Int64, Builtin.Int64, @thick SomeClass.Type) -> @owned SomeClass
+  // CHECK-LABEL: sil hidden [ossa] @$s9functions9SomeClassC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (Builtin.Int64, Builtin.Int64, @thick SomeClass.Type) -> @owned SomeClass
   // CHECK: bb0(%0 : $Builtin.Int64, %1 : $Builtin.Int64, %2 : $@thick SomeClass.Type):
 
-  // CHECK-LABEL: sil hidden @$s9functions9SomeClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Builtin.Int64, Builtin.Int64, @owned SomeClass) -> @owned SomeClass
+  // CHECK-LABEL: sil hidden [ossa] @$s9functions9SomeClassC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (Builtin.Int64, Builtin.Int64, @owned SomeClass) -> @owned SomeClass
   // CHECK: bb0(%0 : $Builtin.Int64, %1 : $Builtin.Int64, %2 : @owned $SomeClass):
   init(x:Int, y:Int) {}
 
-  // CHECK-LABEL: sil hidden @$s9functions9SomeClassC6method{{[_0-9a-zA-Z]*}}F : $@convention(method) (Builtin.Int64, @guaranteed SomeClass) -> () 
+  // CHECK-LABEL: sil hidden [ossa] @$s9functions9SomeClassC6method{{[_0-9a-zA-Z]*}}F : $@convention(method) (Builtin.Int64, @guaranteed SomeClass) -> () 
   // CHECK: bb0(%0 : $Builtin.Int64, %1 : @guaranteed $SomeClass):
   func method(_ x: Int) {}
 
-  // CHECK-LABEL: sil hidden @$s9functions9SomeClassC13static_method{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (Builtin.Int64, @thick SomeClass.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s9functions9SomeClassC13static_method{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (Builtin.Int64, @thick SomeClass.Type) -> ()
   // CHECK: bb0(%0 : $Builtin.Int64, %1 : $@thick SomeClass.Type):
   class func static_method(_ x: Int) {}
 
@@ -96,7 +96,7 @@
   func generic<U>(_ x: U) -> U { return x }
 }
 
-// CHECK-LABEL: sil hidden @$s9functions5calls{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int64, Builtin.Int64, Builtin.Int64) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s9functions5calls{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int64, Builtin.Int64, Builtin.Int64) -> ()
 func calls(_ i:Int, j:Int, k:Int) {
   var i = i
   var j = j
@@ -355,12 +355,12 @@
 }
 
 // -- Curried entry points
-// CHECK-LABEL: sil shared [thunk] @$s9functions10SomeStructV6method{{[_0-9a-zA-Z]*}}FTc : $@convention(thin) (@inout SomeStruct) -> @owned @callee_guaranteed (Builtin.Int64) -> () {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s9functions10SomeStructV6method{{[_0-9a-zA-Z]*}}FTc : $@convention(thin) (@inout SomeStruct) -> @owned @callee_guaranteed (Builtin.Int64) -> () {
 // CHECK:   [[UNCURRIED:%.*]] = function_ref @$s9functions10SomeStructV6method{{[_0-9a-zA-Z]*}}F : $@convention(method) (Builtin.Int64, @inout SomeStruct) -> (){{.*}} // user: %2
 // CHECK:   [[CURRIED:%.*]] = partial_apply [callee_guaranteed] [[UNCURRIED]]
 // CHECK:   return [[CURRIED]]
 
-// CHECK-LABEL: sil shared [thunk] @$s9functions9SomeClassC6method{{[_0-9a-zA-Z]*}}FTc : $@convention(thin) (@guaranteed SomeClass) -> @owned @callee_guaranteed (Builtin.Int64) -> ()
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s9functions9SomeClassC6method{{[_0-9a-zA-Z]*}}FTc : $@convention(thin) (@guaranteed SomeClass) -> @owned @callee_guaranteed (Builtin.Int64) -> ()
 // CHECK: bb0(%0 : @guaranteed $SomeClass):
 // CHECK:   class_method %0 : $SomeClass, #SomeClass.method!1 : (SomeClass) -> (Builtin.Int64) -> ()
 // CHECK:   %2 = copy_value %0 : $SomeClass
@@ -376,7 +376,7 @@
 
 func standalone_generic<T>(_ x: T, y: T) -> T { return x }
 
-// CHECK-LABEL: sil hidden @$s9functions14return_genericBi64_Bi64__Bi64_tcyF
+// CHECK-LABEL: sil hidden [ossa] @$s9functions14return_genericBi64_Bi64__Bi64_tcyF
 func return_generic() -> (_ x:Builtin.Int64, _ y:Builtin.Int64) -> Builtin.Int64 {
   // CHECK: [[GEN:%.*]] = function_ref @$s9functions18standalone_generic{{[_0-9a-zA-Z]*}}F : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> @out τ_0_0
   // CHECK: [[SPEC:%.*]] = partial_apply [callee_guaranteed] [[GEN]]<Builtin.Int64>()
@@ -386,7 +386,7 @@
   return standalone_generic
 }
 
-// CHECK-LABEL: sil hidden @$s9functions20return_generic_tuple{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9functions20return_generic_tuple{{[_0-9a-zA-Z]*}}F
 func return_generic_tuple()
 -> (_ x: (Builtin.Int64, Builtin.Int64), _ y: (Builtin.Int64, Builtin.Int64)) -> (Builtin.Int64, Builtin.Int64) {
   // CHECK: [[GEN:%.*]] = function_ref @$s9functions18standalone_generic{{[_0-9a-zA-Z]*}}F  : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> @out τ_0_0
@@ -397,62 +397,62 @@
   return standalone_generic
 }
 
-// CHECK-LABEL: sil hidden @$s9functions16testNoReturnAttrs5NeverOyF : $@convention(thin) () -> Never
+// CHECK-LABEL: sil hidden [ossa] @$s9functions16testNoReturnAttrs5NeverOyF : $@convention(thin) () -> Never
 func testNoReturnAttr() -> Never {}
-// CHECK-LABEL: sil hidden @$s9functions20testNoReturnAttrPoly{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@in_guaranteed T) -> Never
+// CHECK-LABEL: sil hidden [ossa] @$s9functions20testNoReturnAttrPoly{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@in_guaranteed T) -> Never
 func testNoReturnAttrPoly<T>(_ x: T) -> Never {}
 
-// CHECK-LABEL: sil hidden @$s9functions21testNoReturnAttrParam{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@noescape @callee_guaranteed () -> Never) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s9functions21testNoReturnAttrParam{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@noescape @callee_guaranteed () -> Never) -> ()
 func testNoReturnAttrParam(_ fptr: () -> Never) -> () {}
 
-// CHECK-LABEL: sil hidden [transparent] @$s9functions15testTransparent{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int1) -> Builtin.Int1
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s9functions15testTransparent{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int1) -> Builtin.Int1
 @_transparent func testTransparent(_ x: Bool) -> Bool {
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s9functions16applyTransparent{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int1) -> Builtin.Int1 {
+// CHECK-LABEL: sil hidden [ossa] @$s9functions16applyTransparent{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int1) -> Builtin.Int1 {
 func applyTransparent(_ x: Bool) -> Bool {
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s9functions15testTransparent{{[_0-9a-zA-Z]*}}F : $@convention(thin) (Builtin.Int1) -> Builtin.Int1
   // CHECK: apply [[FUNC]]({{%[0-9]+}}) : $@convention(thin) (Builtin.Int1) -> Builtin.Int1
   return testTransparent(x)
 }
 
-// CHECK-LABEL: sil hidden [noinline] @$s9functions15noinline_calleeyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [noinline] [ossa] @$s9functions15noinline_calleeyyF : $@convention(thin) () -> ()
 @inline(never)
 func noinline_callee() {}
 
-// CHECK-LABEL: sil hidden [Onone] @$s9functions10onone_funcyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [Onone] [ossa] @$s9functions10onone_funcyyF : $@convention(thin) () -> ()
 @_optimize(none)
 func onone_func() {}
 
-// CHECK-LABEL: sil hidden [Ospeed] @$s9functions11ospeed_funcyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [Ospeed] [ossa] @$s9functions11ospeed_funcyyF : $@convention(thin) () -> ()
 @_optimize(speed)
 func ospeed_func() {}
 
-// CHECK-LABEL: sil hidden [Osize] @$s9functions10osize_funcyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [Osize] [ossa] @$s9functions10osize_funcyyF : $@convention(thin) () -> ()
 @_optimize(size)
 func osize_func() {}
 
 struct OptmodeTestStruct {
 
-  // CHECK-LABEL: sil hidden [Ospeed] @$s9functions17OptmodeTestStructV3fooyyF :
+  // CHECK-LABEL: sil hidden [Ospeed] [ossa] @$s9functions17OptmodeTestStructV3fooyyF :
   @_optimize(speed)
   func foo() { }
 
-  // CHECK-LABEL: sil hidden [Ospeed] @$s9functions17OptmodeTestStructVACycfC :
+  // CHECK-LABEL: sil hidden [Ospeed] [ossa] @$s9functions17OptmodeTestStructVACycfC :
   @_optimize(speed)
   init() { }
 
-  // CHECK-LABEL: sil hidden [Ospeed] @$s9functions17OptmodeTestStructV1xBi64_vg :
+  // CHECK-LABEL: sil hidden [Ospeed] [ossa] @$s9functions17OptmodeTestStructV1xBi64_vg :
   @_optimize(speed)
   var x: Int { return getInt() }
 
-  // CHECK-LABEL: sil hidden [Ospeed] @$s9functions17OptmodeTestStructVyBi64_Bi64_cig :
+  // CHECK-LABEL: sil hidden [Ospeed] [ossa] @$s9functions17OptmodeTestStructVyBi64_Bi64_cig :
   @_optimize(speed)
   subscript(l: Int) -> Int { return getInt() }
 }
 
-// CHECK-LABEL: sil hidden [_semantics "foo"] @$s9functions9semanticsyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [_semantics "foo"] [ossa] @$s9functions9semanticsyyF : $@convention(thin) () -> ()
 @_semantics("foo")
 func semantics() {}
 
@@ -466,7 +466,7 @@
 }
 
 // The curry thunk for the method should not include a class_method instruction.
-// CHECK-LABEL: sil shared [thunk] @$s9functions14r17828355ClassC6method
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s9functions14r17828355ClassC6method
 // CHECK: bb0(%0 : @guaranteed $r17828355Class):
 // CHECK-NEXT: // function_ref functions.r17828355Class.method(Builtin.Int64) -> ()
 // CHECK-NEXT:  %1 = function_ref @$s9functions14r17828355ClassC6method{{[_0-9a-zA-Z]*}}F : $@convention(method) (Builtin.Int64, @guaranteed r17828355Class) -> ()
@@ -491,14 +491,14 @@
 }
 
 // CHECK-LABEL: functions.testNoescape() -> ()
-// CHECK-NEXT: sil hidden @$s9functions12testNoescapeyyF : $@convention(thin) () -> ()
+// CHECK-NEXT: sil hidden [ossa] @$s9functions12testNoescapeyyF : $@convention(thin) () -> ()
 // CHECK: function_ref closure #1 () -> () in functions.testNoescape() -> ()
 // CHECK-NEXT: function_ref @$s9functions12testNoescapeyyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> ()
 
 // Despite being a noescape closure, this needs to capture 'a' by-box so it can
 // be passed to the capturing closure.closure
 // CHECK: closure #1 () -> () in functions.testNoescape() -> ()
-// CHECK-NEXT: sil private @$s9functions12testNoescapeyyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
+// CHECK-NEXT: sil private [ossa] @$s9functions12testNoescapeyyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
 
 
 
@@ -515,42 +515,10 @@
   markUsed(a)
 }
 
-// CHECK-LABEL: sil hidden @$s9functions13testNoescape2yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s9functions13testNoescape2yyF : $@convention(thin) () -> () {
 
 // CHECK: // closure #1 () -> () in functions.testNoescape2() -> ()
-// CHECK-NEXT: sil private @$s9functions13testNoescape2yyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
+// CHECK-NEXT: sil private [ossa] @$s9functions13testNoescape2yyFyyXEfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
 
 // CHECK: // closure #1 () -> () in closure #1 () -> () in functions.testNoescape2() -> ()
-// CHECK-NEXT: sil private @$s9functions13testNoescape2yyFyyXEfU_yycfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
-
-enum PartialApplyEnumPayload<T, U> {
-  case Left(T)
-  case Right(U)
-}
-
-struct S {}
-struct C {}
-
-func partialApplyEnumCases(_ x: S, y: C) {
-  let left = PartialApplyEnumPayload<S, C>.Left
-  let left2 = left(S())
-
-  let right = PartialApplyEnumPayload<S, C>.Right
-  let right2 = right(C())
-}
-
-// CHECK-LABEL: sil shared [transparent] [thunk] @$s9functions23PartialApplyEnumPayloadO4Left{{[_0-9a-zA-Z]*}}F
-// CHECK:         [[UNCURRIED:%.*]] = function_ref @$s9functions23PartialApplyEnumPayloadO4Left{{[_0-9a-zA-Z]*}}F
-// CHECK:         [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[UNCURRIED]]<T, U>(%0)
-// CHECK:         [[CANONICAL_THUNK:%.*]] = function_ref @$sx9functions23PartialApplyEnumPayloadOyxq_GIegir_xADIegnr_r0_lTR : $@convention(thin) <τ_0_0, τ_0_1> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in τ_0_0) -> @out PartialApplyEnumPayload<τ_0_0, τ_0_1>) -> @out PartialApplyEnumPayload<τ_0_0, τ_0_1>
-// CHECK:         [[THUNKED_CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[CANONICAL_THUNK]]<T, U>([[CLOSURE]])
-// CHECK:         return [[THUNKED_CLOSURE]]
-// CHECK: } // end sil function '$s9functions23PartialApplyEnumPayloadO4Left{{[_0-9a-zA-Z]*}}F'
-
-// CHECK-LABEL: sil shared [transparent] [thunk] @$s9functions23PartialApplyEnumPayloadO5Right{{[_0-9a-zA-Z]*}}F
-// CHECK:         [[UNCURRIED:%.*]] = function_ref @$s9functions23PartialApplyEnumPayloadO5Right{{[_0-9a-zA-Z]*}}F
-// CHECK:         [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[UNCURRIED]]<T, U>(%0)
-// CHECK:         [[CANONICAL_THUNK:%.*]] = function_ref @$sq_9functions23PartialApplyEnumPayloadOyxq_GIegir_q_ADIegnr_r0_lTR : $@convention(thin) <τ_0_0, τ_0_1> (@in_guaranteed τ_0_1, @guaranteed @callee_guaranteed (@in τ_0_1) -> @out PartialApplyEnumPayload<τ_0_0, τ_0_1>) -> @out PartialApplyEnumPayload<τ_0_0, τ_0_1>
-// CHECK:         [[THUNKED_CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[CANONICAL_THUNK]]<T, U>([[CLOSURE]])
-// CHECK:         return [[THUNKED_CLOSURE]]
-// CHECK: } // end sil function '$s9functions23PartialApplyEnumPayloadO5Right{{[_0-9a-zA-Z]*}}F'
+// CHECK-NEXT: sil private [ossa] @$s9functions13testNoescape2yyFyyXEfU_yycfU_ : $@convention(thin) (@guaranteed { var Int }) -> () {
diff --git a/test/SILGen/generic_casts.swift b/test/SILGen/generic_casts.swift
index 061fa8d..52beabc 100644
--- a/test/SILGen/generic_casts.swift
+++ b/test/SILGen/generic_casts.swift
@@ -8,7 +8,7 @@
 struct S : NotClassBound {}
 struct Unloadable : NotClassBound { var x : NotClassBound }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts020opaque_archetype_to_c1_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts020opaque_archetype_to_c1_D0{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_to_opaque_archetype
 <T:NotClassBound, U>(_ t:T) -> U {
   return t as! U
@@ -16,7 +16,7 @@
   // CHECK:   unconditional_checked_cast_addr T in {{%.*}} : $*T to U in [[RET]] : $*U
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts020opaque_archetype_is_c1_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts020opaque_archetype_is_c1_D0{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_is_opaque_archetype
 <T:NotClassBound, U>(_ t:T, u:U.Type) -> Bool {
   return t is U
@@ -37,7 +37,7 @@
   // CHECK:   return [[RES]] : $Bool
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts026opaque_archetype_to_class_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts026opaque_archetype_to_class_D0{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_to_class_archetype
 <T:NotClassBound, U:ClassBound> (_ t:T) -> U {
   return t as! U
@@ -46,7 +46,7 @@
   // CHECK: return [[DOWNCAST]] : $U
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts026opaque_archetype_is_class_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts026opaque_archetype_is_class_D0{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_is_class_archetype
 <T:NotClassBound, U:ClassBound> (_ t:T, u:U.Type) -> Bool {
   return t is U
@@ -54,7 +54,7 @@
   // CHECK: checked_cast_addr_br take_always T in [[VAL:%.*]] : {{.*}} to U
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts019class_archetype_to_c1_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts019class_archetype_to_c1_D0{{[_0-9a-zA-Z]*}}F
 func class_archetype_to_class_archetype
 <T:ClassBound, U:ClassBound>(_ t:T) -> U {
   return t as! U
@@ -64,7 +64,7 @@
   // CHECK: return [[DOWNCAST]] : $U
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts019class_archetype_is_c1_D0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts019class_archetype_is_c1_D0{{[_0-9a-zA-Z]*}}F
 func class_archetype_is_class_archetype
 <T:ClassBound, U:ClassBound>(_ t:T, u:U.Type) -> Bool {
   return t is U
@@ -72,7 +72,7 @@
   // CHECK: checked_cast_addr_br {{.*}} T in {{%.*}} : $*T to U in {{%.*}} : $*U
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts38opaque_archetype_to_addr_only_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts38opaque_archetype_to_addr_only_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_to_addr_only_concrete
 <T:NotClassBound> (_ t:T) -> Unloadable {
   return t as! Unloadable
@@ -80,14 +80,14 @@
   // CHECK:   unconditional_checked_cast_addr T in {{%.*}} : $*T to Unloadable in [[RET]] : $*Unloadable
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts38opaque_archetype_is_addr_only_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts38opaque_archetype_is_addr_only_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_is_addr_only_concrete
 <T:NotClassBound> (_ t:T) -> Bool {
   return t is Unloadable
   // CHECK: checked_cast_addr_br take_always T in [[VAL:%.*]] : {{.*}} to Unloadable in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts37opaque_archetype_to_loadable_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts37opaque_archetype_to_loadable_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_to_loadable_concrete
 <T:NotClassBound>(_ t:T) -> S {
   return t as! S
@@ -96,14 +96,14 @@
   // CHECK: return [[DOWNCAST]] : $S
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts37opaque_archetype_is_loadable_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts37opaque_archetype_is_loadable_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_archetype_is_loadable_concrete
 <T:NotClassBound>(_ t:T) -> Bool {
   return t is S
   // CHECK: checked_cast_addr_br take_always T in {{%.*}} : $*T to S in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts019class_archetype_to_C0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts019class_archetype_to_C0{{[_0-9a-zA-Z]*}}F
 func class_archetype_to_class
 <T:ClassBound>(_ t:T) -> C {
   return t as! C
@@ -111,14 +111,14 @@
   // CHECK: return [[DOWNCAST]] : $C
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts019class_archetype_is_C0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts019class_archetype_is_C0{{[_0-9a-zA-Z]*}}F
 func class_archetype_is_class
 <T:ClassBound>(_ t:T) -> Bool {
   return t is C
   // CHECK: checked_cast_br {{%.*}} to $C
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts022opaque_existential_to_C10_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts022opaque_existential_to_C10_archetype{{[_0-9a-zA-Z]*}}F
 func opaque_existential_to_opaque_archetype
 <T:NotClassBound>(_ p:NotClassBound) -> T {
   return p as! T
@@ -131,14 +131,14 @@
   // CHECK-NEXT: return [[T0]]
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts022opaque_existential_is_C10_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts022opaque_existential_is_C10_archetype{{[_0-9a-zA-Z]*}}F
 func opaque_existential_is_opaque_archetype
 <T:NotClassBound>(_ p:NotClassBound, _: T) -> Bool {
   return p is T
   // CHECK:   checked_cast_addr_br take_always NotClassBound in [[CONTAINER:%.*]] : {{.*}} to T in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts37opaque_existential_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts37opaque_existential_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func opaque_existential_to_class_archetype
 <T:ClassBound>(_ p:NotClassBound) -> T {
   return p as! T
@@ -147,14 +147,14 @@
   // CHECK: return [[DOWNCAST]] : $T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts37opaque_existential_is_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts37opaque_existential_is_class_archetype{{[_0-9a-zA-Z]*}}F
 func opaque_existential_is_class_archetype
 <T:ClassBound>(_ p:NotClassBound, _: T) -> Bool {
   return p is T
   // CHECK: checked_cast_addr_br take_always NotClassBound in {{%.*}} : $*NotClassBound to T in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts021class_existential_to_C10_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts021class_existential_to_C10_archetype{{[_0-9a-zA-Z]*}}F
 func class_existential_to_class_archetype
 <T:ClassBound>(_ p:ClassBound) -> T {
   return p as! T
@@ -163,27 +163,27 @@
   // CHECK: return [[DOWNCAST]] : $T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts021class_existential_is_C10_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts021class_existential_is_C10_archetype{{[_0-9a-zA-Z]*}}F
 func class_existential_is_class_archetype
 <T:ClassBound>(_ p:ClassBound, _: T) -> Bool {
   return p is T
   // CHECK: checked_cast_addr_br {{.*}} ClassBound in {{%.*}} : $*ClassBound to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts40opaque_existential_to_addr_only_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts40opaque_existential_to_addr_only_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_existential_to_addr_only_concrete(_ p: NotClassBound) -> Unloadable {
   return p as! Unloadable
   // CHECK: bb0([[RET:%.*]] : $*Unloadable, {{%.*}}: $*NotClassBound):
   // CHECK:   unconditional_checked_cast_addr NotClassBound in {{%.*}} : $*NotClassBound to Unloadable in [[RET]] : $*Unloadable
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts40opaque_existential_is_addr_only_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts40opaque_existential_is_addr_only_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_existential_is_addr_only_concrete(_ p: NotClassBound) -> Bool {
   return p is Unloadable
   // CHECK:   checked_cast_addr_br take_always NotClassBound in {{%.*}} : $*NotClassBound to Unloadable in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts39opaque_existential_to_loadable_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts39opaque_existential_to_loadable_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_existential_to_loadable_concrete(_ p: NotClassBound) -> S {
   return p as! S
   // CHECK:   unconditional_checked_cast_addr NotClassBound in {{%.*}} : $*NotClassBound to S in [[DOWNCAST_ADDR:%.*]] : $*S
@@ -191,26 +191,26 @@
   // CHECK: return [[DOWNCAST]] : $S
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts39opaque_existential_is_loadable_concrete{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts39opaque_existential_is_loadable_concrete{{[_0-9a-zA-Z]*}}F
 func opaque_existential_is_loadable_concrete(_ p: NotClassBound) -> Bool {
   return p is S
   // CHECK: checked_cast_addr_br take_always NotClassBound in {{%.*}} : $*NotClassBound to S in
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts021class_existential_to_C0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts021class_existential_to_C0{{[_0-9a-zA-Z]*}}F
 func class_existential_to_class(_ p: ClassBound) -> C {
   return p as! C
   // CHECK: [[DOWNCAST:%.*]] = unconditional_checked_cast {{%.*}} to $C
   // CHECK: return [[DOWNCAST]] : $C
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts021class_existential_is_C0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts021class_existential_is_C0{{[_0-9a-zA-Z]*}}F
 func class_existential_is_class(_ p: ClassBound) -> Bool {
   return p is C
   // CHECK: checked_cast_br {{%.*}} to $C
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts27optional_anyobject_to_classyAA1CCSgyXlSgF
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts27optional_anyobject_to_classyAA1CCSgyXlSgF
 func optional_anyobject_to_class(_ p: AnyObject?) -> C? {
   return p as? C
   // CHECK: checked_cast_br {{%.*}} : $AnyObject to $C
@@ -219,20 +219,20 @@
 // The below tests are to ensure we don't dig into an optional operand when
 // casting to a non-class archetype, as it could dynamically be an optional type.
 
-// CHECK-LABEL: sil hidden @$s13generic_casts32optional_any_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts32optional_any_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_opaque_archetype<T>(_ x: Any?) -> T {
   return x as! T
   // CHECK: bb0([[RET:%.*]] : $*T, {{%.*}} : $*Optional<Any>):
   // CHECK: unconditional_checked_cast_addr Optional<Any> in {{%.*}} : $*Optional<Any> to T in [[RET]] : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts46optional_any_conditionally_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts46optional_any_conditionally_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_opaque_archetype<T>(_ x: Any?) -> T? {
   return x as? T
   // CHECK: checked_cast_addr_br take_always Optional<Any> in {{%.*}} : $*Optional<Any> to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts32optional_any_is_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts32optional_any_is_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_opaque_archetype<T>(_ x: Any?, _: T) -> Bool {
   return x is T
   // CHECK: checked_cast_addr_br take_always Optional<Any> in {{%.*}} : $*Optional<Any> to T in {{%.*}} : $*T
@@ -241,19 +241,19 @@
 // But we can dig into at most one layer of the operand if it's
 // an optional archetype...
 
-// CHECK-LABEL: sil hidden @$s13generic_casts016optional_any_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts016optional_any_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_optional_opaque_archetype<T>(_ x: Any?) -> T? {
   return x as! T?
   // CHECK: unconditional_checked_cast_addr Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts030optional_any_conditionally_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts030optional_any_conditionally_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_optional_opaque_archetype<T>(_ x: Any?) -> T?? {
   return x as? T?
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts016optional_any_is_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts016optional_any_is_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_optional_opaque_archetype<T>(_ x: Any?, _: T) -> Bool {
   return x is T?
   //   Because the levels of optional are the same, 'is' doesn't transform into an 'as?',
@@ -264,19 +264,19 @@
 // And we can dig into the operand when casting to a class archetype, as it
 // cannot dynamically be optional...
 
-// CHECK-LABEL: sil hidden @$s13generic_casts31optional_any_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts31optional_any_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_class_archetype<T : AnyObject>(_ x: Any?) -> T {
   return x as! T
   // CHECK: unconditional_checked_cast_addr Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts45optional_any_conditionally_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts45optional_any_conditionally_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_class_archetype<T : AnyObject>(_ x: Any?) -> T? {
   return x as? T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts31optional_any_is_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts31optional_any_is_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_class_archetype<T : AnyObject>(_ x: Any?, _: T) -> Bool {
   return x is T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
diff --git a/test/SILGen/generic_casts_swift4.swift b/test/SILGen/generic_casts_swift4.swift
index 4e08812..07a72c2 100644
--- a/test/SILGen/generic_casts_swift4.swift
+++ b/test/SILGen/generic_casts_swift4.swift
@@ -5,38 +5,38 @@
 // behaviour when casting to an archetype – the compiler assumes a non-optional
 // archetype is non-optional, and therefore can unwrap the source.
 
-// CHECK-LABEL: sil hidden @$s13generic_casts32optional_any_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts32optional_any_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_opaque_archetype<T>(_ x: Any?) -> T {
   return x as! T
   // CHECK: bb0([[RET:%.*]] : $*T, {{%.*}} : $*Optional<Any>):
   // CHECK: unconditional_checked_cast_addr Any in {{%.*}} : $*Any to T in [[RET]] : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts46optional_any_conditionally_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts46optional_any_conditionally_to_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_opaque_archetype<T>(_ x: Any?) -> T? {
   return x as? T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts32optional_any_is_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts32optional_any_is_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_opaque_archetype<T>(_ x: Any?, _: T) -> Bool {
   return x is T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts016optional_any_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts016optional_any_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_optional_opaque_archetype<T>(_ x: Any?) -> T? {
   return x as! T?
   // CHECK: unconditional_checked_cast_addr Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts030optional_any_conditionally_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts030optional_any_conditionally_to_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_optional_opaque_archetype<T>(_ x: Any?) -> T?? {
   return x as? T?
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts016optional_any_is_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts016optional_any_is_C17_opaque_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_optional_opaque_archetype<T>(_ x: Any?, _: T) -> Bool {
   return x is T?
   //   Because the levels of optional are the same, 'is' doesn't transform into an 'as?',
@@ -44,19 +44,19 @@
   // CHECK: checked_cast_addr_br take_always Optional<Any> in {{%.*}} : $*Optional<Any> to Optional<T> in {{%.*}} : $*Optional<T>
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts31optional_any_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts31optional_any_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_to_class_archetype<T : AnyObject>(_ x: Any?) -> T {
   return x as! T
   // CHECK: unconditional_checked_cast_addr Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts45optional_any_conditionally_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts45optional_any_conditionally_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_conditionally_to_class_archetype<T : AnyObject>(_ x: Any?) -> T? {
   return x as? T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
 }
 
-// CHECK-LABEL: sil hidden @$s13generic_casts31optional_any_is_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13generic_casts31optional_any_is_class_archetype{{[_0-9a-zA-Z]*}}F
 func optional_any_is_class_archetype<T : AnyObject>(_ x: Any?, _: T) -> Bool {
   return x is T
   // CHECK: checked_cast_addr_br take_always Any in {{%.*}} : $*Any to T in {{%.*}} : $*T
diff --git a/test/SILGen/generic_closures.swift b/test/SILGen/generic_closures.swift
index 14680fe..9aa15ed 100644
--- a/test/SILGen/generic_closures.swift
+++ b/test/SILGen/generic_closures.swift
@@ -5,7 +5,7 @@
 
 var zero: Int
 
-// CHECK-LABEL: sil hidden @$s16generic_closures0A21_nondependent_context{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures0A21_nondependent_context{{[_0-9a-zA-Z]*}}F
 func generic_nondependent_context<T>(_ x: T, y: Int) -> Int {
   func foo() -> Int { return y }
 
@@ -32,7 +32,7 @@
   return bar()
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures0A8_capture{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures0A8_capture{{[_0-9a-zA-Z]*}}F
 func generic_capture<T>(_ x: T) -> Any.Type {
   func foo() -> Any.Type { return T.self }
 
@@ -48,7 +48,7 @@
   return foo()
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures0A13_capture_cast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures0A13_capture_cast{{[_0-9a-zA-Z]*}}F
 func generic_capture_cast<T>(_ x: T, y: Any) -> Bool {
   func foo(_ a: Any) -> Bool { return a is T }
 
@@ -68,7 +68,7 @@
   var sensical: Bool { get }
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures0A22_nocapture_existential{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures0A22_nocapture_existential{{[_0-9a-zA-Z]*}}F
 func generic_nocapture_existential<T>(_ x: T, y: Concept) -> Bool {
   func foo(_ a: Concept) -> Bool { return a.sensical }
 
@@ -84,7 +84,7 @@
   return foo(y)
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures0A18_dependent_context{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures0A18_dependent_context{{[_0-9a-zA-Z]*}}F
 func generic_dependent_context<T>(_ x: T, y: Int) -> T {
   func foo() -> T { return x }
 
@@ -130,7 +130,7 @@
     return foo()
   }
 
-  // CHECK-LABEL: sil hidden @$s16generic_closures13NestedGenericC20nested_reabstraction{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s16generic_closures13NestedGenericC20nested_reabstraction{{[_0-9a-zA-Z]*}}F
   //   CHECK:       [[REABSTRACT:%.*]] = function_ref @$sIeg_ytIegr_TR
   //   CHECK:       partial_apply [callee_guaranteed] [[REABSTRACT]]
   func nested_reabstraction<T>(_ x: T) -> Optionable<() -> ()> {
@@ -142,16 +142,16 @@
 // Ensure that nested closures capture the generic parameters of their nested
 // context.
 
-// CHECK: sil hidden @$s16generic_closures018nested_closure_in_A0yxxlF : $@convention(thin) <T> (@in_guaranteed T) -> @out T
+// CHECK: sil hidden [ossa] @$s16generic_closures018nested_closure_in_A0yxxlF : $@convention(thin) <T> (@in_guaranteed T) -> @out T
 // CHECK:   function_ref [[OUTER_CLOSURE:@\$s16generic_closures018nested_closure_in_A0yxxlFxyXEfU_]]
-// CHECK: sil private [[OUTER_CLOSURE]] : $@convention(thin) <T> (@inout_aliasable T) -> @out T
+// CHECK: sil private [ossa] [[OUTER_CLOSURE]] : $@convention(thin) <T> (@inout_aliasable T) -> @out T
 // CHECK:   function_ref [[INNER_CLOSURE:@\$s16generic_closures018nested_closure_in_A0yxxlFxyXEfU_xyXEfU_]]
-// CHECK: sil private [[INNER_CLOSURE]] : $@convention(thin) <T> (@inout_aliasable T) -> @out T {
+// CHECK: sil private [ossa] [[INNER_CLOSURE]] : $@convention(thin) <T> (@inout_aliasable T) -> @out T {
 func nested_closure_in_generic<T>(_ x:T) -> T {
   return { { x }() }()
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures16local_properties{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures16local_properties{{[_0-9a-zA-Z]*}}F
 func local_properties<T>(_ t: inout T) {
   var prop: T {
     get {
@@ -195,7 +195,7 @@
 // <rdar://problem/16399018>
 func shmassert(_ f: @autoclosure () -> Bool) {}
 
-// CHECK-LABEL: sil hidden @$s16generic_closures08capture_A6_param{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures08capture_A6_param{{[_0-9a-zA-Z]*}}F
 func capture_generic_param<A: Fooable>(_ x: A) {
   shmassert(A.foo())
 }
@@ -206,7 +206,7 @@
 
 protocol HasClassAssoc { associatedtype Assoc : Class }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures027captures_class_constrained_A0_1fyx_5AssocQzAEctAA08HasClassF0RzlF
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures027captures_class_constrained_A0_1fyx_5AssocQzAEctAA08HasClassF0RzlF
 // CHECK: bb0([[ARG1:%.*]] : $*T, [[ARG2:%.*]] : @guaranteed $@callee_guaranteed (@guaranteed T.Assoc) -> @owned T.Assoc):
 // CHECK: [[GENERIC_FN:%.*]] = function_ref @$s16generic_closures027captures_class_constrained_A0_1fyx_5AssocQzAEctAA08HasClassF0RzlFA2EcycfU_
 // CHECK: [[ARG2_COPY:%.*]] = copy_value [[ARG2]]
@@ -218,7 +218,7 @@
 
 // Make sure local generic functions can have captures
 
-// CHECK-LABEL: sil hidden @$s16generic_closures06outer_A01t1iyx_SitlF : $@convention(thin) <T> (@in_guaranteed T, Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures06outer_A01t1iyx_SitlF : $@convention(thin) <T> (@in_guaranteed T, Int) -> ()
 func outer_generic<T>(t: T, i: Int) {
   func inner_generic_nocapture<U>(u: U) -> U {
     return u
@@ -266,7 +266,7 @@
   _ = inner_generic2(u: t)
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures14outer_concrete1iySi_tF : $@convention(thin) (Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures14outer_concrete1iySi_tF : $@convention(thin) (Int) -> ()
 func outer_concrete(i: Int) {
   func inner_generic_nocapture<U>(u: U) -> U {
     return u
@@ -299,7 +299,7 @@
   _ = inner_generic(u: i)
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
 func mixed_generic_nongeneric_nesting<T>(t: T) {
   func outer() {
     func middle<U>(u: U) {
@@ -313,9 +313,9 @@
   outer()
 }
 
-// CHECK-LABEL: sil private @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF : $@convention(thin) <T> () -> ()
-// CHECK-LABEL: sil private @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF6middleL_1uyqd___tr__lF : $@convention(thin) <T><U> (@in_guaranteed U) -> ()
-// CHECK-LABEL: sil private @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF6middleL_1uyqd___tr__lF5innerL_qd__yr__lF : $@convention(thin) <T><U> (@guaranteed <τ_0_0><τ_1_0> { var τ_1_0 } <T, U>) -> @out U
+// CHECK-LABEL: sil private [ossa] @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF : $@convention(thin) <T> () -> ()
+// CHECK-LABEL: sil private [ossa] @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF6middleL_1uyqd___tr__lF : $@convention(thin) <T><U> (@in_guaranteed U) -> ()
+// CHECK-LABEL: sil private [ossa] @$s16generic_closures06mixed_A19_nongeneric_nesting1tyx_tlF5outerL_yylF6middleL_1uyqd___tr__lF5innerL_qd__yr__lF : $@convention(thin) <T><U> (@guaranteed <τ_0_0><τ_1_0> { var τ_1_0 } <T, U>) -> @out U
 
 protocol Doge {
   associatedtype Nose : NoseProtocol
diff --git a/test/SILGen/generic_literals.swift b/test/SILGen/generic_literals.swift
index f032ed1..351476f 100644
--- a/test/SILGen/generic_literals.swift
+++ b/test/SILGen/generic_literals.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s16generic_literals0A14IntegerLiteral1xyx_ts013ExpressibleBycD0RzlF : $@convention(thin) <T where T : ExpressibleByIntegerLiteral> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_literals0A14IntegerLiteral1xyx_ts013ExpressibleBycD0RzlF : $@convention(thin) <T where T : ExpressibleByIntegerLiteral> (@in_guaranteed T) -> () {
 func genericIntegerLiteral<T : ExpressibleByIntegerLiteral>(x: T) {
   var x = x
   // CHECK: [[ADDR:%.*]] = alloc_stack $T
@@ -16,7 +16,7 @@
   x = 17
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_literals0A15FloatingLiteral1xyx_ts018ExpressibleByFloatD0RzlF : $@convention(thin) <T where T : ExpressibleByFloatLiteral> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_literals0A15FloatingLiteral1xyx_ts018ExpressibleByFloatD0RzlF : $@convention(thin) <T where T : ExpressibleByFloatLiteral> (@in_guaranteed T) -> () {
 func genericFloatingLiteral<T : ExpressibleByFloatLiteral>(x: T) {
   var x = x
   // CHECK: [[TVAL:%.*]] = alloc_stack $T
@@ -32,7 +32,7 @@
   x = 2.5
 }
 
-// CHECK-LABEL: sil hidden @$s16generic_literals0A13StringLiteral1xyx_ts013ExpressibleBycD0RzlF : $@convention(thin) <T where T : ExpressibleByStringLiteral> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s16generic_literals0A13StringLiteral1xyx_ts013ExpressibleBycD0RzlF : $@convention(thin) <T where T : ExpressibleByStringLiteral> (@in_guaranteed T) -> () {
 
 func genericStringLiteral<T : ExpressibleByStringLiteral>(x: T) {
   var x = x
diff --git a/test/SILGen/generic_local_property.swift b/test/SILGen/generic_local_property.swift
index e9293aa..519e75e 100644
--- a/test/SILGen/generic_local_property.swift
+++ b/test/SILGen/generic_local_property.swift
@@ -2,7 +2,7 @@
 
 func use<T>(_: T) {}
 
-// CHECK-LABEL: sil hidden @$s22generic_local_property3foo1x1yyx_SitlF
+// CHECK-LABEL: sil hidden [ossa] @$s22generic_local_property3foo1x1yyx_SitlF
 func foo<T>(x: T, y: Int) {
   var mutable: Int {
     get {
diff --git a/test/SILGen/generic_objc_block_bridge.swift b/test/SILGen/generic_objc_block_bridge.swift
index feaaa93..3c04174 100644
--- a/test/SILGen/generic_objc_block_bridge.swift
+++ b/test/SILGen/generic_objc_block_bridge.swift
@@ -12,4 +12,4 @@
   }
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIyByd_S2iIegyd_TR : $@convention(thin) (Int, @guaranteed @convention(block) @noescape (Int) -> Int) -> Int {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIyByd_S2iIegyd_TR : $@convention(thin) (Int, @guaranteed @convention(block) @noescape (Int) -> Int) -> Int {
diff --git a/test/SILGen/generic_property_base_lifetime.swift b/test/SILGen/generic_property_base_lifetime.swift
index 74b54e2..c53099c 100644
--- a/test/SILGen/generic_property_base_lifetime.swift
+++ b/test/SILGen/generic_property_base_lifetime.swift
@@ -14,7 +14,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolA_pF : $@convention(thin) (@guaranteed ProtocolA) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolA_pF : $@convention(thin) (@guaranteed ProtocolA) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ProtocolA):
 // CHECK:   [[PROJECTION:%.*]] = open_existential_ref [[ARG]]
 // CHECK:   [[PROJECTION_COPY:%.*]] = copy_value [[PROJECTION]]
@@ -29,7 +29,7 @@
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime21setIntPropExistentialyyAA9ProtocolA_pF : $@convention(thin) (@guaranteed ProtocolA) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime21setIntPropExistentialyyAA9ProtocolA_pF : $@convention(thin) (@guaranteed ProtocolA) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ProtocolA):
 // CHECK:   [[PROJECTION:%.*]] = open_existential_ref [[ARG]]
 // CHECK:   [[PROJECTION_COPY:%.*]] = copy_value [[PROJECTION]]
@@ -41,7 +41,7 @@
   a.intProp = 0
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T):
 // CHECK:    apply {{%.*}}<T>([[ARG]])
 // CHECK: } // end sil function '$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F'
@@ -49,14 +49,14 @@
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime17setIntPropGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime17setIntPropGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T):
 // CHECK:   apply {{%.*}}<T>({{%.*}}, [[ARG]])
 func setIntPropGeneric<T: ProtocolA>(_ a: T) {
   a.intProp = 0
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolB_pF
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolB_pF
 // CHECK:         [[PROJECTION:%.*]] = open_existential_addr immutable_access %0
 // CHECK:         [[STACK:%[0-9]+]] = alloc_stack $@opened({{".*"}}) ProtocolB
 // CHECK:         copy_addr [[PROJECTION]] to [initialization] [[STACK]]
@@ -67,7 +67,7 @@
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[STACK:%[0-9]+]] = alloc_stack $T
 // CHECK:         copy_addr %0 to [initialization] [[STACK]]
 // CHECK:         apply {{%.*}}<T>([[STACK]])
@@ -77,7 +77,7 @@
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolO_pF : $@convention(thin) (@guaranteed ProtocolO) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime21getIntPropExistentialySiAA9ProtocolO_pF : $@convention(thin) (@guaranteed ProtocolO) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ProtocolO):
 // CHECK:  [[PROJECTION:%.*]] = open_existential_ref [[ARG]]
 // CHECK:  [[PROJECTION_COPY:%.*]] = copy_value [[PROJECTION]]
@@ -90,7 +90,7 @@
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime21setIntPropExistentialyyAA9ProtocolO_pF : $@convention(thin) (@guaranteed ProtocolO) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime21setIntPropExistentialyyAA9ProtocolO_pF : $@convention(thin) (@guaranteed ProtocolO) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ProtocolO):
 // CHECK:   [[PROJECTION:%.*]] = open_existential_ref [[ARG]]
 // CHECK:   [[PROJECTION_COPY:%.*]] = copy_value [[PROJECTION]]
@@ -102,14 +102,14 @@
   a.intProp = 0
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime17getIntPropGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T):
 // CHECK:   apply {{%.*}}<T>([[ARG]])
 func getIntPropGeneric<T: ProtocolO>(_ a: T) -> Int {
   return a.intProp
 }
 
-// CHECK-LABEL: sil hidden @$s30generic_property_base_lifetime17setIntPropGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s30generic_property_base_lifetime17setIntPropGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T):
 // CHECK:   apply {{%.*}}<T>({{%.*}}, [[ARG]])
 func setIntPropGeneric<T: ProtocolO>(_ a: T) {
diff --git a/test/SILGen/generic_tuples.swift b/test/SILGen/generic_tuples.swift
index 1a76763..ccc306c 100644
--- a/test/SILGen/generic_tuples.swift
+++ b/test/SILGen/generic_tuples.swift
@@ -3,7 +3,7 @@
 
 
 func dup<T>(_ x: T) -> (T, T) { return (x,x) }
-// CHECK-LABEL:      sil hidden @$s14generic_tuples3dup{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL:      sil hidden [ossa] @$s14generic_tuples3dup{{[_0-9a-zA-Z]*}}F
 // CHECK:      ([[RESULT_0:%.*]] : $*T, [[RESULT_1:%.*]] : $*T, [[XVAR:%.*]] : $*T):
 // CHECK-NEXT: debug_value_addr [[XVAR]] : $*T, let, name "x"
 // CHECK-NEXT: copy_addr [[XVAR]] to [initialization] [[RESULT_0]]
@@ -16,9 +16,9 @@
 // SIL parameters, which caused a failure in the ownership conventions code.
 
 struct Blub {}
-// CHECK-LABEL: sil hidden @$s14generic_tuples3foo{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14generic_tuples3foo{{[_0-9a-zA-Z]*}}F
 func foo<T>(_ x: T) {}
-// CHECK-LABEL: sil hidden @$s14generic_tuples3bar{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14generic_tuples3bar{{[_0-9a-zA-Z]*}}F
 func bar(_ x: (Blub, Blub)) { foo(x) }
 
 
@@ -35,5 +35,5 @@
     return (0, 0)
   }
 }
-// CHECK-LABEL: sil hidden @$s14generic_tuples8HasAssocPAASi_Sit1ARtzrlE16returnTupleAliasSi_SityF : $@convention(method) <Self where Self : HasAssoc, Self.A == (Int, Int)> (@in_guaranteed Self) -> (Int, Int) {
+// CHECK-LABEL: sil hidden [ossa] @$s14generic_tuples8HasAssocPAASi_Sit1ARtzrlE16returnTupleAliasSi_SityF : $@convention(method) <Self where Self : HasAssoc, Self.A == (Int, Int)> (@in_guaranteed Self) -> (Int, Int) {
 // CHECK:       return {{.*}} : $(Int, Int)
diff --git a/test/SILGen/generic_witness.swift b/test/SILGen/generic_witness.swift
index 81e0d62..c717a69 100644
--- a/test/SILGen/generic_witness.swift
+++ b/test/SILGen/generic_witness.swift
@@ -6,7 +6,7 @@
   func runce<A>(_ x: A)
 }
 
-// CHECK-LABEL: sil hidden @$s15generic_witness3foo{{[_0-9a-zA-Z]*}}F : $@convention(thin) <B where B : Runcible> (@in_guaranteed B) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s15generic_witness3foo{{[_0-9a-zA-Z]*}}F : $@convention(thin) <B where B : Runcible> (@in_guaranteed B) -> () {
 
 func foo<B : Runcible>(_ x: B) {
   // CHECK: [[METHOD:%.*]] = witness_method $B, #Runcible.runce!1 : {{.*}} : $@convention(witness_method: Runcible) <τ_0_0 where τ_0_0 : Runcible><τ_1_0> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> ()
@@ -14,7 +14,7 @@
   x.runce(5)
 }
 
-// CHECK-LABEL: sil hidden @$s15generic_witness3bar{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@in_guaranteed Runcible) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15generic_witness3bar{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@in_guaranteed Runcible) -> ()
 func bar(_ x: Runcible) {
   var x = x
   // CHECK: [[BOX:%.*]] = alloc_box ${ var Runcible }
@@ -51,7 +51,7 @@
 
 extension Canvas : Medium {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15generic_witness6CanvasVyxGAA6MediumA2aEP4draw5paint6pencily6StrokeQyd___qd__tAA6PencilRd__7Texture_5PaintQZAKRSlFTW : $@convention(witness_method: Medium) <τ_0_0 where τ_0_0 : Ink><τ_1_0 where τ_1_0 : Pencil, τ_0_0.Paint == τ_1_0.Stroke> (@in_guaranteed τ_0_0.Paint, @in_guaranteed τ_1_0, @in_guaranteed Canvas<τ_0_0>) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15generic_witness6CanvasVyxGAA6MediumA2aEP4draw5paint6pencily6StrokeQyd___qd__tAA6PencilRd__7Texture_5PaintQZAKRSlFTW : $@convention(witness_method: Medium) <τ_0_0 where τ_0_0 : Ink><τ_1_0 where τ_1_0 : Pencil, τ_0_0.Paint == τ_1_0.Stroke> (@in_guaranteed τ_0_0.Paint, @in_guaranteed τ_1_0, @in_guaranteed Canvas<τ_0_0>) -> () {
 // CHECK: [[FN:%.*]] = function_ref @$s15generic_witness6CanvasV4draw5paint6pencily5PaintQz_qd__tAA6PencilRd__6StrokeQyd__AHRSlF : $@convention(method) <τ_0_0 where τ_0_0 : Ink><τ_1_0 where τ_1_0 : Pencil, τ_0_0.Paint == τ_1_0.Stroke> (@in_guaranteed τ_0_0.Paint, @in_guaranteed τ_1_0, Canvas<τ_0_0>) -> ()
 // CHECK: apply [[FN]]<τ_0_0, τ_1_0>({{.*}}) : $@convention(method) <τ_0_0 where τ_0_0 : Ink><τ_1_0 where τ_1_0 : Pencil, τ_0_0.Paint == τ_1_0.Stroke> (@in_guaranteed τ_0_0.Paint, @in_guaranteed τ_1_0, Canvas<τ_0_0>) -> ()
 // CHECK: }
diff --git a/test/SILGen/global_init_attribute.swift b/test/SILGen/global_init_attribute.swift
index 64fffbd..e1e68c7 100644
--- a/test/SILGen/global_init_attribute.swift
+++ b/test/SILGen/global_init_attribute.swift
@@ -10,7 +10,7 @@
 let InternalConst = 42
 // CHECK-NOT: [global_init]
 // CHECK: // global_init_attribute.InternalConst.unsafeMutableAddressor : Swift.Int
-// CHECK-NEXT: sil hidden [global_init] @$s21global_init_attribute13InternalConstSivau
+// CHECK-NEXT: sil hidden [global_init] [ossa] @$s21global_init_attribute13InternalConstSivau
 
 func foo() -> Int {
   return ExportedVar
@@ -28,4 +28,4 @@
 
 // CHECK-NOT: [global_init]
 // CHECK: // global_init_attribute.InternalFoo.unsafeMutableAddressor : Swift.Int
-// CHECK-NEXT: sil hidden [global_init] @$s21global_init_attribute11InternalFooSivau
+// CHECK-NEXT: sil hidden [global_init] [ossa] @$s21global_init_attribute11InternalFooSivau
diff --git a/test/SILGen/global_resilience.swift b/test/SILGen/global_resilience.swift
index 6e50883..0c5ab9f 100644
--- a/test/SILGen/global_resilience.swift
+++ b/test/SILGen/global_resilience.swift
@@ -17,21 +17,21 @@
 
 // Mutable addressor for resilient global
 
-// CHECK-LABEL: sil hidden [global_init] @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau : $@convention(thin) () -> Builtin.RawPointer
+// CHECK-LABEL: sil hidden [global_init] [ossa] @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau : $@convention(thin) () -> Builtin.RawPointer
 // CHECK:         global_addr @$s17global_resilience13myEmptyGlobalAA02MyD6StructVv
 // CHECK:         return
 
 // Synthesized accessors for our resilient global variable
 
-// CHECK-LABEL: sil @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvg
+// CHECK-LABEL: sil [ossa] @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvg
 // CHECK:         function_ref @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau
 // CHECK:         return
 
-// CHECK-LABEL: sil @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvs
+// CHECK-LABEL: sil [ossa] @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvs
 // CHECK:         function_ref @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau
 // CHECK:         return
 
-// CHECK-LABEL: sil @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvM
+// CHECK-LABEL: sil [ossa] @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvM
 // CHECK:         function_ref @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau
 // CHECK:         begin_access [modify] [dynamic]
 // CHECK:         yield
@@ -39,7 +39,7 @@
 
 // Mutable addressor for fixed-layout global
 
-// CHECK-LABEL: sil [global_init] @$s17global_resilience19myFixedLayoutGlobalAA13MyEmptyStructVvau
+// CHECK-LABEL: sil [global_init] [ossa] @$s17global_resilience19myFixedLayoutGlobalAA13MyEmptyStructVvau
 // CHECK:         global_addr @$s17global_resilience19myFixedLayoutGlobalAA13MyEmptyStructVv
 // CHECK:         return
 
@@ -55,7 +55,7 @@
 // Accessing resilient global from our resilience domain --
 // call the addressor directly
 
-// CHECK-LABEL: sil @$s17global_resilience16getMyEmptyGlobalAA0dE6StructVyF
+// CHECK-LABEL: sil [ossa] @$s17global_resilience16getMyEmptyGlobalAA0dE6StructVyF
 // CHECK:         function_ref @$s17global_resilience13myEmptyGlobalAA02MyD6StructVvau
 // CHECK:         return
 public func getMyEmptyGlobal() -> MyEmptyStruct {
@@ -65,14 +65,14 @@
 // Accessing resilient global from a different resilience domain --
 // access it with accessors
 
-// CHECK-LABEL: sil @$s17global_resilience14getEmptyGlobal010resilient_A00D15ResilientStructVyF
+// CHECK-LABEL: sil [ossa] @$s17global_resilience14getEmptyGlobal010resilient_A00D15ResilientStructVyF
 // CHECK:         function_ref @$s16resilient_global11emptyGlobalAA20EmptyResilientStructVvg
 // CHECK:         return
 public func getEmptyGlobal() -> EmptyResilientStruct {
   return emptyGlobal
 }
 
-// CHECK-LABEL: sil @$s17global_resilience17modifyEmptyGlobalyyF
+// CHECK-LABEL: sil [ossa] @$s17global_resilience17modifyEmptyGlobalyyF
 // CHECK:         [[MODIFY:%.*]] = function_ref @$s16resilient_global11emptyGlobalAA20EmptyResilientStructVvM
 // CHECK-NEXT:    ([[ADDR:%.*]], [[TOKEN:%.*]]) = begin_apply [[MODIFY]]()
 // CHECK-NEXT:    // function_ref
@@ -88,7 +88,7 @@
 // Accessing fixed-layout global from a different resilience domain --
 // call the addressor directly
 
-// CHECK-LABEL: sil @$s17global_resilience20getFixedLayoutGlobal010resilient_A020EmptyResilientStructVyF
+// CHECK-LABEL: sil [ossa] @$s17global_resilience20getFixedLayoutGlobal010resilient_A020EmptyResilientStructVyF
 // CHECK:         function_ref @$s16resilient_global17fixedLayoutGlobalAA20EmptyResilientStructVvau
 // CHECK:         return
 public func getFixedLayoutGlobal() -> EmptyResilientStruct {
diff --git a/test/SILGen/guaranteed_closure_context.swift b/test/SILGen/guaranteed_closure_context.swift
index 709e93f..ef64306 100644
--- a/test/SILGen/guaranteed_closure_context.swift
+++ b/test/SILGen/guaranteed_closure_context.swift
@@ -8,7 +8,7 @@
 class C: P {}
 struct S {}
 
-// CHECK-LABEL: sil hidden @$s26guaranteed_closure_context0A9_capturesyyF
+// CHECK-LABEL: sil hidden [ossa] @$s26guaranteed_closure_context0A9_capturesyyF
 func guaranteed_captures() {
   // CHECK: [[MUTABLE_TRIVIAL_BOX:%.*]] = alloc_box ${ var S }
   var mutableTrivial = S()
@@ -72,4 +72,4 @@
   escape(captureEverything)
 }
 
-// CHECK: sil private [[FN_NAME]] : $@convention(thin) (@guaranteed { var S }, @guaranteed { var C }, @guaranteed { var P }, S, @guaranteed C, @guaranteed { var P })
+// CHECK: sil private [ossa] [[FN_NAME]] : $@convention(thin) (@guaranteed { var S }, @guaranteed { var C }, @guaranteed { var P }, S, @guaranteed C, @guaranteed { var P })
diff --git a/test/SILGen/guaranteed_normal_args.swift b/test/SILGen/guaranteed_normal_args.swift
index 0e1c799..ef62bdd 100644
--- a/test/SILGen/guaranteed_normal_args.swift
+++ b/test/SILGen/guaranteed_normal_args.swift
@@ -112,7 +112,7 @@
   var buffer: Buffer
 
   // Make sure that the allocating init forwards into the initializing init at +1.
-  // CHECK-LABEL: sil hidden @$ss15KlassWithBufferC3inKABs0A0C_tcfC : $@convention(method) (@owned Klass, @thick KlassWithBuffer.Type) -> @owned KlassWithBuffer {
+  // CHECK-LABEL: sil hidden [ossa] @$ss15KlassWithBufferC3inKABs0A0C_tcfC : $@convention(method) (@owned Klass, @thick KlassWithBuffer.Type) -> @owned KlassWithBuffer {
   // CHECK: bb0([[ARG:%.*]] : @owned $Klass,
   // CHECK:   [[INITIALIZING_INIT:%.*]] = function_ref @$ss15KlassWithBufferC3inKABs0A0C_tcfc : $@convention(method) (@owned Klass, @owned KlassWithBuffer) -> @owned KlassWithBuffer
   // CHECK:   apply [[INITIALIZING_INIT]]([[ARG]],
@@ -126,7 +126,7 @@
   // 1. Are able to propagate a +0 value value buffer.k into a +0 value and that
   // we then copy that +0 value into a +1 value, before we begin the epilog and
   // then return that value.
-  // CHECK-LABEL: sil hidden @$ss15KlassWithBufferC03getC14AsNativeObjectBoyF : $@convention(method) (@guaranteed KlassWithBuffer) -> @owned Builtin.NativeObject {
+  // CHECK-LABEL: sil hidden [ossa] @$ss15KlassWithBufferC03getC14AsNativeObjectBoyF : $@convention(method) (@guaranteed KlassWithBuffer) -> @owned Builtin.NativeObject {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $KlassWithBuffer):
   // CHECK:   [[METHOD:%.*]] = class_method [[SELF]] : $KlassWithBuffer, #KlassWithBuffer.buffer!getter.1
   // CHECK:   [[BUF:%.*]] = apply [[METHOD]]([[SELF]])
@@ -146,7 +146,7 @@
 struct StructContainingBridgeObject {
   var rawValue: Builtin.BridgeObject
 
-  // CHECK-LABEL: sil hidden @$ss28StructContainingBridgeObjectV8swiftObjAByXl_tcfC : $@convention(method) (@owned AnyObject, @thin StructContainingBridgeObject.Type) -> @owned StructContainingBridgeObject {
+  // CHECK-LABEL: sil hidden [ossa] @$ss28StructContainingBridgeObjectV8swiftObjAByXl_tcfC : $@convention(method) (@owned AnyObject, @thin StructContainingBridgeObject.Type) -> @owned StructContainingBridgeObject {
   // CHECK: bb0([[ARG:%.*]] : @owned $AnyObject,
   // CHECK:   [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
   // CHECK:   [[COPIED_ARG:%.*]] = copy_value [[BORROWED_ARG]]
@@ -169,7 +169,7 @@
 // Make sure that we provide a cleanup to x properly before we pass it to
 // result.
 extension FakeDictionary {
-  // CHECK-LABEL: sil hidden @$ss14FakeDictionaryV20makeSureToCopyTuplesyyF : $@convention(method) <Key, Value> (FakeDictionary<Key, Value>) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$ss14FakeDictionaryV20makeSureToCopyTuplesyyF : $@convention(method) <Key, Value> (FakeDictionary<Key, Value>) -> () {
   // CHECK:   [[X:%.*]] = alloc_stack $(Key, Value), let, name "x"
   // CHECK:   [[INDUCTION_VAR:%.*]] = unchecked_take_enum_data_addr {{%.*}} : $*Optional<(Key, Value)>, #Optional.some!enumelt.1
   // CHECK:   [[INDUCTION_VAR_0:%.*]] = tuple_element_addr [[INDUCTION_VAR]] : $*(Key, Value), 0
diff --git a/test/SILGen/guaranteed_normal_args_curry_thunks.swift b/test/SILGen/guaranteed_normal_args_curry_thunks.swift
index 31bdb69..508fcd0 100644
--- a/test/SILGen/guaranteed_normal_args_curry_thunks.swift
+++ b/test/SILGen/guaranteed_normal_args_curry_thunks.swift
@@ -97,7 +97,7 @@
 // Tests //
 ///////////
 
-// CHECK-LABEL: sil hidden @$ss021testLoadableClassInitB0yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss021testLoadableClassInitB0yyF : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:   [[THUNK_REF:%.*]] = function_ref @$ss017LoadableClassInitA0CyABs5KlassCcfCTcTd : $@convention(thin) (@thick LoadableClassInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableClassInitLoadable
 // CHECK:   [[CANONICAL_THUNK:%.*]] = apply [[THUNK_REF]](
@@ -111,7 +111,7 @@
 
 // Curry thunk.
 //
-// CHECK-LABEL: sil shared [thunk] @$ss017LoadableClassInitA0CyABs5KlassCcfCTcTd : $@convention(thin) (@thick LoadableClassInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableClassInitLoadable {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$ss017LoadableClassInitA0CyABs5KlassCcfCTcTd : $@convention(thin) (@thick LoadableClassInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableClassInitLoadable {
 // CHECK:   [[ALLOCATING_INIT_FN:%.*]] = function_ref @$ss017LoadableClassInitA0CyABs5KlassCcfC :
 // CHECK:   [[METATYPE_PA_ALLOCATING_INIT_FN:%.*]] = partial_apply [callee_guaranteed] [[ALLOCATING_INIT_FN]](
 // CHECK:   [[THUNK_FN:%.*]] = function_ref @$ss5KlassCs017LoadableClassInitB0CIegxo_AbDIeggo_TR :
@@ -121,7 +121,7 @@
 
 // Canonical Thunk.
 //
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$ss5KlassCs017LoadableClassInitB0CIegxo_AbDIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @owned LoadableClassInitLoadable) -> @owned LoadableClassInitLoadable {
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$ss5KlassCs017LoadableClassInitB0CIegxo_AbDIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @owned LoadableClassInitLoadable) -> @owned LoadableClassInitLoadable {
 // CHECK: bb0([[CLASS:%.*]] : @guaranteed $Klass, [[PA:%.*]] : @guaranteed $@callee_guaranteed (@owned Klass) -> @owned LoadableClassInitLoadable):
 // CHECK:   [[CLASS_COPY:%.*]] = copy_value [[CLASS]]
 // CHECK:   [[RESULT:%.*]] = apply [[PA]]([[CLASS_COPY]])
@@ -132,7 +132,7 @@
   let y = x(Klass())
 }
 
-// CHECK-LABEL: sil hidden @$ss022testLoadableStructInitB0yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss022testLoadableStructInitB0yyF : $@convention(thin) () -> () {
 // CHECK:   [[THUNK_REF:%.*]] = function_ref @$ss018LoadableStructInitA0VyABs5KlassCcfCTc : $@convention(thin) (@thin LoadableStructInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableStructInitLoadable
 // CHECK:   [[CANONICAL_THUNK:%.*]] = apply [[THUNK_REF]](
 // CHECK:   [[BORROWED_CANONICAL_THUNK:%.*]] = begin_borrow [[CANONICAL_THUNK]]
@@ -145,7 +145,7 @@
 
 // Curry thunk.
 //
-// CHECK-LABEL: sil shared [thunk] @$ss018LoadableStructInitA0VyABs5KlassCcfCTc : $@convention(thin) (@thin LoadableStructInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableStructInitLoadable {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$ss018LoadableStructInitA0VyABs5KlassCcfCTc : $@convention(thin) (@thin LoadableStructInitLoadable.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @owned LoadableStructInitLoadable {
 // CHECK:   [[ALLOCATING_INIT_FN:%.*]] = function_ref @$ss018LoadableStructInitA0VyABs5KlassCcfC :
 // CHECK:   [[METATYPE_PA_ALLOCATING_INIT_FN:%.*]] = partial_apply [callee_guaranteed] [[ALLOCATING_INIT_FN]](
 // CHECK:   [[THUNK_FN:%.*]] = function_ref @$ss5KlassCs018LoadableStructInitB0VIegxo_AbDIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @owned LoadableStructInitLoadable) -> @owned LoadableStructInitLoadable
@@ -155,7 +155,7 @@
 
 // Canonical Thunk.
 //
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$ss5KlassCs018LoadableStructInitB0VIegxo_AbDIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @owned LoadableStructInitLoadable) -> @owned LoadableStructInitLoadable {
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$ss5KlassCs018LoadableStructInitB0VIegxo_AbDIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @owned LoadableStructInitLoadable) -> @owned LoadableStructInitLoadable {
 // CHECK: bb0([[CLASS:%.*]] : @guaranteed $Klass, [[PA:%.*]] : @guaranteed $@callee_guaranteed (@owned Klass) -> @owned LoadableStructInitLoadable):
 // CHECK:   [[CLASS_COPY:%.*]] = copy_value [[CLASS]]
 // CHECK:   [[RESULT:%.*]] = apply [[PA]]([[CLASS_COPY]])
@@ -169,7 +169,7 @@
 // In this case we have a generic type that due to type lowering introduces an
 // extra thunk.
 //
-// CHECK-LABEL: sil hidden @$ss37testAddrOnlyStructInitGenericConcreteyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss37testAddrOnlyStructInitGenericConcreteyyF : $@convention(thin) () -> () {
 // CHECK:   [[THUNK_REF:%.*]] = function_ref @$ss25AddrOnlyStructInitGenericVyAByxGxcfCTc : $@convention(thin) <τ_0_0> (@thin AddrOnlyStructInitGeneric<τ_0_0>.Type) -> @owned @callee_guaranteed (@in_guaranteed τ_0_0) -> @out AddrOnlyStructInitGeneric<τ_0_0>
 // CHECK:   [[CURRY_THUNK:%.*]] = apply [[THUNK_REF]]<Klass>(
 // CHECK:   [[CANONICAL_THUNK_REF:%.*]] = function_ref @$ss5KlassCs25AddrOnlyStructInitGenericVyABGIegnr_AbEIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@in_guaranteed Klass) -> @out AddrOnlyStructInitGeneric<Klass>) -> @owned AddrOnlyStructInitGeneric<Klass>
@@ -183,7 +183,7 @@
 
 // Curry thunk
 //
-// CHECK-LABEL: sil shared [thunk] @$ss25AddrOnlyStructInitGenericVyAByxGxcfCTc : $@convention(thin) <T> (@thin AddrOnlyStructInitGeneric<T>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out AddrOnlyStructInitGeneric<T> {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$ss25AddrOnlyStructInitGenericVyAByxGxcfCTc : $@convention(thin) <T> (@thin AddrOnlyStructInitGeneric<T>.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @out AddrOnlyStructInitGeneric<T> {
 // CHECK:   [[ALLOCATING_INIT_REF:%.*]] = function_ref @$ss25AddrOnlyStructInitGenericVyAByxGxcfC : $@convention(method) <τ_0_0> (@in τ_0_0, @thin AddrOnlyStructInitGeneric<τ_0_0>.Type) -> @out AddrOnlyStructInitGeneric<τ_0_0>
 // CHECK:   [[ALLOCATING_INIT:%.*]] = partial_apply [callee_guaranteed] [[ALLOCATING_INIT_REF]]<T>(
 // CHECK:   [[THUNK_REF:%.*]] = function_ref @$sxs25AddrOnlyStructInitGenericVyxGIegir_xACIegnr_lTR : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in τ_0_0) -> @out AddrOnlyStructInitGeneric<τ_0_0>) -> @out AddrOnlyStructInitGeneric<τ_0_0>
@@ -191,14 +191,14 @@
 // CHECK:   return [[THUNK]]
 // CHECK: } // end sil function '$ss25AddrOnlyStructInitGenericVyAByxGxcfCTc'
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$sxs25AddrOnlyStructInitGenericVyxGIegir_xACIegnr_lTR : $@convention(thin) <T> (@in_guaranteed T, @guaranteed @callee_guaranteed (@in T) -> @out AddrOnlyStructInitGeneric<T>) -> @out AddrOnlyStructInitGeneric<T> {
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$sxs25AddrOnlyStructInitGenericVyxGIegir_xACIegnr_lTR : $@convention(thin) <T> (@in_guaranteed T, @guaranteed @callee_guaranteed (@in T) -> @out AddrOnlyStructInitGeneric<T>) -> @out AddrOnlyStructInitGeneric<T> {
 // CHECK: bb0([[ARG0:%.*]] : $*AddrOnlyStructInitGeneric<T>, [[ARG1:%.*]] : $*T, [[ARG2:%.*]] : @guaranteed $@callee_guaranteed (@in T) -> @out AddrOnlyStructInitGeneric<T>):
 // CHECK:   [[STACK:%.*]] = alloc_stack $T
 // CHECK:   copy_addr [[ARG1]] to [initialization] [[STACK]] : $*T
 // CHECK:   apply [[ARG2]]([[ARG0]], [[STACK]]) : $@callee_guaranteed (@in T) -> @out AddrOnlyStructInitGeneric<T>
 // CHECK: } // end sil function '$sxs25AddrOnlyStructInitGenericVyxGIegir_xACIegnr_lTR'
 
-// CHECK_LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$ss5KlassCs25AddrOnlyStructInitGenericVyABGIegnr_AbEIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@in_guaranteed Klass) -> @out AddrOnlyStructInitGeneric<Klass>) -> @owned AddrOnlyStructInitGeneric<Klass> {
+// CHECK_LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$ss5KlassCs25AddrOnlyStructInitGenericVyABGIegnr_AbEIeggo_TR : $@convention(thin) (@guaranteed Klass, @guaranteed @callee_guaranteed (@in_guaranteed Klass) -> @out AddrOnlyStructInitGeneric<Klass>) -> @owned AddrOnlyStructInitGeneric<Klass> {
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Klass, [[ARG1:%.*]] : @guaranteed $@callee_guaranteed (@in_guaranteed Klass) -> @out AddrOnlyStructInitGeneric<Klass>):
 // CHECK:   [[STACK:%.*]] = alloc_stack $Klass
 // CHECK:   [[ARG0_COPY:%.*]] = copy_value [[ARG0]]
@@ -214,7 +214,7 @@
   let y = x(Klass())
 }
 
-// CHECK-LABEL: sil hidden @$ss029testAddrOnlyStructInitGenericbC01tyx_ts08Protocole7AddressC0RzlF : $@convention(thin) <T where T : ProtocolInitAddressOnly> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss029testAddrOnlyStructInitGenericbC01tyx_ts08Protocole7AddressC0RzlF : $@convention(thin) <T where T : ProtocolInitAddressOnly> (@in_guaranteed T) -> () {
 // CHECK:   [[CURRY_THUNK_REF:%.*]] = function_ref @$ss25AddrOnlyStructInitGenericVyAByxGxcfCTc : $@convention(thin) <τ_0_0> (@thin AddrOnlyStructInitGeneric<τ_0_0>.Type) -> @owned @callee_guaranteed (@in_guaranteed τ_0_0) -> @out AddrOnlyStructInitGeneric<τ_0_0>
 // CHECK:   [[CURRY_THUNK:%.*]] = apply [[CURRY_THUNK_REF]]<T.SubType>(
 // CHECK:   [[Y:%.*]] = alloc_stack $AddrOnlyStructInitGeneric<T.SubType>, let, name "y"
@@ -231,7 +231,7 @@
   let y = x(T.SubType())
 }
 
-// CHECK-LABEL: sil hidden @$ss20testGenericInitClass1tyx_ts08ProtocolC8LoadableRzlF : $@convention(thin) <T where T : ProtocolInitLoadable> (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss20testGenericInitClass1tyx_ts08ProtocolC8LoadableRzlF : $@convention(thin) <T where T : ProtocolInitLoadable> (@in_guaranteed T) -> () {
 // CHECK:   [[CURRY_THUNK_REF:%.*]] = function_ref @$ss20ProtocolInitLoadableP1txs5KlassC_tcfCTc : $@convention(thin) <τ_0_0 where τ_0_0 : ProtocolInitLoadable> (@thick τ_0_0.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @out τ_0_0
 // CHECK:   [[CURRY_THUNK:%.*]] = apply [[CURRY_THUNK_REF]]<T>(
 // CHECK:   [[Y:%.*]] = alloc_stack $T, let, name "y"
@@ -245,7 +245,7 @@
 
 // Curry thunk.
 //
-// CHECK-LABEL: sil shared [thunk] @$ss20ProtocolInitLoadableP1txs5KlassC_tcfCTc : $@convention(thin) <Self where Self : ProtocolInitLoadable> (@thick Self.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @out Self {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$ss20ProtocolInitLoadableP1txs5KlassC_tcfCTc : $@convention(thin) <Self where Self : ProtocolInitLoadable> (@thick Self.Type) -> @owned @callee_guaranteed (@guaranteed Klass) -> @out Self {
 // CHECK:   [[WITNESS_METHOD_REF:%.*]] = witness_method $Self, #ProtocolInitLoadable.init!allocator.1 : <Self where Self : ProtocolInitLoadable> (Self.Type) -> (Klass) -> Self : $@convention(witness_method: ProtocolInitLoadable) <τ_0_0 where τ_0_0 : ProtocolInitLoadable> (@owned Klass, @thick τ_0_0.Type) -> @out τ_0_0
 // CHECK:   [[WITNESS_METHOD:%.*]] = partial_apply [callee_guaranteed] [[WITNESS_METHOD_REF]]<Self>(
 // CHECK:   [[CANONICAL_THUNK_REF:%.*]] = function_ref @$ss5KlassCxIegxr_ABxIeggr_s20ProtocolInitLoadableRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : ProtocolInitLoadable> (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @out τ_0_0) -> @out τ_0_0
@@ -255,7 +255,7 @@
 
 // Canonical thunk
 //
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$ss5KlassCxIegxr_ABxIeggr_s20ProtocolInitLoadableRzlTR : $@convention(thin) <Self where Self : ProtocolInitLoadable> (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @out Self) -> @out Self {
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$ss5KlassCxIegxr_ABxIeggr_s20ProtocolInitLoadableRzlTR : $@convention(thin) <Self where Self : ProtocolInitLoadable> (@guaranteed Klass, @guaranteed @callee_guaranteed (@owned Klass) -> @out Self) -> @out Self {
 // CHECK: bb0([[ARG0:%.*]] : $*Self, [[ARG1:%.*]] : @guaranteed $Klass, [[ARG2:%.*]] : @guaranteed $@callee_guaranteed (@owned Klass) -> @out Self):
 // CHECK:   [[ARG1_COPY:%.*]] = copy_value [[ARG1]]
 // CHECK:   apply [[ARG2]]([[ARG0]], [[ARG1_COPY]])
diff --git a/test/SILGen/guaranteed_self.swift b/test/SILGen/guaranteed_self.swift
index 8e7d5a0..829cff5 100644
--- a/test/SILGen/guaranteed_self.swift
+++ b/test/SILGen/guaranteed_self.swift
@@ -26,10 +26,10 @@
 struct S: Fooable {
   var x: C? // Make the type nontrivial, so +0/+1 is observable.
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S.Type) -> @owned S
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S.Type) -> @owned S
   init() {}
   // TODO: Way too many redundant r/r pairs here. Should use +0 rvalues.
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed S) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed S) -> () {
   // CHECK:       bb0({{.*}} [[SELF:%.*]] : @guaranteed $S):
   // CHECK-NOT:     copy_value [[SELF]]
   // CHECK-NOT:     destroy_value [[SELF]]
@@ -41,13 +41,13 @@
     self.foooo(x)
   }
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV3bar{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout S) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV3bar{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout S) -> ()
   // CHECK:       bb0([[SELF:%.*]] : $*S):
   // CHECK-NOT:     destroy_addr [[SELF]]
   mutating func bar() {
     self.bar()
   }
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV3bas{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed S) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV3bas{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed S) -> ()
   // CHECK:       bb0([[SELF:%.*]] : @guaranteed $S):
   // CHECK-NOT:     copy_value [[SELF]]
   // CHECK-NOT:     destroy_value [[SELF]]
@@ -58,41 +58,41 @@
   var prop1: Int = 0
 
   // Getter for prop1
-  // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self1SV5prop1Sivg : $@convention(method) (@guaranteed S) -> Int
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self1SV5prop1Sivg : $@convention(method) (@guaranteed S) -> Int
   // CHECK:       bb0([[SELF:%.*]] : @guaranteed $S):
   // CHECK-NOT:     destroy_value [[SELF]]
 
   // Setter for prop1
-  // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self1SV5prop1Sivs : $@convention(method) (Int, @inout S) -> ()
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self1SV5prop1Sivs : $@convention(method) (Int, @inout S) -> ()
   // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*S):
   // CHECK-NOT:     load [[SELF_ADDR]]
   // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
   // modify for prop1
-  // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self1SV5prop1SivM : $@yield_once @convention(method) (@inout S) -> @yields @inout Int
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self1SV5prop1SivM : $@yield_once @convention(method) (@inout S) -> @yields @inout Int
   // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
   // CHECK-NOT:     load [[SELF_ADDR]]
   // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
   var prop2: Int {
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV5prop2Sivg : $@convention(method) (@guaranteed S) -> Int
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV5prop2Sivg : $@convention(method) (@guaranteed S) -> Int
     // CHECK:       bb0([[SELF:%.*]] : @guaranteed $S):
     // CHECK-NOT:     destroy_value [[SELF]]
     get { return 0 }
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV5prop2Sivs : $@convention(method) (Int, @inout S) -> ()
-    // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self1SV5prop2SivM : $@yield_once @convention(method) (@inout S) -> @yields @inout Int
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV5prop2Sivs : $@convention(method) (Int, @inout S) -> ()
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self1SV5prop2SivM : $@yield_once @convention(method) (@inout S) -> @yields @inout Int
     set { }
   }
 
   var prop3: Int {
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV5prop3Sivg : $@convention(method) (@guaranteed S) -> Int
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV5prop3Sivg : $@convention(method) (@guaranteed S) -> Int
     // CHECK:       bb0([[SELF:%.*]] : @guaranteed $S):
     // CHECK-NOT:     destroy_value [[SELF]]
     get { return 0 }
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self1SV5prop3Sivs : $@convention(method) (Int, @guaranteed S) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1SV5prop3Sivs : $@convention(method) (Int, @guaranteed S) -> ()
     // CHECK:       bb0({{.*}} [[SELF:%.*]] : @guaranteed $S):
     // CHECK-NOT:     destroy_value [[SELF]]
-    // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self1SV5prop3SivM : $@yield_once @convention(method) (@guaranteed S) -> @yields @inout Int
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self1SV5prop3SivM : $@yield_once @convention(method) (@guaranteed S) -> @yields @inout Int
     // CHECK:       bb0([[SELF:%.*]] : @guaranteed $S):
     // CHECK-NOT:     destroy_value [[SELF]]
     nonmutating set { }
@@ -100,76 +100,76 @@
 }
 
 // Witness thunk for nonmutating 'foo'
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (Int, @in_guaranteed S) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (Int, @in_guaranteed S) -> () {
 // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for mutating 'bar'
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP3bar{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (@inout S) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP3bar{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (@inout S) -> () {
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK-NOT:     load [[SELF_ADDR]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for 'bas', which is mutating in the protocol, but nonmutating
 // in the implementation
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP3bas{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (@inout S) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP3bas{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) (@inout S) -> ()
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK:         end_borrow [[SELF]]
 // CHECK-NOT:     destroy_value [[SELF]]
 
 // Witness thunk for prop1 getter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
 // CHECK-NOT:     destroy_value [[SELF]]
 
 // Witness thunk for prop1 setter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivsTW : $@convention(witness_method: Fooable) (Int, @inout S) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivsTW : $@convention(witness_method: Fooable) (Int, @inout S) -> () {
 // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*S):
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop1 modify
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivMTW : $@yield_once @convention(witness_method: Fooable) (@inout S) -> @yields @inout Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop1SivMTW : $@yield_once @convention(witness_method: Fooable) (@inout S) -> @yields @inout Int {
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop2 getter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop2 setter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivsTW : $@convention(witness_method: Fooable) (Int, @inout S) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivsTW : $@convention(witness_method: Fooable) (Int, @inout S) -> () {
 // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*S):
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop2 modify
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivMTW : $@yield_once @convention(witness_method: Fooable) (@inout S) -> @yields @inout Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop2SivMTW : $@yield_once @convention(witness_method: Fooable) (@inout S) -> @yields @inout Int {
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop3 getter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivgTW : $@convention(witness_method: Fooable) (@in_guaranteed S) -> Int
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop3 nonmutating setter
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivsTW : $@convention(witness_method: Fooable) (Int, @in_guaranteed S) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivsTW : $@convention(witness_method: Fooable) (Int, @in_guaranteed S) -> ()
 // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness thunk for prop3 nonmutating modify
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivMTW : $@yield_once @convention(witness_method: Fooable) (@in_guaranteed S) -> @yields @inout Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self1SVAA7FooableA2aDP5prop3SivMTW : $@yield_once @convention(witness_method: Fooable) (@in_guaranteed S) -> @yields @inout Int
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*S):
 // CHECK:         [[SELF:%.*]] = load_borrow [[SELF_ADDR]]
 // CHECK-NOT:     destroy_value [[SELF]]
@@ -184,7 +184,7 @@
   var x: T?
 
   init() {}
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self2AOV3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) <T> (Int, @in_guaranteed AO<T>) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self2AOV3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) <T> (Int, @in_guaranteed AO<T>) -> ()
   // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*AO<T>):
   // CHECK:         apply {{.*}} [[SELF_ADDR]]
   // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
@@ -195,7 +195,7 @@
   mutating func bar() {
     self.bar()
   }
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self2AOV3bas{{[_0-9a-zA-Z]*}}F : $@convention(method) <T> (@in_guaranteed AO<T>) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self2AOV3bas{{[_0-9a-zA-Z]*}}F : $@convention(method) <T> (@in_guaranteed AO<T>) -> ()
   // CHECK:       bb0([[SELF_ADDR:%.*]] : $*AO<T>):
   // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
   func bas() {
@@ -205,21 +205,21 @@
 
   var prop1: Int = 0
   var prop2: Int {
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self2AOV5prop2Sivg : $@convention(method) <T> (@in_guaranteed AO<T>) -> Int {
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self2AOV5prop2Sivg : $@convention(method) <T> (@in_guaranteed AO<T>) -> Int {
     // CHECK:       bb0([[SELF_ADDR:%.*]] : $*AO<T>):
     // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
     get { return 0 }
     set { }
   }
   var prop3: Int {
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self2AOV5prop3Sivg : $@convention(method) <T> (@in_guaranteed AO<T>) -> Int
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self2AOV5prop3Sivg : $@convention(method) <T> (@in_guaranteed AO<T>) -> Int
     // CHECK:       bb0([[SELF_ADDR:%.*]] : $*AO<T>):
     // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
     get { return 0 }
-    // CHECK-LABEL: sil hidden @$s15guaranteed_self2AOV5prop3Sivs : $@convention(method) <T> (Int, @in_guaranteed AO<T>) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self2AOV5prop3Sivs : $@convention(method) <T> (Int, @in_guaranteed AO<T>) -> ()
     // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*AO<T>):
     // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
-    // CHECK-LABEL: sil hidden [transparent] @$s15guaranteed_self2AOV5prop3SivM : $@yield_once @convention(method) <T> (@in_guaranteed AO<T>) -> @yields @inout Int
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15guaranteed_self2AOV5prop3SivM : $@yield_once @convention(method) <T> (@in_guaranteed AO<T>) -> @yields @inout Int
     // CHECK:       bb0([[SELF_ADDR:%.*]] : $*AO<T>):
     // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
     // CHECK:       }
@@ -228,13 +228,13 @@
 }
 
 // Witness for nonmutating 'foo'
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self2AOVyxGAA7FooableA2aEP3foo{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) <τ_0_0> (Int, @in_guaranteed AO<τ_0_0>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self2AOVyxGAA7FooableA2aEP3foo{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) <τ_0_0> (Int, @in_guaranteed AO<τ_0_0>) -> ()
 // CHECK:       bb0({{.*}} [[SELF_ADDR:%.*]] : $*AO<τ_0_0>):
 // CHECK:         apply {{.*}} [[SELF_ADDR]]
 // CHECK-NOT:     destroy_addr [[SELF_ADDR]]
 
 // Witness for 'bar', which is mutating in protocol but nonmutating in impl
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15guaranteed_self2AOVyxGAA7FooableA2aEP3bar{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) <τ_0_0> (@inout AO<τ_0_0>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15guaranteed_self2AOVyxGAA7FooableA2aEP3bar{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Fooable) <τ_0_0> (@inout AO<τ_0_0>) -> ()
 // CHECK:       bb0([[SELF_ADDR:%.*]] : $*AO<τ_0_0>):
 // -- NB: This copy is not necessary, since we're willing to assume an inout
 //        parameter is not mutably aliased.
@@ -243,7 +243,7 @@
 
 class C: Fooable, Barrable {
   // Allocating initializer
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick C.Type) -> @owned C
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick C.Type) -> @owned C
   // CHECK:         [[SELF1:%.*]] = alloc_ref $C
   // CHECK-NOT:     [[SELF1]]
   // CHECK:         [[SELF2:%.*]] = apply {{.*}}([[SELF1]])
@@ -251,7 +251,7 @@
   // CHECK:         return [[SELF2]]
 
   // Initializing constructors still have the +1 in, +1 out convention.
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned C) -> @owned C {
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned C) -> @owned C {
   // CHECK:       bb0([[SELF:%.*]] : @owned $C):
   // CHECK:         [[MARKED_SELF:%.*]] = mark_uninitialized [rootself] [[SELF]]
   // CHECK:         [[MARKED_SELF_RESULT:%.*]] = copy_value [[MARKED_SELF]]
@@ -260,7 +260,7 @@
   // CHECK:       } // end sil function '$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fc'
 
   // @objc thunk for initializing constructor
-  // CHECK-LABEL: sil hidden [thunk] @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (@owned C) -> @owned C
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15guaranteed_self1CC{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (@owned C) -> @owned C
   // CHECK:       bb0([[SELF:%.*]] : @owned $C):
   // CHECK-NOT:     copy_value [[SELF]]
   // CHECK:         [[SELF2:%.*]] = apply {{%.*}}([[SELF]])
@@ -271,13 +271,13 @@
   @objc required init() {}
 
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1CC3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed C) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1CC3foo{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed C) -> ()
   // CHECK:       bb0({{.*}} [[SELF:%.*]] : @guaranteed $C):
   // CHECK-NOT:     copy_value
   // CHECK-NOT:     destroy_value
   // CHECK:       } // end sil function '$s15guaranteed_self1CC3foo{{[_0-9a-zA-Z]*}}F'
 
-  // CHECK-LABEL: sil hidden [thunk] @$s15guaranteed_self1CC3foo{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Int, C) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15guaranteed_self1CC3foo{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Int, C) -> () {
   // CHECK:       bb0({{.*}} [[SELF:%.*]] : @unowned $C):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -297,7 +297,7 @@
     self.bas()
   }
 
-  // CHECK-LABEL: sil hidden [transparent] [thunk] @$s15guaranteed_self1CC5prop1SivgTo : $@convention(objc_method) (C) -> Int
+  // CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s15guaranteed_self1CC5prop1SivgTo : $@convention(objc_method) (C) -> Int
   // CHECK:       bb0([[SELF:%.*]] : @unowned $C):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -307,7 +307,7 @@
   // CHECK-NOT:     destroy_value [[SELF]]
   // CHECK-NOT:     destroy_value [[SELF_COPY]]
 
-  // CHECK-LABEL: sil hidden [transparent] [thunk] @$s15guaranteed_self1CC5prop1SivsTo : $@convention(objc_method) (Int, C) -> ()
+  // CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s15guaranteed_self1CC5prop1SivsTo : $@convention(objc_method) (Int, C) -> ()
   // CHECK:       bb0({{.*}} [[SELF:%.*]] : @unowned $C):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -330,7 +330,7 @@
 }
 
 class D: C {
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1DC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick D.Type) -> @owned D
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1DC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick D.Type) -> @owned D
   // CHECK:         [[SELF1:%.*]] = alloc_ref $D
   // CHECK-NOT:     [[SELF1]]
   // CHECK:         [[SELF2:%.*]] = apply {{.*}}([[SELF1]])
@@ -338,7 +338,7 @@
   // CHECK-NOT:     [[SELF2]]
   // CHECK:         return [[SELF2]]
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self1DC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned D) -> @owned D
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self1DC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned D) -> @owned D
   // CHECK:       bb0([[SELF:%.*]] : @owned $D):
   // CHECK:         [[SELF_BOX:%.*]] = alloc_box ${ var D }
   // CHECK-NEXT:    [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [derivedself] [[SELF_BOX]]
@@ -363,7 +363,7 @@
     super.init()
   }
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s15guaranteed_self1DC3foo{{[_0-9a-zA-Z]*}}FTD : $@convention(method) (Int, @guaranteed D) -> ()
+  // CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s15guaranteed_self1DC3foo{{[_0-9a-zA-Z]*}}FTD : $@convention(method) (Int, @guaranteed D) -> ()
   // CHECK:       bb0({{.*}} [[SELF:%.*]] : @guaranteed $D):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         destroy_value [[SELF_COPY]]
@@ -389,7 +389,7 @@
 // ----------------------------------------------------------------------------
 
 
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$s15guaranteed_self9FakeArrayVAA8SequenceA2aDP17_constrainElement{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Sequence) (@in_guaranteed FakeElement, @in_guaranteed FakeArray) -> () {
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$s15guaranteed_self9FakeArrayVAA8SequenceA2aDP17_constrainElement{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: Sequence) (@in_guaranteed FakeElement, @in_guaranteed FakeArray) -> () {
 // CHECK: bb0([[ARG0_PTR:%.*]] : $*FakeElement, [[ARG1_PTR:%.*]] : $*FakeArray):
 // CHECK: [[ARG0:%.*]] = load [trivial] [[ARG0_PTR]]
 // CHECK: function_ref (extension in guaranteed_self):guaranteed_self.SequenceDefaults._constrainElement
@@ -448,7 +448,7 @@
   let letk = Kraken()
   var vark = Kraken()
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self13LetFieldClassC10letkMethod{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed LetFieldClass) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self13LetFieldClassC10letkMethod{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed LetFieldClass) -> () {
   // CHECK: bb0([[CLS:%.*]] : @guaranteed $LetFieldClass):
   // CHECK: [[KRAKEN_ADDR:%.*]] = ref_element_addr [[CLS]] : $LetFieldClass, #LetFieldClass.letk
   // CHECK-NEXT: [[KRAKEN:%.*]] = load_borrow [[KRAKEN_ADDR]]
@@ -483,7 +483,7 @@
     destroyShip(lv)
   }
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self13LetFieldClassC10varkMethod{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed LetFieldClass) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self13LetFieldClassC10varkMethod{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed LetFieldClass) -> () {
   // CHECK: bb0([[CLS:%.*]] : @guaranteed $LetFieldClass):
   // CHECK: [[KRAKEN_GETTER_FUN:%.*]] = class_method [[CLS]] : $LetFieldClass, #LetFieldClass.vark!getter.1 : (LetFieldClass) -> () -> Kraken, $@convention(method) (@guaranteed LetFieldClass) -> @owned Kraken
   // CHECK-NEXT: [[KRAKEN:%.*]] = apply [[KRAKEN_GETTER_FUN]]([[CLS]])
@@ -530,7 +530,7 @@
 
   init() {}
 
-  // CHECK-LABEL: sil hidden @$s15guaranteed_self16ClassIntTreeNodeC4find{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed ClassIntTreeNode) -> @owned ClassIntTreeNode {
+  // CHECK-LABEL: sil hidden [ossa] @$s15guaranteed_self16ClassIntTreeNodeC4find{{[_0-9a-zA-Z]*}}F : $@convention(method) (Int, @guaranteed ClassIntTreeNode) -> @owned ClassIntTreeNode {
   // CHECK-NOT: destroy_value
   // CHECK: copy_value
   // CHECK-NOT: copy_value
diff --git a/test/SILGen/if_expr.swift b/test/SILGen/if_expr.swift
index 5e27e65..e1a8e63 100644
--- a/test/SILGen/if_expr.swift
+++ b/test/SILGen/if_expr.swift
@@ -29,7 +29,7 @@
 
 func consumeAddressOnly(_: AddressOnly) {}
 
-// CHECK: sil hidden @$s7if_expr19addr_only_ternary_1{{[_0-9a-zA-Z]*}}F
+// CHECK: sil hidden [ossa] @$s7if_expr19addr_only_ternary_1{{[_0-9a-zA-Z]*}}F
 func addr_only_ternary_1(x: Bool) -> AddressOnly {
   // CHECK: bb0([[RET:%.*]] : $*AddressOnly, {{.*}}):
   // CHECK: [[a:%[0-9]+]] = alloc_box ${ var AddressOnly }, var, name "a"
@@ -54,7 +54,7 @@
 // <rdar://problem/31595572> - crash when conditional expression is an
 // lvalue of IUO type
 
-// CHECK-LABEL: sil hidden @$s7if_expr18iuo_lvalue_ternary1xSiSbSgz_tF : $@convention(thin) (@inout Optional<Bool>) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s7if_expr18iuo_lvalue_ternary1xSiSbSgz_tF : $@convention(thin) (@inout Optional<Bool>) -> Int
 // CHECK: [[IUO_BOOL_ADDR:%.*]] = begin_access [read] [unknown] %0 : $*Optional<Bool>
 // CHECK: [[IUO_BOOL:%.*]] = load [trivial] [[IUO_BOOL_ADDR]] : $*Optional<Bool>
 // CHECK: switch_enum [[IUO_BOOL]]
diff --git a/test/SILGen/if_while_binding.swift b/test/SILGen/if_while_binding.swift
index 23d4cc3..31329e6 100644
--- a/test/SILGen/if_while_binding.swift
+++ b/test/SILGen/if_while_binding.swift
@@ -13,7 +13,7 @@
 func marker_3() {}
 
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A8_no_else{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A8_no_else{{[_0-9a-zA-Z]*}}F
 func if_no_else() {
   // CHECK:   [[FOO:%.*]] = function_ref @$s16if_while_binding3fooSSSgyF
   // CHECK:   [[OPT_RES:%.*]] = apply [[FOO]]()
@@ -36,7 +36,7 @@
 }
 // CHECK: } // end sil function '$s16if_while_binding0A8_no_else{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A11_else_chainyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A11_else_chainyyF : $@convention(thin) () -> () {
 func if_else_chain() {
   // CHECK:   [[FOO:%.*]] = function_ref @$s16if_while_binding3foo{{[_0-9a-zA-Z]*}}F
   // CHECK-NEXT:   [[OPT_RES:%.*]] = apply [[FOO]]()
@@ -72,7 +72,7 @@
   // CHECK: [[CONT_X]]:
 }
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0B5_loopyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0B5_loopyyF : $@convention(thin) () -> () {
 func while_loop() {
   // CHECK:   br [[LOOP_ENTRY:bb[0-9]+]]
   //
@@ -103,7 +103,7 @@
 
 // Don't leak alloc_stacks for address-only conditional bindings in 'while'.
 // <rdar://problem/16202294>
-// CHECK-LABEL: sil hidden @$s16if_while_binding0B13_loop_generic{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0B13_loop_generic{{[_0-9a-zA-Z]*}}F
 // CHECK:         br [[COND:bb[0-9]+]]
 // CHECK:       [[COND]]:
 // CHECK:         [[X:%.*]] = alloc_stack $T, let, name "x"
@@ -126,7 +126,7 @@
 }
 
 // <rdar://problem/19382942> Improve 'if let' to avoid optional pyramid of doom
-// CHECK-LABEL: sil hidden @$s16if_while_binding0B11_loop_multiyyF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0B11_loop_multiyyF
 func while_loop_multi() {
   // CHECK:   br [[LOOP_ENTRY:bb[0-9]+]]
   // CHECK: [[LOOP_ENTRY]]:
@@ -162,7 +162,7 @@
   // CHECK-NEXT:   return
 }
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A6_multiyyF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A6_multiyyF
 func if_multi() {
   // CHECK:   switch_enum {{.*}}, case #Optional.some!enumelt.1: [[CHECKBUF2:bb.*]], case #Optional.none!enumelt: [[NONE_TRAMPOLINE:bb[0-9]+]]
   //
@@ -194,7 +194,7 @@
   // CHECK-NEXT:   return
 }
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A11_multi_elseyyF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A11_multi_elseyyF
 func if_multi_else() {
   // CHECK:   switch_enum {{.*}}, case #Optional.some!enumelt.1: [[CHECKBUF2:bb.*]], case #Optional.none!enumelt: [[NONE_TRAMPOLINE:bb[0-9]+]]
   //
@@ -230,7 +230,7 @@
   // CHECK-NEXT:   return
 }
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A12_multi_whereyyF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A12_multi_whereyyF
 func if_multi_where() {
   // CHECK:   switch_enum {{.*}}, case #Optional.some!enumelt.1: [[CHECKBUF2:bb.*]], case #Optional.none!enumelt: [[NONE_TRAMPOLINE:bb[0-9]+]]
   //
@@ -247,7 +247,7 @@
   // CHECK:   br [[DONE]]
 
   // CHECK: [[CHECK_WHERE]]([[B:%[0-9]+]] : @owned $String):
-  // CHECK:   function_ref Swift.Bool._getBuiltinLogicValue() -> Builtin.Int1
+  // CHECK:   struct_extract {{.*}}
   // CHECK:   cond_br {{.*}}, [[IF_BODY:bb[0-9]+]], [[IF_EXIT3:bb[0-9]+]]
   if let a = foo(), var b = bar(), a == b {
     // CHECK: [[IF_BODY]]:
@@ -267,15 +267,14 @@
 
 
 // <rdar://problem/19797158> Swift 1.2's "if" has 2 behaviors. They could be unified.
-// CHECK-LABEL: sil hidden @$s16if_while_binding0A16_leading_booleanyySiF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding0A16_leading_booleanyySiF
 func if_leading_boolean(_ a : Int) {
   // Test the boolean condition.
   
   // CHECK: debug_value %0 : $Int, let, name "a"
   // CHECK: [[EQRESULT:%[0-9]+]] = apply {{.*}}(%0, %0{{.*}}) : $@convention({{.*}}) (Int, Int{{.*}}) -> Bool
 
-  // CHECK:      [[FN:%.*]] = function_ref {{.*}}
-  // CHECK-NEXT: [[EQRESULTI1:%[0-9]+]] = apply [[FN:%.*]]([[EQRESULT]]) : $@convention(method) (Bool) -> Builtin.Int1
+  // CHECK: [[EQRESULTI1:%[0-9]+]] = struct_extract {{.*}} : $Bool, #Bool._value
   // CHECK-NEXT: cond_br [[EQRESULTI1]], [[CHECKFOO:bb[0-9]+]], [[ELSE:bb[0-9]+]]
 
   // Call Foo and test for the optional being present.
@@ -308,7 +307,7 @@
 class BaseClass {}
 class DerivedClass : BaseClass {}
 
-// CHECK-LABEL: sil hidden @$s16if_while_binding20testAsPatternInIfLetyyAA9BaseClassCSgF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding20testAsPatternInIfLetyyAA9BaseClassCSgF
 func testAsPatternInIfLet(_ a : BaseClass?) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Optional<BaseClass>):
   // CHECK:   debug_value [[ARG]] : $Optional<BaseClass>, let, name "a"
@@ -348,7 +347,7 @@
 }
 
 // <rdar://problem/22312114> if case crashes swift - bools not supported in let/else yet
-// CHECK-LABEL: sil hidden @$s16if_while_binding12testCaseBoolyySbSgF
+// CHECK-LABEL: sil hidden [ossa] @$s16if_while_binding12testCaseBoolyySbSgF
 func testCaseBool(_ value : Bool?) {
   // CHECK: bb0([[ARG:%.*]] : $Optional<Bool>):
   // CHECK: switch_enum [[ARG]] : $Optional<Bool>, case #Optional.some!enumelt.1: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_TRAMPOLINE:bb[0-9]+]]
diff --git a/test/SILGen/implicitly_unwrapped_optional.swift b/test/SILGen/implicitly_unwrapped_optional.swift
index 41a8a79..a3e30d1 100644
--- a/test/SILGen/implicitly_unwrapped_optional.swift
+++ b/test/SILGen/implicitly_unwrapped_optional.swift
@@ -5,7 +5,7 @@
   var f: (() -> ())! = f
   f?()
 }
-// CHECK: sil hidden @{{.*}}foo{{.*}} : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> ()>) -> () {
+// CHECK: sil hidden [ossa] @{{.*}}foo{{.*}} : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> ()>) -> () {
 // CHECK: bb0([[T0:%.*]] : @guaranteed $Optional<@callee_guaranteed () -> ()>):
 // CHECK:   [[F:%.*]] = alloc_box ${ var Optional<@callee_guaranteed () -> ()> }
 // CHECK:   [[PF:%.*]] = project_box [[F]]
@@ -36,7 +36,7 @@
 
 func wrap<T>(x x: T) -> T! { return x }
 
-// CHECK-LABEL: sil hidden @$s29implicitly_unwrapped_optional16wrap_then_unwrap{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s29implicitly_unwrapped_optional16wrap_then_unwrap{{[_0-9a-zA-Z]*}}F
 func wrap_then_unwrap<T>(x x: T) -> T {
   // CHECK:   switch_enum_addr {{%.*}}, case #Optional.some!enumelt.1: [[OK:bb[0-9]+]], case #Optional.none!enumelt: [[FAIL:bb[0-9]+]]
   // CHECK: [[FAIL]]:
@@ -45,7 +45,7 @@
   return wrap(x: x)!
 }
 
-// CHECK-LABEL: sil hidden @$s29implicitly_unwrapped_optional10tuple_bind1xSSSgSi_SStSg_tF : $@convention(thin) (@guaranteed Optional<(Int, String)>) -> @owned Optional<String> {
+// CHECK-LABEL: sil hidden [ossa] @$s29implicitly_unwrapped_optional10tuple_bind1xSSSgSi_SStSg_tF : $@convention(thin) (@guaranteed Optional<(Int, String)>) -> @owned Optional<String> {
 func tuple_bind(x x: (Int, String)!) -> String? {
   return x?.1
   // CHECK:   switch_enum {{%.*}}, case #Optional.some!enumelt.1: [[NONNULL:bb[0-9]+]], case #Optional.none!enumelt: [[NULL:bb[0-9]+]]
@@ -54,7 +54,7 @@
   // CHECK-NOT: destroy_value [[STRING]]
 }
 
-// CHECK-LABEL: sil hidden @$s29implicitly_unwrapped_optional011tuple_bind_a1_B01xSSSi_SStSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s29implicitly_unwrapped_optional011tuple_bind_a1_B01xSSSi_SStSg_tF
 func tuple_bind_implicitly_unwrapped(x x: (Int, String)!) -> String {
   return x.1
 }
@@ -64,7 +64,7 @@
   let object : AnyObject? = return_any()
 }
 
-// CHECK-LABEL: sil hidden @$s29implicitly_unwrapped_optional6sr3758yyF
+// CHECK-LABEL: sil hidden [ossa] @$s29implicitly_unwrapped_optional6sr3758yyF
 func sr3758() {
   // Verify that there are no additional reabstractions introduced.
   // CHECK: [[CLOSURE:%.+]] = function_ref @$s29implicitly_unwrapped_optional6sr3758yyFyypSgcfU_ : $@convention(thin) (@in_guaranteed Optional<Any>) -> ()
diff --git a/test/SILGen/import_as_member.swift b/test/SILGen/import_as_member.swift
index d931849..8e73fa1 100644
--- a/test/SILGen/import_as_member.swift
+++ b/test/SILGen/import_as_member.swift
@@ -18,7 +18,7 @@
 public func returnStringGlobalVar() -> String {
   return Panda.cutenessFactor
 }
-// CHECK-LABEL: sil {{.*}}returnStringGlobalVar{{.*}} () -> @owned String {
+// CHECK-LABEL: sil [ossa] {{.*}}returnStringGlobalVar{{.*}} () -> @owned String {
 // CHECK:   %0 = global_addr @PKPandaCutenessFactor : $*NSString
 // CHECK:   [[VAL:%.*]] = load [copy] %0 : $*NSString
 // CHECK:   [[BRIDGE:%.*]] = function_ref @$sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
@@ -29,7 +29,7 @@
 public func returnNullableStringGlobalVar() -> String? {
   return Panda.cuddlynessFactor
 }
-// CHECK-LABEL: sil {{.*}}returnNullableStringGlobalVar{{.*}} () -> @owned Optional<String> {
+// CHECK-LABEL: sil [ossa] {{.*}}returnNullableStringGlobalVar{{.*}} () -> @owned Optional<String> {
 // CHECK:   %0 = global_addr @PKPandaCuddlynessFactor : $*NSString
 // CHECK:   [[VAL:%.*]] = load [copy] %0 : $*NSString
 // CHECK:   [[BRIDGE:%.*]] = function_ref @$sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
@@ -54,7 +54,7 @@
 }
 
 extension SomeClass {
-  // CHECK-LABEL: sil hidden @$sSo12IAMSomeClassC16import_as_memberE6doubleABSd_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo12IAMSomeClassC16import_as_memberE6doubleABSd_tcfC
   // CHECK: bb0([[DOUBLE:%[0-9]+]] : $Double
   // CHECK-NOT: value_metatype
   // CHECK: [[FNREF:%[0-9]+]] = function_ref @MakeIAMSomeClass
diff --git a/test/SILGen/imported_struct_array_field.swift b/test/SILGen/imported_struct_array_field.swift
index 6b114b9..dcfb357 100644
--- a/test/SILGen/imported_struct_array_field.swift
+++ b/test/SILGen/imported_struct_array_field.swift
@@ -1,6 +1,6 @@
-// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/array_typedef.h %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enable-objc-interop -disable-objc-attr-requires-foundation-module -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
+// CHECK-LABEL: sil shared [transparent] [serializable] [ossa] @$sSo4NameV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (UInt8, UInt8, UInt8, UInt8, @thin Name.Type) -> Name
 func useImportedArrayTypedefInit() -> Name {
   return Name(name: (0, 0, 0, 0))
 }
diff --git a/test/SILGen/indirect_enum.swift b/test/SILGen/indirect_enum.swift
index 07c29fb..bb10d50 100644
--- a/test/SILGen/indirect_enum.swift
+++ b/test/SILGen/indirect_enum.swift
@@ -7,7 +7,7 @@
   case Branch(left: TreeA<T>, right: TreeA<T>)
 }
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum11TreeA_cases_1l1ryx_AA0C1AOyxGAGtlF : $@convention(thin) <T> (@in_guaranteed T, @guaranteed TreeA<T>, @guaranteed TreeA<T>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum11TreeA_cases_1l1ryx_AA0C1AOyxGAGtlF : $@convention(thin) <T> (@in_guaranteed T, @guaranteed TreeA<T>, @guaranteed TreeA<T>) -> () {
 func TreeA_cases<T>(_ t: T, l: TreeA<T>, r: TreeA<T>) {
 // CHECK: bb0([[ARG1:%.*]] : $*T, [[ARG2:%.*]] : @guaranteed $TreeA<T>, [[ARG3:%.*]] : @guaranteed $TreeA<T>):
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin TreeA<T>.Type
@@ -40,7 +40,7 @@
 // CHECK: // end sil function '$s13indirect_enum11TreeA_cases_1l1ryx_AA0C1AOyxGAGtlF'
 
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum16TreeA_reabstractyyS2icF : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum16TreeA_reabstractyyS2icF : $@convention(thin) (@guaranteed @callee_guaranteed (Int) -> Int) -> () {
 func TreeA_reabstract(_ f: @escaping (Int) -> Int) {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $@callee_guaranteed (Int) -> Int):
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin TreeA<(Int) -> Int>.Type
@@ -63,7 +63,7 @@
   indirect case Branch(left: TreeB<T>, right: TreeB<T>)
 }
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum11TreeB_cases_1l1ryx_AA0C1BOyxGAGtlF
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum11TreeB_cases_1l1ryx_AA0C1BOyxGAGtlF
 func TreeB_cases<T>(_ t: T, l: TreeB<T>, r: TreeB<T>) {
 
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin TreeB<T>.Type
@@ -101,7 +101,7 @@
 
 }
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum13TreeInt_cases_1l1rySi_AA0cD0OAFtF : $@convention(thin) (Int, @guaranteed TreeInt, @guaranteed TreeInt) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum13TreeInt_cases_1l1rySi_AA0cD0OAFtF : $@convention(thin) (Int, @guaranteed TreeInt, @guaranteed TreeInt) -> ()
 func TreeInt_cases(_ t: Int, l: TreeInt, r: TreeInt) {
 // CHECK: bb0([[ARG1:%.*]] : $Int, [[ARG2:%.*]] : @guaranteed $TreeInt, [[ARG3:%.*]] : @guaranteed $TreeInt):
 // CHECK:         [[METATYPE:%.*]] = metatype $@thin TreeInt.Type
@@ -146,7 +146,7 @@
 func c<T>(_ x: T, _ y: T) {}
 func d() {}
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum11switchTreeAyyAA0D1AOyxGlF : $@convention(thin) <T> (@guaranteed TreeA<T>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum11switchTreeAyyAA0D1AOyxGlF : $@convention(thin) <T> (@guaranteed TreeA<T>) -> () {
 func switchTreeA<T>(_ x: TreeA<T>) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $TreeA<T>):
   // --           x +0
@@ -212,7 +212,7 @@
 }
 // CHECK: } // end sil function '$s13indirect_enum11switchTreeAyyAA0D1AOyxGlF'
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum11switchTreeB{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum11switchTreeB{{[_0-9a-zA-Z]*}}F
 func switchTreeB<T>(_ x: TreeB<T>) {
   // CHECK:       copy_addr %0 to [initialization] [[SCRATCH:%.*]] :
   // CHECK:       switch_enum_addr [[SCRATCH]]
@@ -308,7 +308,7 @@
 
 // Make sure that switchTreeInt obeys ownership invariants.
 //
-// CHECK-LABEL: sil hidden @$s13indirect_enum13switchTreeInt{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum13switchTreeInt{{[_0-9a-zA-Z]*}}F
 func switchTreeInt(_ x: TreeInt) {
   switch x {
 
@@ -327,7 +327,7 @@
 }
 // CHECK: } // end sil function '$s13indirect_enum13switchTreeInt{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil hidden @$s13indirect_enum10guardTreeA{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum10guardTreeA{{[_0-9a-zA-Z]*}}F
 func guardTreeA<T>(_ tree: TreeA<T>) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $TreeA<T>):
   do {
@@ -409,7 +409,7 @@
   // CHECK: [[NO1]]([[ORIGINAL_VALUE:%.*]] : @owned $TreeA<T>):
   // CHECK:   destroy_value [[ORIGINAL_VALUE]]
 }
-// CHECK-LABEL: sil hidden @$s13indirect_enum10guardTreeB{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum10guardTreeB{{[_0-9a-zA-Z]*}}F
 func guardTreeB<T>(_ tree: TreeB<T>) {
   do {
     // CHECK:   copy_addr %0 to [initialization] [[TMP1:%.*]] :
@@ -499,7 +499,7 @@
 
 // Just run guardTreeInt through the ownership verifier
 //
-// CHECK-LABEL: sil hidden @$s13indirect_enum12guardTreeInt{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum12guardTreeInt{{[_0-9a-zA-Z]*}}F
 func guardTreeInt(_ tree: TreeInt) {
   do {
     guard case .Nil = tree else { return }
@@ -517,7 +517,7 @@
 }
 
 // SEMANTIC ARC TODO: This test needs to be made far more comprehensive.
-// CHECK-LABEL: sil hidden @$s13indirect_enum35dontDisableCleanupOfIndirectPayloadyyAA010TrivialButG0OF : $@convention(thin) (@guaranteed TrivialButIndirect) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s13indirect_enum35dontDisableCleanupOfIndirectPayloadyyAA010TrivialButG0OF : $@convention(thin) (@guaranteed TrivialButIndirect) -> () {
 func dontDisableCleanupOfIndirectPayload(_ x: TrivialButIndirect) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $TrivialButIndirect):
   // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
diff --git a/test/SILGen/inherited_protocol_conformance_multi_file_2.swift b/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
index c5851c1..d9b61252 100644
--- a/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
+++ b/test/SILGen/inherited_protocol_conformance_multi_file_2.swift
@@ -42,22 +42,22 @@
 // cbA
 // 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
+// FILE_A-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
+// FILE_A-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSkAAsADP9hashValueSivgTW
 // FILE_A-NOT: sil_witness_table Thing: Hashable module main
 // FILE_A-NOT: sil_witness_table Thing: Equatable module main
 
-// FILE_B-NOT: sil [transparent] [thunk] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
-// FILE_B: sil private [transparent] [thunk] @$s4main5ThingVSHAASH9hashValueSivgTW
-// FILE_B-NOT: sil [transparent] [thunk] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
+// FILE_B-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
+// FILE_B: sil private [transparent] [thunk] [ossa] @$s4main5ThingVSHAASH9hashValueSivgTW
+// FILE_B-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSQAAsADP2eeoi{{[_0-9a-zA-Z]*}}FZTW
 
 // FILE_B-NOT: sil_witness_table hidden Thing: Equatable module main
 // FILE_B: sil_witness_table hidden Thing: Hashable module main
 // FILE_B-NOT: sil_witness_table hidden Thing: Equatable module main
 
-// FILE_C-NOT: sil [transparent] [thunk] @$s4main5ThingVSkAAsADP9hashValueSivgTW
-// FILE_C: sil private [transparent] [thunk] @$s4main5ThingVSQAASQ2eeoiySbx_xtFZTW
-// FILE_C-NOT: sil [transparent] [thunk] @$s4main5ThingVSkAAsADP9hashValueSivgTW
+// FILE_C-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSkAAsADP9hashValueSivgTW
+// FILE_C: sil private [transparent] [thunk] [ossa] @$s4main5ThingVSQAASQ2eeoiySbx_xtFZTW
+// FILE_C-NOT: sil [transparent] [thunk] [ossa] @$s4main5ThingVSkAAsADP9hashValueSivgTW
 
 // FILE_C-NOT: sil_witness_table hidden Thing: Hashable module main
 // FILE_C: sil_witness_table hidden Thing: Equatable module main
diff --git a/test/SILGen/init_ref_delegation.swift b/test/SILGen/init_ref_delegation.swift
index 4e15400..7fc56b9 100644
--- a/test/SILGen/init_ref_delegation.swift
+++ b/test/SILGen/init_ref_delegation.swift
@@ -4,7 +4,7 @@
 
 // Initializer delegation within a struct.
 struct S {
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation1SV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S.Type) -> S {
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation1SV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S.Type) -> S {
   init() {
     // CHECK: bb0([[SELF_META:%[0-9]+]] : $@thin S.Type):
     // CHECK-NEXT:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var S }
@@ -31,7 +31,7 @@
   // We don't want the enum to be uninhabited
   case Foo
 
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation1EO{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin E.Type) -> E
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation1EO{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin E.Type) -> E
   init() {
     // CHECK: bb0([[E_META:%[0-9]+]] : $@thin E.Type):
     // CHECK:   [[E_BOX:%[0-9]+]] = alloc_box ${ var E }
@@ -55,7 +55,7 @@
 
 // Initializer delegation to a generic initializer
 struct S2 {
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation2S2V{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S2.Type) -> S2
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation2S2V{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thin S2.Type) -> S2
   init() {
     // CHECK: bb0([[S2_META:%[0-9]+]] : $@thin S2.Type):
     // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var S2 }
@@ -85,7 +85,7 @@
 class C1 {
   var ivar: X
 
- // CHECK-LABEL: sil hidden @$s19init_ref_delegation2C1C{{[_0-9a-zA-Z]*}}fC
+ // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation2C1C{{[_0-9a-zA-Z]*}}fC
   convenience init(x: X) {
     // CHECK: bb0([[X:%[0-9]+]] : $X, [[SELF_META:%[0-9]+]] : $@thick C1.Type):
     // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var C1 }
@@ -107,7 +107,7 @@
 @objc class C2 {
   var ivar: X
 
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fC
   convenience init(x: X) {
     // CHECK: bb0([[X:%[0-9]+]] : $X, [[SELF_META:%[0-9]+]] : $@thick C2.Type):
     // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var C2 }
@@ -120,11 +120,11 @@
     // CHECK:   destroy_value [[MARKED_SELF_BOX]] : ${ var C2 }
     // CHECK:   return [[VAR_15]] : $C2
     self.init(x1: x, x2: x)
-    // CHECK-NOT: sil hidden @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (X, @owned C2) -> @owned C2 {
+    // CHECK-NOT: sil hidden [ossa] @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (X, @owned C2) -> @owned C2 {
   }
 
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fC : $@convention(method) (X, X, @thick C2.Type) -> @owned C2 {
-  // CHECK-NOT:   sil @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (X, X, @owned C2) -> @owned C2 {
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fC : $@convention(method) (X, X, @thick C2.Type) -> @owned C2 {
+  // CHECK-NOT:   sil [ossa] @$s19init_ref_delegation2C2C{{[_0-9a-zA-Z]*}}fcTo : $@convention(objc_method) (X, X, @owned C2) -> @owned C2 {
   init(x1: X, x2: X) { ivar = x1 }
 }
 
@@ -133,7 +133,7 @@
 class C3 {
   var i: Int = 5
 
-  // CHECK-LABEL: sil hidden @$s19init_ref_delegation2C3C{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s19init_ref_delegation2C3C{{[_0-9a-zA-Z]*}}fC
   convenience init() {
     // CHECK: mark_uninitialized [delegatingself]
     // CHECK-NOT: integer_literal
@@ -154,7 +154,7 @@
   convenience init(x1: X) {
     self.init()
   }
-  // CHECK: sil hidden @$s19init_ref_delegation2C4C{{[_0-9a-zA-Z]*}}fC
+  // CHECK: sil hidden [ossa] @$s19init_ref_delegation2C4C{{[_0-9a-zA-Z]*}}fC
   // CHECK: [[PEER:%[0-9]+]] = function_ref @$s19init_ref_delegation2C4C{{[_0-9a-zA-Z]*}}fC
   // CHECK: apply [[PEER]]([[X:%[0-9]+]], [[META:%[0-9]+]])
   convenience init(x2: X) {
diff --git a/test/SILGen/initializers.swift b/test/SILGen/initializers.swift
index 1075538..a66ebff 100644
--- a/test/SILGen/initializers.swift
+++ b/test/SILGen/initializers.swift
@@ -358,7 +358,7 @@
     return nil
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17FailableBaseClassC19failAfterDelegationACSgyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17FailableBaseClassC19failAfterDelegationACSgyt_tcfC
   // CHECK: bb0([[SELF_META:%.*]] : $@thick FailableBaseClass.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var FailableBaseClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -377,7 +377,7 @@
 
   // Optional to optional
   //
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17FailableBaseClassC20failDuringDelegationACSgyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17FailableBaseClassC20failDuringDelegationACSgyt_tcfC
   // CHECK: bb0([[SELF_META:%.*]] : $@thick FailableBaseClass.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var FailableBaseClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -410,7 +410,7 @@
 
   // IUO to optional
   //
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17FailableBaseClassC21failDuringDelegation2ACSgyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17FailableBaseClassC21failDuringDelegation2ACSgyt_tcfC
   // CHECK: bb0([[SELF_META:%.*]] : $@thick FailableBaseClass.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var FailableBaseClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -456,7 +456,7 @@
 class FailableDerivedClass : FailableBaseClass {
   var otherMember: Canary
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers20FailableDerivedClassC27derivedFailBeforeDelegationACSgyt_tcfc : $@convention(method) (@owned FailableDerivedClass) -> @owned Optional<FailableDerivedClass> {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers20FailableDerivedClassC27derivedFailBeforeDelegationACSgyt_tcfc : $@convention(method) (@owned FailableDerivedClass) -> @owned Optional<FailableDerivedClass> {
   // CHECK: bb0([[OLD_SELF:%.*]] : @owned $FailableDerivedClass):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var FailableDerivedClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [derivedself] [[SELF_BOX]]
@@ -475,7 +475,7 @@
     return nil
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers20FailableDerivedClassC27derivedFailDuringDelegationACSgyt_tcfc : $@convention(method) (@owned FailableDerivedClass) -> @owned Optional<FailableDerivedClass> {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers20FailableDerivedClassC27derivedFailDuringDelegationACSgyt_tcfc : $@convention(method) (@owned FailableDerivedClass) -> @owned Optional<FailableDerivedClass> {
   // CHECK: bb0([[OLD_SELF:%.*]] : @owned $FailableDerivedClass):
   init?(derivedFailDuringDelegation: ()) {
     // First initialize the lvalue for self.
@@ -571,7 +571,7 @@
 
   // ---- Delegating to super
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC30delegatingFailBeforeDelegationACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC30delegatingFailBeforeDelegationACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
   // CHECK: bb0(
   // First initialize.
   // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
@@ -615,7 +615,7 @@
     super.init(noFail: ())
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC41delegatingFailDuringDelegationArgEmissionACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC41delegatingFailDuringDelegationArgEmissionACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
   // CHECK: bb0(
   // First initialize.
   // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
@@ -666,7 +666,7 @@
     super.init(noFail: try unwrap(delegatingFailDuringDelegationArgEmission))
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC34delegatingFailDuringDelegationCallACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC34delegatingFailDuringDelegationCallACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
   // CHECK: bb0(
   // First initialize.
   // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
@@ -697,7 +697,7 @@
     try super.init()
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC29delegatingFailAfterDelegationACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC29delegatingFailAfterDelegationACSi_tKcfc : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
   // CHECK: bb0(
   // First initialize.
   // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
@@ -733,7 +733,7 @@
     try unwrap(delegatingFailAfterDelegation)
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC30delegatingFailBeforeDelegation0fg6DuringI11ArgEmissionACSi_SitKcfc : $@convention(method) (Int, Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC30delegatingFailBeforeDelegation0fg6DuringI11ArgEmissionACSi_SitKcfc : $@convention(method) (Int, Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
   // Create our box.
   // CHECK:   [[REF:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
   // CHECK:   [[MARK_UNINIT:%.*]] = mark_uninitialized [derivedself] [[REF]] : ${ var ThrowDerivedClass }
@@ -867,7 +867,7 @@
     try unwrap(chainingFailAfterDelegation)
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC39chainingFailDuringDelegationArgEmission0fghI4CallACSi_SitKcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC39chainingFailDuringDelegationArgEmission0fghI4CallACSi_SitKcfC
   // CHECK: bb0({{.*}}, [[SELF_META:%.*]] : $@thick ThrowDerivedClass.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -901,7 +901,7 @@
     try unwrap(chainingFailAfterDelegation)
   }
 
-  // CHECK-LABEL: sil hidden @$s21failable_initializers17ThrowDerivedClassC32chainingFailDuringDelegationCall0fg5AfterI0ACSi_SitKcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers17ThrowDerivedClassC32chainingFailDuringDelegationCall0fg5AfterI0ACSi_SitKcfC
   // CHECK: bb0({{.*}}, [[SELF_META:%.*]] : $@thick ThrowDerivedClass.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var ThrowDerivedClass }, let, name "self"
   // CHECK:   [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -1110,7 +1110,7 @@
 }
 
 class InOutInitializer {
-// CHECK-LABEL: sil hidden @$s21failable_initializers16InOutInitializerC1xACSiz_tcfC : $@convention(method) (@inout Int, @thick InOutInitializer.Type) -> @owned InOutInitializer {
+// CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers16InOutInitializerC1xACSiz_tcfC : $@convention(method) (@inout Int, @thick InOutInitializer.Type) -> @owned InOutInitializer {
 // CHECK: bb0(%0 : $*Int, %1 : $@thick InOutInitializer.Type):
   init(x: inout Int) {}
 }
@@ -1121,7 +1121,7 @@
 }
 class SubVariadic : SuperVariadic { }
 
-// CHECK-LABEL: sil hidden @$s21failable_initializers11SubVariadicC4intsACSid_tcfc
+// CHECK-LABEL: sil hidden [ossa] @$s21failable_initializers11SubVariadicC4intsACSid_tcfc
 // CHECK:       bb0(%0 : @owned $Array<Int>, %1 : @owned $SubVariadic):
 // CHECK:         [[SELF_UPCAST:%.*]] = upcast {{.*}} : $SubVariadic to $SuperVariadic
 // CHECK:         [[T0:%.*]] = begin_borrow %0 : $Array<Int>
diff --git a/test/SILGen/inlinable_attribute.swift b/test/SILGen/inlinable_attribute.swift
index ad5937e..b6cac83 100644
--- a/test/SILGen/inlinable_attribute.swift
+++ b/test/SILGen/inlinable_attribute.swift
@@ -1,37 +1,37 @@
 // 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) () -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute15fragileFunctionyyF : $@convention(thin) () -> ()
 @inlinable public func fragileFunction() {
 
 }
 
 public struct MySt {
-  // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute4MyStV6methodyyF : $@convention(method) (MySt) -> ()
+  // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute4MyStV6methodyyF : $@convention(method) (MySt) -> ()
   @inlinable public func method() {}
 
-  // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute4MyStV8propertySivg : $@convention(method) (MySt) -> Int
+  // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute4MyStV8propertySivg : $@convention(method) (MySt) -> Int
   @inlinable public var property: Int {
     return 5
   }
 
-  // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute4MyStVyS2icig : $@convention(method) (Int, MySt) -> Int
+  // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute4MyStVyS2icig : $@convention(method) (Int, MySt) -> Int
   @inlinable public subscript(x: Int) -> Int {
     return x
   }
 }
 
 public class MyCls {
-  // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute5MyClsCfD : $@convention(method) (@owned MyCls) -> ()
+  // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute5MyClsCfD : $@convention(method) (@owned MyCls) -> ()
   @inlinable deinit {}
 
   // Allocating entry point is [serialized]
 
-  // CHECK-LABEL: sil [serialized] @$s19inlinable_attribute5MyClsC14designatedInitACyt_tcfC : $@convention(method) (@thick MyCls.Type) -> @owned MyCls
+  // CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute5MyClsC14designatedInitACyt_tcfC : $@convention(method) (@thick MyCls.Type) -> @owned MyCls
   public init(designatedInit: ()) {}
 
   // Note -- convenience init is intentionally not [serialized]
 
-  // CHECK-LABEL: sil @$s19inlinable_attribute5MyClsC15convenienceInitACyt_tcfC : $@convention(method) (@thick MyCls.Type) -> @owned MyCls
+  // CHECK-LABEL: sil [ossa] @$s19inlinable_attribute5MyClsC15convenienceInitACyt_tcfC : $@convention(method) (@thick MyCls.Type) -> @owned MyCls
   public convenience init(convenienceInit: ()) {
     self.init(designatedInit: ())
   }
@@ -43,14 +43,14 @@
   case c(MySt)
 }
 
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$s19inlinable_attribute6MyEnumO1cyAcA0C2StVcACmFTc : $@convention(thin) (@thin MyEnum.Type) -> @owned @callee_guaranteed (MySt) -> MyEnum
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$s19inlinable_attribute6MyEnumO1cyAcA0C2StVcACmFTc : $@convention(thin) (@thin MyEnum.Type) -> @owned @callee_guaranteed (MySt) -> MyEnum
 
 @inlinable public func referencesMyEnum() {
   _ = MyEnum.c
 }
 
-// CHECK-LABEL: sil non_abi [transparent] [serialized] @$s19inlinable_attribute15HasInitializersV1xSivpfi : $@convention(thin) () -> Int
-// CHECK-LABEL: sil non_abi [transparent] [serialized] @$s19inlinable_attribute15HasInitializersV1ySivpfi : $@convention(thin) () -> Int
+// CHECK-LABEL: sil non_abi [transparent] [serialized] [ossa] @$s19inlinable_attribute15HasInitializersV1xSivpfi : $@convention(thin) () -> Int
+// CHECK-LABEL: sil non_abi [transparent] [serialized] [ossa] @$s19inlinable_attribute15HasInitializersV1ySivpfi : $@convention(thin) () -> Int
 
 @_fixed_layout
 public struct HasInitializers {
@@ -64,12 +64,12 @@
   public func gallop() {}
 }
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute15talkAboutAHorse1hyAA5HorseC_tF : $@convention(thin) (@guaranteed Horse) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute15talkAboutAHorse1hyAA5HorseC_tF : $@convention(thin) (@guaranteed Horse) -> () {
 // CHECK: function_ref @$s19inlinable_attribute5HorseC6gallopyyFTc
 // CHECK: return
 // CHECK: }
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s19inlinable_attribute5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> () {
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s19inlinable_attribute5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> () {
 // CHECK: class_method
 // CHECK: return
 // CHECK: }
@@ -92,25 +92,25 @@
   init(horse: Horse) {}
 }
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute017PublicDerivedFromC0Cfd : $@convention(method) (@guaranteed PublicDerivedFromPublic) -> @owned Builtin.NativeObject
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute017PublicDerivedFromC0CfD : $@convention(method) (@owned PublicDerivedFromPublic) -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute017PublicDerivedFromC0Cfd : $@convention(method) (@guaranteed PublicDerivedFromPublic) -> @owned Builtin.NativeObject
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute017PublicDerivedFromC0CfD : $@convention(method) (@owned PublicDerivedFromPublic) -> ()
 
 // Make sure the synthesized delegating initializer is inlinable also
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute017PublicDerivedFromC0C5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PublicDerivedFromPublic) -> @owned PublicDerivedFromPublic
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute017PublicDerivedFromC0C5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PublicDerivedFromPublic) -> @owned PublicDerivedFromPublic
 @_fixed_layout
 public class PublicDerivedFromPublic : PublicBase {
   // Allow @inlinable deinits
   @inlinable deinit {}
 }
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute20UFIDerivedFromPublicC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned UFIDerivedFromPublic) -> @owned UFIDerivedFromPublic
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute20UFIDerivedFromPublicC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned UFIDerivedFromPublic) -> @owned UFIDerivedFromPublic
 @usableFromInline
 @_fixed_layout
 class UFIDerivedFromPublic : PublicBase {
 }
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute17UFIDerivedFromUFIC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned UFIDerivedFromUFI) -> @owned UFIDerivedFromUFI
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute17UFIDerivedFromUFIC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned UFIDerivedFromUFI) -> @owned UFIDerivedFromUFI
 @usableFromInline
 @_fixed_layout
 class UFIDerivedFromUFI : UFIBase {
@@ -118,32 +118,32 @@
   @inlinable deinit {}
 }
 
-// CHECK-LABEL: sil hidden @$s19inlinable_attribute25InternalDerivedFromPublicC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned InternalDerivedFromPublic) -> @owned InternalDerivedFromPublic
+// CHECK-LABEL: sil hidden [ossa] @$s19inlinable_attribute25InternalDerivedFromPublicC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned InternalDerivedFromPublic) -> @owned InternalDerivedFromPublic
 class InternalDerivedFromPublic : PublicBase {}
 
-// CHECK-LABEL: sil hidden @$s19inlinable_attribute22InternalDerivedFromUFIC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned InternalDerivedFromUFI) -> @owned InternalDerivedFromUFI
+// CHECK-LABEL: sil hidden [ossa] @$s19inlinable_attribute22InternalDerivedFromUFIC5horseAcA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned InternalDerivedFromUFI) -> @owned InternalDerivedFromUFI
 class InternalDerivedFromUFI : UFIBase {}
 
-// CHECK-LABEL: sil private @$s19inlinable_attribute24PrivateDerivedFromPublic{{.+}}LLC5horseAdA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PrivateDerivedFromPublic) -> @owned PrivateDerivedFromPublic
+// CHECK-LABEL: sil private [ossa] @$s19inlinable_attribute24PrivateDerivedFromPublic{{.+}}LLC5horseAdA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PrivateDerivedFromPublic) -> @owned PrivateDerivedFromPublic
 private class PrivateDerivedFromPublic : PublicBase {}
 
-// CHECK-LABEL: sil private @$s19inlinable_attribute21PrivateDerivedFromUFI{{.+}}LLC5horseAdA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PrivateDerivedFromUFI) -> @owned PrivateDerivedFromUFI
+// CHECK-LABEL: sil private [ossa] @$s19inlinable_attribute21PrivateDerivedFromUFI{{.+}}LLC5horseAdA5HorseC_tcfc : $@convention(method) (@owned Horse, @owned PrivateDerivedFromUFI) -> @owned PrivateDerivedFromUFI
 private class PrivateDerivedFromUFI : UFIBase {}
 
 // Make sure that nested functions are also serializable.
 
-// CHECK-LABEL: sil [serialized] @$s19inlinable_attribute3basyyF
+// CHECK-LABEL: sil [serialized] [ossa] @$s19inlinable_attribute3basyyF
 @inlinable
 public func bas() {
-  // CHECK-LABEL: sil shared [serialized] @$s19inlinable_attribute3basyyF3zimL_yyF
+  // CHECK-LABEL: sil shared [serialized] [ossa] @$s19inlinable_attribute3basyyF3zimL_yyF
   func zim() {
-    // CHECK-LABEL: sil shared [serialized] @$s19inlinable_attribute3basyyF3zimL_yyF4zangL_yyF
+    // CHECK-LABEL: sil shared [serialized] [ossa] @$s19inlinable_attribute3basyyF3zimL_yyF4zangL_yyF
     func zang() { }
   }
 
-  // CHECK-LABEL: sil shared [serialized] @$s19inlinable_attribute3bas{{[_0-9a-zA-Z]*}}U_
+  // CHECK-LABEL: sil shared [serialized] [ossa] @$s19inlinable_attribute3bas{{[_0-9a-zA-Z]*}}U_
   let zung = {
-    // CHECK-LABEL: sil shared [serialized] @$s19inlinable_attribute3basyyFyycfU_7zippityL_yyF
+    // CHECK-LABEL: sil shared [serialized] [ossa] @$s19inlinable_attribute3basyyFyycfU_7zippityL_yyF
     func zippity() { }
   }
 }
diff --git a/test/SILGen/inlinable_attribute_objc.swift b/test/SILGen/inlinable_attribute_objc.swift
index 96d5008..365b50a 100644
--- a/test/SILGen/inlinable_attribute_objc.swift
+++ b/test/SILGen/inlinable_attribute_objc.swift
@@ -15,17 +15,17 @@
 // Make sure we can reference dynamic thunks and curry thunks
 // from inlinable scopes
 
-// CHECK-LABEL: sil [serialized] @$s24inlinable_attribute_objc15talkAboutAHorse1hyAA5HorseC_tF : $@convention(thin) (@guaranteed Horse) -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @$s24inlinable_attribute_objc15talkAboutAHorse1hyAA5HorseC_tF : $@convention(thin) (@guaranteed Horse) -> () {
 // CHECK: function_ref @$s24inlinable_attribute_objc5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> ()
 // CHECK: return
 // CHECK: }
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s24inlinable_attribute_objc5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> ()
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s24inlinable_attribute_objc5HorseC6gallopyyFTc : $@convention(thin) (@guaranteed Horse) -> @owned @callee_guaranteed () -> ()
 // CHECK:   %1 = function_ref @$s24inlinable_attribute_objc5HorseC6gallopyyFTD
 // CHECK: return
 // CHECK: }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s24inlinable_attribute_objc5HorseC6gallopyyFTD : $@convention(method) (@guaranteed Horse) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s24inlinable_attribute_objc5HorseC6gallopyyFTD : $@convention(method) (@guaranteed Horse) -> ()
 // CHECK: objc_method
 // CHECK: return
 // CHECK: }
diff --git a/test/SILGen/inline_always.swift b/test/SILGen/inline_always.swift
index e8b193c..8625056 100644
--- a/test/SILGen/inline_always.swift
+++ b/test/SILGen/inline_always.swift
@@ -1,6 +1,6 @@
 // RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden [always_inline] @$s13inline_always0b1_A7_calleeyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [always_inline] [ossa] @$s13inline_always0b1_A7_calleeyyF : $@convention(thin) () -> ()
 @inline(__always)
 func always_inline_callee() {}
 
@@ -9,24 +9,24 @@
 }
 
 struct AlwaysInlinedMember : AlwaysInline {
-  // CHECK-LABEL: sil hidden [always_inline] @$s13inline_always19AlwaysInlinedMemberV0bD0yyF : $@convention(method) (AlwaysInlinedMember) -> () {
+  // CHECK-LABEL: sil hidden [always_inline] [ossa] @$s13inline_always19AlwaysInlinedMemberV0bD0yyF : $@convention(method) (AlwaysInlinedMember) -> () {
   @inline(__always)
   func alwaysInlined() {}
 
   @inline(__always)
   var alwaysInlinedVar: Int {
-    // CHECK-LABEL: sil hidden [always_inline] @$s13inline_always19AlwaysInlinedMemberV0bD3VarSivg : $@convention(method) (AlwaysInlinedMember) -> Int
+    // CHECK-LABEL: sil hidden [always_inline] [ossa] @$s13inline_always19AlwaysInlinedMemberV0bD3VarSivg : $@convention(method) (AlwaysInlinedMember) -> Int
     get { return 0 }
 
-    // CHECK-LABEL: sil hidden [always_inline] @$s13inline_always19AlwaysInlinedMemberV0bD3VarSivs : $@convention(method) (Int, @inout AlwaysInlinedMember) -> ()
+    // CHECK-LABEL: sil hidden [always_inline] [ossa] @$s13inline_always19AlwaysInlinedMemberV0bD3VarSivs : $@convention(method) (Int, @inout AlwaysInlinedMember) -> ()
     set { }
   }
 
-  // CHECK-LABEL: sil hidden [always_inline] @$s13inline_always19AlwaysInlinedMemberV0bD6GetterSivg : $@convention(method) (AlwaysInlinedMember) -> Int
+  // CHECK-LABEL: sil hidden [always_inline] [ossa] @$s13inline_always19AlwaysInlinedMemberV0bD6GetterSivg : $@convention(method) (AlwaysInlinedMember) -> Int
   var alwaysInlinedGetter: Int {
     @inline(__always)
     get { return 0 }
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] [always_inline] @$s13inline_always19AlwaysInlinedMemberVAA0C6InlineA2aDP0bD0yyFTW : $@convention(witness_method: AlwaysInline) (@in_guaranteed AlwaysInlinedMember) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [always_inline] [ossa] @$s13inline_always19AlwaysInlinedMemberVAA0C6InlineA2aDP0bD0yyFTW : $@convention(witness_method: AlwaysInline) (@in_guaranteed AlwaysInlinedMember) -> () {
diff --git a/test/SILGen/interface_type_mangling.swift b/test/SILGen/interface_type_mangling.swift
index 27b8d27..722cf62 100644
--- a/test/SILGen/interface_type_mangling.swift
+++ b/test/SILGen/interface_type_mangling.swift
@@ -194,14 +194,14 @@
   typealias Tee = T
 
   var a: T
-  // CHECK-LABEL: sil private @$s23interface_type_mangling18GenericTypeContextV09closureIndF0yyqd__lF3fooL_yyx_qd__tr__lF
+  // CHECK-LABEL: sil private [ossa] @$s23interface_type_mangling18GenericTypeContextV09closureIndF0yyqd__lF3fooL_yyx_qd__tr__lF
   func closureInGenericContext<U>(_ b: U) {
     func foo(_ x: T, _ y: U) { }
 
     foo(a, b)
   }
 
-  // CHECK-LABEL: sil private @$s23interface_type_mangling18GenericTypeContextV09closureInd8PropertyF0xvg3fooL_xylF
+  // CHECK-LABEL: sil private [ossa] @$s23interface_type_mangling18GenericTypeContextV09closureInd8PropertyF0xvg3fooL_xylF
   var closureInGenericPropertyContext: T {
     func foo() -> T { }
 
@@ -210,7 +210,7 @@
 
   // FIXME: Demangling for generic params at depth is wrong.
   // CHECK-LABEL: twoParamsAtDepth<A, B>(_: A1, y: B1) -> ()
-  // CHECK-LABEL: sil hidden @$s23interface_type_mangling18GenericTypeContextV16twoParamsAtDepth_1yyqd___qd_0_tr0_lF
+  // CHECK-LABEL: sil hidden [ossa] @$s23interface_type_mangling18GenericTypeContextV16twoParamsAtDepth_1yyqd___qd_0_tr0_lF
   func twoParamsAtDepth<A, B>(_ x: A, y: B) {}
 }
 
diff --git a/test/SILGen/ivar_destroyer.swift b/test/SILGen/ivar_destroyer.swift
index 1661bee..ed49bda 100644
--- a/test/SILGen/ivar_destroyer.swift
+++ b/test/SILGen/ivar_destroyer.swift
@@ -25,7 +25,7 @@
   var z: Canary = Canary()
 }
 
-// CHECK-LABEL: sil hidden @$s14ivar_destroyer36DerivedClassWithNonTrivialPropertiesCfE
+// CHECK-LABEL: sil hidden [ossa] @$s14ivar_destroyer36DerivedClassWithNonTrivialPropertiesCfE
 // CHECK:       bb0(%0 : @guaranteed $DerivedClassWithNonTrivialProperties):
 // CHECK-NEXT:    debug_value %0
 // CHECK-NEXT:    [[Z_ADDR:%.*]] = ref_element_addr %0
diff --git a/test/SILGen/keypath_application.swift b/test/SILGen/keypath_application.swift
index 67f177c..514d070 100644
--- a/test/SILGen/keypath_application.swift
+++ b/test/SILGen/keypath_application.swift
@@ -6,7 +6,7 @@
 protocol P {}
 protocol Q {}
 
-// CHECK-LABEL: sil hidden @{{.*}}loadable
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}loadable
 func loadable(readonly: A, writable: inout A,
               value: B,
               kp: KeyPath<A, B>,
@@ -106,7 +106,7 @@
   writable[keyPath: rkp] = value
 } // CHECK-LABEL: } // end sil function '{{.*}}loadable
 
-// CHECK-LABEL: sil hidden @{{.*}}addressOnly
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}addressOnly
 func addressOnly(readonly: P, writable: inout P,
                  value: Q,
                  kp: KeyPath<P, Q>,
@@ -135,7 +135,7 @@
   writable[keyPath: rkp] = value
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}reabstracted
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}reabstracted
 func reabstracted(readonly: @escaping () -> (),
                   writable: inout () -> (),
                   value: @escaping (A) -> B,
@@ -165,7 +165,7 @@
   writable[keyPath: rkp] = value
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}partial
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}partial
 func partial<A>(valueA: A,
                 valueB: Int,
                 pkpA: PartialKeyPath<A>,
@@ -192,7 +192,7 @@
   var tt: Int { get { return 0 } set { } }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}writebackNesting
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}writebackNesting
 func writebackNesting(x: inout Int,
                       y: WritableKeyPath<Int, Int>,
                       z: WritableKeyPath<Int, Int>,
diff --git a/test/SILGen/keypath_witness_overrides.swift b/test/SILGen/keypath_witness_overrides.swift
index a8033da..90d3ae8 100644
--- a/test/SILGen/keypath_witness_overrides.swift
+++ b/test/SILGen/keypath_witness_overrides.swift
@@ -6,7 +6,7 @@
 // table entry for a protocol requirement is introduced.
 import protocol_overrides
 
-// CHECK-LABEL: sil hidden @$s25keypath_witness_overrides18getWritableKeyPath_5indexs03AnyfG0Cx_5IndexQzt09protocol_C015OverridesSetterRzSHAGRQlF
+// CHECK-LABEL: sil hidden [ossa] @$s25keypath_witness_overrides18getWritableKeyPath_5indexs03AnyfG0Cx_5IndexQzt09protocol_C015OverridesSetterRzSHAGRQlF
 func getWritableKeyPath<OS: OverridesSetter>(_ c: OS, index: OS.Index) -> AnyKeyPath
 where OS.Index: Hashable {
   // CHECK: keypath $WritableKeyPath<OS, OS.Element>,
@@ -19,8 +19,8 @@
   return keypath
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s18protocol_overrides14OriginalGetterPy7ElementQz5IndexQzcipAA15OverridesSetterRzSHAGRQlxxTK
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18protocol_overrides14OriginalGetterPy7ElementQz5IndexQzcipAA15OverridesSetterRzSHAGRQlxxTK
 // CHECK: witness_method $OS, #OriginalGetter.subscript!getter.1
 
-// CHECK-LABEL: sil shared [thunk] @$s18protocol_overrides10AddsSetterPy7ElementQz5IndexQzcipAA09OverridesD0RzSHAGRQlxxTk
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18protocol_overrides10AddsSetterPy7ElementQz5IndexQzcipAA09OverridesD0RzSHAGRQlxxTk
 // CHECK-LABEL: witness_method $OS, #AddsSetter.subscript!setter.1
diff --git a/test/SILGen/keypaths.swift b/test/SILGen/keypaths.swift
index 2d73dc4..ef3c89a 100644
--- a/test/SILGen/keypaths.swift
+++ b/test/SILGen/keypaths.swift
@@ -48,7 +48,7 @@
 protocol PoC : C<Int> {}
 */
 
-// CHECK-LABEL: sil hidden @{{.*}}storedProperties
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}storedProperties
 func storedProperties<T>(_: T) {
   // CHECK: keypath $WritableKeyPath<S<T>, T>, <τ_0_0> (root $S<τ_0_0>; stored_property #S.x : $τ_0_0) <T>
   _ = \S<T>.x
@@ -66,7 +66,7 @@
   _ = \C<T>.z.z.y
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}computedProperties
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}computedProperties
 func computedProperties<T: P>(_: T) {
   // CHECK: keypath $ReferenceWritableKeyPath<C<T>, S<T>>, <τ_0_0 where τ_0_0 : P> (
   // CHECK-SAME: root $C<τ_0_0>;
@@ -167,7 +167,7 @@
   var y: String
 }
 
-// CHECK-LABEL: sil hidden @$s8keypaths35keyPathsWithSpecificGenericInstanceyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8keypaths35keyPathsWithSpecificGenericInstanceyyF
 func keyPathsWithSpecificGenericInstance() {
   // CHECK: keypath $KeyPath<Concrete, String>, (
   // CHECK-SAME: gettable_property $String,
@@ -201,7 +201,7 @@
   var y: OptionalFields?
 }
 
-// CHECK-LABEL: sil hidden @$s8keypaths18keyPathForOptionalyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8keypaths18keyPathForOptionalyyF
 func keyPathForOptional() {
   // CHECK: keypath $WritableKeyPath<OptionalFields, S<Int>>, (
   // CHECK-SAME:   stored_property #OptionalFields.x : $Optional<S<Int>>;
@@ -235,7 +235,7 @@
   init() { fatalError() }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}keyPathForStorageQualified
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}keyPathForStorageQualified
 func keyPathForStorageQualified() {
   // CHECK: = keypath $ReferenceWritableKeyPath<StorageQualified, Optional<StorageQualified>>,
   // CHECK-SAME: settable_property $Optional<StorageQualified>, id #StorageQualified.tooWeak!getter.1
@@ -264,7 +264,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}11iuoKeyPaths
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}11iuoKeyPaths
 func iuoKeyPaths() {
   // CHECK: = keypath $WritableKeyPath<IUOProperty, Int>,
   // CHECK-SAME: stored_property #IUOProperty.iuo
@@ -316,7 +316,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}10subscripts
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}10subscripts
 func subscripts<T: Hashable, U: Hashable>(x: T, y: U, s: String) {
   _ = \Subscripts<T>.[]
   _ = \Subscripts<T>.[generic: x]
@@ -348,7 +348,7 @@
   _ = \Subscripts<T>.[Treble()]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}subclass_generics
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}subclass_generics
 func subclass_generics<T: C<Int>, U: C<V>, V/*: PoC*/>(_: T, _: U, _: V) {
   _ = \T.x
   _ = \T.z
@@ -386,7 +386,7 @@
  */
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}identity
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}identity
 func identity<T>(_: T) {
   // CHECK: keypath $WritableKeyPath<T, T>, <τ_0_0> ({{.*}}root $τ_0_0) <T>
   let _: WritableKeyPath<T, T> = \T.self
diff --git a/test/SILGen/keypaths_inlinable.swift b/test/SILGen/keypaths_inlinable.swift
index 35c894c..cda3689 100644
--- a/test/SILGen/keypaths_inlinable.swift
+++ b/test/SILGen/keypaths_inlinable.swift
@@ -11,7 +11,7 @@
   public subscript(x: Int, y: String) -> Bool { get { return false } set { } }
 }
 
-// CHECK-LABEL: sil [serialized] @$s18keypaths_inlinable11usesKeypathyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s18keypaths_inlinable11usesKeypathyyF : $@convention(thin) () -> ()
 @inlinable public func usesKeypath() {
   // FRAGILE: keypath $WritableKeyPath<KeypathStruct, Int>, (root $KeypathStruct; stored_property #KeypathStruct.stored : $Int)
   // RESILIENT: keypath $WritableKeyPath<KeypathStruct, Int>, (root $KeypathStruct; settable_property $Int,  id @$s18keypaths_inlinable13KeypathStructV6storedSivg : $@convention(method) (@in_guaranteed KeypathStruct) -> Int, getter @$s18keypaths_inlinable13KeypathStructV6storedSivpACTKq : $@convention(thin) (@in_guaranteed KeypathStruct) -> @out Int, setter @$s18keypaths_inlinable13KeypathStructV6storedSivpACTkq : $@convention(thin) (@in_guaranteed Int, @inout KeypathStruct) -> (), external #KeypathStruct.stored)
@@ -26,21 +26,21 @@
   _ = \KeypathStruct[0, ""]
 }
 
-// RESILIENT-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructV6storedSivpACTKq : $@convention(thin) (@in_guaranteed KeypathStruct) -> @out Int
+// RESILIENT-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructV6storedSivpACTKq : $@convention(thin) (@in_guaranteed KeypathStruct) -> @out Int
 // RESILIENT: function_ref @$s18keypaths_inlinable13KeypathStructV6storedSivg
 
-// RESILIENT-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructV6storedSivpACTkq : $@convention(thin) (@in_guaranteed Int, @inout KeypathStruct) -> ()
+// RESILIENT-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructV6storedSivpACTkq : $@convention(thin) (@in_guaranteed Int, @inout KeypathStruct) -> ()
 // RESILIENT: function_ref @$s18keypaths_inlinable13KeypathStructV6storedSivs
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructV8computedSSvpACTKq : $@convention(thin) (@in_guaranteed KeypathStruct) -> @out String
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructV8computedSSvpACTKq : $@convention(thin) (@in_guaranteed KeypathStruct) -> @out String
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructV8computedSSvpACTkq : $@convention(thin) (@in_guaranteed String, @inout KeypathStruct) -> ()
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructV8computedSSvpACTkq : $@convention(thin) (@in_guaranteed String, @inout KeypathStruct) -> ()
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSiSSTHq : $@convention(thin) (UnsafeRawPointer, UnsafeRawPointer) -> Bool
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSiSSTHq : $@convention(thin) (UnsafeRawPointer, UnsafeRawPointer) -> Bool
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSiSSThq : $@convention(thin) (UnsafeRawPointer) -> Int
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSiSSThq : $@convention(thin) (UnsafeRawPointer) -> Int
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructVySbSi_SStcipACTKq : $@convention(thin) (@in_guaranteed KeypathStruct, UnsafeRawPointer) -> @out Bool
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructVySbSi_SStcipACTKq : $@convention(thin) (@in_guaranteed KeypathStruct, UnsafeRawPointer) -> @out Bool
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s18keypaths_inlinable13KeypathStructVySbSi_SStcipACTkq : $@convention(thin) (@in_guaranteed Bool, @inout KeypathStruct, UnsafeRawPointer) -> ()
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s18keypaths_inlinable13KeypathStructVySbSi_SStcipACTkq : $@convention(thin) (@in_guaranteed Bool, @inout KeypathStruct, UnsafeRawPointer) -> ()
 
diff --git a/test/SILGen/keypaths_multi_file.swift b/test/SILGen/keypaths_multi_file.swift
index c44ea2f..bd7639e 100644
--- a/test/SILGen/keypaths_multi_file.swift
+++ b/test/SILGen/keypaths_multi_file.swift
@@ -19,11 +19,11 @@
 
 // A.x setter
 // CHECK-LABEL: sil hidden_external @$s8keypaths1AV1xSivs
-// DEFINITION-LABEL: sil hidden @$s8keypaths1AV1xSivs
+// DEFINITION-LABEL: sil hidden [ossa] @$s8keypaths1AV1xSivs
 
 // A.subscript setter
 // CHECK-LABEL: sil hidden_external @$s8keypaths1AVyS2icis
-// DEFINITION-LABEL: sil hidden @$s8keypaths1AVyS2icis
+// DEFINITION-LABEL: sil hidden [ossa] @$s8keypaths1AVyS2icis
 
 func bar<T>(_: T) {
   _ = \C<T>.b
diff --git a/test/SILGen/keypaths_objc.swift b/test/SILGen/keypaths_objc.swift
index e755f77..0dbf081 100644
--- a/test/SILGen/keypaths_objc.swift
+++ b/test/SILGen/keypaths_objc.swift
@@ -25,7 +25,7 @@
   @objc var foo: Foo { fatalError() }
 }
 
-// CHECK-LABEL: sil hidden @$s13keypaths_objc0B8KeypathsyyF
+// CHECK-LABEL: sil hidden [ossa] @$s13keypaths_objc0B8KeypathsyyF
 func objcKeypaths() {
   // CHECK: keypath $WritableKeyPath<NonObjC, Int>, (root
   _ = \NonObjC.x
@@ -47,7 +47,7 @@
   _ = \Foo.differentName
 }
 
-// CHECK-LABEL: sil hidden @$s13keypaths_objc0B18KeypathIdentifiersyyF
+// CHECK-LABEL: sil hidden [ossa] @$s13keypaths_objc0B18KeypathIdentifiersyyF
 func objcKeypathIdentifiers() {
   // CHECK: keypath $KeyPath<ObjCFoo, String>, (objc "objcProp"; {{.*}} id #ObjCFoo.objcProp!getter.1.foreign
   _ = \ObjCFoo.objcProp
@@ -65,7 +65,7 @@
     @objc dynamic var dynamic: Int { return 0 }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}nonobjcExtensionOfObjCClass
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}nonobjcExtensionOfObjCClass
 func nonobjcExtensionOfObjCClass() {
   // Should be treated as a statically-dispatch property
   // CHECK: keypath $KeyPath<NSObject, X>, ({{.*}} id @
@@ -81,7 +81,7 @@
   var objcRequirement: Int { get set }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}ProtocolRequirement
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}ProtocolRequirement
 func objcProtocolRequirement<T: ObjCProto>(_: T) {
   // CHECK: keypath {{.*}} id #ObjCProto.objcRequirement!getter.1.foreign
   _ = \T.objcRequirement
@@ -89,7 +89,7 @@
   _ = \ObjCProto.objcRequirement
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}externalObjCProperty
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}externalObjCProperty
 func externalObjCProperty() {
   // Pure ObjC-dispatched properties do not have external descriptors.
   // CHECK: keypath $KeyPath<NSObject, String>, 
diff --git a/test/SILGen/lazy_global_access.swift b/test/SILGen/lazy_global_access.swift
index 8d9e3ee..5d9c8fe 100644
--- a/test/SILGen/lazy_global_access.swift
+++ b/test/SILGen/lazy_global_access.swift
@@ -12,10 +12,10 @@
   static var staticProp = 0
 }
 
-// MAIN: sil hidden @$s18lazy_global_access8usePropsSi_SityF : $@convention(thin) () -> (Int, Int) {
+// MAIN: sil hidden [ossa] @$s18lazy_global_access8usePropsSi_SityF : $@convention(thin) () -> (Int, Int) {
 // MAIN:   global_addr @$s18lazy_global_access0B4PropSivp : $*Int
 // MAIN:   function_ref @$s18lazy_global_access4FoooV10staticPropSivau : $@convention(thin) () -> Builtin.RawPointer
-// LIBRARY: sil hidden @$s18lazy_global_access8usePropsSi_SityF : $@convention(thin) () -> (Int, Int) {
+// LIBRARY: sil hidden [ossa] @$s18lazy_global_access8usePropsSi_SityF : $@convention(thin) () -> (Int, Int) {
 // LIBRARY:   function_ref @$s18lazy_global_access0B4PropSivau : $@convention(thin) () -> Builtin.RawPointer
 // LIBRARY:   function_ref @$s18lazy_global_access4FoooV10staticPropSivau : $@convention(thin) () -> Builtin.RawPointer
 func useProps() -> (Int, Int) {
diff --git a/test/SILGen/lazy_globals.swift b/test/SILGen/lazy_globals.swift
index 9fa2e1c..4e1cc29 100644
--- a/test/SILGen/lazy_globals.swift
+++ b/test/SILGen/lazy_globals.swift
@@ -1,11 +1,11 @@
 // RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
-// CHECK: sil private @globalinit_[[T:.*]]_func0 : $@convention(c) () -> () {
+// CHECK: sil private [ossa] @globalinit_[[T:.*]]_func0 : $@convention(c) () -> () {
 // CHECK:   alloc_global @$s12lazy_globals1xSiv
 // CHECK:   [[XADDR:%.*]] = global_addr @$s12lazy_globals1xSivp : $*Int
 // CHECK:   store {{%.*}} to [trivial] [[XADDR]] : $*Int
 
-// CHECK: sil hidden [global_init] @$s12lazy_globals1xSivau : $@convention(thin) () -> Builtin.RawPointer {
+// CHECK: sil hidden [global_init] [ossa] @$s12lazy_globals1xSivau : $@convention(thin) () -> Builtin.RawPointer {
 // CHECK:   [[TOKEN_ADDR:%.*]] = global_addr @globalinit_[[T]]_token0 : $*Builtin.Word
 // CHECK:   [[TOKEN_PTR:%.*]] = address_to_pointer [[TOKEN_ADDR]] : $*Builtin.Word to $Builtin.RawPointer
 // CHECK:   [[INIT_FUNC:%.*]] = function_ref @globalinit_[[T]]_func0 : $@convention(c) () -> ()
@@ -16,14 +16,14 @@
 // CHECK: }
 var x: Int = 0
 
-// CHECK: sil private @globalinit_[[T:.*]]_func1 : $@convention(c) () -> () {
+// CHECK: sil private [ossa] @globalinit_[[T:.*]]_func1 : $@convention(c) () -> () {
 // CHECK:   alloc_global @$s12lazy_globals3FooV3fooSivpZ
 // CHECK:   [[XADDR:%.*]] = global_addr @$s12lazy_globals3FooV3fooSivpZ : $*Int
 // CHECK:   store {{.*}} to [trivial] [[XADDR]] : $*Int
 // CHECK:   return
 
 struct Foo {
-// CHECK: sil hidden [global_init] @$s12lazy_globals3FooV3fooSivau : $@convention(thin) () -> Builtin.RawPointer {
+// CHECK: sil hidden [global_init] [ossa] @$s12lazy_globals3FooV3fooSivau : $@convention(thin) () -> Builtin.RawPointer {
 // CHECK:   [[TOKEN_ADDR:%.*]] = global_addr @globalinit_[[T]]_token1 : $*Builtin.Word
 // CHECK:   [[TOKEN_PTR:%.*]] = address_to_pointer [[TOKEN_ADDR]] : $*Builtin.Word to $Builtin.RawPointer
 // CHECK:   [[INIT_FUNC:%.*]] = function_ref @globalinit_[[T]]_func1 : $@convention(c) () -> ()
@@ -40,14 +40,14 @@
   static var initialized: Int = 57
 }
 
-// CHECK: sil private @globalinit_[[T:.*]]_func3 : $@convention(c) () -> () {
+// CHECK: sil private [ossa] @globalinit_[[T:.*]]_func3 : $@convention(c) () -> () {
 // CHECK:   alloc_global @$s12lazy_globals3BarO3barSivpZ
 // CHECK:   [[XADDR:%.*]] = global_addr @$s12lazy_globals3BarO3barSivpZ : $*Int
 // CHECK:   store {{.*}} to [trivial] [[XADDR]] : $*Int
 // CHECK:   return
 
 enum Bar {
-// CHECK: sil hidden [global_init] @$s12lazy_globals3BarO3barSivau : $@convention(thin) () -> Builtin.RawPointer {
+// CHECK: sil hidden [global_init] [ossa] @$s12lazy_globals3BarO3barSivau : $@convention(thin) () -> Builtin.RawPointer {
 // CHECK:   [[TOKEN_ADDR:%.*]] = global_addr @globalinit_[[T]]_token3 : $*Builtin.Word
 // CHECK:   [[TOKEN_PTR:%.*]] = address_to_pointer [[TOKEN_ADDR]] : $*Builtin.Word to $Builtin.RawPointer
 // CHECK:   [[INIT_FUNC:%.*]] = function_ref @globalinit_[[T]]_func3 : $@convention(c) () -> ()
@@ -63,12 +63,12 @@
 
 func f() -> (Int, Int) { return (1, 2) }
 
-// CHECK: sil private @globalinit_[[T]]_func4 : $@convention(c) () -> () {
+// CHECK: sil private [ossa] @globalinit_[[T]]_func4 : $@convention(c) () -> () {
 // CHECK:   function_ref @$s12lazy_globals1fSi_SityF : $@convention(thin) () -> (Int, Int)
-// CHECK: sil hidden [global_init] @$s12lazy_globals2a1Sivau : $@convention(thin) () -> Builtin.RawPointer
+// CHECK: sil hidden [global_init] [ossa] @$s12lazy_globals2a1Sivau : $@convention(thin) () -> Builtin.RawPointer
 // CHECK:   function_ref @globalinit_[[T]]_func4 : $@convention(c) () -> ()
 // CHECK:   global_addr @$s12lazy_globals2a1Sivp : $*Int
-// CHECK: sil hidden [global_init] @$s12lazy_globals2b1Sivau : $@convention(thin) () -> Builtin.RawPointer {
+// CHECK: sil hidden [global_init] [ossa] @$s12lazy_globals2b1Sivau : $@convention(thin) () -> Builtin.RawPointer {
 // CHECK:   function_ref @globalinit_[[T]]_func4 : $@convention(c) () -> ()
 // CHECK:   global_addr @$s12lazy_globals2b1Sivp : $*Int
 var (a1, b1) = f()
diff --git a/test/SILGen/lazy_globals_multiple_vars.swift b/test/SILGen/lazy_globals_multiple_vars.swift
index e4e1b12..0c415d5 100644
--- a/test/SILGen/lazy_globals_multiple_vars.swift
+++ b/test/SILGen/lazy_globals_multiple_vars.swift
@@ -1,32 +1,32 @@
 // RUN: %target-swift-emit-silgen -parse-as-library %s | %FileCheck %s
 
-// CHECK:       sil private [[INIT_A_B:@globalinit_.*]] :
+// CHECK:       sil private [ossa] [[INIT_A_B:@globalinit_.*]] :
 // CHECK:         alloc_global @$s26lazy_globals_multiple_vars1aSiv
 // CHECK:         global_addr @$s26lazy_globals_multiple_vars1aSiv
 // CHECK:         alloc_global @$s26lazy_globals_multiple_vars1bSiv
 // CHECK:         global_addr @$s26lazy_globals_multiple_vars1bSiv
-// CHECK:       sil hidden [global_init] @$s26lazy_globals_multiple_vars1aSivau
+// CHECK:       sil hidden [global_init] [ossa] @$s26lazy_globals_multiple_vars1aSivau
 // CHECK:         global_addr [[TOKEN_A_B:@globalinit_.*]] :
 // CHECK:         function_ref [[INIT_A_B]]
-// CHECK:       sil hidden [global_init] @$s26lazy_globals_multiple_vars1bSivau
+// CHECK:       sil hidden [global_init] [ossa] @$s26lazy_globals_multiple_vars1bSivau
 // CHECK:         global_addr [[TOKEN_A_B]]
 // CHECK:         function_ref [[INIT_A_B]]
 var (a, b) = (1, 2)
 
-// CHECK:       sil private [[INIT_C:@globalinit_.*]] :
+// CHECK:       sil private [ossa] [[INIT_C:@globalinit_.*]] :
 // CHECK-NOT:     global_addr @$s26lazy_globals_multiple_vars1dSiv
 // CHECK:         alloc_global @$s26lazy_globals_multiple_vars1cSiv
 // CHECK:         global_addr @$s26lazy_globals_multiple_vars1cSiv
 // CHECK-NOT:     global_addr @$s26lazy_globals_multiple_vars1dSiv
-// CHECK:       sil hidden [global_init] @$s26lazy_globals_multiple_vars1cSivau
+// CHECK:       sil hidden [global_init] [ossa] @$s26lazy_globals_multiple_vars1cSivau
 // CHECK:         global_addr [[TOKEN_C:@globalinit_.*]] :
 // CHECK:         function_ref [[INIT_C]]
-// CHECK:       sil private [[INIT_D:@globalinit_.*]] :
+// CHECK:       sil private [ossa] [[INIT_D:@globalinit_.*]] :
 // CHECK-NOT:     global_addr @$s26lazy_globals_multiple_vars1cSiv
 // CHECK:         alloc_global @$s26lazy_globals_multiple_vars1dSiv
 // CHECK:         global_addr @$s26lazy_globals_multiple_vars1dSiv
 // CHECK-NOT:     global_addr @$s26lazy_globals_multiple_vars1cSiv
-// CHECK:       sil hidden [global_init] @$s26lazy_globals_multiple_vars1dSivau
+// CHECK:       sil hidden [global_init] [ossa] @$s26lazy_globals_multiple_vars1dSivau
 // CHECK-NOT:     global_addr [[TOKEN_C]]
 // CHECK:         global_addr [[TOKEN_D:@globalinit_.*]] :
 // CHECK-NOT:     global_addr [[TOKEN_C]]
diff --git a/test/SILGen/lazy_properties.swift b/test/SILGen/lazy_properties.swift
index bf92e18..9540ee9 100644
--- a/test/SILGen/lazy_properties.swift
+++ b/test/SILGen/lazy_properties.swift
@@ -2,13 +2,13 @@
 
 // <rdar://problem/17405715> lazy property crashes silgen of implicit memberwise initializer
 
-// CHECK-LABEL: sil hidden @$s15lazy_properties19StructWithLazyFieldV4onceSivg : $@convention(method) (@inout StructWithLazyField) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s15lazy_properties19StructWithLazyFieldV4onceSivg : $@convention(method) (@inout StructWithLazyField) -> Int
 
-// CHECK-LABEL: sil hidden @$s15lazy_properties19StructWithLazyFieldV4onceSivs : $@convention(method) (Int, @inout StructWithLazyField) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15lazy_properties19StructWithLazyFieldV4onceSivs : $@convention(method) (Int, @inout StructWithLazyField) -> ()
 
-// CHECK-LABEL: sil hidden [transparent] @$s15lazy_properties19StructWithLazyFieldV4onceSivM : $@yield_once @convention(method) (@inout StructWithLazyField) -> @yields @inout Int
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s15lazy_properties19StructWithLazyFieldV4onceSivM : $@yield_once @convention(method) (@inout StructWithLazyField) -> @yields @inout Int
 
-// CHECK-LABEL: sil hidden @$s15lazy_properties19StructWithLazyFieldV4onceACSiSg_tcfC : $@convention(method) (Optional<Int>, @thin StructWithLazyField.Type) -> @owned StructWithLazyField
+// CHECK-LABEL: sil hidden [ossa] @$s15lazy_properties19StructWithLazyFieldV4onceACSiSg_tcfC : $@convention(method) (Optional<Int>, @thin StructWithLazyField.Type) -> @owned StructWithLazyField
 
 struct StructWithLazyField {
   lazy var once : Int = 42
@@ -23,13 +23,13 @@
 
 // Anonymous closure parameters in lazy initializer crash SILGen
 
-// CHECK-LABEL: sil hidden @$s15lazy_properties22HasAnonymousParametersV1xSivg : $@convention(method) (@inout HasAnonymousParameters) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s15lazy_properties22HasAnonymousParametersV1xSivg : $@convention(method) (@inout HasAnonymousParameters) -> Int
 
-// CHECK-LABEL: sil private @$s15lazy_properties22HasAnonymousParametersV1xSivgS2iXEfU_ : $@convention(thin) (Int) -> Int
+// CHECK-LABEL: sil private [ossa] @$s15lazy_properties22HasAnonymousParametersV1xSivgS2iXEfU_ : $@convention(thin) (Int) -> Int
 
-// CHECK-LABEL: sil hidden @$s15lazy_properties22HasAnonymousParametersV1xSivs : $@convention(method) (Int, @inout HasAnonymousParameters) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15lazy_properties22HasAnonymousParametersV1xSivs : $@convention(method) (Int, @inout HasAnonymousParameters) -> ()
 
-// CHECK-LABEL: sil hidden [transparent] @$s15lazy_properties22HasAnonymousParametersV1xSivM : $@yield_once @convention(method) (@inout HasAnonymousParameters) -> @yields @inout Int
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s15lazy_properties22HasAnonymousParametersV1xSivM : $@yield_once @convention(method) (@inout HasAnonymousParameters) -> @yields @inout Int
 
 struct HasAnonymousParameters {
   lazy var x = { $0 }(0)
diff --git a/test/SILGen/let_decls.swift b/test/SILGen/let_decls.swift
index fb03b53..d3b1c75 100644
--- a/test/SILGen/let_decls.swift
+++ b/test/SILGen/let_decls.swift
@@ -5,7 +5,7 @@
 
 // Let decls don't get boxes for trivial types.
 //
-// CHECK-LABEL: sil hidden @{{.*}}test1
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test1
 func test1(_ a : Int) -> Int {
   // CHECK-NOT: alloc_box
   let (b,c) = (a, 32)
@@ -24,7 +24,7 @@
 
 // Let decls being closed over.
 //
-// CHECK-LABEL: sil hidden @{{.*}}test2
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test2
 func test2() {
   // No allocations.
   // CHECK-NOT: alloc_box
@@ -40,7 +40,7 @@
 
 // The closure just returns its value, which it captured directly.
 
-// CHECK: sil private @$s9let_decls5test2yyFSiyXEfU_ : $@convention(thin) (Int) -> Int
+// CHECK: sil private [ossa] @$s9let_decls5test2yyFSiyXEfU_ : $@convention(thin) (Int) -> Int
 // CHECK: bb0(%0 : $Int):
 // CHECK:  return %0 : $Int
 
@@ -62,7 +62,7 @@
 // rdar://15689514 - Verify that the cleanup for the let decl runs at the end of
 // the 'let' lifetime, not at the end of the initializing expression.
 //
-// CHECK-LABEL: sil hidden @{{.*}}test3
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test3
 func test3() {
   // CHECK: [[GETFN:%[0-9]+]] = function_ref{{.*}}getAString
   // CHECK-NEXT: [[STR:%[0-9]+]] = apply [[GETFN]]()
@@ -89,7 +89,7 @@
 
 func produceAddressOnlyStruct<T>(_ x : T) -> AddressOnlyStruct<T> {}
 
-// CHECK-LABEL: sil hidden @{{.*}}testAddressOnlyStructString
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testAddressOnlyStructString
 // CHECK: bb0([[FUNC_ARG:%.*]] : $*T):
 func testAddressOnlyStructString<T>(_ a : T) -> String {
   return produceAddressOnlyStruct(a).str
@@ -104,7 +104,7 @@
   // CHECK: return [[STRVAL]]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testAddressOnlyStructElt
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testAddressOnlyStructElt
 func testAddressOnlyStructElt<T>(_ a : T) -> T {
   return produceAddressOnlyStruct(a).elt
   // CHECK: bb0([[ARG0:%.*]] : $*T, [[ARG1:%.*]] : $*T):
@@ -120,7 +120,7 @@
 
 // rdar://15717123 - let decls of address-only type.
 
-// CHECK-LABEL: sil hidden @{{.*}}testAddressOnlyLet
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testAddressOnlyLet
 func testAddressOnlyLet<T>(_ a : T) {
   let x = produceAddressOnlyStruct(a)
 }
@@ -128,7 +128,7 @@
 
 func produceSubscriptableRValue() -> [String] {}
 
-// CHECK-LABEL: sil hidden @{{.*}}subscriptRValue
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}subscriptRValue
 func subscriptRValue() {
   var a = produceSubscriptableRValue()[0]
 }
@@ -140,7 +140,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @{{.*}}testGetOnlySubscript
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testGetOnlySubscript
 func testGetOnlySubscript(_ x : GetOnlySubscriptStruct, idx : Int) -> Int {
   return x[idx]
   
@@ -161,7 +161,7 @@
   
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}callThroughLet
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}callThroughLet
 func callThroughLet(_ predicate: @escaping (Int, Int) -> Bool) {
   let p = predicate
   if p(1, 2) {
@@ -181,7 +181,7 @@
    }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}pass_address_only_rvalue_result
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}pass_address_only_rvalue_result
 // CHECK: bb0(%0 : $*T,
 // CHECK: [[FN:%[0-9]+]] = function_ref @{{.*}}GenericTestStructV{{.*}}ig
 // CHECK: apply [[FN]]<T>(%0,
@@ -198,7 +198,7 @@
 func produceNMSubscriptableRValue() -> NonMutableSubscriptable {}
 
 
-// CHECK-LABEL: sil hidden @{{.*}}test_nm_subscript_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test_nm_subscript_get
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[FR1:%[0-9]+]] = function_ref @{{.*}}produceNMSubscriptableRValue
 // CHECK-NEXT: [[RES:%[0-9]+]] = apply [[FR1]]()
@@ -209,7 +209,7 @@
   return produceNMSubscriptableRValue()[a]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}test_nm_subscript_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test_nm_subscript_set
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[FR1:%[0-9]+]] = function_ref @{{.*}}produceNMSubscriptableRValue
 // CHECK-NEXT: [[RES:%[0-9]+]] = apply [[FR1]]()
@@ -229,7 +229,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}test_weird_property
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test_weird_property
 func test_weird_property(_ v : WeirdPropertyTest, i : Int) -> Int {
   var v = v
   // CHECK: [[VBOX:%[0-9]+]] = alloc_box ${ var WeirdPropertyTest }
@@ -252,7 +252,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @{{.*}}generic_identity
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}generic_identity
 // CHECK: bb0(%0 : $*T, %1 : $*T):
 // CHECK-NEXT: debug_value_addr %1 : $*T
 // CHECK-NEXT: copy_addr %1 to [initialization] %0 : $*T
@@ -267,7 +267,7 @@
   static let x = 5
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testStaticLetMember
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testStaticLetMember
 func testStaticLetMember() -> Int {
 
   // CHECK: function_ref @{{.*}}StaticLetMemberV1xSi
@@ -283,7 +283,7 @@
 // Verify that no temporaries+copies are produced when calling non-@mutable
 // methods on protocol and archetypes calls.
 
-// CHECK-LABEL: sil hidden @{{.*}}testLetProtocolBases
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testLetProtocolBases
 // CHECK: bb0(%0 : $*SimpleProtocol):
 func testLetProtocolBases(_ p : SimpleProtocol) {
   // CHECK-NEXT: debug_value_addr
@@ -302,7 +302,7 @@
   // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testLetArchetypeBases
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testLetArchetypeBases
 // CHECK: bb0(%0 : $*T):
 func testLetArchetypeBases<T : SimpleProtocol>(_ p : T) {
   // CHECK-NEXT: debug_value_addr
@@ -318,7 +318,7 @@
   // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testDebugValue
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testDebugValue
 // CHECK: bb0(%0 : $Int, %1 : $*SimpleProtocol):
 // CHECK-NEXT: debug_value %0 : $Int, let, name "a"
 // CHECK-NEXT: debug_value_addr %1 : $*SimpleProtocol, let, name "b"
@@ -337,7 +337,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @{{.*}}testAddressOnlyTupleArgument
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testAddressOnlyTupleArgument
 func testAddressOnlyTupleArgument(_ bounds: (start: SimpleProtocol, pastEnd: Int)) {
 // CHECK:       bb0(%0 : $*SimpleProtocol, %1 : $Int):
 // CHECK-NEXT:    %2 = alloc_stack $(start: SimpleProtocol, pastEnd: Int), let, name "bounds", argno 1
@@ -359,14 +359,14 @@
 }
 
 
-// CHECK-LABEL: sil hidden @{{.*}}member_ref_abstraction_change
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}member_ref_abstraction_change
 // CHECK: function_ref reabstraction thunk helper
 // CHECK: return
 func member_ref_abstraction_change(_ x: GenericFunctionStruct<Int, Int>) -> (Int) -> Int {
   return x.f
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}call_auto_closure
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}call_auto_closure
 // CHECK: bb0([[CLOSURE:%.*]] : $@noescape @callee_guaranteed () -> Bool):
 // CHECK:   apply [[CLOSURE]]() : $@noescape @callee_guaranteed () -> Bool
 // CHECK: } // end sil function '{{.*}}call_auto_closure{{.*}}'
@@ -393,7 +393,7 @@
   func testIntMemberLoad() -> Int {
     return i
   }
-  // CHECK-LABEL: sil hidden @$s9let_decls16StructMemberTestV07testIntD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
+  // CHECK-LABEL: sil hidden [ossa] @$s9let_decls16StructMemberTestV07testIntD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $StructMemberTest):
   // CHECK:  debug_value [[ARG]] : $StructMemberTest, let, name "self"
   // CHECK:  [[TRIVIAL_VALUE:%.*]] = struct_extract [[ARG]] : $StructMemberTest, #StructMemberTest.i
@@ -405,7 +405,7 @@
   func testRecursiveIntMemberLoad() -> Int {
     return s.i
   }
-  // CHECK-LABEL: sil hidden @$s9let_decls16StructMemberTestV016testRecursiveIntD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
+  // CHECK-LABEL: sil hidden [ossa] @$s9let_decls16StructMemberTestV016testRecursiveIntD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $StructMemberTest):
   // CHECK:  debug_value %0 : $StructMemberTest, let, name "self"
   // CHECK:  %2 = struct_extract %0 : $StructMemberTest, #StructMemberTest.s
@@ -416,7 +416,7 @@
   func testTupleMemberLoad() -> Int {
     return t.1.i
   }
-  // CHECK-LABEL: sil hidden @$s9let_decls16StructMemberTestV09testTupleD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
+  // CHECK-LABEL: sil hidden [ossa] @$s9let_decls16StructMemberTestV09testTupleD4LoadSiyF : $@convention(method) (@guaranteed StructMemberTest)
   // CHECK: bb0(%0 : @guaranteed $StructMemberTest):
   // CHECK-NEXT:   debug_value %0 : $StructMemberTest, let, name "self"
   // CHECK-NEXT:   [[T0:%.*]] = struct_extract %0 : $StructMemberTest, #StructMemberTest.t
@@ -433,7 +433,7 @@
   func getA() -> T {
     return a
   }
-  // CHECK-LABEL: sil hidden @{{.*}}GenericStructV4getA{{.*}} : $@convention(method) <T> (@in_guaranteed GenericStruct<T>) -> @out T
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}GenericStructV4getA{{.*}} : $@convention(method) <T> (@in_guaranteed GenericStruct<T>) -> @out T
   // CHECK: bb0(%0 : $*T, %1 : $*GenericStruct<T>):
   // CHECK-NEXT: debug_value_addr %1 : $*GenericStruct<T>, let, name "self"
   // CHECK-NEXT: %3 = struct_element_addr %1 : $*GenericStruct<T>, #GenericStruct.a
@@ -445,7 +445,7 @@
     return b
   }
   
-  // CHECK-LABEL: sil hidden @{{.*}}GenericStructV4getB{{.*}} : $@convention(method) <T> (@in_guaranteed GenericStruct<T>) -> Int
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}GenericStructV4getB{{.*}} : $@convention(method) <T> (@in_guaranteed GenericStruct<T>) -> Int
   // CHECK: bb0([[SELF_ADDR:%.*]] : $*GenericStruct<T>):
   // CHECK-NEXT: debug_value_addr [[SELF_ADDR]] : $*GenericStruct<T>, let, name "self"
   // CHECK-NEXT: [[PROJ_ADDR:%.*]] = struct_element_addr [[SELF_ADDR]] : $*GenericStruct<T>, #GenericStruct.b
@@ -460,7 +460,7 @@
   let lp : Int
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}testLetPropertyAccessOnLValueBase
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testLetPropertyAccessOnLValueBase
 // CHECK: bb0(%0 : $LetPropertyStruct):
 // CHECK:  [[ABOX:%[0-9]+]] = alloc_box ${ var LetPropertyStruct }
 // CHECK:  [[A:%[0-9]+]] = project_box [[ABOX]]
@@ -478,7 +478,7 @@
 
 var addressOnlyGetOnlyGlobalProperty : SimpleProtocol { get {} }
 
-// CHECK-LABEL: sil hidden @$s9let_decls018testAddressOnlyGetE14GlobalPropertyAA14SimpleProtocol_pyF
+// CHECK-LABEL: sil hidden [ossa] @$s9let_decls018testAddressOnlyGetE14GlobalPropertyAA14SimpleProtocol_pyF
 // CHECK: bb0(%0 : $*SimpleProtocol):
 // CHECK-NEXT:   // function_ref
 // CHECK-NEXT:  %1 = function_ref @$s9let_decls014addressOnlyGetD14GlobalPropertyAA14SimpleProtocol_pvg
diff --git a/test/SILGen/lifetime.swift b/test/SILGen/lifetime.swift
index 0d9dca2..84da033 100644
--- a/test/SILGen/lifetime.swift
+++ b/test/SILGen/lifetime.swift
@@ -13,7 +13,7 @@
 struct Val {
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime13local_valtypeyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime13local_valtypeyyF
 func local_valtype() {
     var b: Val
     // CHECK: [[B:%[0-9]+]] = alloc_box ${ var Val }
@@ -22,7 +22,7 @@
     // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime20local_valtype_branch{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime20local_valtype_branch{{[_0-9a-zA-Z]*}}F
 func local_valtype_branch(_ a: Bool) {
     var a = a
     // CHECK: [[A:%[0-9]+]] = alloc_box ${ var Bool }
@@ -119,7 +119,7 @@
 func reftype_func() -> Ref {}
 func reftype_func_with_arg(_ x: Ref) -> Ref {}
 
-// CHECK-LABEL: sil hidden @$s8lifetime14reftype_returnAA3RefCyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime14reftype_returnAA3RefCyF
 func reftype_return() -> Ref {
     return reftype_func()
     // CHECK: [[RF:%[0-9]+]] = function_ref @$s8lifetime12reftype_funcAA3RefCyF : $@convention(thin) () -> @owned Ref
@@ -129,7 +129,7 @@
     // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime11reftype_argyyAA3RefCF : $@convention(thin) (@guaranteed Ref) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime11reftype_argyyAA3RefCF : $@convention(thin) (@guaranteed Ref) -> () {
 // CHECK: bb0([[A:%[0-9]+]] : @guaranteed $Ref):
 // CHECK:   [[AADDR:%[0-9]+]] = alloc_box ${ var Ref }
 // CHECK:   [[PA:%[0-9]+]] = project_box [[AADDR]]
@@ -143,7 +143,7 @@
     var a = a
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime26reftype_call_ignore_returnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime26reftype_call_ignore_returnyyF
 func reftype_call_ignore_return() {
     reftype_func()
     // CHECK: = function_ref @$s8lifetime12reftype_funcAA3RefCyF : $@convention(thin) () -> @owned Ref
@@ -152,7 +152,7 @@
     // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime27reftype_call_store_to_localyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime27reftype_call_store_to_localyyF
 func reftype_call_store_to_local() {
     var a = reftype_func()
     // CHECK: [[A:%[0-9]+]] = alloc_box ${ var Ref }
@@ -167,7 +167,7 @@
     // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime16reftype_call_argyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime16reftype_call_argyyF
 func reftype_call_arg() {
     reftype_func_with_arg(reftype_func())
     // CHECK: [[RF:%[0-9]+]] = function_ref @$s8lifetime12reftype_func{{[_0-9a-zA-Z]*}}F
@@ -178,7 +178,7 @@
     // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime21reftype_call_with_arg{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime21reftype_call_with_arg{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[A1:%[0-9]+]] : @guaranteed $Ref):
 // CHECK:   [[AADDR:%[0-9]+]] = alloc_box ${ var Ref }
 // CHECK:   [[PB:%.*]] = project_box [[AADDR]]
@@ -198,7 +198,7 @@
     reftype_func_with_arg(a)
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime16reftype_reassign{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime16reftype_reassign{{[_0-9a-zA-Z]*}}F
 func reftype_reassign(_ a: inout Ref, b: Ref) {
     var b = b
     // CHECK: bb0([[AADDR:%[0-9]+]] : $*Ref, [[B1:%[0-9]+]] : @guaranteed $Ref):
@@ -212,7 +212,7 @@
 
 func tuple_with_ref_elements() -> (Val, (Ref, Val), Ref) {}
 
-// CHECK-LABEL: sil hidden @$s8lifetime28tuple_with_ref_ignore_returnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime28tuple_with_ref_ignore_returnyyF
 func tuple_with_ref_ignore_return() {
   tuple_with_ref_elements()
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s8lifetime23tuple_with_ref_elementsAA3ValV_AA3RefC_ADtAFtyF
@@ -228,7 +228,7 @@
   var b:Val
 
   // -- loadable value constructor:
-  // CHECK-LABEL: sil hidden @$s8lifetime5AlephV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Ref, Val, @thin Aleph.Type) -> @owned Aleph
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime5AlephV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Ref, Val, @thin Aleph.Type) -> @owned Aleph
   // CHECK: bb0([[A:%.*]] : @owned $Ref, [[B:%.*]] : $Val, {{%.*}} : $@thin Aleph.Type):
   // CHECK-NEXT:   [[RET:%.*]] = struct $Aleph ([[A]] : {{.*}}, [[B]] : {{.*}})
   // CHECK-NEXT:   return [[RET]]
@@ -250,7 +250,7 @@
   var c:Unloadable
 
   // -- address-only value constructor:
-  // CHECK-LABEL: sil hidden @$s8lifetime6DalethV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Aleph, @owned Beth, @in Unloadable, @thin Daleth.Type) -> @out Daleth {
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime6DalethV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Aleph, @owned Beth, @in Unloadable, @thin Daleth.Type) -> @out Daleth {
   // CHECK: bb0([[THIS:%.*]] : $*Daleth, [[A:%.*]] : @owned $Aleph, [[B:%.*]] : @owned $Beth, [[C:%.*]] : $*Unloadable, {{%.*}} : $@thin Daleth.Type):
   // CHECK-NEXT:   [[A_ADDR:%.*]] = struct_element_addr [[THIS]] : $*Daleth, #Daleth.a
   // CHECK-NEXT:   store [[A]] to [init] [[A_ADDR]]
@@ -265,7 +265,7 @@
 class He {
   
   // -- default allocator:
-  // CHECK-LABEL: sil hidden @$s8lifetime2HeC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick He.Type) -> @owned He {
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime2HeC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick He.Type) -> @owned He {
   // CHECK: bb0({{%.*}} : $@thick He.Type):
   // CHECK-NEXT:   [[THIS:%.*]] = alloc_ref $He
   // CHECK-NEXT:   // function_ref lifetime.He.init
@@ -275,7 +275,7 @@
   // CHECK-NEXT: }
 
   // -- default initializer:
-  // CHECK-LABEL: sil hidden @$s8lifetime2HeC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned He) -> @owned He {
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime2HeC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned He) -> @owned He {
   // CHECK: bb0([[SELF:%.*]] : @owned $He):
   // CHECK-NEXT: debug_value
   // CHECK-NEXT: [[UNINITIALIZED_SELF:%.*]] = mark_uninitialized [rootself] [[SELF]]
@@ -292,7 +292,7 @@
   var b:Val
 
   // -- loadable value initializer with tuple destructuring:
-  // CHECK-LABEL: sil hidden @$s8lifetime3WawV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Ref, Val, Val, @thin Waw.Type) -> @owned Waw 
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3WawV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned Ref, Val, Val, @thin Waw.Type) -> @owned Waw 
   // CHECK: bb0([[A0:%.*]] : @owned $Ref, [[A1:%.*]] : $Val, [[B:%.*]] : $Val, {{%.*}} : $@thin Waw.Type):
   // CHECK-NEXT:   [[A:%.*]] = tuple ([[A0]] : {{.*}}, [[A1]] : {{.*}})
   // CHECK-NEXT:   [[RET:%.*]] = struct $Waw ([[A]] : {{.*}}, [[B]] : {{.*}})
@@ -304,7 +304,7 @@
   var b:Unloadable
 
   // -- address-only value initializer with tuple destructuring:
-  // CHECK-LABEL: sil hidden @$s8lifetime5ZayinV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@in Unloadable, Val, @in Unloadable, @thin Zayin.Type) -> @out Zayin
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime5ZayinV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@in Unloadable, Val, @in Unloadable, @thin Zayin.Type) -> @out Zayin
   // CHECK: bb0([[THIS:%.*]] : $*Zayin, [[A0:%.*]] : $*Unloadable, [[A1:%.*]] : $Val, [[B:%.*]] : $*Unloadable, {{%.*}} : $@thin Zayin.Type):
   // CHECK-NEXT:   [[THIS_A_ADDR:%.*]] = struct_element_addr [[THIS]] : $*Zayin, #Zayin.a
   // CHECK-NEXT:   [[THIS_A0_ADDR:%.*]] = tuple_element_addr [[THIS_A_ADDR]] : {{.*}}, 0
@@ -319,7 +319,7 @@
 
 func fragile_struct_with_ref_elements() -> Beth {}
 
-// CHECK-LABEL: sil hidden @$s8lifetime29struct_with_ref_ignore_returnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime29struct_with_ref_ignore_returnyyF
 func struct_with_ref_ignore_return() {
   fragile_struct_with_ref_elements()
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s8lifetime32fragile_struct_with_ref_elementsAA4BethVyF
@@ -328,7 +328,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime28struct_with_ref_materializedyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime28struct_with_ref_materializedyyF
 func struct_with_ref_materialized() {
   fragile_struct_with_ref_elements().gimel()
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s8lifetime32fragile_struct_with_ref_elementsAA4BethVyF
@@ -342,7 +342,7 @@
   var aleph_prop: Aleph { get {} set {} }
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime015logical_lvalue_A0yyAA11RefWithPropC_SiAA3ValVtF : $@convention(thin) (@guaranteed RefWithProp, Int, Val) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime015logical_lvalue_A0yyAA11RefWithPropC_SiAA3ValVtF : $@convention(thin) (@guaranteed RefWithProp, Int, Val) -> () {
 func logical_lvalue_lifetime(_ r: RefWithProp, _ i: Int, _ v: Val) {
   var r = r
   var i = i
@@ -385,7 +385,7 @@
   // Class initializer
   init() {
   // -- allocating entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
     // CHECK: bb0([[METATYPE:%[0-9]+]] : $@thick Foo<T>.Type):
     // CHECK: [[THIS:%[0-9]+]] = alloc_ref $Foo<T>
     // CHECK: [[INIT_METHOD:%[0-9]+]] = function_ref @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc
@@ -393,7 +393,7 @@
     // CHECK: return [[INIT_THIS]]
 
   // -- initializing entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc :
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc :
     // CHECK: bb0([[THISIN:%[0-9]+]] : @owned $Foo<T>):
     // CHECK: [[THIS:%[0-9]+]] = mark_uninitialized
 
@@ -447,7 +447,7 @@
     z = Foo<T>.makeT()
 
   // -- allocating entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
     // CHECK: bb0([[CHI:%[0-9]+]] : $Int, [[METATYPE:%[0-9]+]] : $@thick Foo<T>.Type):
     // CHECK: [[THIS:%[0-9]+]] = alloc_ref $Foo<T>
     // CHECK: [[INIT_METHOD:%[0-9]+]] = function_ref @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc
@@ -455,7 +455,7 @@
     // CHECK: return [[INIT_THIS]]
 
   // -- initializing entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC3chiACyxGSi_tcfc : $@convention(method) <T> (Int, @owned Foo<T>) -> @owned Foo<T> {
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC3chiACyxGSi_tcfc : $@convention(method) <T> (Int, @owned Foo<T>) -> @owned Foo<T> {
     // CHECK: bb0([[CHI:%[0-9]+]] : $Int, [[THISIN:%[0-9]+]] : @owned $Foo<T>):
     // CHECK:   [[THIS:%[0-9]+]] = mark_uninitialized [rootself] [[THISIN]]
 
@@ -502,11 +502,11 @@
   }
 
   // -- allocating entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fC :
     // CHECK: [[INIT_METHOD:%[0-9]+]] = function_ref @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc
 
   // -- initializing entry point
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc :
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooC{{[_0-9a-zA-Z]*}}fc :
 
   init<U:Intifiable>(chi:U) {
     z = Foo<T>.makeT()
@@ -514,7 +514,7 @@
     x = chi.intify()
   }
   
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooCfd : $@convention(method) <T> (@guaranteed Foo<T>) -> @owned Builtin.NativeObject
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooCfd : $@convention(method) <T> (@guaranteed Foo<T>) -> @owned Builtin.NativeObject
 
   deinit {
     // CHECK: bb0([[THIS:%[0-9]+]] : @guaranteed $Foo<T>):
@@ -541,7 +541,7 @@
   }
 
   // Deallocating destructor for Foo.
-  // CHECK-LABEL: sil hidden @$s8lifetime3FooCfD : $@convention(method) <T> (@owned Foo<T>) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3FooCfD : $@convention(method) <T> (@owned Foo<T>) -> ()
   // CHECK: bb0([[SELF:%[0-9]+]] : @owned $Foo<T>):
   // CHECK:   [[DESTROYING_REF:%[0-9]+]] = function_ref @$s8lifetime3FooCfd : $@convention(method) <τ_0_0> (@guaranteed Foo<τ_0_0>) -> @owned Builtin.NativeObject
   // CHECK-NEXT:   [[BORROWED_SELF:%.*]] = begin_borrow [[SELF]]
@@ -558,7 +558,7 @@
 
 class FooSubclass<T> : Foo<T> {
 
-  // CHECK-LABEL: sil hidden @$s8lifetime11FooSubclassCfd : $@convention(method) <T> (@guaranteed FooSubclass<T>) -> @owned Builtin.NativeObject
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime11FooSubclassCfd : $@convention(method) <T> (@guaranteed FooSubclass<T>) -> @owned Builtin.NativeObject
   // CHECK: bb0([[THIS:%[0-9]+]] : @guaranteed $FooSubclass<T>):
   // -- base dtor
   // CHECK: [[BASE:%[0-9]+]] = upcast [[THIS]] : ${{.*}} to $Foo<T>
@@ -580,7 +580,7 @@
   var w:Ref
   init() { }
 
-  // CHECK-LABEL: sil hidden @$s8lifetime12ImplicitDtorCfd
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime12ImplicitDtorCfd
   // CHECK: bb0([[THIS:%[0-9]+]] : @guaranteed $ImplicitDtor):
   // -- don't need to destroy_value x because it's trivial
   // CHECK-NOT: ref_element_addr [[THIS]] : {{.*}}, #ImplicitDtor.x
@@ -601,7 +601,7 @@
     self.z = z
   }
 
-  // CHECK: sil hidden @$s8lifetime19ImplicitDtorDerivedCfd : $@convention(method) <T> (@guaranteed ImplicitDtorDerived<T>) -> @owned Builtin.NativeObject {
+  // CHECK: sil hidden [ossa] @$s8lifetime19ImplicitDtorDerivedCfd : $@convention(method) <T> (@guaranteed ImplicitDtorDerived<T>) -> @owned Builtin.NativeObject {
   // CHECK: bb0([[THIS:%[0-9]+]] : @guaranteed $ImplicitDtorDerived<T>):
   // -- base dtor
   // CHECK: [[BASE:%[0-9]+]] = upcast [[THIS]] : ${{.*}} to $ImplicitDtor
@@ -622,7 +622,7 @@
 class ImplicitDtorDerivedFromGeneric<T> : ImplicitDtorDerived<Int> {
   init() { super.init(z: 5) }
 
-  // CHECK-LABEL: sil hidden @$s8lifetime30ImplicitDtorDerivedFromGenericC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime30ImplicitDtorDerivedFromGenericC{{[_0-9a-zA-Z]*}}fc
   // CHECK: bb0([[THIS:%[0-9]+]] : @guaranteed $ImplicitDtorDerivedFromGeneric<T>):
   // -- base dtor
   // CHECK: [[BASE:%[0-9]+]] = upcast [[THIS]] : ${{.*}} to $ImplicitDtorDerived<Int>
@@ -639,7 +639,7 @@
   var x:Int
 
   // Loadable struct initializer
-  // CHECK-LABEL: sil hidden @$s8lifetime3BarV{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3BarV{{[_0-9a-zA-Z]*}}fC
   init() {
     // CHECK: bb0([[METATYPE:%[0-9]+]] : $@thin Bar.Type):
     // CHECK: [[SELF_BOX:%[0-9]+]] = alloc_box ${ var Bar }
@@ -667,7 +667,7 @@
   var y:T
 
   // Address-only struct initializer
-  // CHECK-LABEL: sil hidden @$s8lifetime3BasV{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime3BasV{{[_0-9a-zA-Z]*}}fC
   init(yy:T) {
     // CHECK: bb0([[THISADDRPTR:%[0-9]+]] : $*Bas<T>, [[YYADDR:%[0-9]+]] : $*T, [[META:%[0-9]+]] : $@thin Bas<T>.Type):
     // CHECK: [[SELF_BOX:%[0-9]+]] = alloc_box $<τ_0_0> { var Bas<τ_0_0> } <T>
@@ -697,7 +697,7 @@
 
 class B { init(y:Int) {} }
 class D : B {
-  // CHECK-LABEL: sil hidden @$s8lifetime1DC1x1yACSi_Sitcfc
+  // CHECK-LABEL: sil hidden [ossa] @$s8lifetime1DC1x1yACSi_Sitcfc
   // CHECK: bb0([[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Int, [[SELF:%[0-9]+]] : @owned $D):
   init(x: Int, y: Int) {
     var x = x
@@ -728,7 +728,7 @@
   func foo() {}
 }
 
-// CHECK-LABEL: sil hidden @$s8lifetime8downcast{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8lifetime8downcast{{[_0-9a-zA-Z]*}}F
 func downcast(_ b: B) {
   var b = b
   // CHECK: [[BADDR:%[0-9]+]] = alloc_box ${ var B }
diff --git a/test/SILGen/lifetime_unions.swift b/test/SILGen/lifetime_unions.swift
index 7c9f57d..f2d48b2 100644
--- a/test/SILGen/lifetime_unions.swift
+++ b/test/SILGen/lifetime_unions.swift
@@ -43,7 +43,7 @@
 func getAddressOnlyUnion<T>(_: T.Type) -> AddressOnlyUnion<T> { return .Foo }
  */
 
-// CHECK-LABEL: sil hidden @$s15lifetime_unions19destroyUnionRValuesyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s15lifetime_unions19destroyUnionRValuesyyF : $@convention(thin) () -> () {
 func destroyUnionRValues() {
   // CHECK:   [[GET_TRIVIAL_UNION:%.*]] = function_ref @$s15lifetime_unions15getTrivialUnionAA0dE0OyF : $@convention(thin) () -> TrivialUnion
   // CHECK:   [[TRIVIAL_UNION:%.*]] = apply [[GET_TRIVIAL_UNION]]() : $@convention(thin) () -> TrivialUnion
diff --git a/test/SILGen/literals.swift b/test/SILGen/literals.swift
index 7946f86..0f8c3ba 100644
--- a/test/SILGen/literals.swift
+++ b/test/SILGen/literals.swift
@@ -8,7 +8,7 @@
 
 func takesANull(_: CustomNull) {}
 
-// CHECK-LABEL: sil hidden @$s8literals4testyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8literals4testyyF : $@convention(thin) () -> ()
 func test() {
   // CHECK: [[NIL:%.*]] = enum $Optional<@callee_guaranteed () -> ()>, #Optional.none!enumelt
   // CHECK: [[FN:%.*]] = function_ref @$s8literals21takesOptionalFunctionyyyycSgF
@@ -31,7 +31,7 @@
 
 class CustomStringSubclass : CustomStringClass {}
 
-// CHECK-LABEL: sil hidden @$s8literals27returnsCustomStringSubclassAA0cdE0CyF : $@convention(thin) () -> @owned CustomStringSubclass
+// CHECK-LABEL: sil hidden [ossa] @$s8literals27returnsCustomStringSubclassAA0cdE0CyF : $@convention(thin) () -> @owned CustomStringSubclass
 // CHECK: [[METATYPE:%.*]] = metatype $@thick CustomStringSubclass.Type
 // CHECK: [[UPCAST:%.*]] = upcast [[METATYPE]] : $@thick CustomStringSubclass.Type to $@thick CustomStringClass.Type
 // CHECK: [[CTOR:%.*]] = class_method [[UPCAST]] : $@thick CustomStringClass.Type, #CustomStringClass.init!allocator.1 : (CustomStringClass.Type) -> (String) -> CustomStringClass, $@convention(method) (@owned String, @thick CustomStringClass.Type) -> @owned CustomStringClass
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 94767f7..38a6b2e 100644
--- a/test/SILGen/load_from_lvalue_in_plus_zero_context.swift
+++ b/test/SILGen/load_from_lvalue_in_plus_zero_context.swift
@@ -15,7 +15,7 @@
   let d: String
 }
 
-// CHECK-LABEL: sil hidden @$s37load_from_lvalue_in_plus_zero_context4test1ayAA1AC_tF : $@convention(thin) (@guaranteed A) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s37load_from_lvalue_in_plus_zero_context4test1ayAA1AC_tF : $@convention(thin) (@guaranteed A) -> () {
 func test(a: A) {
   let s: String?
   // CHECK:   [[C_TEMP:%.*]] = alloc_stack $Optional<C>
diff --git a/test/SILGen/local_captures.swift b/test/SILGen/local_captures.swift
index 22c1273..0bb9cae 100644
--- a/test/SILGen/local_captures.swift
+++ b/test/SILGen/local_captures.swift
@@ -3,19 +3,19 @@
 // Check that we don't crash if a local function references another local
 // function without captures.
 
-// CHECK-LABEL: sil hidden @$s14local_captures10globalfuncyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s14local_captures10globalfuncyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> ()
 func globalfunc() -> () -> () {
 
-	// CHECK-LABEL: sil private @$s14local_captures10globalfuncyycyF0A4FuncL_yyF : $@convention(thin) () -> ()
+	// CHECK-LABEL: sil private [ossa] @$s14local_captures10globalfuncyycyF0A4FuncL_yyF : $@convention(thin) () -> ()
 	func localFunc() {
 	}
 
-	// CHECK-LABEL: sil private @$s14local_captures10globalfuncyycyF6callitL_yyF : $@convention(thin) () -> ()
+	// CHECK-LABEL: sil private [ossa] @$s14local_captures10globalfuncyycyF6callitL_yyF : $@convention(thin) () -> ()
 	func callit() {
 		localFunc()
 	}
 
-	// CHECK-LABEL: sil private @$s14local_captures10globalfuncyycyF5getitL_yycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> ()
+	// CHECK-LABEL: sil private [ossa] @$s14local_captures10globalfuncyycyF5getitL_yycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> ()
 	func getit() -> () -> () {
 		return localFunc
 	}
diff --git a/test/SILGen/local_recursion.swift b/test/SILGen/local_recursion.swift
index ac4f598..d408a4c 100644
--- a/test/SILGen/local_recursion.swift
+++ b/test/SILGen/local_recursion.swift
@@ -1,7 +1,7 @@
 // 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-LABEL: sil hidden [ossa] @$s15local_recursionAA_1yySi_SitF : $@convention(thin) (Int, Int) -> () {
 // CHECK:       bb0([[X:%0]] : $Int, [[Y:%1]] : $Int):
 func local_recursion(_ x: Int, y: Int) {
   func self_recursive(_ a: Int) {
@@ -85,25 +85,25 @@
   f(x)
 }
 
-// CHECK: sil private [[SELF_RECURSIVE]]
+// CHECK: sil private [ossa] [[SELF_RECURSIVE]] :
 // CHECK: bb0([[A:%0]] : $Int, [[X:%1]] : $Int):
-// CHECK:   [[SELF_REF:%.*]] = function_ref [[SELF_RECURSIVE]]
+// CHECK:   [[SELF_REF:%.*]] = function_ref [[SELF_RECURSIVE]] :
 // CHECK:   apply [[SELF_REF]]({{.*}}, [[X]])
 
-// CHECK: sil private [[MUTUALLY_RECURSIVE_1]]
+// CHECK: sil private [ossa] [[MUTUALLY_RECURSIVE_1]]
 // CHECK: bb0([[A:%0]] : $Int, [[Y:%1]] : $Int, [[X:%2]] : $Int):
 // CHECK:   [[MUTUALLY_RECURSIVE_REF:%.*]] = function_ref [[MUTUALLY_RECURSIVE_2:@\$s15local_recursionAA_1yySi_SitF20mutually_recursive_2L_yySiF]]
 // CHECK:   apply [[MUTUALLY_RECURSIVE_REF]]({{.*}}, [[X]], [[Y]])
-// CHECK: sil private [[MUTUALLY_RECURSIVE_2]]
+// CHECK: sil private [ossa] [[MUTUALLY_RECURSIVE_2]]
 // CHECK: bb0([[B:%0]] : $Int, [[X:%1]] : $Int, [[Y:%2]] : $Int):
 // CHECK:   [[MUTUALLY_RECURSIVE_REF:%.*]] = function_ref [[MUTUALLY_RECURSIVE_1]]
 // CHECK:   apply [[MUTUALLY_RECURSIVE_REF]]({{.*}}, [[Y]], [[X]])
 
 
-// CHECK: sil private [[TRANS_CAPTURE_1:@\$s15local_recursionAA_1yySi_SitF20transitive_capture_1L_yS2iF]]
+// CHECK: sil private [ossa] [[TRANS_CAPTURE_1:@\$s15local_recursionAA_1yySi_SitF20transitive_capture_1L_yS2iF]]
 // CHECK: bb0([[A:%0]] : $Int, [[X:%1]] : $Int):
 
-// CHECK: sil private [[TRANS_CAPTURE]]
+// CHECK: sil private [ossa] [[TRANS_CAPTURE]]
 // CHECK: bb0([[B:%0]] : $Int, [[X:%1]] : $Int, [[Y:%2]] : $Int):
 // CHECK:   [[TRANS_CAPTURE_1_REF:%.*]] = function_ref [[TRANS_CAPTURE_1]]
 // CHECK:   apply [[TRANS_CAPTURE_1_REF]]({{.*}}, [[X]])
diff --git a/test/SILGen/lying_about_optional_return.swift b/test/SILGen/lying_about_optional_return.swift
index f671b32..590d7d2 100644
--- a/test/SILGen/lying_about_optional_return.swift
+++ b/test/SILGen/lying_about_optional_return.swift
@@ -1,6 +1,6 @@
-// RUN: %target-swift-emit-silgen -import-objc-header %S/Inputs/c_function_pointer_in_c_struct.h %s | %FileCheck %s
+// RUN: %target-swift-emit-silgen -enable-objc-interop -disable-objc-attr-requires-foundation-module -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
+// CHECK-LABEL: sil hidden [ossa] @$s27lying_about_optional_return0C37ChainingForeignFunctionTypeProperties{{[_0-9a-zA-Z]*}}F
 func optionalChainingForeignFunctionTypeProperties(a: SomeCallbacks?) {
   // CHECK: enum $Optional<()>, #Optional.some!enumelt.1, {{%.*}} : $()
   let _: ()? = voidReturning()
diff --git a/test/SILGen/lying_about_optional_return_objc.swift b/test/SILGen/lying_about_optional_return_objc.swift
index 2b3f8e3..71769dc 100644
--- a/test/SILGen/lying_about_optional_return_objc.swift
+++ b/test/SILGen/lying_about_optional_return_objc.swift
@@ -1,6 +1,6 @@
 // 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
+// CHECK-LABEL: sil hidden [ossa] @$s32lying_about_optional_return_objc0C37ChainingForeignFunctionTypeProperties{{[_0-9a-zA-Z]*}}F
 func optionalChainingForeignFunctionTypeProperties(b: BlockProperty?) {
   // CHECK: enum $Optional<()>, #Optional.some!enumelt.1, {{%.*}} : $()
   b?.readWriteBlock()
diff --git a/test/SILGen/magic_identifiers_inside_property_initializers.swift b/test/SILGen/magic_identifiers_inside_property_initializers.swift
index a381cac..a1c338a 100644
--- a/test/SILGen/magic_identifiers_inside_property_initializers.swift
+++ b/test/SILGen/magic_identifiers_inside_property_initializers.swift
@@ -1,7 +1,7 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
 class Test {
-    // CHECK-LABEL: sil hidden [transparent] @$s46magic_identifiers_inside_property_initializers4TestC4fileSSvpfi
+    // CHECK-LABEL: sil hidden [transparent] [ossa] @$s46magic_identifiers_inside_property_initializers4TestC4fileSSvpfi
     // CHECK: string_literal utf8 "{{.*}}.swift"
     let file = #file
 }
diff --git a/test/SILGen/mangling.swift b/test/SILGen/mangling.swift
index e4e5358..12f05d8 100644
--- a/test/SILGen/mangling.swift
+++ b/test/SILGen/mangling.swift
@@ -9,21 +9,21 @@
 // These examples are from RFC 3492, which defines the Punycode encoding used
 // by name mangling.
 
-// CHECK-LABEL: sil hidden @$s8mangling0022egbpdajGbuEbxfgehfvwxnyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling0022egbpdajGbuEbxfgehfvwxnyyF
 func ليهمابتكلموشعربي؟() { }
-// CHECK-LABEL: sil hidden @$s8mangling0024ihqwcrbEcvIaIdqgAFGpqjyeyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling0024ihqwcrbEcvIaIdqgAFGpqjyeyyF
 func 他们为什么不说中文() { }
-// CHECK-LABEL: sil hidden @$s8mangling0027ihqwctvzcJBfGFJdrssDxIboAybyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling0027ihqwctvzcJBfGFJdrssDxIboAybyyF
 func 他們爲什麽不說中文() { }
-// CHECK-LABEL: sil hidden @$s8mangling0030Proprostnemluvesky_uybCEdmaEBayyF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling0030Proprostnemluvesky_uybCEdmaEBayyF
 func Pročprostěnemluvíčesky() { }
 
 // <rdar://problem/13757744> Variadic tuples need a different mangling from
 // non-variadic tuples.
 
-// CHECK-LABEL: sil hidden @$s8mangling9r137577441xySaySiG_tF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling9r137577441xySaySiG_tF
 func r13757744(x: [Int]) {}
-// CHECK-LABEL: sil hidden @$s8mangling9r137577441xySid_tF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling9r137577441xySid_tF
 func r13757744(x: Int...) {}
 
 // <rdar://problem/13757750> Prefix, postfix, and infix operators need
@@ -33,61 +33,61 @@
 postfix operator +-
 infix operator +-
 
-// CHECK-LABEL: sil hidden @$s8mangling2psopyyxlF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2psopyyxlF
 prefix func +- <T>(a: T) {}
-// CHECK-LABEL: sil hidden @$s8mangling2psoPyyxlF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2psoPyyxlF
 postfix func +- <T>(a: T) {}
 
-// CHECK-LABEL: sil hidden @$s8mangling2psoiyyx_xtlF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2psoiyyx_xtlF
 func +- <T>(a: T, b: T) {}
 
-// CHECK-LABEL: sil hidden @$s8mangling2psopyyx1a_x1bt_tlF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2psopyyx1a_x1bt_tlF
 prefix func +- <T>(_: (a: T, b: T)) {}
-// CHECK-LABEL: sil hidden @$s8mangling2psoPyyx1a_x1bt_tlF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2psoPyyx1a_x1bt_tlF
 postfix func +- <T>(_: (a: T, b: T)) {}
 
 infix operator «+»
 
-// CHECK-LABEL: sil hidden @$s8mangling007p_qcaDcoiyS2i_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling007p_qcaDcoiyS2i_SitF
 func «+»(a: Int, b: Int) -> Int { return a + b }
 
 protocol Foo {}
 protocol Bar {}
 
 // Ensure protocol list manglings are '_' terminated regardless of length
-// CHECK-LABEL: sil hidden @$s8mangling12any_protocolyyypF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12any_protocolyyypF
 func any_protocol(_: Any) {}
-// CHECK-LABEL: sil hidden @$s8mangling12one_protocolyyAA3Foo_pF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12one_protocolyyAA3Foo_pF
 func one_protocol(_: Foo) {}
-// CHECK-LABEL: sil hidden @$s8mangling18one_protocol_twiceyyAA3Foo_p_AaC_ptF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling18one_protocol_twiceyyAA3Foo_p_AaC_ptF
 func one_protocol_twice(_: Foo, _: Foo) {}
-// CHECK-LABEL: sil hidden @$s8mangling12two_protocolyyAA3Bar_AA3FoopF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12two_protocolyyAA3Bar_AA3FoopF
 func two_protocol(_: Foo & Bar) {}
 
 // Ensure archetype depths are mangled correctly.
 class Zim<T> {
-  // CHECK-LABEL: sil hidden @$s8mangling3ZimC4zangyyx_qd__tlF
+  // CHECK-LABEL: sil hidden [ossa] @$s8mangling3ZimC4zangyyx_qd__tlF
   func zang<U>(_: T, _: U) {}
-  // CHECK-LABEL: sil hidden @$s8mangling3ZimC4zungyyqd___xtlF
+  // CHECK-LABEL: sil hidden [ossa] @$s8mangling3ZimC4zungyyqd___xtlF
   func zung<U>(_: U, _: T) {}
 }
 
 // Clang-imported classes and protocols get mangled into a magic 'So' context
 // to make collisions into link errors. <rdar://problem/14221244>
-// CHECK-LABEL: sil hidden @$s8mangling28uses_objc_class_and_protocol1o1p2p2ySo8NSObjectC_So8NSAnsing_pSo14NSBetterAnsing_ptF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling28uses_objc_class_and_protocol1o1p2p2ySo8NSObjectC_So8NSAnsing_pSo14NSBetterAnsing_ptF
 func uses_objc_class_and_protocol(o: NSObject, p: NSAnsing, p2: BetterAnsing) {}
 
 // Clang-imported structs get mangled using their Clang module name.
 // FIXME: Temporarily mangles everything into the virtual module __C__
 // <rdar://problem/14221244>
-// CHECK-LABEL: sil hidden @$s8mangling17uses_clang_struct1rySo6NSRectV_tF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling17uses_clang_struct1rySo6NSRectV_tF
 func uses_clang_struct(r: NSRect) {}
 
-// CHECK-LABEL: sil hidden @$s8mangling14uses_optionals1xs7UnicodeO6ScalarVSgSiSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling14uses_optionals1xs7UnicodeO6ScalarVSgSiSg_tF
 func uses_optionals(x: Int?) -> UnicodeScalar? { return nil }
 
 enum GenericUnion<T> {
-  // CHECK-LABEL: sil shared [transparent] @$s8mangling12GenericUnionO3FooyACyxGSicAEmlF
+  // CHECK-LABEL: sil shared [transparent] [ossa] @$s8mangling12GenericUnionO3FooyACyxGSicAEmlF
   case Foo(Int)
 }
 
@@ -104,12 +104,12 @@
 // auto_closures should not collide with the equivalent non-auto_closure
 // function type.
 
-// CHECK-LABEL: sil hidden @$s8mangling19autoClosureOverload1fySiyXK_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling19autoClosureOverload1fySiyXK_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> () {
 func autoClosureOverload(f: @autoclosure () -> Int) {}
-// CHECK-LABEL: sil hidden @$s8mangling19autoClosureOverload1fySiyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling19autoClosureOverload1fySiyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Int) -> () {
 func autoClosureOverload(f: () -> Int) {}
 
-// CHECK-LABEL: sil hidden @$s8mangling24autoClosureOverloadCallsyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling24autoClosureOverloadCallsyyF : $@convention(thin) () -> () {
 func autoClosureOverloadCalls() {
   // CHECK: function_ref @$s8mangling19autoClosureOverload1fySiyXK_tF
   autoClosureOverload(f: 1)
@@ -126,62 +126,62 @@
   associatedtype Assoc
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling4fooAyyxAA12HasAssocTypeRzlF : $@convention(thin) <T where T : HasAssocType> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling4fooAyyxAA12HasAssocTypeRzlF : $@convention(thin) <T where T : HasAssocType> (@in_guaranteed T) -> ()
 func fooA<T: HasAssocType>(_: T) {}
-// CHECK-LABEL: sil hidden @$s8mangling4fooByyxAA12HasAssocTypeRzAA0D4Reqt0D0RpzlF : $@convention(thin) <T where T : HasAssocType, T.Assoc : AssocReqt> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling4fooByyxAA12HasAssocTypeRzAA0D4Reqt0D0RpzlF : $@convention(thin) <T where T : HasAssocType, T.Assoc : AssocReqt> (@in_guaranteed T) -> ()
 func fooB<T: HasAssocType>(_: T) where T.Assoc: AssocReqt {}
 
-// CHECK-LABEL: sil hidden @$s8mangling2qqoiyySi_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling2qqoiyySi_SitF
 func ??(x: Int, y: Int) {}
 
 struct InstanceAndClassProperty {
   var property: Int {
-    // CHECK-LABEL: sil hidden @$s8mangling24InstanceAndClassPropertyV8propertySivg
+    // CHECK-LABEL: sil hidden [ossa] @$s8mangling24InstanceAndClassPropertyV8propertySivg
     get { return 0 }
-    // CHECK-LABEL: sil hidden @$s8mangling24InstanceAndClassPropertyV8propertySivs
+    // CHECK-LABEL: sil hidden [ossa] @$s8mangling24InstanceAndClassPropertyV8propertySivs
     set {}
   }
   static var property: Int {
-    // CHECK-LABEL: sil hidden @$s8mangling24InstanceAndClassPropertyV8propertySivgZ
+    // CHECK-LABEL: sil hidden [ossa] @$s8mangling24InstanceAndClassPropertyV8propertySivgZ
     get { return 0 }
-    // CHECK-LABEL: sil hidden @$s8mangling24InstanceAndClassPropertyV8propertySivsZ
+    // CHECK-LABEL: sil hidden [ossa] @$s8mangling24InstanceAndClassPropertyV8propertySivsZ
     set {}
   }
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling6curry1yyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling6curry1yyF : $@convention(thin) () -> ()
 func curry1() {
 
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling3barSiyKF : $@convention(thin) () -> (Int, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling3barSiyKF : $@convention(thin) () -> (Int, @error Error)
 func bar() throws -> Int { return 0 }
 
-// CHECK-LABEL: sil hidden @$s8mangling12curry1ThrowsyyKF : $@convention(thin) () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12curry1ThrowsyyKF : $@convention(thin) () -> @error Error
 func curry1Throws() throws {
 
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling12curry2ThrowsyycyKF : $@convention(thin) () -> (@owned @callee_guaranteed () -> (), @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12curry2ThrowsyycyKF : $@convention(thin) () -> (@owned @callee_guaranteed () -> (), @error Error)
 func curry2Throws() throws -> () -> () {
   return curry1
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling6curry3yyKcyF : $@convention(thin) () -> @owned @callee_guaranteed () -> @error Error
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling6curry3yyKcyF : $@convention(thin) () -> @owned @callee_guaranteed () -> @error Error
 func curry3() -> () throws -> () {
   return curry1Throws
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling12curry3ThrowsyyKcyKF : $@convention(thin) () -> (@owned @callee_guaranteed () -> @error Error, @error Error)
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling12curry3ThrowsyyKcyKF : $@convention(thin) () -> (@owned @callee_guaranteed () -> @error Error, @error Error)
 func curry3Throws() throws -> () throws -> () {
   return curry1Throws
 }
 
-// CHECK-LABEL: sil hidden @$s8mangling14varargsVsArray3arr1nySid_SStF : $@convention(thin) (@guaranteed Array<Int>, @guaranteed String) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling14varargsVsArray3arr1nySid_SStF : $@convention(thin) (@guaranteed Array<Int>, @guaranteed String) -> ()
 func varargsVsArray(arr: Int..., n: String) { }
 
-// CHECK-LABEL: sil hidden @$s8mangling14varargsVsArray3arr1nySaySiG_SStF : $@convention(thin) (@guaranteed Array<Int>, @guaranteed String) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling14varargsVsArray3arr1nySaySiG_SStF : $@convention(thin) (@guaranteed Array<Int>, @guaranteed String) -> ()
 func varargsVsArray(arr: [Int], n: String) { }
 
-// CHECK-LABEL: sil hidden @$s8mangling14varargsVsArray3arr1nySaySiGd_SStF : $@convention(thin) (@guaranteed Array<Array<Int>>, @guaranteed String) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s8mangling14varargsVsArray3arr1nySaySiGd_SStF : $@convention(thin) (@guaranteed Array<Array<Int>>, @guaranteed String) -> ()
 func varargsVsArray(arr: [Int]..., n: String) { }
diff --git a/test/SILGen/mangling_ext_structA.swift b/test/SILGen/mangling_ext_structA.swift
index d09a3e4..976bb9f 100644
--- a/test/SILGen/mangling_ext_structA.swift
+++ b/test/SILGen/mangling_ext_structA.swift
@@ -19,11 +19,11 @@
 
 func markUsed<T>(_ t: T) {}
 
-// CHECK-LABEL: sil hidden @$s11def_structA1AV04ext_B1AE4testyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11def_structA1AV04ext_B1AE4testyyF
 var a = A()
 markUsed(a.test())
 
-// CHECK-LABEL: sil hidden @$s11def_structA1AV04ext_B1AE10NestedTypeV4testyyF
+// CHECK-LABEL: sil hidden [ossa] @$s11def_structA1AV04ext_B1AE10NestedTypeV4testyyF
 
 var nestedType = A.NestedType()
 markUsed(nestedType.test())
diff --git a/test/SILGen/mangling_generic_extensions.swift b/test/SILGen/mangling_generic_extensions.swift
index 5b9b5a0..0879f94 100644
--- a/test/SILGen/mangling_generic_extensions.swift
+++ b/test/SILGen/mangling_generic_extensions.swift
@@ -12,32 +12,32 @@
   // An unconstrained extension in the same module doesn't use the extension
   // mangling, since the implementation can be resiliently moved into the
   // definition.
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions3FooV1aSivg
-  // NO-SELF-LABEL: sil hidden @$s27mangling_generic_extensions3FooV1aSivg
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooV1aSivg
+  // NO-SELF-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooV1aSivg
   var a: Int { return 0 }
 
-  // NO-SELF-LABEL: sil hidden @$s27mangling_generic_extensions3FooV3zimyyF
+  // NO-SELF-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooV3zimyyF
   func zim() { }
-  // NO-SELF-LABEL: sil hidden @$s27mangling_generic_extensions3FooV4zangyyqd__lF
+  // NO-SELF-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooV4zangyyqd__lF
   func zang<U>(_: U) { }
-  // NO-SELF-LABEL: sil hidden @$s27mangling_generic_extensions3FooV4zungyyqd__AA8RuncibleRd__3HatQyd__Rs_lF
+  // NO-SELF-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooV4zungyyqd__AA8RuncibleRd__3HatQyd__Rs_lF
   func zung<U: Runcible>(_: U) where U.Hat == T { }
 }
 
 extension Foo where T: Runcible {
   // A constrained extension always uses the extension mangling.
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions3FooVA2A8RuncibleRzlE1aSivg
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooVA2A8RuncibleRzlE1aSivg
   var a: Int { return 0 }
 
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions3FooVA2A8RuncibleRzlE1bxvg
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooVA2A8RuncibleRzlE1bxvg
   var b: T { get { } }
 }
 
 extension Foo where T: Runcible, T.Spoon: Runcible {
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions3FooVA2A8RuncibleRzAaD5SpoonRpzlE1aSivg
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooVA2A8RuncibleRzAaD5SpoonRpzlE1aSivg
   var a: Int { return 0 }
 
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions3FooVA2A8RuncibleRzAaD5SpoonRpzlE1bxvg
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions3FooVA2A8RuncibleRzAaD5SpoonRpzlE1bxvg
   var b: T { get { } }
 }
 
@@ -48,12 +48,12 @@
 // declaration, so we would no longer want to use the extension mangling
 // in unconstrained cases.
 extension Runcible {
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions8RunciblePAAE5runceyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions8RunciblePAAE5runceyyF
   func runce() {}
 }
 
 extension Runcible where Self.Spoon == Self.Hat {
-  // CHECK-LABEL: sil hidden @$s27mangling_generic_extensions8RunciblePAA5SpoonQz3HatRtzrlE5runceyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s27mangling_generic_extensions8RunciblePAA5SpoonQz3HatRtzrlE5runceyyF
   func runce() {}
 }
 
diff --git a/test/SILGen/mangling_private.swift b/test/SILGen/mangling_private.swift
index 1a26522..3f551de 100644
--- a/test/SILGen/mangling_private.swift
+++ b/test/SILGen/mangling_private.swift
@@ -12,40 +12,40 @@
 
 import mangling_private_helper
 
-// CHECK-LABEL: sil private @$s16mangling_private0B4Func33_A3CCBB841DB59E79A4AD4EE458655068LLSiyF
-// OTHER-NAME-LABEL: sil private @$s16mangling_private0B4Func33_CF726049E48876D30EA29D63CF139F1DLLSiyF
+// CHECK-LABEL: sil private [ossa] @$s16mangling_private0B4Func33_A3CCBB841DB59E79A4AD4EE458655068LLSiyF
+// OTHER-NAME-LABEL: sil private [ossa] @$s16mangling_private0B4Func33_CF726049E48876D30EA29D63CF139F1DLLSiyF
 private func privateFunc() -> Int {
   return 0
 }
 
 public struct PublicStruct {
-  // CHECK-LABEL: sil private @$s16mangling_private12PublicStructV0B6Method33_A3CCBB841DB59E79A4AD4EE458655068LLyyFZ
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private12PublicStructV0B6Method33_A3CCBB841DB59E79A4AD4EE458655068LLyyFZ
   private static func privateMethod() {}
 
-  // CHECK-LABEL: sil private @$s16mangling_private12PublicStructV1xACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private12PublicStructV1xACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
   private init(x: Int) {}
 }
 
 public struct InternalStruct {
-  // CHECK-LABEL: sil private @$s16mangling_private14InternalStructV0B6Method33_A3CCBB841DB59E79A4AD4EE458655068LLyyFZ
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private14InternalStructV0B6Method33_A3CCBB841DB59E79A4AD4EE458655068LLyyFZ
   private static func privateMethod() {}
 
-  // CHECK-LABEL: sil private @$s16mangling_private14InternalStructV1xACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private14InternalStructV1xACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
   private init(x: Int) {}
 }
 
 private struct PrivateStruct {
-  // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV0B6MethodyyFZ
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV0B6MethodyyFZ
   private static func privateMethod() {}
 
-  // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV1xADSi_tcfC
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV1xADSi_tcfC
   private init(x: Int) {}
 
   struct Inner {
-    // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV5InnerV0B6MethodyyFZ
+    // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV5InnerV0B6MethodyyFZ
     private static func privateMethod() {}
 
-    // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV5InnerV1xAFSi_tcfC
+    // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV5InnerV1xAFSi_tcfC
     private init(x: Int) {}
   }
 }
@@ -57,21 +57,21 @@
 }
 
 extension PublicStruct {
-  // CHECK-LABEL: sil private @$s16mangling_private12PublicStructV16extPrivateMethod33_A3CCBB841DB59E79A4AD4EE458655068LLyyF
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private12PublicStructV16extPrivateMethod33_A3CCBB841DB59E79A4AD4EE458655068LLyyF
   private func extPrivateMethod() {}
 
-  // CHECK-LABEL: sil private @$s16mangling_private12PublicStructV3extACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private12PublicStructV3extACSi_tc33_A3CCBB841DB59E79A4AD4EE458655068LlfC
   private init(ext: Int) {}
 }
 extension PrivateStruct {
-  // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV03extC6MethodyyF
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV03extC6MethodyyF
   private func extPrivateMethod() {}
 
-  // CHECK-LABEL: sil private @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV3extADSi_tcfC
+  // CHECK-LABEL: sil private [ossa] @$s16mangling_private13PrivateStruct33_A3CCBB841DB59E79A4AD4EE458655068LLV3extADSi_tcfC
   private init(ext: Int) {}
 }
 
-// CHECK-LABEL: sil private @$s16mangling_private10localTypesyyF11LocalStructL_V0B6MethodyyFZ
+// CHECK-LABEL: sil private [ossa] @$s16mangling_private10localTypesyyF11LocalStructL_V0B6MethodyyFZ
 
 // CHECK-LABEL: sil_vtable Sub {
 class Sub : Base {
diff --git a/test/SILGen/mangling_retroactive.swift b/test/SILGen/mangling_retroactive.swift
index ee95ccd..099003e 100644
--- a/test/SILGen/mangling_retroactive.swift
+++ b/test/SILGen/mangling_retroactive.swift
@@ -12,14 +12,14 @@
 extension X: P { } // retroactive
 extension Y: Q { } // retroactive
 
-// CHECK: sil hidden @$s20mangling_retroactive5test0yyAA1ZVy12RetroactiveB1XVSiAE1YVAG0D1A1PAAyHCg_AiJ1QAAyHCg1_GF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive5test0yyAA1ZVy12RetroactiveB1XVSiAE1YVAG0D1A1PAAyHCg_AiJ1QAAyHCg1_GF
 func test0(_: Z<X, Int, Y>) { }
 
 struct Z2<T: P> {
   struct Inner<V: Q> { }
 }
 
-// CHECK: sil hidden @$s20mangling_retroactive5test1yyAA2Z2V5InnerVy12RetroactiveB1XV_AG1YVAI0F1A1PAAyHCg_AkL1QAAyHCg0_GF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive5test1yyAA2Z2V5InnerVy12RetroactiveB1XV_AG1YVAI0F1A1PAAyHCg_AkL1QAAyHCg0_GF
 func test1(_: Z2<X>.Inner<Y>) { }
 
 extension X: Hashable {
@@ -38,5 +38,52 @@
 struct RequiresEquatable<T: Equatable> { }
 
 // Conditional requirement involves retroactive conformances.
-// CHECK: sil hidden @$s20mangling_retroactive5test2yyAA17RequiresEquatableVyAA1ZVy12RetroactiveB1XVSiAG1YVAI0F1A1PAAyHCg_AkL1QAAyHCg1_GAOSQAISHAAyHC_AKSQAAyHCHCg_GF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive5test2yyAA17RequiresEquatableVyAA1ZVy12RetroactiveB1XVSiAG1YVAI0F1A1PAAyHCg_AkL1QAAyHCg1_GAOSQHPAISHAAyHC_AKSQAAyHCHCg_GF
 func test2(_: RequiresEquatable<Z<X, Int, Y>>) { }
+
+struct UnconditionallyP<T: Q>: P {}
+struct RequiresP<T: P> {}
+
+// RequiresP uses a non-retroactive conformance for its generic param
+// UnconditionallyP, even though UnconditionallyP's generic param uses a
+// retroactive conformance to conform to Q.
+func rdar46735592(_: RequiresP<UnconditionallyP<Y>>) { }
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive12rdar46735592yyAA9RequiresPVyAA16UnconditionallyPVy12RetroactiveB1YVAI0F1A1QAAyHCg_GGF
+
+struct QImpl: Q {}
+struct ConditionallyP<T> {}
+extension ConditionallyP: P where T: Q {}
+
+func useConditionallyP(_: RequiresP<ConditionallyP<QImpl>>) {}
+func useConditionallyP_retroactive(_: RequiresP<ConditionallyP<Y>>) {}
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive17useConditionallyPyyAA9RequiresPVyAA0D1PVyAA5QImplVGGF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive018useConditionallyP_B0yyAA9RequiresPVyAA0D1PVy12RetroactiveB1YVGAJ0F1A1PHPAiK1QAAyHC_HCg_GF
+
+protocol Wrapper {
+  associatedtype Wrapped
+}
+struct WrapperImpl<Wrapped>: Wrapper {}
+
+struct IndirectlyConditionallyP<T: Wrapper> {}
+extension IndirectlyConditionallyP: P where T.Wrapped: Q {}
+
+func useIndirectlyConditionallyP(_: RequiresP<IndirectlyConditionallyP<WrapperImpl<QImpl>>>) {}
+func useIndirectlyConditionallyP_retroactive(_: RequiresP<IndirectlyConditionallyP<WrapperImpl<Y>>>) {}
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive27useIndirectlyConditionallyPyyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVyAA5QImplVGGGF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive028useIndirectlyConditionallyP_B0yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVy12RetroactiveB1YVGGAM0I1A1PHPAkN1QAAyHC_HCg_GF
+
+struct IndirectlyConditionallyP2<T> {}
+extension IndirectlyConditionallyP2: P where T: Wrapper, T.Wrapped: Q {}
+
+func useIndirectlyConditionallyP2(_: RequiresP<IndirectlyConditionallyP<WrapperImpl<QImpl>>>) {}
+func useIndirectlyConditionallyP2_retroactive(_: RequiresP<IndirectlyConditionallyP<WrapperImpl<Y>>>) {}
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive28useIndirectlyConditionallyP2yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVyAA5QImplVGGGF
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive029useIndirectlyConditionallyP2_B0yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVy12RetroactiveB1YVGGAM0J1A1PHPAkN1QAAyHC_HCg_GF
+
+protocol NonRetroactive {}
+extension Y: NonRetroactive {}
+struct ConditionallyP2<T> {}
+extension ConditionallyP2: P where T: Q, T: NonRetroactive {}
+
+func useConditionallyP2(_: RequiresP<ConditionallyP2<Y>>) {}
+// CHECK: sil hidden [ossa] @$s20mangling_retroactive18useConditionallyP2yyAA9RequiresPVyAA0dE0Vy12RetroactiveB1YVGAJ0G1A1PHPAiK1QAAyHC_AiA03NonG0HpyHCHCg_GF
diff --git a/test/SILGen/mangling_retroactive_overlay.swift b/test/SILGen/mangling_retroactive_overlay.swift
index 9138221..b589a7a 100644
--- a/test/SILGen/mangling_retroactive_overlay.swift
+++ b/test/SILGen/mangling_retroactive_overlay.swift
@@ -9,6 +9,6 @@
 
 // Note: the NSObject: Equatable conformance from the overlay is not considered
 // to be a "retroactive" conformance, so ensure that it isn't mangled as such.
-// CHECK: sil hidden @$s28mangling_retroactive_overlay4testyyAA10RequiresEqVySo8NSObjectCGF 
+// CHECK: sil hidden [ossa] @$s28mangling_retroactive_overlay4testyyAA10RequiresEqVySo8NSObjectCGF 
 func test(_: RequiresEq<NSObject>) { }
 
diff --git a/test/SILGen/metatype_abstraction.swift b/test/SILGen/metatype_abstraction.swift
index dc6ea68..4ef4ffc 100644
--- a/test/SILGen/metatype_abstraction.swift
+++ b/test/SILGen/metatype_abstraction.swift
@@ -20,7 +20,7 @@
   var value: T.Type
 }
 
-// CHECK-LABEL: sil hidden @$ss26genericMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss26genericMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[ADDR:%.*]] = struct_element_addr {{%.*}} : $*Generic<T.Type>, #Generic.value
 // CHECK:         [[META:%.*]] = load [trivial] [[ADDR]] : $*@thick T.Type
 // CHECK:         return [[META]] : $@thick T.Type
@@ -29,7 +29,7 @@
   var x = x
   return x.value
 }
-// CHECK-LABEL: sil hidden @$ss26dynamicMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss26dynamicMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[ADDR:%.*]] = struct_element_addr {{%.*}} : $*Generic<C.Type>, #Generic.value
 // CHECK:         [[META:%.*]] = load [trivial] [[ADDR]] : $*@thick C.Type
 // CHECK:         return [[META]] : $@thick C.Type
@@ -38,7 +38,7 @@
   var x = x
   return x.value
 }
-// CHECK-LABEL: sil hidden @$ss25staticMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss25staticMetatypeFromGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[META:%.*]] = metatype $@thin S.Type
 // CHECK:         return [[META]] : $@thin S.Type
 // CHECK:       }
@@ -46,7 +46,7 @@
   return x.value
 }
 
-// CHECK-LABEL: sil hidden @$ss026genericMetatypeFromGenericB0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss026genericMetatypeFromGenericB0{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[ADDR:%.*]] = struct_element_addr {{%.*}} : $*GenericMetatype<T>, #GenericMetatype.value
 // CHECK:         [[META:%.*]] = load [trivial] [[ADDR]] : $*@thick T.Type
 // CHECK:         return [[META]] : $@thick T.Type
@@ -55,7 +55,7 @@
   var x = x
   return x.value
 }
-// CHECK-LABEL: sil hidden @$ss026dynamicMetatypeFromGenericB0ys1CCms0dB0VyACGF
+// CHECK-LABEL: sil hidden [ossa] @$ss026dynamicMetatypeFromGenericB0ys1CCms0dB0VyACGF
 // CHECK:         [[XBOX:%[0-9]+]] = alloc_box ${ var GenericMetatype<C> }
 // CHECK:         [[PX:%[0-9]+]] = project_box [[XBOX]]
 // CHECK:         [[READ:%.*]] = begin_access [read] [unknown] [[PX]] : $*GenericMetatype<C>
@@ -71,7 +71,7 @@
 func takeGeneric<T>(_ x: T) {}
 func takeGenericMetatype<T>(_ x: T.Type) {}
 
-// CHECK-LABEL: sil hidden @$ss23staticMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss23staticMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[MAT:%.*]] = alloc_stack $@thick S.Type
 // CHECK:         [[META:%.*]] = metatype $@thick S.Type
 // CHECK:         store [[META]] to [trivial] [[MAT]] : $*@thick S.Type
@@ -79,20 +79,20 @@
 func staticMetatypeToGeneric(_ x: S.Type) {
   takeGeneric(x)
 }
-// CHECK-LABEL: sil hidden @$ss023staticMetatypeToGenericB0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss023staticMetatypeToGenericB0{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[META:%.*]] = metatype $@thick S.Type
 // CHECK:         apply {{%.*}}<S>([[META]])
 func staticMetatypeToGenericMetatype(_ x: S.Type) {
   takeGenericMetatype(x)
 }
-// CHECK-LABEL: sil hidden @$ss24dynamicMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss24dynamicMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[MAT:%.*]] = alloc_stack $@thick C.Type
 // CHECK:         apply {{%.*}}<C.Type>([[MAT]]) : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
 func dynamicMetatypeToGeneric(_ x: C.Type) {
   var x = x
   takeGeneric(x)
 }
-// CHECK-LABEL: sil hidden @$ss024dynamicMetatypeToGenericB0yys1CCmF
+// CHECK-LABEL: sil hidden [ossa] @$ss024dynamicMetatypeToGenericB0yys1CCmF
 // CHECK:         [[XBOX:%[0-9]+]] = alloc_box ${ var @thick C.Type }
 // CHECK:         [[PX:%[0-9]+]] = project_box [[XBOX]]
 // CHECK:         [[READ:%.*]] = begin_access [read] [unknown] [[PX]] : $*@thick C.Type
@@ -102,7 +102,7 @@
   var x = x
   takeGenericMetatype(x)
 }
-// CHECK-LABEL: sil hidden @$ss24genericMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss24genericMetatypeToGeneric{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[MAT:%.*]] = alloc_stack $@thick U.Type
 // CHECK:         apply {{%.*}}<U.Type>([[MAT]]) : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> ()
 func genericMetatypeToGeneric<U>(_ x: U.Type) {
@@ -113,20 +113,20 @@
   takeGenericMetatype(x)
 }
 
-// CHECK-LABEL: sil hidden @$ss019static_metatype_of_B0ys1SVmmACF
+// CHECK-LABEL: sil hidden [ossa] @$ss019static_metatype_of_B0ys1SVmmACF
 // CHECK:         metatype $@thin S.Type.Type
 func static_metatype_of_metatype(_ x: S) -> S.Type.Type {
   return type(of: type(of: x))
 }
 
-// CHECK-LABEL: sil hidden @$ss018class_metatype_of_B0ys1CCmmACF
+// CHECK-LABEL: sil hidden [ossa] @$ss018class_metatype_of_B0ys1CCmmACF
 // CHECK:         [[METATYPE:%.*]] = value_metatype $@thick C.Type
 // CHECK:         [[META_METATYPE:%.*]] = value_metatype $@thick C.Type.Type, [[METATYPE]]
 func class_metatype_of_metatype(_ x: C) -> C.Type.Type {
   return type(of: type(of: x))
 }
 
-// CHECK-LABEL: sil hidden @$ss020generic_metatype_of_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$ss020generic_metatype_of_B0{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[METATYPE:%.*]] = value_metatype $@thick T.Type
 // CHECK:         [[META_METATYPE:%.*]] = value_metatype $@thick T.Type.Type, [[METATYPE]]
 func generic_metatype_of_metatype<T>(_ x: T) -> T.Type.Type {
diff --git a/test/SILGen/metatype_casts.swift b/test/SILGen/metatype_casts.swift
index bc0f1d0..c8b0bc4 100644
--- a/test/SILGen/metatype_casts.swift
+++ b/test/SILGen/metatype_casts.swift
@@ -1,12 +1,12 @@
 // RUN: %target-swift-emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s14metatype_casts6t_is_u{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14metatype_casts6t_is_u{{[_0-9a-zA-Z]*}}F
 // CHECK:         checked_cast_br {{.*}} $@thick T.Type to $@thick U.Type
 func t_is_u<T, U>(_: T, _: U) -> Bool {
   return T.self is U.Type
 }
 
-// CHECK-LABEL: sil hidden @$s14metatype_casts8int_is_t{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14metatype_casts8int_is_t{{[_0-9a-zA-Z]*}}F
 func int_is_t<T>() -> (Bool, T.Type?, T.Type) {
   // CHECK: checked_cast_br {{%.*}} : $@thick Int.Type to $@thick T.Type
   // CHECK: checked_cast_br {{%.*}} : $@thick Int.Type to $@thick T.Type
@@ -14,7 +14,7 @@
   return (Int.self is T.Type, Int.self as? T.Type, Int.self as! T.Type)
 }
 
-// CHECK-LABEL: sil hidden @$s14metatype_casts8t_is_int{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14metatype_casts8t_is_int{{[_0-9a-zA-Z]*}}F
 func t_is_int<T>(_: T) -> (Bool, Int.Type?, Int.Type) {
   // CHECK: checked_cast_br {{%.*}} : $@thick T.Type to $@thick Int.Type
   // CHECK: checked_cast_br {{%.*}} : $@thick T.Type to $@thick Int.Type
@@ -27,13 +27,13 @@
 class Ambulance : Emergency {}
 class FashionPolice {}
 
-// CHECK-LABEL: sil hidden @$s14metatype_casts30anyObjectToExistentialMetatype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14metatype_casts30anyObjectToExistentialMetatype{{[_0-9a-zA-Z]*}}F
 func anyObjectToExistentialMetatype(o: AnyObject) -> Emergency.Type? {
   // CHECK: checked_cast_addr_br take_always AnyObject in {{%.*}} : $*AnyObject to Emergency.Type in {{%.*}}
   return o as? Emergency.Type
 }
 
-// CHECK-LABEL: sil hidden @$s14metatype_casts19anyObjectToMetatype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14metatype_casts19anyObjectToMetatype{{[_0-9a-zA-Z]*}}F
 func anyObjectToMetatype(o: AnyObject) -> FashionPolice.Type? {
   // CHECK: checked_cast_addr_br take_always AnyObject in {{%.*}} : $*AnyObject to FashionPolice.Type in {{%.*}}
   return o as? FashionPolice.Type
diff --git a/test/SILGen/metatype_object_conversion.swift b/test/SILGen/metatype_object_conversion.swift
index 46ffb1f..88d1d8d 100644
--- a/test/SILGen/metatype_object_conversion.swift
+++ b/test/SILGen/metatype_object_conversion.swift
@@ -8,7 +8,7 @@
 
 @objc protocol OP {}
 
-// CHECK-LABEL: sil hidden @$s26metatype_object_conversion0A8ToObjectyyXlAA1CCmF
+// CHECK-LABEL: sil hidden [ossa] @$s26metatype_object_conversion0A8ToObjectyyXlAA1CCmF
 func metatypeToObject(_ x: C.Type) -> AnyObject {
   // CHECK: bb0([[THICK:%.*]] : $@thick C.Type):
   // CHECK:   [[OBJC:%.*]] = thick_to_objc_metatype [[THICK]]
@@ -17,7 +17,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s26metatype_object_conversion27existentialMetatypeToObjectyyXlAA2CP_pXpF
+// CHECK-LABEL: sil hidden [ossa] @$s26metatype_object_conversion27existentialMetatypeToObjectyyXlAA2CP_pXpF
 func existentialMetatypeToObject(_ x: CP.Type) -> AnyObject {
   // CHECK: bb0([[THICK:%.*]] : $@thick CP.Type):
   // CHECK:   [[OBJC:%.*]] = thick_to_objc_metatype [[THICK]]
@@ -26,7 +26,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s26metatype_object_conversion23protocolToProtocolClassSo0F0CyF
+// CHECK-LABEL: sil hidden [ossa] @$s26metatype_object_conversion23protocolToProtocolClassSo0F0CyF
 func protocolToProtocolClass() -> Protocol {
   // CHECK: [[PROTO:%.*]] = objc_protocol #OP
   // CHECK: [[COPIED_PROTO:%.*]] = copy_value [[PROTO]]
diff --git a/test/SILGen/metatypes.swift b/test/SILGen/metatypes.swift
index d15ed76..88f7740 100644
--- a/test/SILGen/metatypes.swift
+++ b/test/SILGen/metatypes.swift
@@ -19,7 +19,7 @@
 
 class SomeSubclass : SomeClass {}
 
-// CHECK-LABEL: sil hidden @$s9metatypes07static_A0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes07static_A0{{[_0-9a-zA-Z]*}}F
 func static_metatypes()
   -> (SomeStruct.Type, SomeClass.Type, SomeClass.Type)
 {
@@ -31,7 +31,7 @@
   return (SomeStruct.self, SomeClass.self, SomeSubclass.self)
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes07struct_A0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes07struct_A0{{[_0-9a-zA-Z]*}}F
 func struct_metatypes(s: SomeStruct)
   -> (SomeStruct.Type, SomeStruct.Type)
 {
@@ -41,7 +41,7 @@
   return (type(of: s), SomeStruct.self)
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes06class_A0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes06class_A0{{[_0-9a-zA-Z]*}}F
 func class_metatypes(c: SomeClass, s: SomeSubclass)
   -> (SomeClass.Type, SomeClass.Type)
 {
@@ -52,7 +52,7 @@
   return (type(of: c), type(of: s))
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes010archetype_A0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes010archetype_A0{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : $*T):
 func archetype_metatypes<T>(t: T) -> (T.Type, T.Type) {
   // CHECK: [[STATIC_T:%[0-9]+]] = metatype $@thick T.Type
@@ -61,7 +61,7 @@
   return (T.self, type(of: t))
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes012existential_A0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes012existential_A0{{[_0-9a-zA-Z]*}}F
 func existential_metatypes(p: SomeProtocol) -> SomeProtocol.Type {
   // CHECK: existential_metatype $@thick SomeProtocol.Type
   return type(of: p)
@@ -79,7 +79,7 @@
 
 // rdar://16610078
 
-// CHECK-LABEL: sil hidden @$s9metatypes30existential_metatype_from_thinypXpyF : $@convention(thin) () -> @thick Any.Type
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes30existential_metatype_from_thinypXpyF : $@convention(thin) () -> @thick Any.Type
 // CHECK:      [[T0:%.*]] = metatype $@thin SomeStruct.Type
 // CHECK-NEXT: [[T1:%.*]] = metatype $@thick SomeStruct.Type
 // CHECK-NEXT: [[T2:%.*]] = init_existential_metatype [[T1]] : $@thick SomeStruct.Type, $@thick Any.Type
@@ -88,7 +88,7 @@
   return SomeStruct.self
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes36existential_metatype_from_thin_valueypXpyF : $@convention(thin) () -> @thick Any.Type
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes36existential_metatype_from_thin_valueypXpyF : $@convention(thin) () -> @thick Any.Type
 // CHECK:      [[T1:%.*]] = metatype $@thin SomeStruct.Type
 // CHECK:      [[T0:%.*]] = function_ref @$s9metatypes10SomeStructV{{[_0-9a-zA-Z]*}}fC
 // CHECK-NEXT: [[T2:%.*]] = apply [[T0]]([[T1]])
@@ -102,7 +102,7 @@
   return type(of: s)
 }
 
-// CHECK-LABEL: sil hidden @$s9metatypes20specialized_metatypeSDySSSiGyF
+// CHECK-LABEL: sil hidden [ossa] @$s9metatypes20specialized_metatypeSDySSSiGyF
 // CHECK:         metatype $@thin Dictionary<String, Int>.Type
 func specialized_metatype() -> Dictionary<String, Int> {
   let dict = Swift.Dictionary<Swift.String, Int>()
diff --git a/test/SILGen/modify.swift b/test/SILGen/modify.swift
index df939bf..13aa797 100644
--- a/test/SILGen/modify.swift
+++ b/test/SILGen/modify.swift
@@ -4,7 +4,7 @@
 class Base {
   var stored: Int = 0
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify4BaseC6storedSivM : $@yield_once @convention(method) (@guaranteed Base) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify4BaseC6storedSivM : $@yield_once @convention(method) (@guaranteed Base) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $Base):
 // CHECK:   [[T0:%.*]] = ref_element_addr [[SELF]] : $Base, #Base.stored
 // CHECK:   [[T1:%.*]] = begin_access [modify] [dynamic] [[T0]]
@@ -13,7 +13,7 @@
 // CHECK:   return {{%.*}} : $()
 // CHECK: }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify4BaseC8computedSivM : $@yield_once @convention(method) (@guaranteed Base) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify4BaseC8computedSivM : $@yield_once @convention(method) (@guaranteed Base) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $Base):
 // CHECK:   [[ADDR:%.*]] = alloc_stack $Int
 // CHECK:   [[T0:%.*]] = function_ref @$s6modify4BaseC8computedSivg
@@ -58,7 +58,7 @@
 
 extension Derived : Abstractable {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6modify7DerivedCAA12AbstractableA2aDP14storedFunction6ResultQzycvMTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6modify7DerivedCAA12AbstractableA2aDP14storedFunction6ResultQzycvMTW
 // CHECK: bb0(%0 : $*Derived):
 // CHECK-NEXT: [[T0:%.*]] = load_borrow %0 : $*Derived
 // CHECK-NEXT: [[SELF:%.*]] = upcast [[T0]] : $Derived to $Base
@@ -83,7 +83,7 @@
 // CHECK-NEXT: end_borrow [[T0]]
 // CHECK-NEXT: return
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6modify7DerivedCAA12AbstractableA2aDP19finalStoredFunction6ResultQzycvMTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6modify7DerivedCAA12AbstractableA2aDP19finalStoredFunction6ResultQzycvMTW
 // CHECK: bb0(%0 : $*Derived):
 // CHECK-NEXT: [[T0:%.*]] = load_borrow %0 : $*Derived
 // CHECK-NEXT: [[SELF:%.*]] = upcast [[T0]] : $Derived to $Base
@@ -109,7 +109,7 @@
 // CHECK-NEXT: end_borrow [[T0]]
 // CHECK-NEXT: return
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6modify7DerivedCAA12AbstractableA2aDP14staticFunction6ResultQzycvMZTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6modify7DerivedCAA12AbstractableA2aDP14staticFunction6ResultQzycvMZTW
 // CHECK: bb0(%0 : $@thick Derived.Type):
 // CHECK-NEXT: [[SELF:%.*]] = upcast %0 : $@thick Derived.Type to $@thick Base.Type
 // CHECK-NEXT: // function_ref
@@ -165,7 +165,7 @@
     didSet {}
   }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify9HasDidSetC6storedSivM : $@yield_once @convention(method) (@guaranteed HasDidSet) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify9HasDidSetC6storedSivM : $@yield_once @convention(method) (@guaranteed HasDidSet) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $HasDidSet):
 // CHECK:   [[ADDR:%.*]] = alloc_stack $Int
 // CHECK:   [[T0:%.*]] = function_ref @$s6modify9HasDidSetC6storedSivg
@@ -184,7 +184,7 @@
     set(value) {}
   }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify9HasDidSetC8computedSivM : $@yield_once @convention(method) (@guaranteed HasDidSet) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify9HasDidSetC8computedSivM : $@yield_once @convention(method) (@guaranteed HasDidSet) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $HasDidSet):
 // CHECK:   [[ADDR:%.*]] = alloc_stack $Int
 // CHECK:   [[T0:%.*]] = function_ref @$s6modify9HasDidSetC8computedSivg
@@ -204,7 +204,7 @@
     didSet {}
   }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify15HasStoredDidSetC6storedSivM : $@yield_once @convention(method) (@guaranteed HasStoredDidSet) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify15HasStoredDidSetC6storedSivM : $@yield_once @convention(method) (@guaranteed HasStoredDidSet) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $HasStoredDidSet):
 // CHECK:   [[ADDR:%.*]] = alloc_stack $Int
 // CHECK:   [[T0:%.*]] = ref_element_addr [[SELF]] : $HasStoredDidSet, #HasStoredDidSet.stored
@@ -224,7 +224,7 @@
 class HasWeak {
   weak var weakvar: HasWeak?
 }
-// CHECK-LABEL: sil hidden [transparent] @$s6modify7HasWeakC7weakvarACSgvM : $@yield_once @convention(method) (@guaranteed HasWeak) -> @yields @inout Optional<HasWeak> {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify7HasWeakC7weakvarACSgvM : $@yield_once @convention(method) (@guaranteed HasWeak) -> @yields @inout Optional<HasWeak> {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $HasWeak):
 // CHECK:   [[PROP:%.*]] = ref_element_addr [[SELF]] : $HasWeak, #HasWeak.weakvar
 // CHECK:   [[ACCESS:%.*]] = begin_access [modify] [dynamic] [[PROP]] : $*@sil_weak Optional<HasWeak>
@@ -254,7 +254,7 @@
 func improveWizard(_ wizard: inout Wizard) {
   improve(&wizard.hocus)
 }
-// CHECK-LABEL: sil hidden @$s6modify13improveWizardyyAA0C0VzF
+// CHECK-LABEL: sil hidden [ossa] @$s6modify13improveWizardyyAA0C0VzF
 // CHECK:       [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Wizard
 // CHECK-NEXT:  [[TEMP:%.*]] = alloc_stack $Int
 //   Call the getter and materialize the result in the temporary.
@@ -282,7 +282,7 @@
   var total: Int
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify4BillV5totalSivM : $@yield_once @convention(method) (@inout Bill) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify4BillV5totalSivM : $@yield_once @convention(method) (@inout Bill) -> @yields @inout Int {
 // CHECK: bb0([[SELF:%.*]] : $*Bill):
 // CHECK:   [[ACCESS:%.*]] = begin_access [modify] [unknown] [[SELF]]
 // CHECK:   [[T0:%.*]] = struct_element_addr [[ACCESS]] : $*Bill, #Bill.total
@@ -290,7 +290,7 @@
 // CHECK:   end_access [[ACCESS]]
 // CHECK: }
 
-// CHECK-LABEL:  sil private [transparent] [thunk] @$s6modify4BillVAA8TotalledA2aDP5totalSivMTW : $@yield_once @convention(witness_method: Totalled) (@inout Bill) -> @yields @inout Int {
+// CHECK-LABEL:  sil private [transparent] [thunk] [ossa] @$s6modify4BillVAA8TotalledA2aDP5totalSivMTW : $@yield_once @convention(witness_method: Totalled) (@inout Bill) -> @yields @inout Int {
 // CHECK:        bb0([[SELF:%.*]] : $*Bill):
 // CHECK:          [[T0:%.*]] = function_ref @$s6modify4BillV5totalSivM
 // CHECK-NEXT:     ([[T1:%.*]], [[TOKEN:%.*]]) = begin_apply [[T0]]([[SELF]])
@@ -324,7 +324,7 @@
   subscript<T>(_: T) -> T { get { } set { } }
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify23GenericSubscriptWitnessVyxxcluiM
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify23GenericSubscriptWitnessVyxxcluiM
 // CHECK:         function_ref @$s6modify23GenericSubscriptWitnessVyxxcluig
 // CHECK:         function_ref @$s6modify23GenericSubscriptWitnessVyxxcluis
 
@@ -350,11 +350,11 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluig : $@convention(method) <T where T : Magic> (Int, InferredRequirementOnSubscript) -> GenericTypeWithRequirement<T>
+// CHECK-LABEL: sil hidden [ossa] @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluig : $@convention(method) <T where T : Magic> (Int, InferredRequirementOnSubscript) -> GenericTypeWithRequirement<T>
 
-// CHECK-LABEL: sil hidden @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluis : $@convention(method) <T where T : Magic> (GenericTypeWithRequirement<T>, Int, @inout InferredRequirementOnSubscript) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluis : $@convention(method) <T where T : Magic> (GenericTypeWithRequirement<T>, Int, @inout InferredRequirementOnSubscript) -> ()
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluiM : $@yield_once @convention(method) <T where T : Magic> (Int, @inout InferredRequirementOnSubscript) -> @yields @inout GenericTypeWithRequirement<T>
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify30InferredRequirementOnSubscriptVyAA015GenericTypeWithC0VyxGSicAA5MagicRzluiM : $@yield_once @convention(method) <T where T : Magic> (Int, @inout InferredRequirementOnSubscript) -> @yields @inout GenericTypeWithRequirement<T>
 
 // Test for materializeForSet vs static properties of structs.
 
@@ -437,7 +437,7 @@
 struct TuxedoPanda : Panda { }
 
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s6modify11TuxedoPandaVAA0C0A2aDP1xyxxcvMTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s6modify11TuxedoPandaVAA0C0A2aDP1xyxxcvMTW
 
 // CHECK: [[T0:%.*]] = function_ref @$s6modify5PandaPAAE1xyxxcvM
 // CHECK: ([[T1:%.*]], [[TOKEN:%.*]]) = begin_apply [[T0]]<TuxedoPanda>(%0)
@@ -452,7 +452,7 @@
   lazy var cat: Int = 5
 }
 
-// CHECK-LABEL: sil hidden @$s6modify31inoutAccessOfLazyStructProperty1lyAA0efG0Vz_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6modify31inoutAccessOfLazyStructProperty1lyAA0efG0Vz_tF
 // CHECK:   function_ref @$s6modify18LazyStructPropertyV3catSivg
 // CHECK:   function_ref @$s6modify18LazyStructPropertyV3catSivs
 func inoutAccessOfLazyStructProperty(l: inout LazyStructProperty) {
@@ -461,13 +461,13 @@
 
 // Test for materializeForSet vs lazy properties of classes.
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify17LazyClassPropertyC3catSivM
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify17LazyClassPropertyC3catSivM
 
 class LazyClassProperty {
   lazy var cat: Int = 5
 }
 
-// CHECK-LABEL: sil hidden @$s6modify30inoutAccessOfLazyClassProperty1lyAA0efG0Cz_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6modify30inoutAccessOfLazyClassProperty1lyAA0efG0Cz_tF
 // CHECK:    class_method {{.*}} : $LazyClassProperty, #LazyClassProperty.cat!modify.1
 func inoutAccessOfLazyClassProperty(l: inout LazyClassProperty) {
   increment(&l.cat)
@@ -479,7 +479,7 @@
   lazy var cat: Int = 5
 }
 
-// CHECK-LABEL: sil hidden @$s6modify35inoutAccessOfLazyFinalClassProperty1lyAA0efgH0Cz_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6modify35inoutAccessOfLazyFinalClassProperty1lyAA0efgH0Cz_tF
 // CHECK:    function_ref @$s6modify22LazyFinalClassPropertyC3catSivg
 // CHECK:    function_ref @$s6modify22LazyFinalClassPropertyC3catSivs
 func inoutAccessOfLazyFinalClassProperty(l: inout LazyFinalClassProperty) {
@@ -539,7 +539,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s6modify23HasConditionalSubscriptVA2A0cD0RzlEyACyxGSiciM
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s6modify23HasConditionalSubscriptVA2A0cD0RzlEyACyxGSiciM
 // CHECK:         function_ref @$s6modify23HasConditionalSubscriptVA2A0cD0RzlEyACyxGSicig
 
 // CHECK-LABEL: sil_vtable DerivedForOverride {
diff --git a/test/SILGen/modify_accessor.swift b/test/SILGen/modify_accessor.swift
index 21d9550..e541d5d 100644
--- a/test/SILGen/modify_accessor.swift
+++ b/test/SILGen/modify_accessor.swift
@@ -7,7 +7,7 @@
 
   var modifiable: String {
     get {}
-// CHECK-LABEL: sil hidden @$s15modify_accessor12SimpleModifyV10modifiableSSvM
+// CHECK-LABEL: sil hidden [ossa] @$s15modify_accessor12SimpleModifyV10modifiableSSvM
 // CHECK-SAME:    : $@yield_once @convention(method) (@inout SimpleModify) -> @yields @inout String {
 // CHECK:         [[SELF:%.*]] = begin_access [modify] [unknown] %0 : $*SimpleModify
 // CHECK-NEXT:    [[FIELD:%.*]] = struct_element_addr [[SELF]] : $*SimpleModify, #SimpleModify.stored
@@ -24,7 +24,7 @@
     }
   }
 
-// CHECK-LABEL: sil hidden @$s15modify_accessor12SimpleModifyV3set6stringySS_tF
+// CHECK-LABEL: sil hidden [ossa] @$s15modify_accessor12SimpleModifyV3set6stringySS_tF
 // CHECK:         [[VALUE:%.*]] = copy_value %0 : $String
 // CHECK-NEXT:    [[SELF:%.*]] = begin_access [modify] [unknown] %1 : $*SimpleModify
 // CHECK-NEXT:    // function_ref
@@ -39,7 +39,7 @@
     modifiable = string
   }
 
-// CHECK-LABEL: sil hidden @$s15modify_accessor12SimpleModifyV0A0yyF
+// CHECK-LABEL: sil hidden [ossa] @$s15modify_accessor12SimpleModifyV0A0yyF
 // CHECK:         [[SELF:%.*]] = begin_access [modify] [unknown] %0 : $*SimpleModify
 // CHECK-NEXT:    // function_ref
 // CHECK-NEXT:    [[MODIFYFN:%.*]] = function_ref @$s15modify_accessor12SimpleModifyV10modifiableSSvM
@@ -60,7 +60,7 @@
   var stored: String = "test"
   var modifiable: String {
     get { return stored }
-// CHECK: sil hidden [transparent] @$s15modify_accessor25SetterSynthesisFromModifyC10modifiableSSvs
+// CHECK: sil hidden [transparent] [ossa] @$s15modify_accessor25SetterSynthesisFromModifyC10modifiableSSvs
 // CHECK:         [[VALUE_BORROW:%.*]] = begin_borrow %0 : $String
 // CHECK-NEXT:    [[VALUE:%.*]] = copy_value [[VALUE_BORROW]] : $String
 // CHECK-NEXT:    // function_ref
@@ -87,7 +87,7 @@
     set(value) { stored = value }
   }
 
-// CHECK-LABEL: sil hidden @$s15modify_accessor12ModifyAndSetV3set6stringySS_tF
+// CHECK-LABEL: sil hidden [ossa] @$s15modify_accessor12ModifyAndSetV3set6stringySS_tF
 // CHECK:         [[VALUE:%.*]] = copy_value %0 : $String
 // CHECK-NEXT:    [[SELF:%.*]] = begin_access [modify] [unknown] %1 : $*ModifyAndSet
 // CHECK-NEXT:    // function_ref
@@ -100,7 +100,7 @@
     modifiable = string
   }
 
-  // CHECK-LABEL: sil hidden @$s15modify_accessor12ModifyAndSetV0A0yyF
+  // CHECK-LABEL: sil hidden [ossa] @$s15modify_accessor12ModifyAndSetV0A0yyF
   // CHECK:         [[SELF:%.*]] = begin_access [modify] [unknown] %0 : $*ModifyAndSet
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    [[MODIFYFN:%.*]] = function_ref @$s15modify_accessor12ModifyAndSetV10modifiableSSvM
diff --git a/test/SILGen/modify_objc.swift b/test/SILGen/modify_objc.swift
index 95c3c34..e81e3cf 100644
--- a/test/SILGen/modify_objc.swift
+++ b/test/SILGen/modify_objc.swift
@@ -16,7 +16,7 @@
 extension ClassWithBlockProperty : ProtocolWithBlockProperty {}
 
 //   Protocol witness for 'block'.
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$sSo22ClassWithBlockPropertyC11modify_objc08ProtocolbcD0A2cDP5blockySSSgcSgvMTW :
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$sSo22ClassWithBlockPropertyC11modify_objc08ProtocolbcD0A2cDP5blockySSSgcSgvMTW :
 // CHECK-SAME:    $@yield_once @convention(witness_method: ProtocolWithBlockProperty) (@inout ClassWithBlockProperty) -> @yields @inout Optional<@callee_guaranteed (@guaranteed Optional<String>) -> ()>
 // CHECK:    bb0([[SELF_INDIRECT:%.*]] : $*ClassWithBlockProperty):
 // CHECK-NEXT: [[SELF:%.*]] = load_borrow [[SELF_INDIRECT]] : $*ClassWithBlockProperty
@@ -25,11 +25,11 @@
 // CHECK-NEXT: ([[ADDR:%.*]], [[TOKEN:%.*]]) = begin_apply [[FN]]([[SELF]])
 // CHECK-NEXT: yield [[ADDR]] : $*Optional<@callee_guaranteed (@guaranteed Optional<String>) -> ()>
 
-// CHECK-LABEL: sil shared [serializable] @$sSo22ClassWithBlockPropertyC5blockySSSgcSgvM :
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo22ClassWithBlockPropertyC5blockySSSgcSgvM :
 // CHECK-SAME:    $@yield_once @convention(method) (@guaranteed ClassWithBlockProperty) -> @yields @inout Optional<@callee_guaranteed (@guaranteed Optional<String>) -> ()>
 
 //   Protocol witness for 'dependentBlock'
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$sSo22ClassWithBlockPropertyC11modify_objc08ProtocolbcD0A2cDP09dependentC0y14DependentInputQzcSgvMTW :
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$sSo22ClassWithBlockPropertyC11modify_objc08ProtocolbcD0A2cDP09dependentC0y14DependentInputQzcSgvMTW :
 // CHECK-SAME:    $@yield_once @convention(witness_method: ProtocolWithBlockProperty) (@inout ClassWithBlockProperty) -> @yields @inout Optional<@callee_guaranteed (@in_guaranteed Optional<String>) -> ()>
 // CHECK:    bb0([[SELF_INDIRECT:%.*]] : $*ClassWithBlockProperty):
 // CHECK-NEXT: [[SELF:%.*]] = load_borrow [[SELF_INDIRECT]] : $*ClassWithBlockProperty
@@ -42,7 +42,7 @@
 // CHECK-NEXT: store [[OUT_FUNCTION]] to [init] [[TEMP]] :
 // CHECK-NEXT: yield [[TEMP]] : $*Optional<@callee_guaranteed (@in_guaranteed Optional<String>) -> ()>
 
-// CHECK-LABEL: sil shared [serializable] @$sSo22ClassWithBlockPropertyC09dependentC0ySSSgcSgvM :
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo22ClassWithBlockPropertyC09dependentC0ySSSgcSgvM :
 // CHECK-SAME:    $@yield_once @convention(method) (@guaranteed ClassWithBlockProperty) -> @yields @inout Optional<@callee_guaranteed (@guaranteed Optional<String>) -> ()>
 
 // Make sure 'modify' implementations for 'dynamic' properties go through
@@ -56,7 +56,7 @@
   @objc dynamic var x: Int = 0
 }
 
-// CHECK-LABEL: sil shared @$s11modify_objc24HasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicStoredProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [ossa] @$s11modify_objc24HasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicStoredProperty) -> @yields @inout Int
 // CHECK: objc_method %0 : $HasDynamicStoredProperty, #HasDynamicStoredProperty.x!getter.1.foreign
 // CHECK: yield
 // CHECK: objc_method %0 : $HasDynamicStoredProperty, #HasDynamicStoredProperty.x!setter.1.foreign
@@ -64,13 +64,13 @@
 // CHECK: objc_method %0 : $HasDynamicStoredProperty, #HasDynamicStoredProperty.x!setter.1.foreign
 // CHECK: unwind
 
-// TESTING-LABEL: sil shared [serialized] @$s11modify_objc24HasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicStoredProperty) -> @yields @inout Int
+// TESTING-LABEL: sil shared [serialized] [ossa] @$s11modify_objc24HasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicStoredProperty) -> @yields @inout Int
 
 class HasDynamicComputedProperty : ProtocolWithIntProperty {
   @objc dynamic var x: Int { get { } set { } }
 }
 
-// CHECK-LABEL: sil shared @$s11modify_objc26HasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicComputedProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [ossa] @$s11modify_objc26HasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicComputedProperty) -> @yields @inout Int
 // CHECK: objc_method %0 : $HasDynamicComputedProperty, #HasDynamicComputedProperty.x!getter.1.foreign
 // CHECK: yield
 // CHECK: objc_method %0 : $HasDynamicComputedProperty, #HasDynamicComputedProperty.x!setter.1.foreign
@@ -78,7 +78,7 @@
 // CHECK: objc_method %0 : $HasDynamicComputedProperty, #HasDynamicComputedProperty.x!setter.1.foreign
 // CHECK: unwind
 
-// TESTING-LABEL: sil shared [serialized] @$s11modify_objc26HasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicComputedProperty) -> @yields @inout Int
+// TESTING-LABEL: sil shared [serialized] [ossa] @$s11modify_objc26HasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed HasDynamicComputedProperty) -> @yields @inout Int
 
 // Make sure 'modify' implementations for public 'dynamic' properties
 // are serialized.
@@ -86,16 +86,16 @@
   @objc public dynamic var x: Int = 0
 }
 
-// CHECK-LABEL: sil shared [serialized] @$s11modify_objc30PublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicStoredProperty) -> @yields @inout Int
-// RESILIENT-LABEL: sil shared [serialized] @$s11modify_objc30PublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicStoredProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s11modify_objc30PublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicStoredProperty) -> @yields @inout Int
+// RESILIENT-LABEL: sil shared [serialized] [ossa] @$s11modify_objc30PublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicStoredProperty) -> @yields @inout Int
 
 
 public class PublicHasDynamicComputedProperty : ProtocolWithIntProperty {
   @objc public dynamic var x: Int { get { } set { } }
 }
 
-// CHECK-LABEL: sil shared [serialized] @$s11modify_objc32PublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicComputedProperty) -> @yields @inout Int
-// RESILIENT-LABEL: sil shared [serialized] @$s11modify_objc32PublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicComputedProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s11modify_objc32PublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicComputedProperty) -> @yields @inout Int
+// RESILIENT-LABEL: sil shared [serialized] [ossa] @$s11modify_objc32PublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed PublicHasDynamicComputedProperty) -> @yields @inout Int
 
 
 // ... even if the class inherits NSObject.
@@ -103,12 +103,12 @@
   @objc public dynamic var x: Int = 0
 }
 
-// CHECK-LABEL: sil shared [serialized] @$s11modify_objc32NSPublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicStoredProperty) -> @yields @inout Int
-// RESILIENT-LABEL: sil shared [serialized] @$s11modify_objc32NSPublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicStoredProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s11modify_objc32NSPublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicStoredProperty) -> @yields @inout Int
+// RESILIENT-LABEL: sil shared [serialized] [ossa] @$s11modify_objc32NSPublicHasDynamicStoredPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicStoredProperty) -> @yields @inout Int
 
 public class NSPublicHasDynamicComputedProperty : NSObject, ProtocolWithIntProperty {
   @objc public dynamic var x: Int { get { } set { } }
 }
 
-// CHECK-LABEL: sil shared [serialized] @$s11modify_objc34NSPublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicComputedProperty) -> @yields @inout Int
-// RESILIENT-LABEL: sil shared [serialized] @$s11modify_objc34NSPublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicComputedProperty) -> @yields @inout Int
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s11modify_objc34NSPublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicComputedProperty) -> @yields @inout Int
+// RESILIENT-LABEL: sil shared [serialized] [ossa] @$s11modify_objc34NSPublicHasDynamicComputedPropertyC1xSivM : $@yield_once @convention(method) (@guaranteed NSPublicHasDynamicComputedProperty) -> @yields @inout Int
diff --git a/test/SILGen/multi_file.swift b/test/SILGen/multi_file.swift
index 39ce991..4cd4188 100644
--- a/test/SILGen/multi_file.swift
+++ b/test/SILGen/multi_file.swift
@@ -3,28 +3,28 @@
 
 func markUsed<T>(_ t: T) {}
 
-// CHECK-LABEL: sil hidden @$s10multi_file12rdar16016713{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10multi_file12rdar16016713{{[_0-9a-zA-Z]*}}F
 func rdar16016713(_ r: Range) {
   // CHECK: [[LIMIT:%[0-9]+]] = function_ref @$s10multi_file5RangeV5limitSivg : $@convention(method) (Range) -> Int
   // CHECK: {{%[0-9]+}} = apply [[LIMIT]]({{%[0-9]+}}) : $@convention(method) (Range) -> Int
   markUsed(r.limit)
 }
 
-// CHECK-LABEL: sil hidden @$s10multi_file26lazyPropertiesAreNotStored{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10multi_file26lazyPropertiesAreNotStored{{[_0-9a-zA-Z]*}}F
 func lazyPropertiesAreNotStored(_ container: LazyContainer) {
   var container = container
   // CHECK: {{%[0-9]+}} = function_ref @$s10multi_file13LazyContainerV7lazyVarSivg : $@convention(method) (@inout LazyContainer) -> Int
   markUsed(container.lazyVar)
 }
 
-// CHECK-LABEL: sil hidden @$s10multi_file29lazyRefPropertiesAreNotStored{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10multi_file29lazyRefPropertiesAreNotStored{{[_0-9a-zA-Z]*}}F
 func lazyRefPropertiesAreNotStored(_ container: LazyContainerClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $LazyContainerClass):
   // CHECK:   {{%[0-9]+}} = class_method [[ARG]] : $LazyContainerClass, #LazyContainerClass.lazyVar!getter.1 : (LazyContainerClass) -> () -> Int, $@convention(method) (@guaranteed LazyContainerClass) -> Int
   markUsed(container.lazyVar)
 }
 
-// CHECK-LABEL: sil hidden @$s10multi_file25finalVarsAreDevirtualizedyyAA18FinalPropertyClassCF
+// CHECK-LABEL: sil hidden [ossa] @$s10multi_file25finalVarsAreDevirtualizedyyAA18FinalPropertyClassCF
 func finalVarsAreDevirtualized(_ obj: FinalPropertyClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $FinalPropertyClass):
   // CHECK:   ref_element_addr [[ARG]] : $FinalPropertyClass, #FinalPropertyClass.foo
@@ -34,7 +34,7 @@
 }
 
 // rdar://18448869
-// CHECK-LABEL: sil hidden @$s10multi_file34finalVarsDontNeedMaterializeForSetyyAA27ObservingPropertyFinalClassCF
+// CHECK-LABEL: sil hidden [ossa] @$s10multi_file34finalVarsDontNeedMaterializeForSetyyAA27ObservingPropertyFinalClassCF
 func finalVarsDontNeedMaterializeForSet(_ obj: ObservingPropertyFinalClass) {
   obj.foo += 1
   // CHECK: [[T0:%.*]] = ref_element_addr %0 : $ObservingPropertyFinalClass, #ObservingPropertyFinalClass.foo
@@ -51,5 +51,5 @@
     set {}
   }
 }
-// CHECK-LABEL: sil hidden [transparent] @$s10multi_file19HasComputedPropertyC3fooSivM : $@yield_once @convention(method) (@guaranteed HasComputedProperty) -> @yields @inout Int {
-// CHECK-LABEL: sil private [transparent] [thunk] @$s10multi_file19HasComputedPropertyCAA012ProtocolWithE0A2aDP3fooSivMTW : $@yield_once @convention(witness_method: ProtocolWithProperty) (@inout HasComputedProperty) -> @yields @inout Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s10multi_file19HasComputedPropertyC3fooSivM : $@yield_once @convention(method) (@guaranteed HasComputedProperty) -> @yields @inout Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s10multi_file19HasComputedPropertyCAA012ProtocolWithE0A2aDP3fooSivMTW : $@yield_once @convention(witness_method: ProtocolWithProperty) (@inout HasComputedProperty) -> @yields @inout Int {
diff --git a/test/SILGen/nested_generics.swift b/test/SILGen/nested_generics.swift
index 3ec4bb8..8b6939b 100644
--- a/test/SILGen/nested_generics.swift
+++ b/test/SILGen/nested_generics.swift
@@ -42,13 +42,13 @@
 }
 
 // CHECK-LABEL: // nested_generics.Lunch.Dinner.coolCombination(t: A.Topping, u: nested_generics.Deli<nested_generics.Pepper>.Mustard) -> ()
-// CHECK-LABEL: sil hidden @$s15nested_generics5LunchV6DinnerV15coolCombination1t1uy7ToppingQz_AA4DeliC7MustardOyAA6PepperV_GtF : $@convention(method) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard> (@in_guaranteed T.Topping, Deli<Pepper>.Mustard, @in_guaranteed Lunch<T>.Dinner<U>) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics5LunchV6DinnerV15coolCombination1t1uy7ToppingQz_AA4DeliC7MustardOyAA6PepperV_GtF : $@convention(method) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard> (@in_guaranteed T.Topping, Deli<Pepper>.Mustard, @in_guaranteed Lunch<T>.Dinner<U>) -> ()
 
 // CHECK-LABEL: // nestedGeneric #1 <A><A1><A2, B2 where A: nested_generics.Pizza, A1: nested_generics.HotDog, A.Topping: nested_generics.CuredMeat, A1.Condiment == nested_generics.Deli<nested_generics.Pepper>.Mustard>(x: A2, y: B2) -> (A2, B2) in nested_generics.Lunch.Dinner.coolCombination(t: A.Topping, u: nested_generics.Deli<nested_generics.Pepper>.Mustard) -> ()
-// CHECK-LABEL: sil private @$s15nested_generics5LunchV6DinnerV15coolCombination1t1uy7ToppingQz_AA4DeliC7MustardOyAA6PepperV_GtF0A7GenericL_1x1yqd0___qd0_0_tqd0___qd0_0_tAA5PizzaRzAA6HotDogRd__AA9CuredMeatAJRQAQ9CondimentRtd__r__0_lF : $@convention(thin) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard><X, Y> (@in_guaranteed X, @in_guaranteed Y) -> (@out X, @out Y)
+// CHECK-LABEL: sil private [ossa] @$s15nested_generics5LunchV6DinnerV15coolCombination1t1uy7ToppingQz_AA4DeliC7MustardOyAA6PepperV_GtF0A7GenericL_1x1yqd0___qd0_0_tqd0___qd0_0_tAA5PizzaRzAA6HotDogRd__AA9CuredMeatAJRQAQ9CondimentRtd__r__0_lF : $@convention(thin) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard><X, Y> (@in_guaranteed X, @in_guaranteed Y) -> (@out X, @out Y)
 
 // CHECK-LABEL: // nested_generics.Lunch.Dinner.init(firstCourse: A, secondCourse: Swift.Optional<A1>, leftovers: A, transformation: (A) -> A1) -> nested_generics.Lunch<A>.Dinner<A1>
-// CHECK-LABEL: sil hidden @$s15nested_generics5LunchV6DinnerV11firstCourse06secondF09leftovers14transformationAEyx_qd__Gx_qd__Sgxqd__xctcfC : $@convention(method) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard> (@owned T, @in Optional<U>, @owned T, @owned @callee_guaranteed (@guaranteed T) -> @out U, @thin Lunch<T>.Dinner<U>.Type) -> @out Lunch<T>.Dinner<U>
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics5LunchV6DinnerV11firstCourse06secondF09leftovers14transformationAEyx_qd__Gx_qd__Sgxqd__xctcfC : $@convention(method) <T where T : Pizza, T.Topping : CuredMeat><U where U : HotDog, U.Condiment == Deli<Pepper>.Mustard> (@owned T, @in Optional<U>, @owned T, @owned @callee_guaranteed (@guaranteed T) -> @out U, @thin Lunch<T>.Dinner<U>.Type) -> @out Lunch<T>.Dinner<U>
 
 // Non-generic nested inside generic
 
@@ -65,7 +65,7 @@
 }
 
 // CHECK-LABEL: // nested_generics.Deli.Pepperoni.init() -> nested_generics.Deli<A>.Pepperoni
-// CHECK-LABEL: sil hidden @$s15nested_generics4DeliC9PepperoniCAEyx_Gycfc : $@convention(method) <Spices> (@owned Deli<Spices>.Pepperoni) -> @owned Deli<Spices>.Pepperoni
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics4DeliC9PepperoniCAEyx_Gycfc : $@convention(method) <Spices> (@owned Deli<Spices>.Pepperoni) -> @owned Deli<Spices>.Pepperoni
 
 // Typealiases referencing outer generic parameters
 
@@ -92,7 +92,7 @@
 extension String {
   func foo() {
     // CHECK-LABEL: // init(material: A) -> Cheese #1 in (extension in nested_generics):Swift.String.foo() -> ()<A> in Cheese #1 in (extension in nested_generics):Swift.String.foo() -> ()
-    // CHECK-LABEL: sil private @$sSS15nested_genericsE3fooyyF6CheeseL_V8materialADyxGx_tcfC
+    // CHECK-LABEL: sil private [ossa] @$sSS15nested_genericsE3fooyyF6CheeseL_V8materialADyxGx_tcfC
     struct Cheese<Milk> {
       let material: Milk
     }
@@ -104,7 +104,7 @@
 extension HotDogs {
   func applyRelish() {
     // CHECK-LABEL: // init(material: A) -> Relish #1 in nested_generics.HotDogs.applyRelish() -> ()<A> in Relish #1 in nested_generics.HotDogs.applyRelish() -> ()
-    // CHECK-LABEL: sil private @$s15nested_generics7HotDogsC11applyRelishyyF0F0L_V8materialAFyxGx_tcfC
+    // CHECK-LABEL: sil private [ossa] @$s15nested_generics7HotDogsC11applyRelishyyF0F0L_V8materialAFyxGx_tcfC
 
     struct Relish<Material> {
       let material: Material
@@ -117,7 +117,7 @@
 struct ChiliFlakes {}
 
 // CHECK-LABEL: // nested_generics.eatDinnerGeneric<A, B where A: nested_generics.Pizza, B: nested_generics.HotDog, A.Topping: nested_generics.CuredMeat, B.Condiment == nested_generics.Deli<nested_generics.Pepper>.Mustard>(d: inout nested_generics.Lunch<A>.Dinner<B>, t: A.Topping, u: nested_generics.Deli<nested_generics.Pepper>.Mustard) -> ()
-// CHECK-LABEL: sil hidden @$s15nested_generics16eatDinnerGeneric1d1t1uyAA5LunchV0D0Vyx_q_Gz_7ToppingQzAA4DeliC7MustardOyAA6PepperV_GtAA5PizzaRzAA6HotDogR_AA9CuredMeatALRQAS9CondimentRt_r0_lF : $@convention(thin) <T, U where T : Pizza, U : HotDog, T.Topping : CuredMeat, U.Condiment == Deli<Pepper>.Mustard> (@inout Lunch<T>.Dinner<U>, @in_guaranteed T.Topping, Deli<Pepper>.Mustard) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics16eatDinnerGeneric1d1t1uyAA5LunchV0D0Vyx_q_Gz_7ToppingQzAA4DeliC7MustardOyAA6PepperV_GtAA5PizzaRzAA6HotDogR_AA9CuredMeatALRQAS9CondimentRt_r0_lF : $@convention(thin) <T, U where T : Pizza, U : HotDog, T.Topping : CuredMeat, U.Condiment == Deli<Pepper>.Mustard> (@inout Lunch<T>.Dinner<U>, @in_guaranteed T.Topping, Deli<Pepper>.Mustard) -> ()
 
 func eatDinnerGeneric<T, U>(d: inout Lunch<T>.Dinner<U>, t: T.Topping, u: U.Condiment) {
   // Method call
@@ -136,7 +136,7 @@
 // Overloading concrete function with different bound generic arguments in parent type
 
 // CHECK-LABEL: // nested_generics.eatDinnerConcrete(d: inout nested_generics.Lunch<nested_generics.Pizzas<nested_generics.ChiliFlakes>.NewYork>.Dinner<nested_generics.HotDogs.American>, t: nested_generics.Deli<nested_generics.ChiliFlakes>.Pepperoni, u: nested_generics.Deli<nested_generics.Pepper>.Mustard) -> ()
-// CHECK-LABEL: sil hidden @$s15nested_generics17eatDinnerConcrete1d1t1uyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA11ChiliFlakesV_G_AA7HotDogsC8AmericanVGz_AA4DeliC9PepperoniCyAO_GAW7MustardOyAA6PepperV_GtF : $@convention(thin) (@inout Lunch<Pizzas<ChiliFlakes>.NewYork>.Dinner<HotDogs.American>, @guaranteed Deli<ChiliFlakes>.Pepperoni, Deli<Pepper>.Mustard) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics17eatDinnerConcrete1d1t1uyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA11ChiliFlakesV_G_AA7HotDogsC8AmericanVGz_AA4DeliC9PepperoniCyAO_GAW7MustardOyAA6PepperV_GtF : $@convention(thin) (@inout Lunch<Pizzas<ChiliFlakes>.NewYork>.Dinner<HotDogs.American>, @guaranteed Deli<ChiliFlakes>.Pepperoni, Deli<Pepper>.Mustard) -> ()
 
 func eatDinnerConcrete(d: inout Lunch<Pizzas<ChiliFlakes>.NewYork>.Dinner<HotDogs.American>,
                        t: Deli<ChiliFlakes>.Pepperoni,
@@ -155,10 +155,10 @@
 }
 
 // CHECK-LABEL: // reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.ChiliFlakes>.NewYork) -> (@out nested_generics.HotDogs.American) to @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.ChiliFlakes>.NewYork) -> (@unowned nested_generics.HotDogs.American)
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s15nested_generics6PizzasV7NewYorkCyAA11ChiliFlakesV_GAA7HotDogsC8AmericanVIeggr_AhLIeggd_TR : $@convention(thin) (@guaranteed Pizzas<ChiliFlakes>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<ChiliFlakes>.NewYork) -> @out HotDogs.American) -> HotDogs.American
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s15nested_generics6PizzasV7NewYorkCyAA11ChiliFlakesV_GAA7HotDogsC8AmericanVIeggr_AhLIeggd_TR : $@convention(thin) (@guaranteed Pizzas<ChiliFlakes>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<ChiliFlakes>.NewYork) -> @out HotDogs.American) -> HotDogs.American
 
 // CHECK-LABEL: // nested_generics.eatDinnerConcrete(d: inout nested_generics.Lunch<nested_generics.Pizzas<nested_generics.Pepper>.NewYork>.Dinner<nested_generics.HotDogs.American>, t: nested_generics.Deli<nested_generics.Pepper>.Pepperoni, u: nested_generics.Deli<nested_generics.Pepper>.Mustard) -> ()
-// CHECK-LABEL: sil hidden @$s15nested_generics17eatDinnerConcrete1d1t1uyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA6PepperV_G_AA7HotDogsC8AmericanVGz_AA4DeliC9PepperoniCyAO_GAW7MustardOyAO_GtF : $@convention(thin) (@inout Lunch<Pizzas<Pepper>.NewYork>.Dinner<HotDogs.American>, @guaranteed Deli<Pepper>.Pepperoni, Deli<Pepper>.Mustard) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s15nested_generics17eatDinnerConcrete1d1t1uyAA5LunchV0D0VyAA6PizzasV7NewYorkCyAA6PepperV_G_AA7HotDogsC8AmericanVGz_AA4DeliC9PepperoniCyAO_GAW7MustardOyAO_GtF : $@convention(thin) (@inout Lunch<Pizzas<Pepper>.NewYork>.Dinner<HotDogs.American>, @guaranteed Deli<Pepper>.Pepperoni, Deli<Pepper>.Mustard) -> ()
 
 func eatDinnerConcrete(d: inout Lunch<Pizzas<Pepper>.NewYork>.Dinner<HotDogs.American>,
                        t: Deli<Pepper>.Pepperoni,
@@ -177,10 +177,10 @@
 }
 
 // CHECK-LABEL: // reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.Pepper>.NewYork) -> (@out nested_generics.HotDogs.American) to @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.Pepper>.NewYork) -> (@unowned nested_generics.HotDogs.American)
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s15nested_generics6PizzasV7NewYorkCyAA6PepperV_GAA7HotDogsC8AmericanVIeggr_AhLIeggd_TR : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<Pepper>.NewYork) -> @out HotDogs.American) -> HotDogs.American
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s15nested_generics6PizzasV7NewYorkCyAA6PepperV_GAA7HotDogsC8AmericanVIeggr_AhLIeggd_TR : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<Pepper>.NewYork) -> @out HotDogs.American) -> HotDogs.American
 
 // CHECK-LABEL: // closure #1 (nested_generics.Pizzas<nested_generics.Pepper>.NewYork) -> nested_generics.HotDogs.American in nested_generics.calls() -> ()
-// CHECK-LABEL: sil private @$s15nested_generics5callsyyFAA7HotDogsC8AmericanVAA6PizzasV7NewYorkCyAA6PepperV_GcfU_ : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork) -> HotDogs.American
+// CHECK-LABEL: sil private [ossa] @$s15nested_generics5callsyyFAA7HotDogsC8AmericanVAA6PizzasV7NewYorkCyAA6PepperV_GcfU_ : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork) -> HotDogs.American
 
 func calls() {
 
@@ -224,9 +224,9 @@
 }
 
 // CHECK-LABEL: // reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.Pepper>.NewYork) -> (@unowned nested_generics.HotDogs.American) to @escaping @callee_guaranteed (@guaranteed nested_generics.Pizzas<nested_generics.Pepper>.NewYork) -> (@out nested_generics.HotDogs.American)
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s15nested_generics6PizzasV7NewYorkCyAA6PepperV_GAA7HotDogsC8AmericanVIeggd_AhLIeggr_TR : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<Pepper>.NewYork) -> HotDogs.American) -> @out HotDogs.American
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s15nested_generics6PizzasV7NewYorkCyAA6PepperV_GAA7HotDogsC8AmericanVIeggd_AhLIeggr_TR : $@convention(thin) (@guaranteed Pizzas<Pepper>.NewYork, @guaranteed @callee_guaranteed (@guaranteed Pizzas<Pepper>.NewYork) -> HotDogs.American) -> @out HotDogs.American
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15nested_generics9OuterRingC05InnerD0Cyx_qd__GAA30ProtocolWithGenericRequirementA2aGP6method1t1u1v1TQz_1UQzqd__tAN_APqd__tlFTW : $@convention(witness_method: ProtocolWithGenericRequirement) <τ_0_0><τ_1_0><τ_2_0> (@in_guaranteed τ_0_0, @in_guaranteed τ_1_0, @in_guaranteed τ_2_0, @in_guaranteed OuterRing<τ_0_0>.InnerRing<τ_1_0>) -> (@out τ_0_0, @out τ_1_0, @out τ_2_0) {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15nested_generics9OuterRingC05InnerD0Cyx_qd__GAA30ProtocolWithGenericRequirementA2aGP6method1t1u1v1TQz_1UQzqd__tAN_APqd__tlFTW : $@convention(witness_method: ProtocolWithGenericRequirement) <τ_0_0><τ_1_0><τ_2_0> (@in_guaranteed τ_0_0, @in_guaranteed τ_1_0, @in_guaranteed τ_2_0, @in_guaranteed OuterRing<τ_0_0>.InnerRing<τ_1_0>) -> (@out τ_0_0, @out τ_1_0, @out τ_2_0) {
 // CHECK: bb0([[T:%[0-9]+]] : $*τ_0_0, [[U:%[0-9]+]] : $*τ_1_0, [[V:%[0-9]+]] : $*τ_2_0, [[TOut:%[0-9]+]] : $*τ_0_0, [[UOut:%[0-9]+]] : $*τ_1_0, [[VOut:%[0-9]+]] : $*τ_2_0, [[SELF:%[0-9]+]] : $*OuterRing<τ_0_0>.InnerRing<τ_1_0>):
 // CHECK:   [[SELF_COPY_VAL:%[0-9]+]] = load_borrow [[SELF]] : $*OuterRing<τ_0_0>.InnerRing<τ_1_0>
 // CHECK:   [[METHOD:%[0-9]+]] = class_method [[SELF_COPY_VAL]] : $OuterRing<τ_0_0>.InnerRing<τ_1_0>, #OuterRing.InnerRing.method!1 : <T><U><V> (OuterRing<T>.InnerRing<U>) -> (T, U, V) -> (T, U, V), $@convention(method) <τ_0_0><τ_1_0><τ_2_0> (@in_guaranteed τ_0_0, @in_guaranteed τ_1_0, @in_guaranteed τ_2_0, @guaranteed OuterRing<τ_0_0>.InnerRing<τ_1_0>) -> (@out τ_0_0, @out τ_1_0, @out τ_2_0)
diff --git a/test/SILGen/nested_types_referencing_nested_functions.swift b/test/SILGen/nested_types_referencing_nested_functions.swift
index e355b6e..0e27e30 100644
--- a/test/SILGen/nested_types_referencing_nested_functions.swift
+++ b/test/SILGen/nested_types_referencing_nested_functions.swift
@@ -6,19 +6,19 @@
   func bar<T>(_: T) { foo() }
 
   class Foo {
-    // CHECK-LABEL: sil private @$s025nested_types_referencing_A10_functions3FooL_CACycfc : $@convention(method) (@owned Foo) -> @owned Foo {
+    // CHECK-LABEL: sil private [ossa] @$s025nested_types_referencing_A10_functions3FooL_CACycfc : $@convention(method) (@owned Foo) -> @owned Foo {
     init() {
       foo()
     }
-    // CHECK-LABEL: sil private @$s025nested_types_referencing_A10_functions3FooL_C3zimyyF : $@convention(method) (@guaranteed Foo) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s025nested_types_referencing_A10_functions3FooL_C3zimyyF : $@convention(method) (@guaranteed Foo) -> ()
     func zim() {
       foo()
     }
-    // CHECK-LABEL: sil private @$s025nested_types_referencing_A10_functions3FooL_C4zangyyxlF : $@convention(method) <T> (@in_guaranteed T, @guaranteed Foo) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s025nested_types_referencing_A10_functions3FooL_C4zangyyxlF : $@convention(method) <T> (@in_guaranteed T, @guaranteed Foo) -> ()
     func zang<T>(_ x: T) {
       bar(x)
     }
-    // CHECK-LABEL: sil private @$s025nested_types_referencing_A10_functions3FooL_CfD : $@convention(method) (@owned Foo) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s025nested_types_referencing_A10_functions3FooL_CfD : $@convention(method) (@owned Foo) -> ()
     deinit {
       foo()
     }
diff --git a/test/SILGen/newtype.swift b/test/SILGen/newtype.swift
index c7c2855..9b7d41c 100644
--- a/test/SILGen/newtype.swift
+++ b/test/SILGen/newtype.swift
@@ -16,7 +16,7 @@
   return ErrorDomain(rawValue: str)
 }
 
-// CHECK-RAW-LABEL: sil shared [transparent] [serializable] @$sSo14SNTErrorDomaina8rawValueABSS_tcfC
+// CHECK-RAW-LABEL: sil shared [transparent] [serializable] [ossa] @$sSo14SNTErrorDomaina8rawValueABSS_tcfC
 // CHECK-RAW: bb0([[STR:%[0-9]+]] : @owned $String,
 // CHECK-RAW: [[SELF_BOX:%[0-9]+]] = alloc_box ${ var ErrorDomain }, var, name "self"
 // CHECK-RAW: [[MARKED_SELF_BOX:%[0-9]+]] = mark_uninitialized [rootself] [[SELF_BOX]]
@@ -36,7 +36,7 @@
   return ed.rawValue
 }
 
-// CHECK-RAW-LABEL: sil shared [serializable] @$sSo14SNTErrorDomaina8rawValueSSvg
+// CHECK-RAW-LABEL: sil shared [serializable] [ossa] @$sSo14SNTErrorDomaina8rawValueSSvg
 // CHECK-RAW: bb0([[SELF:%[0-9]+]] : @guaranteed $ErrorDomain):
 // CHECK-RAW: [[STORED_VALUE:%[0-9]+]] = struct_extract [[SELF]] : $ErrorDomain, #ErrorDomain._rawValue
 // CHECK-RAW: [[STORED_VALUE_COPY:%.*]] = copy_value [[STORED_VALUE]]
@@ -47,21 +47,21 @@
 // CHECK-RAW: return [[STRING_RESULT]]
 
 class ObjCTest {
-  // CHECK-RAW-LABEL: sil hidden @$s7newtype8ObjCTestC19optionalPassThroughySo14SNTErrorDomainaSgAGF : $@convention(method) (@guaranteed Optional<ErrorDomain>, @guaranteed ObjCTest) -> @owned Optional<ErrorDomain> {
-  // CHECK-RAW: sil hidden [thunk] @$s7newtype8ObjCTestC19optionalPassThroughySo14SNTErrorDomainaSgAGFTo : $@convention(objc_method) (Optional<ErrorDomain>, ObjCTest) -> @autoreleased Optional<ErrorDomain> {
+  // CHECK-RAW-LABEL: sil hidden [ossa] @$s7newtype8ObjCTestC19optionalPassThroughySo14SNTErrorDomainaSgAGF : $@convention(method) (@guaranteed Optional<ErrorDomain>, @guaranteed ObjCTest) -> @owned Optional<ErrorDomain> {
+  // CHECK-RAW: sil hidden [thunk] [ossa] @$s7newtype8ObjCTestC19optionalPassThroughySo14SNTErrorDomainaSgAGFTo : $@convention(objc_method) (Optional<ErrorDomain>, ObjCTest) -> @autoreleased Optional<ErrorDomain> {
   @objc func optionalPassThrough(_ ed: ErrorDomain?) -> ErrorDomain? {
     return ed
   }  
 
-  // CHECK-RAW-LABEL: sil hidden @$s7newtype8ObjCTestC18integerPassThroughySo5MyIntaAFF : $@convention(method) (MyInt, @guaranteed ObjCTest) -> MyInt {
-  // CHECK-RAW: sil hidden [thunk] @$s7newtype8ObjCTestC18integerPassThroughySo5MyIntaAFFTo : $@convention(objc_method) (MyInt, ObjCTest) -> MyInt {
+  // CHECK-RAW-LABEL: sil hidden [ossa] @$s7newtype8ObjCTestC18integerPassThroughySo5MyIntaAFF : $@convention(method) (MyInt, @guaranteed ObjCTest) -> MyInt {
+  // CHECK-RAW: sil hidden [thunk] [ossa] @$s7newtype8ObjCTestC18integerPassThroughySo5MyIntaAFFTo : $@convention(objc_method) (MyInt, ObjCTest) -> MyInt {
   @objc func integerPassThrough(_ ed: MyInt) -> MyInt {
     return ed
   }  
 }
 
 // These use a bridging conversion with a specialization of a generic witness.
-// CHECK-RAW-LABEL: sil hidden @$s7newtype15bridgeToNewtypeSo8MyStringayF
+// CHECK-RAW-LABEL: sil hidden [ossa] @$s7newtype15bridgeToNewtypeSo8MyStringayF
 func bridgeToNewtype() -> MyString {
 // CHECK-RAW: [[STRING:%.*]] = apply
 // CHECK-RAW: [[TO_NS:%.*]] = function_ref @$sSS10FoundationE19_bridgeToObjectiveCSo8NSStringCyF
@@ -74,7 +74,7 @@
   return "foo" as NSString as MyString
 }
 
-// CHECK-RAW-LABEL: sil hidden @$s7newtype17bridgeFromNewtype6stringSSSo8MyStringa_tF
+// CHECK-RAW-LABEL: sil hidden [ossa] @$s7newtype17bridgeFromNewtype6stringSSSo8MyStringa_tF
 func bridgeFromNewtype(string: MyString) -> String {
 // CHECK-RAW: [[FROM_MY:%.*]] = function_ref @$ss20_SwiftNewtypeWrapperPss21_ObjectiveCBridgeable8RawValueRpzrlE09_bridgeToD1CAD_01_D5CTypeQZyF : $@convention(method) <τ_0_0 where τ_0_0 : _SwiftNewtypeWrapper, τ_0_0.RawValue : _ObjectiveCBridgeable> (@in_guaranteed τ_0_0) -> @owned τ_0_0.RawValue._ObjectiveCType
 // CHECK-RAW: [[NS:%.*]] = apply [[FROM_MY]]<MyString>(
diff --git a/test/SILGen/noescape_reabstraction.swift b/test/SILGen/noescape_reabstraction.swift
index 0e27339..5e16fb3 100644
--- a/test/SILGen/noescape_reabstraction.swift
+++ b/test/SILGen/noescape_reabstraction.swift
@@ -10,7 +10,7 @@
 func noescape_generic<T>(_ x: (T) -> T) {
 }
 
-// CHECK-LABEL: sil hidden @$s22noescape_reabstraction0A9_concreteyyAA1SVADXEF
+// CHECK-LABEL: sil hidden [ossa] @$s22noescape_reabstraction0A9_concreteyyAA1SVADXEF
 // CHECK:         function_ref [[REABSTRACTION_THUNK:@\$s22noescape_reabstraction1SVACIgyd_A2CIegnr_TR]]
 
 func concrete(_ x: (S) -> S) {
@@ -20,5 +20,5 @@
 func generic<T>(_ x: (T) -> T) {
 }
 
-// CHECK-LABEL: sil hidden @$s22noescape_reabstraction8concreteyyAA1SVADXEF
+// CHECK-LABEL: sil hidden [ossa] @$s22noescape_reabstraction8concreteyyAA1SVADXEF
 // CHECK:         function_ref [[REABSTRACTION_THUNK]]
diff --git a/test/SILGen/nsmanaged-witness-multi.swift b/test/SILGen/nsmanaged-witness-multi.swift
index a8bb1e0..48f4421 100644
--- a/test/SILGen/nsmanaged-witness-multi.swift
+++ b/test/SILGen/nsmanaged-witness-multi.swift
@@ -18,11 +18,11 @@
 // Make sure the modify accessor for Fish.name is emitted here even though it
 // its storage was declared in a different translation unit
 
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$s4main4FishCAA0B8ProtocolA2aDP4nameSSvMTW : $@yield_once @convention(witness_method: FishProtocol) (@inout Fish) -> @yields @inout String
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$s4main4FishCAA0B8ProtocolA2aDP4nameSSvMTW : $@yield_once @convention(witness_method: FishProtocol) (@inout Fish) -> @yields @inout String
 // CHECK: function_ref @$s4main4FishC4nameSSvM
 // CHECK: return
 
-// CHECK-LABEL: sil shared [serialized] @$s4main4FishC4nameSSvM : $@yield_once @convention(method) (@guaranteed Fish) -> @yields @inout String
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s4main4FishC4nameSSvM : $@yield_once @convention(method) (@guaranteed Fish) -> @yields @inout String
 // CHECK: objc_method %0 : $Fish, #Fish.name!getter.1.foreign
 // CHECK: objc_method %0 : $Fish, #Fish.name!setter.1.foreign
 // CHECK: unwind
diff --git a/test/SILGen/nsmanaged-witness.swift b/test/SILGen/nsmanaged-witness.swift
index fb9a65c..8c138ca 100644
--- a/test/SILGen/nsmanaged-witness.swift
+++ b/test/SILGen/nsmanaged-witness.swift
@@ -61,5 +61,5 @@
 // TODO: We can't emit a vtable entry for modify for ObjC types.
 // CHECK-NOT: class_method {{.*}}Foo{{.*}}intProperty{{.*}}modify
 
-// CHECK-LABEL: sil shared [serializable] @$sSo3FooC11intPropertys5Int32VvM
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo3FooC11intPropertys5Int32VvM
 
diff --git a/test/SILGen/objc_attr_NSManaged.swift b/test/SILGen/objc_attr_NSManaged.swift
index 0c4ace1..351833e 100644
--- a/test/SILGen/objc_attr_NSManaged.swift
+++ b/test/SILGen/objc_attr_NSManaged.swift
@@ -17,12 +17,12 @@
 
   @NSManaged func kvc()
 
-  // CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC1x{{[_0-9a-zA-Z]*}}fgTo
-  // CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC1x{{[_0-9a-zA-Z]*}}fsTo
-  // CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC3kvc{{[_0-9a-zA-Z]*}}FTo
+  // CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC1x{{[_0-9a-zA-Z]*}}fgTo
+  // CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC1x{{[_0-9a-zA-Z]*}}fsTo
+  // CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC3kvc{{[_0-9a-zA-Z]*}}FTo
 
   // Make sure that we're calling through the @objc entry points.
-  // CHECK-LABEL: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC7modifyX{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed SwiftGizmo) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC7modifyX{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed SwiftGizmo) -> () {
   func modifyX() {
     // CHECK:   [[GETTER:%[0-9]+]] = objc_method [[SELF:%.*]] : $SwiftGizmo, #SwiftGizmo.x!getter.1.foreign : (SwiftGizmo) -> () -> X, $@convention(objc_method) (SwiftGizmo) -> @autoreleased X
     // CHECK-NEXT: apply [[GETTER]]([[SELF]]) : $@convention(objc_method) (SwiftGizmo) -> @autoreleased X
@@ -33,7 +33,7 @@
     // CHECK: return
   }
 
-  // CHECK-LABEL: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC8testFunc{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC8testFunc{{[_0-9a-zA-Z]*}}F
   func testFunc() {
     // CHECK: = objc_method %0 : $SwiftGizmo, #SwiftGizmo.kvc!1.foreign : (SwiftGizmo) -> () -> (), $@convention(objc_method) (SwiftGizmo) -> ()
     // CHECK: return
@@ -69,7 +69,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s19objc_attr_NSManaged9testFinalySSAA0E5GizmoCF : $@convention(thin) (@guaranteed FinalGizmo) -> @owned String {
+// CHECK-LABEL: sil hidden [ossa] @$s19objc_attr_NSManaged9testFinalySSAA0E5GizmoCF : $@convention(thin) (@guaranteed FinalGizmo) -> @owned String {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $FinalGizmo):
 // CHECK: objc_method [[ARG]] : $FinalGizmo, #FinalGizmo.kvc2!1.foreign : (FinalGizmo) -> () -> (), $@convention(objc_method) (FinalGizmo) -> ()
 // CHECK-NOT: return
@@ -103,15 +103,15 @@
 	@NSManaged final var entityID: String
 }
 
-// CHECK-LABEL: sil shared @$s19objc_attr_NSManaged11FinalEntityC8entityIDSSvM : $@yield_once @convention(method) (@guaranteed FinalEntity) -> @yields @inout String
+// CHECK-LABEL: sil shared [ossa] @$s19objc_attr_NSManaged11FinalEntityC8entityIDSSvM : $@yield_once @convention(method) (@guaranteed FinalEntity) -> @yields @inout String
 // CHECK: objc_method {{.*}} : $FinalEntity, #FinalEntity.entityID!getter.1.foreign
 // CHECK: yield
 // CHECK: objc_method {{.*}} : $FinalEntity, #FinalEntity.entityID!setter.1.foreign
 // CHECK: return
 
-// CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC1xAA1XCfgTo : $@convention(objc_method) (SwiftGizmo) -> @autoreleased X
-// CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10SwiftGizmoC1xAA1XCfsTo
-// CHECK-NOT: sil hidden @$s19objc_attr_NSManaged10{{[_0-9a-zA-Z]*}}FinalGizmoC1yytfgTo
+// CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC1xAA1XCfgTo : $@convention(objc_method) (SwiftGizmo) -> @autoreleased X
+// CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10SwiftGizmoC1xAA1XCfsTo
+// CHECK-NOT: sil hidden [ossa] @$s19objc_attr_NSManaged10{{[_0-9a-zA-Z]*}}FinalGizmoC1yytfgTo
 
 // The vtable should not contain any entry points for getters and setters.
 // CHECK-LABEL: sil_vtable SwiftGizmo {
diff --git a/test/SILGen/objc_attr_NSManaged_multi.swift b/test/SILGen/objc_attr_NSManaged_multi.swift
index 77d970b..0202ea5 100644
--- a/test/SILGen/objc_attr_NSManaged_multi.swift
+++ b/test/SILGen/objc_attr_NSManaged_multi.swift
@@ -5,7 +5,7 @@
 
 import Foundation
 
-// CHECK-LABEL: sil hidden @$s25objc_attr_NSManaged_multi9testMultiyyXlAA10SwiftGizmoCF : $@convention(thin) (@guaranteed SwiftGizmo) -> @owned AnyObject {
+// CHECK-LABEL: sil hidden [ossa] @$s25objc_attr_NSManaged_multi9testMultiyyXlAA10SwiftGizmoCF : $@convention(thin) (@guaranteed SwiftGizmo) -> @owned AnyObject {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $SwiftGizmo):
 // CHECK: = objc_method [[ARG]] : $SwiftGizmo, #SwiftGizmo.kvc!1.foreign : (SwiftGizmo) -> () -> (), $@convention(objc_method) (SwiftGizmo) -> ()
 // CHECK-NOT: return
@@ -19,7 +19,7 @@
   return obj.x
 }
 
-// CHECK-LABEL: sil hidden @$s25objc_attr_NSManaged_multi14testFinalMultiySSAA0F5GizmoCF : $@convention(thin) (@guaranteed FinalGizmo) -> @owned String {
+// CHECK-LABEL: sil hidden [ossa] @$s25objc_attr_NSManaged_multi14testFinalMultiySSAA0F5GizmoCF : $@convention(thin) (@guaranteed FinalGizmo) -> @owned String {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $FinalGizmo):
 // CHECK: objc_method [[ARG]] : $FinalGizmo, #FinalGizmo.kvc2!1.foreign : (FinalGizmo) -> () -> (), $@convention(objc_method) (FinalGizmo) -> ()
 // CHECK-NOT: return
diff --git a/test/SILGen/objc_blocks_bridging.swift b/test/SILGen/objc_blocks_bridging.swift
index b94b9f0..1e9cc7d 100644
--- a/test/SILGen/objc_blocks_bridging.swift
+++ b/test/SILGen/objc_blocks_bridging.swift
@@ -9,7 +9,7 @@
 import Foundation
 
 @objc class Foo {
-// CHECK-LABEL: sil hidden [thunk] @$s20objc_blocks_bridging3FooC3foo_1xS3iXE_SitFTo :
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s20objc_blocks_bridging3FooC3foo_1xS3iXE_SitFTo :
   // CHECK: bb0([[ARG1:%.*]] : @unowned $@convention(block) @noescape (Int) -> Int, {{.*}}, [[SELF:%.*]] : @unowned $Foo):
   // CHECK:         [[ARG1_COPY:%.*]] = copy_block [[ARG1]]
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -25,7 +25,7 @@
     return f(x)
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s20objc_blocks_bridging3FooC3bar_1xS3SXE_SStFTo : $@convention(objc_method) (@convention(block) @noescape (NSString) -> @autoreleased NSString, NSString, Foo) -> @autoreleased NSString {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s20objc_blocks_bridging3FooC3bar_1xS3SXE_SStFTo : $@convention(objc_method) (@convention(block) @noescape (NSString) -> @autoreleased NSString, NSString, Foo) -> @autoreleased NSString {
   // CHECK:       bb0([[BLOCK:%.*]] : @unowned $@convention(block) @noescape (NSString) -> @autoreleased NSString, [[NSSTRING:%.*]] : @unowned $NSString, [[SELF:%.*]] : @unowned $Foo):
   // CHECK:         [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK:         [[NSSTRING_COPY:%.*]] = copy_value [[NSSTRING]]
@@ -42,14 +42,14 @@
     return f(x)
   }
 
-  // GUARANTEED-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSo8NSStringCABIyBya_S2SIeggo_TR : $@convention(thin) (@guaranteed String, @guaranteed @convention(block) @noescape (NSString) -> @autoreleased NSString) -> @owned String {
+  // GUARANTEED-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSo8NSStringCABIyBya_S2SIeggo_TR : $@convention(thin) (@guaranteed String, @guaranteed @convention(block) @noescape (NSString) -> @autoreleased NSString) -> @owned String {
   // GUARANTEED: bb0(%0 : @guaranteed $String, [[BLOCK:%.*]] : @guaranteed $@convention(block) @noescape (NSString) -> @autoreleased NSString):
   // GUARANTEED:   [[BRIDGE:%.*]] = function_ref @$sSS10FoundationE19_bridgeToObjectiveCSo8NSStringCyF
   // GUARANTEED:   [[NSSTR:%.*]] = apply [[BRIDGE]](%0)
   // GUARANTEED:   apply [[BLOCK]]([[NSSTR]]) : $@convention(block) @noescape (NSString) -> @autoreleased NSString
   // GUARANTEED: } // end sil function '$sSo8NSStringCABIyBya_S2SIeggo_TR'
 
-  // CHECK-LABEL: sil hidden [thunk] @$s20objc_blocks_bridging3FooC3bas_1xSSSgA2FXE_AFtFTo : $@convention(objc_method) (@convention(block) @noescape (Optional<NSString>) -> @autoreleased Optional<NSString>, Optional<NSString>, Foo) -> @autoreleased Optional<NSString> {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s20objc_blocks_bridging3FooC3bas_1xSSSgA2FXE_AFtFTo : $@convention(objc_method) (@convention(block) @noescape (Optional<NSString>) -> @autoreleased Optional<NSString>, Optional<NSString>, Foo) -> @autoreleased Optional<NSString> {
   // CHECK:       bb0([[BLOCK:%.*]] : @unowned $@convention(block) @noescape (Optional<NSString>) -> @autoreleased Optional<NSString>, [[OPT_STRING:%.*]] : @unowned $Optional<NSString>, [[SELF:%.*]] : @unowned $Foo):
   // CHECK:         [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK:         [[OPT_STRING_COPY:%.*]] = copy_value [[OPT_STRING]]
@@ -65,7 +65,7 @@
     return f(x)
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s20objc_blocks_bridging3FooC16cFunctionPointer{{[_0-9a-zA-Z]*}}FTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s20objc_blocks_bridging3FooC16cFunctionPointer{{[_0-9a-zA-Z]*}}FTo
   // CHECK:       bb0([[F:%.*]] : $@convention(c) @noescape (Int) -> Int, [[X:%.*]] : $Int, [[SELF:%.*]] : @unowned $Foo):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -78,7 +78,7 @@
   }
 
   // Blocks and C function pointers must not be reabstracted when placed in optionals.
-  // CHECK-LABEL: sil hidden [thunk] @$s20objc_blocks_bridging3FooC7optFunc{{[_0-9a-zA-Z]*}}FTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s20objc_blocks_bridging3FooC7optFunc{{[_0-9a-zA-Z]*}}FTo
   // CHECK: bb0([[ARG0:%.*]] : @unowned $Optional<@convention(block) (NSString) -> @autoreleased NSString>,
   // CHECK:         [[COPY:%.*]] = copy_block [[ARG0]]
   // CHECK:         switch_enum [[COPY]] : $Optional<@convention(block) (NSString) -> @autoreleased NSString>, case #Optional.some!enumelt.1: [[SOME_BB:bb[0-9]+]], case #Optional.none!enumelt: [[NONE_BB:bb[0-9]+]]
@@ -93,7 +93,7 @@
     return f?(x)
   }
 
-  // CHECK-LABEL: sil hidden @$s20objc_blocks_bridging3FooC19optCFunctionPointer{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s20objc_blocks_bridging3FooC19optCFunctionPointer{{[_0-9a-zA-Z]*}}F
   // CHECK:         switch_enum %0
   //
   // CHECK: bb1([[FP_BUF:%.*]] : $@convention(c) (NSString) -> @autoreleased NSString):
@@ -104,7 +104,7 @@
 
 // => SEMANTIC SIL TODO: This test needs to be filled out more for ownership
 //
-// CHECK-LABEL: sil hidden @$s20objc_blocks_bridging10callBlocks{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_blocks_bridging10callBlocks{{[_0-9a-zA-Z]*}}F
 func callBlocks(_ x: Foo,
   f: @escaping (Int) -> Int,
   g: @escaping (String) -> String,
@@ -146,7 +146,7 @@
   @objc func blockTakesBlock() -> ((Int) -> Int) -> Int {}
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIgyd_SiIegyd_S2iIyByd_SiIeyByd_TR
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIgyd_SiIegyd_S2iIyByd_SiIeyByd_TR
 // CHECK:         [[BLOCK_COPY:%.*]] = copy_block [[ORIG_BLOCK:%.*]] :
 // CHECK:         [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] {{%.*}}([[BLOCK_COPY]])
 // CHECK: [[CONVERT:%.*]] = convert_escape_to_noescape [not_guaranteed] [[CLOSURE]]
@@ -156,14 +156,14 @@
 func clearDraggingItemImageComponentsProvider(_ x: NSDraggingItem) {
   x.imageComponentsProvider = { [] }
 }
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSayypGIego_So7NSArrayCSgIeyBa_TR
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSayypGIego_So7NSArrayCSgIeyBa_TR
 // CHECK:         [[CONVERT:%.*]] = function_ref @$sSa10FoundationE19_bridgeToObjectiveCSo7NSArrayCyF
 // CHECK:         [[CONVERTED:%.*]] = apply [[CONVERT]]
 // CHECK:         [[OPTIONAL:%.*]] = enum $Optional<NSArray>, #Optional.some!enumelt.1, [[CONVERTED]]
 // CHECK:         return [[OPTIONAL]]
 
-// CHECK-LABEL: sil hidden @{{.*}}bridgeNonnullBlockResult{{.*}}
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSSIego_So8NSStringCSgIeyBa_TR
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}bridgeNonnullBlockResult{{.*}}
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSSIego_So8NSStringCSgIeyBa_TR
 // CHECK:         [[CONVERT:%.*]] = function_ref @$sSS10FoundationE19_bridgeToObjectiveCSo8NSStringCyF
 // CHECK:         [[BRIDGED:%.*]] = apply [[CONVERT]]
 // CHECK:         [[OPTIONAL_BRIDGED:%.*]] = enum $Optional<NSString>, #Optional.some!enumelt.1, [[BRIDGED]]
@@ -172,7 +172,7 @@
   nonnullStringBlockResult { return "test" }
 }
 
-// CHECK-LABEL: sil hidden @$s20objc_blocks_bridging19bridgeNoescapeBlock2fn5optFnyyyXE_yycSgtF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_blocks_bridging19bridgeNoescapeBlock2fn5optFnyyyXE_yycSgtF
 func bridgeNoescapeBlock(fn: () -> (), optFn: (() -> ())?) {
   // CHECK: [[CLOSURE_FN:%.*]] = function_ref @$s20objc_blocks_bridging19bridgeNoescapeBlock2fn5optFnyyyXE_yycSgtFyyXEfU_
   // CHECK: [[CONV_FN:%.*]] = convert_function [[CLOSURE_FN]]
@@ -296,14 +296,14 @@
     o.someDynamicMethod(closure: closure)
   }
 }
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIg_Iegy_IyB_IyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@noescape @callee_guaranteed () -> ()) -> (), @convention(block) @noescape () -> ()) -> () {
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIyB_Ieg_TR : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIg_Iegy_IyB_IyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@noescape @callee_guaranteed () -> ()) -> (), @convention(block) @noescape () -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIyB_Ieg_TR : $@convention(thin) (@guaranteed @convention(block) @noescape () -> ()) -> ()
 
 // rdar://35402696
 func takeOptStringFunction(fn: (String) -> String?) {}
 func testGlobalBlock() {
   takeOptStringFunction(fn: GlobalBlock)
 }
-// CHECK-LABEL: sil hidden @$s20objc_blocks_bridging15testGlobalBlockyyF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_blocks_bridging15testGlobalBlockyyF
 // CHECK: global_addr @GlobalBlock : $*@convention(block) (NSString) -> @autoreleased Optional<NSString>
 // CHECK: function_ref @$sSo8NSStringCABSgIeyBya_S2SIeggo_TR : $@convention(thin) (@guaranteed String, @guaranteed @convention(block) (NSString) -> @autoreleased Optional<NSString>) -> @owned String
diff --git a/test/SILGen/objc_bridged_results.swift b/test/SILGen/objc_bridged_results.swift
index 2447a01..c511120 100644
--- a/test/SILGen/objc_bridged_results.swift
+++ b/test/SILGen/objc_bridged_results.swift
@@ -8,7 +8,7 @@
 
 import Foundation
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results11testNonnullySayypGSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results11testNonnullySayypGSo4TestCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
 // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nonnullArray!getter.1.foreign : (Test) -> () -> [Any], $@convention(objc_method) (Test) -> @autoreleased Optional<NSArray>
 // CHECK: [[COCOA_VAL:%[0-9]+]] = apply [[METHOD]]([[ARG]]) : $@convention(objc_method) (Test) -> @autoreleased Optional<NSArray>
@@ -21,7 +21,7 @@
   return obj.nonnullArray
 } // CHECK: } // end sil function '$s20objc_bridged_results11testNonnullySayypGSo4TestCF'
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results12testNullableySayypGSgSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results12testNullableySayypGSgSo4TestCF
 func testNullable(_ obj: Test) -> [Any]? {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nullableArray!getter.1.foreign : (Test) -> () -> [Any]?, $@convention(objc_method) (Test) -> @autoreleased Optional<NSArray>
@@ -47,7 +47,7 @@
   return obj.nullableArray
 } // CHECK: } // end sil function '$s20objc_bridged_results12testNullableySayypGSgSo4TestCF'
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results19testNullUnspecifiedySayypGSgSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results19testNullUnspecifiedySayypGSgSo4TestCF
 func testNullUnspecified(_ obj: Test) -> [Any]! {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nullUnspecifiedArray!getter.1.foreign : (Test) -> () -> [Any]?, $@convention(objc_method) (Test) -> @autoreleased Optional<NSArray>
@@ -74,7 +74,7 @@
 } // CHECK: } // end sil function '$s20objc_bridged_results19testNullUnspecifiedySayypGSgSo4TestCF'
 
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results21testNonnullDictionaryySDys11AnyHashableVypGSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results21testNonnullDictionaryySDys11AnyHashableVypGSo4TestCF
 func testNonnullDictionary(_ obj: Test) -> [AnyHashable: Any] {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nonnullDictionary!getter.1.foreign : (Test) -> () -> [AnyHashable : Any], $@convention(objc_method) (Test) -> @autoreleased Optional<NSDictionary>
@@ -87,7 +87,7 @@
   return obj.nonnullDictionary
 } // CHECK: } // end sil function '$s20objc_bridged_results21testNonnullDictionaryySDys11AnyHashableVypGSo4TestCF'
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results14testNonnullSetyShys11AnyHashableVGSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results14testNonnullSetyShys11AnyHashableVGSo4TestCF
 func testNonnullSet(_ obj: Test) -> Set<AnyHashable> {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nonnullSet!getter.1.foreign : (Test) -> () -> Set<AnyHashable>, $@convention(objc_method) (Test) -> @autoreleased Optional<NSSet>
@@ -100,7 +100,7 @@
   return obj.nonnullSet
 } // CHECK: } // end sil function '$s20objc_bridged_results14testNonnullSetyShys11AnyHashableVGSo4TestCF'
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results17testNonnullStringySSSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results17testNonnullStringySSSo4TestCF
 func testNonnullString(_ obj: Test) -> String {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.nonnullString!getter.1.foreign : (Test) -> () -> String, $@convention(objc_method) (Test) -> @autoreleased Optional<NSString>
@@ -113,7 +113,7 @@
   return obj.nonnullString
 } // CHECK: } // end sil function '$s20objc_bridged_results17testNonnullStringySSSo4TestCF'
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results13testClassPropSSyF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results13testClassPropSSyF
 func testClassProp() -> String {
   // CHECK: [[CLASS:%.+]] = metatype $@objc_metatype Test.Type
   // CHECK: [[METHOD:%.+]] = objc_method [[CLASS]] : $@objc_metatype Test.Type, #Test.nonnullSharedString!getter.1.foreign : (Test.Type) -> () -> String, $@convention(objc_method) (@objc_metatype Test.Type) -> @autoreleased Optional<NSString>
@@ -129,7 +129,7 @@
 // Note: This doesn't really "work" in that it doesn't accept a nil value the
 // way the others do, because subscripts are thunked. But the main thing is
 // not to crash trying to generate the thunk.
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results20testNonnullSubscriptySayypGSo4TestCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results20testNonnullSubscriptySayypGSo4TestCF
 func testNonnullSubscript(_ obj: Test) -> [Any] {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Test):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $Test, #Test.subscript!getter.1.foreign : (Test) -> (Int) -> [Any], $@convention(objc_method) (Int, Test) -> @autoreleased Optional<NSArray>
@@ -143,7 +143,7 @@
 } // CHECK: } // end sil function '$s20objc_bridged_results20testNonnullSubscriptySayypGSo4TestCF'
 
 
-// CHECK-LABEL: sil hidden @$s20objc_bridged_results19testPerformSelectoryySo8NSObjectCF
+// CHECK-LABEL: sil hidden [ossa] @$s20objc_bridged_results19testPerformSelectoryySo8NSObjectCF
 func testPerformSelector(_ obj: NSObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $NSObject):
   // CHECK: [[METHOD:%[0-9]+]] = objc_method [[ARG]] : $NSObject, #NSObject.perform!1.foreign
diff --git a/test/SILGen/objc_bridged_using_protocol_extension_impl.swift b/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
index 04705cd..126ace9 100644
--- a/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
+++ b/test/SILGen/objc_bridged_using_protocol_extension_impl.swift
@@ -41,14 +41,14 @@
   @objc dynamic func bar(_: Any) {}
 }
 
-// CHECK-LABEL: sil hidden @$s42objc_bridged_using_protocol_extension_impl7callBar3bar3fooyAA0H0C_AA3FooVtF
+// CHECK-LABEL: sil hidden [ossa] @$s42objc_bridged_using_protocol_extension_impl7callBar3bar3fooyAA0H0C_AA3FooVtF
 func callBar(bar: Bar, foo: Foo) {
   // CHECK: [[BRIDGE:%.*]] = function_ref @$s42objc_bridged_using_protocol_extension_impl7FooablePAAs21_ObjectiveCBridgeableRzrlE09_bridgeToH1C01_H5CTypesADPQzyF
   // CHECK: apply [[BRIDGE]]<Foo>
   bar.bar(foo)
 }
 
-// CHECK-LABEL:sil hidden @$s42objc_bridged_using_protocol_extension_impl7callBar3bar3genyAA0H0C_AA3GenVySiSSGtF
+// CHECK-LABEL:sil hidden [ossa] @$s42objc_bridged_using_protocol_extension_impl7callBar3bar3genyAA0H0C_AA3GenVySiSSGtF
 func callBar(bar: Bar, gen: Gen<Int, String>) {
   // CHECK: [[BRIDGE:%.*]] = function_ref @$s42objc_bridged_using_protocol_extension_impl7FooablePAAs21_ObjectiveCBridgeableRzrlE09_bridgeToH1C01_H5CTypesADPQzyF
   // CHECK: apply [[BRIDGE]]<Gen<Int, String>>
diff --git a/test/SILGen/objc_bridging.swift b/test/SILGen/objc_bridging.swift
index e14ebbc..9e98fc6 100644
--- a/test/SILGen/objc_bridging.swift
+++ b/test/SILGen/objc_bridging.swift
@@ -13,7 +13,7 @@
 func getDescription(_ o: NSObject) -> String {
   return o.description
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging14getDescription{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging14getDescription{{.*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $NSObject):
 // CHECK:   [[DESCRIPTION:%.*]] = objc_method [[ARG]] : $NSObject, #NSObject.description!getter.1.foreign
 // CHECK:   [[OPT_BRIDGED:%.*]] = apply [[DESCRIPTION]]([[ARG]])
@@ -45,7 +45,7 @@
 func getUppercaseString(_ s: NSString) -> String {
   return s.uppercase()
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging18getUppercaseString{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging18getUppercaseString{{.*}}F
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $NSString):
 // -- The 'self' argument of NSString methods doesn't bridge.
 // CHECK-NOT: function_ref @$sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
@@ -82,7 +82,7 @@
   var s = s
   f.setFoo(s)
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging6setFoo{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging6setFoo{{.*}}F
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Foo, {{%.*}} : @guaranteed $String):
 // CHECK:   [[NATIVE:%.*]] = load
 // CHECK:   [[STRING_TO_NSSTRING:%.*]] = function_ref @$sSS10FoundationE19_bridgeToObjectiveCSo8NSStringCyF
@@ -100,7 +100,7 @@
   return f.zim()
 }
 
-// CHECK-ios-i386-LABEL: sil hidden @$s13objc_bridging6getZim{{.*}}F
+// CHECK-ios-i386-LABEL: sil hidden [ossa] @$s13objc_bridging6getZim{{.*}}F
 // CHECK-ios-i386: bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK-ios-i386:   [[METHOD:%.*]] = objc_method [[SELF]] : $Foo, #Foo.zim!1.foreign : (Foo) -> () -> Bool
 // CHECK-ios-i386:   [[OBJC_BOOL:%.*]] = apply [[METHOD]]([[SELF]])  : $@convention(objc_method) (Foo) -> ObjCBool
@@ -109,14 +109,14 @@
 // CHECK-ios-i386:   return [[SWIFT_BOOL]] : $Bool
 // CHECK-ios-i386: }
 
-// CHECK-watchos-i386-LABEL: sil hidden @$s13objc_bridging6getZim{{.*}}F
+// CHECK-watchos-i386-LABEL: sil hidden [ossa] @$s13objc_bridging6getZim{{.*}}F
 // CHECK-watchos-i386: bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK-watchos-i386:   [[METHOD:%.*]] = objc_method [[SELF]] : $Foo, #Foo.zim!1.foreign : (Foo) -> () -> Boo
 // CHECK-watchos-i386:   [[BOOL:%.*]] = apply [[METHOD]]([[SELF]]) : $@convention(objc_method) (Foo) -> Bool
 // CHECK-watchos-i386:   return [[BOOL]] : $Bool
 // CHECK-watchos-i386: }
 
-// CHECK-macosx-x86_64-LABEL: sil hidden @$s13objc_bridging6getZim{{.*}}F
+// CHECK-macosx-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging6getZim{{.*}}F
 // CHECK-macosx-x86_64: bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK-macosx-x86_64:   [[METHOD:%.*]] = objc_method [[SELF]] : $Foo, #Foo.zim!1.foreign : (Foo) -> () -> Bool
 // CHECK-macosx-x86_64:   [[OBJC_BOOL:%.*]] = apply [[METHOD]]([[SELF]])  : $@convention(objc_method) (Foo) -> ObjCBool
@@ -125,14 +125,14 @@
 // CHECK-macosx-x86_64:   return [[SWIFT_BOOL]] : $Bool
 // CHECK-macosx-x86_64: }
 
-// CHECK-ios-x86_64-LABEL: sil hidden @$s13objc_bridging6getZim{{.*}}F
+// CHECK-ios-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging6getZim{{.*}}F
 // CHECK-ios-x86_64: bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK-ios-x86_64:   [[METHOD:%.*]] = objc_method [[SELF]] : $Foo, #Foo.zim!1.foreign : (Foo) -> () -> Boo
 // CHECK-ios-x86_64:   [[BOOL:%.*]] = apply [[METHOD]]([[SELF]]) : $@convention(objc_method) (Foo) -> Bool
 // CHECK-ios-x86_64:   return [[BOOL]] : $Bool
 // CHECK-ios-x86_64: }
 
-// CHECK-arm64-LABEL: sil hidden @$s13objc_bridging6getZim{{.*}}F
+// CHECK-arm64-LABEL: sil hidden [ossa] @$s13objc_bridging6getZim{{.*}}F
 // CHECK-arm64: bb0([[SELF:%.*]] : @guaranteed $Foo):
 // CHECK-arm64:   [[METHOD:%.*]] = objc_method [[SELF]] : $Foo, #Foo.zim!1.foreign : (Foo) -> () -> Boo
 // CHECK-arm64:   [[BOOL:%.*]] = apply [[METHOD]]([[SELF]]) : $@convention(objc_method) (Foo) -> Bool
@@ -143,7 +143,7 @@
 func setZim(_ f: Foo, b: Bool) {
   f.setZim(b)
 }
-// CHECK-ios-i386-LABEL: sil hidden @$s13objc_bridging6setZim{{.*}}F
+// CHECK-ios-i386-LABEL: sil hidden [ossa] @$s13objc_bridging6setZim{{.*}}F
 // CHECK-ios-i386: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK-ios-i386:   [[CONVERT:%.*]] = function_ref @swift_BoolToObjCBool : $@convention(thin) (Bool) -> ObjCBool
 // CHECK-ios-i386:   [[OBJC_BOOL:%.*]] = apply [[CONVERT]]([[ARG1]]) : $@convention(thin) (Bool) -> ObjCBool
@@ -152,7 +152,7 @@
 // CHECK-ios-i386-NOT:   destroy_value [[ARG0]]
 // CHECK-ios-i386: }
 
-// CHECK-macosx-x86_64-LABEL: sil hidden @$s13objc_bridging6setZim{{.*}}F
+// CHECK-macosx-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging6setZim{{.*}}F
 // CHECK-macosx-x86_64: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK-macosx-x86_64:   [[CONVERT:%.*]] = function_ref @swift_BoolToObjCBool : $@convention(thin) (Bool) -> ObjCBool
 // CHECK-macosx-x86_64:   [[OBJC_BOOL:%.*]] = apply [[CONVERT]]([[ARG1]]) : $@convention(thin) (Bool) -> ObjCBool
@@ -161,21 +161,21 @@
 // CHECK-macosx-x86_64-NOT:   destroy_value [[ARG0]]
 // CHECK-macosx-x86_64: }
 
-// CHECK-ios-x86_64-LABEL: sil hidden @$s13objc_bridging6setZim{{.*}}F
+// CHECK-ios-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging6setZim{{.*}}F
 // CHECK-ios-x86_64: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK-ios-x86_64:   [[METHOD:%.*]] = objc_method [[ARG0]] : $Foo, #Foo.setZim!1.foreign
 // CHECK-ios-x86_64:   apply [[METHOD]]([[ARG1]], [[ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
 // CHECK-ios-x86_64-NOT:   destroy_value [[ARG0]]
 // CHECK-ios-x86_64: }
 
-// CHECK-arm64-LABEL: sil hidden @$s13objc_bridging6setZim{{.*}}F
+// CHECK-arm64-LABEL: sil hidden [ossa] @$s13objc_bridging6setZim{{.*}}F
 // CHECK-arm64: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK-arm64:   [[METHOD:%.*]] = objc_method [[ARG0]] : $Foo, #Foo.setZim!1.foreign
 // CHECK-arm64:   apply [[METHOD]]([[ARG1]], [[ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
 // CHECK-arm64-NOT:   destroy_value [[ARG0]]
 // CHECK-arm64: }
 
-// CHECK-watchos-i386-LABEL: sil hidden @$s13objc_bridging6setZim{{.*}}F
+// CHECK-watchos-i386-LABEL: sil hidden [ossa] @$s13objc_bridging6setZim{{.*}}F
 // CHECK-watchos-i386: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK-watchos-i386:   [[METHOD:%.*]] = objc_method [[ARG0]] : $Foo, #Foo.setZim!1.foreign
 // CHECK-watchos-i386:   apply [[METHOD]]([[ARG1]], [[ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
@@ -186,7 +186,7 @@
 func getZang(_ f: Foo) -> Bool {
   return f.zang()
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging7getZangySbSo3FooCF
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging7getZangySbSo3FooCF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Foo)
 // CHECK:   [[METHOD:%.*]] = objc_method [[ARG]] : $Foo, #Foo.zang!1.foreign
 // CHECK:   [[BOOL:%.*]] = apply [[METHOD]]([[ARG]]) : $@convention(objc_method) (Foo) -> Bool
@@ -197,7 +197,7 @@
 func setZang(_ f: Foo, _ b: Bool) {
   f.setZang(b)
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging7setZangyySo3FooC_SbtF
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging7setZangyySo3FooC_SbtF
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Foo, [[ARG1:%.*]] : $Bool):
 // CHECK:   [[METHOD:%.*]] = objc_method [[ARG0]] : $Foo, #Foo.setZang!1.foreign
 // CHECK:   apply [[METHOD]]([[ARG1]], [[ARG0]]) : $@convention(objc_method) (Bool, Foo) -> ()
@@ -208,7 +208,7 @@
 func callBar() -> String {
   return bar()
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging7callBar{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging7callBar{{.*}}F
 // CHECK: bb0:
 // CHECK:   [[BAR:%.*]] = function_ref @bar
 // CHECK:   [[OPT_BRIDGED:%.*]] = apply [[BAR]]() : $@convention(c) () -> @autoreleased Optional<NSString>
@@ -228,7 +228,7 @@
   var s = s
   setBar(s)
 }
-// CHECK-LABEL: sil hidden @$s13objc_bridging10callSetBar{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging10callSetBar{{.*}}F
 // CHECK: bb0({{%.*}} : @guaranteed $String):
 // CHECK:   [[NATIVE:%.*]] = load
 // CHECK:   [[STRING_TO_NSSTRING:%.*]] = function_ref @$sSS10FoundationE19_bridgeToObjectiveCSo8NSStringCyF
@@ -249,23 +249,23 @@
     get { return NSS }
     set {}
   }
-  // CHECK-LABEL: sil hidden [thunk] @$sSo8NSStringC13objc_bridgingE13nsstrFakePropABvgTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSStringC13objc_bridgingE13nsstrFakePropABvgTo
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
-  // CHECK-LABEL: sil hidden [thunk] @$sSo8NSStringC13objc_bridgingE13nsstrFakePropABvsTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSStringC13objc_bridgingE13nsstrFakePropABvsTo
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
 
   @objc func nsstrResult() -> NSString { return NSS }
-  // CHECK-LABEL: sil hidden [thunk] @$sSo8NSStringC13objc_bridgingE11nsstrResultAByFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSStringC13objc_bridgingE11nsstrResultAByFTo
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
 
   @objc func nsstrArg(_ s: NSString) { }
-  // CHECK-LABEL: sil hidden [thunk] @$sSo8NSStringC13objc_bridgingE8nsstrArgyyABFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$sSo8NSStringC13objc_bridgingE8nsstrArgyyABFTo
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
@@ -275,7 +275,7 @@
 class Bas : NSObject {
   // -- Bridging thunks for String properties convert between NSString
   @objc var strRealProp: String = "Hello"
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11strRealPropSSvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11strRealPropSSvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]] : $Bas
   // CHECK:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -293,13 +293,13 @@
   // CHECK: }
 
 
-  // CHECK-LABEL: sil hidden @$s13objc_bridging3BasC11strRealPropSSvg
+  // CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging3BasC11strRealPropSSvg
   // CHECK:   [[PROP_ADDR:%.*]] = ref_element_addr %0 : {{.*}}, #Bas.strRealProp
   // CHECK:   [[READ:%.*]] = begin_access [read] [dynamic] [[PROP_ADDR]] : $*String
   // CHECK:   [[PROP:%.*]] = load [copy] [[READ]]
 
 
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11strRealPropSSvsTo : $@convention(objc_method) (NSString, Bas) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11strRealPropSSvsTo : $@convention(objc_method) (NSString, Bas) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $NSString, [[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -314,7 +314,7 @@
   // CHECK:   destroy_value [[THIS_COPY]]
   // CHECK: } // end sil function '$s13objc_bridging3BasC11strRealPropSSvsTo'
 
-  // CHECK-LABEL: sil hidden @$s13objc_bridging3BasC11strRealPropSSvs
+  // CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging3BasC11strRealPropSSvs
   // CHECK: bb0(%0 : @owned $String, %1 : @guaranteed $Bas):
 
   // CHECK:   [[STR_ADDR:%.*]] = ref_element_addr %1 : {{.*}}, #Bas.strRealProp
@@ -326,7 +326,7 @@
     get { return "" }
     set {}
   }
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11strFakePropSSvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11strFakePropSSvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -342,7 +342,7 @@
   // CHECK:   return [[NSSTR]]
   // CHECK: }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11strFakePropSSvsTo : $@convention(objc_method) (NSString, Bas) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11strFakePropSSvsTo : $@convention(objc_method) (NSString, Bas) -> () {
   // CHECK: bb0([[NSSTR:%.*]] : @unowned $NSString, [[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[NSSTR_COPY:%.*]] = copy_value [[NSSTR]]
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -362,19 +362,19 @@
     get { return NSS }
     set {}
   }
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC13nsstrRealPropSo8NSStringCvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC13nsstrRealPropSo8NSStringCvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSString {
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC13nsstrRealPropSo8NSStringCvsTo : $@convention(objc_method) (NSString, Bas) ->
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC13nsstrRealPropSo8NSStringCvsTo : $@convention(objc_method) (NSString, Bas) ->
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
 
   // -- Bridging thunks for String methods convert between NSString
   @objc func strResult() -> String { return "" }
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC9strResultSSyFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC9strResultSSyFTo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -390,7 +390,7 @@
   // CHECK:   return [[NSSTR]]
   // CHECK: }
   @objc func strArg(_ s: String) { }
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC6strArgyySSFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC6strArgyySSFTo
   // CHECK: bb0([[NSSTR:%.*]] : @unowned $NSString, [[THIS:%.*]] : @unowned $Bas):
   // CHECK:   [[NSSTR_COPY:%.*]] = copy_value [[NSSTR]]
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -407,12 +407,12 @@
 
   // -- Bridging thunks for explicitly NSString properties don't convert
   @objc func nsstrResult() -> NSString { return NSS }
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11nsstrResultSo8NSStringCyFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11nsstrResultSo8NSStringCyFTo
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
   @objc func nsstrArg(_ s: NSString) { }
-  // CHECK-LABEL: sil hidden @$s13objc_bridging3BasC8nsstrArgyySo8NSStringCF
+  // CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging3BasC8nsstrArgyySo8NSStringCF
   // CHECK-NOT: swift_StringToNSString
   // CHECK-NOT: $sSS10FoundationE36_unconditionallyBridgeFromObjectiveCySSSo8NSStringCSgFZ
   // CHECK: }
@@ -422,7 +422,7 @@
     super.init()
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC8arrayArgyySayyXlGFTo : $@convention(objc_method) (NSArray, Bas) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC8arrayArgyySayyXlGFTo : $@convention(objc_method) (NSArray, Bas) -> ()
   // CHECK: bb0([[NSARRAY:%[0-9]+]] : @unowned $NSArray, [[SELF:%[0-9]+]] : @unowned $Bas):
   // CHECK:   [[NSARRAY_COPY:%.*]] = copy_value [[NSARRAY]] : $NSArray
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Bas
@@ -439,7 +439,7 @@
   // CHECK:   return [[RESULT]] : $()
   @objc func arrayArg(_ array: [AnyObject]) { }
   
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC11arrayResultSayyXlGyFTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC11arrayResultSayyXlGyFTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
   // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $Bas):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Bas
   // CHECK:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -455,12 +455,12 @@
   // CHECK:   return [[NSARRAY]]
   @objc func arrayResult() -> [AnyObject] { return [] }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC9arrayPropSaySSGvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
-  // CHECK-LABEL: sil hidden [thunk] @$s13objc_bridging3BasC9arrayPropSaySSGvsTo : $@convention(objc_method) (NSArray, Bas) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC9arrayPropSaySSGvgTo : $@convention(objc_method) (Bas) -> @autoreleased NSArray
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s13objc_bridging3BasC9arrayPropSaySSGvsTo : $@convention(objc_method) (NSArray, Bas) -> ()
   @objc var arrayProp: [String] = []
 }
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging16applyStringBlock_1xS3SXB_SStF
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging16applyStringBlock_1xS3SXB_SStF
 func applyStringBlock(_ f: @convention(block) (String) -> String, x: String) -> String {
   // CHECK: bb0([[BLOCK:%.*]] : @guaranteed $@convention(block) @noescape (NSString) -> @autoreleased NSString, [[STRING:%.*]] : @guaranteed $String):
   // CHECK:   [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
@@ -486,7 +486,7 @@
 }
 // CHECK: } // end sil function '$s13objc_bridging16applyStringBlock_1xS3SXB_SStF'
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging15bridgeCFunction{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging15bridgeCFunction{{.*}}F
 func bridgeCFunction() -> (String?) -> (String?) {
   // CHECK: [[THUNK:%.*]] = function_ref @$sSo18NSStringFromStringySSSgABFTO : $@convention(thin) (@guaranteed Optional<String>) -> @owned Optional<String>
   // CHECK: [[THICK:%.*]] = thin_to_thick_function [[THUNK]]
@@ -503,7 +503,7 @@
 // arguments lifetime-extends the bridged pointer for the right duration.
 // <rdar://problem/16738050>
 
-// CHECK-LABEL: sil shared [serializable] @$sSo7NSArrayC7objects5countABSPyyXlSgGSg_s5Int32VtcfC
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo7NSArrayC7objects5countABSPyyXlSgGSg_s5Int32VtcfC
 // CHECK:         [[SELF:%.*]] = alloc_ref_dynamic
 // CHECK:         [[METHOD:%.*]] = function_ref @$sSo7NSArrayC7objects5countABSPyyXlSgGSg_s5Int32VtcfcTO
 // CHECK:         [[RESULT:%.*]] = apply [[METHOD]]
@@ -512,13 +512,13 @@
 // Check that type lowering preserves the bool/BOOL distinction when bridging
 // imported C functions.
 
-// CHECK-ios-i386-LABEL: sil hidden @$s13objc_bridging5boolsySb_SbtSbF
+// CHECK-ios-i386-LABEL: sil hidden [ossa] @$s13objc_bridging5boolsySb_SbtSbF
 // CHECK-ios-i386:         function_ref @useBOOL : $@convention(c) (ObjCBool) -> ()
 // CHECK-ios-i386:         function_ref @useBool : $@convention(c) (Bool) -> ()
 // CHECK-ios-i386:         function_ref @getBOOL : $@convention(c) () -> ObjCBool
 // CHECK-ios-i386:         function_ref @getBool : $@convention(c) () -> Bool
 
-// CHECK-macosx-x86_64-LABEL: sil hidden @$s13objc_bridging5boolsySb_SbtSbF
+// CHECK-macosx-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging5boolsySb_SbtSbF
 // CHECK-macosx-x86_64:         function_ref @useBOOL : $@convention(c) (ObjCBool) -> ()
 // CHECK-macosx-x86_64:         function_ref @useBool : $@convention(c) (Bool) -> ()
 // CHECK-macosx-x86_64:         function_ref @getBOOL : $@convention(c) () -> ObjCBool
@@ -528,19 +528,19 @@
 // at the underlying Clang decl of the bridged decl to decide whether it needs
 // bridging.
 //
-// CHECK-watchos-i386-LABEL: sil hidden @$s13objc_bridging5boolsySb_SbtSbF
+// CHECK-watchos-i386-LABEL: sil hidden [ossa] @$s13objc_bridging5boolsySb_SbtSbF
 // CHECK-watchos-i386:         function_ref @useBOOL : $@convention(c) (Bool) -> ()
 // CHECK-watchos-i386:         function_ref @useBool : $@convention(c) (Bool) -> ()
 // CHECK-watchos-i386:         function_ref @getBOOL : $@convention(c) () -> Bool
 // CHECK-watchos-i386:         function_ref @getBool : $@convention(c) () -> Bool
 
-// CHECK-ios-x86_64-LABEL: sil hidden @$s13objc_bridging5boolsySb_SbtSbF
+// CHECK-ios-x86_64-LABEL: sil hidden [ossa] @$s13objc_bridging5boolsySb_SbtSbF
 // CHECK-ios-x86_64:         function_ref @useBOOL : $@convention(c) (Bool) -> ()
 // CHECK-ios-x86_64:         function_ref @useBool : $@convention(c) (Bool) -> ()
 // CHECK-ios-x86_64:         function_ref @getBOOL : $@convention(c) () -> Bool
 // CHECK-ios-x86_64:         function_ref @getBool : $@convention(c) () -> Bool
 
-// CHECK-arm64-LABEL: sil hidden @$s13objc_bridging5boolsySb_SbtSbF
+// CHECK-arm64-LABEL: sil hidden [ossa] @$s13objc_bridging5boolsySb_SbtSbF
 // CHECK-arm64:         function_ref @useBOOL : $@convention(c) (Bool) -> ()
 // CHECK-arm64:         function_ref @useBool : $@convention(c) (Bool) -> ()
 // CHECK-arm64:         function_ref @getBOOL : $@convention(c) () -> Bool
@@ -553,7 +553,7 @@
   return (getBOOL(), getBool())
 }
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging9getFridge{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging9getFridge{{.*}}F
 // CHECK: bb0([[HOME:%[0-9]+]] : @guaranteed $APPHouse):
 func getFridge(_ home: APPHouse) -> Refrigerator {
   // CHECK: [[GETTER:%[0-9]+]] = objc_method [[HOME]] : $APPHouse, #APPHouse.fridge!getter.1.foreign
@@ -566,7 +566,7 @@
   return home.fridge
 }
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging16updateFridgeTemp{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging16updateFridgeTemp{{.*}}F
 // CHECK: bb0([[HOME:%[0-9]+]] : @guaranteed $APPHouse, [[DELTA:%[0-9]+]] : $Double):
 func updateFridgeTemp(_ home: APPHouse, delta: Double) {
   // Temporary fridge
@@ -597,7 +597,7 @@
   home.fridge.temperature += delta
 }
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging20callNonStandardBlock5valueySi_tF
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging20callNonStandardBlock5valueySi_tF
 func callNonStandardBlock(value: Int) {
   // CHECK: enum $Optional<@convention(block) () -> @owned Optional<AnyObject>>
   takesNonStandardBlock { return value }
@@ -605,7 +605,7 @@
 
 func takeTwoAnys(_ lhs: Any, _ rhs: Any) -> Any { return lhs }
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging22defineNonStandardBlock1xyyp_tF
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging22defineNonStandardBlock1xyyp_tF
 func defineNonStandardBlock(x: Any) {
   // CHECK: function_ref @$s13objc_bridging22defineNonStandardBlock1xyyp_tFypypcfU_
   // CHECK: function_ref @$sypypIegnr_yXlyXlIeyBya_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@in_guaranteed Any) -> @out Any, AnyObject) -> @autoreleased AnyObject
@@ -613,7 +613,7 @@
   let fn : @convention(block) (Any) -> Any = { y in takeTwoAnys(x, y) }
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypypIegnr_yXlyXlIeyBya_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@in_guaranteed Any) -> @out Any, AnyObject) -> @autoreleased AnyObject
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypypIegnr_yXlyXlIeyBya_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@in_guaranteed Any) -> @out Any, AnyObject) -> @autoreleased AnyObject
 // CHECK: bb0(%0 : $*@block_storage @callee_guaranteed (@in_guaranteed Any) -> @out Any, %1 : @unowned $AnyObject):
 // CHECK:   [[T0:%.*]] = copy_value %1 : $AnyObject
 // CHECK:   [[T1:%.*]] = open_existential_ref [[T0]] : $AnyObject
@@ -623,7 +623,7 @@
 // CHECK:   [[RESULT:%.*]] = alloc_stack $Any
 // CHECK:   apply {{.*}}([[RESULT]], [[ARG]])
 
-// CHECK-LABEL: sil hidden @$s13objc_bridging15castToCFunction3ptrySV_tF : $@convention(thin) (UnsafeRawPointer) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_bridging15castToCFunction3ptrySV_tF : $@convention(thin) (UnsafeRawPointer) -> () {
 func castToCFunction(ptr: UnsafeRawPointer) {
   // CHECK: [[OUT:%.*]] = alloc_stack $@convention(c) (Optional<AnyObject>) -> ()
   // CHECK: [[IN:%.]] = alloc_stack $UnsafeRawPointer
diff --git a/test/SILGen/objc_bridging_any.swift b/test/SILGen/objc_bridging_any.swift
index 84b4d86..3a3f9f5 100644
--- a/test/SILGen/objc_bridging_any.swift
+++ b/test/SILGen/objc_bridging_any.swift
@@ -9,7 +9,7 @@
 
 struct KnownUnbridged {}
 
-// CHECK-LABEL: sil hidden @$s17objc_bridging_any11passingToId{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any11passingToId{{.*}}F
 func passingToId<T: CP, U>(receiver: NSIdLover,
                            string: String,
                            nsString: NSString,
@@ -185,7 +185,7 @@
 // _bridgeAnythingToObjectiveC call.  That's not true anymore.
 func zim() {}
 struct Zang {}
-// CHECK-LABEL: sil hidden @$s17objc_bridging_any27typesWithNontrivialLowering8receiverySo9NSIdLoverC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any27typesWithNontrivialLowering8receiverySo9NSIdLoverC_tF
 func typesWithNontrivialLowering(receiver: NSIdLover) {
   // CHECK: apply {{.*}}<() -> ()>
   receiver.takesId(zim)
@@ -197,7 +197,7 @@
   receiver.takesId((0, "one"))
 }
 
-// CHECK-LABEL: sil hidden @$s17objc_bridging_any19passingToNullableId{{.*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any19passingToNullableId{{.*}}F
 func passingToNullableId<T: CP, U>(receiver: NSIdLover,
                                    string: String,
                                    nsString: NSString,
@@ -418,11 +418,11 @@
   // function in a different function... Just pattern match the unreachable case
   // to preserve behavior. We should check if it is correct.
 
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyF : $@convention(method) (@guaranteed SwiftIdLover) -> @out Any
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyF : $@convention(method) (@guaranteed SwiftIdLover) -> @out Any
   // CHECK: unreachable
   // CHECK: } // end sil function '$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyF'
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased AnyObject {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased AnyObject {
   // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $SwiftIdLover):
   // CHECK:   [[NATIVE_RESULT:%.*]] = alloc_stack $Any
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $SwiftIdLover
@@ -440,25 +440,25 @@
   // CHECK: } // end sil function '$s17objc_bridging_any12SwiftIdLoverC18methodReturningAnyypyFTo'
 
   @objc func methodReturningOptionalAny() -> Any? { fatalError() }
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC26methodReturningOptionalAnyypSgyF
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC26methodReturningOptionalAnyypSgyFTo
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC26methodReturningOptionalAnyypSgyF
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC26methodReturningOptionalAnyypSgyFTo
   // CHECK:       function_ref @$ss27_bridgeAnythingToObjectiveC{{.*}}F
 
   @objc func methodTakingAny(a: Any) { fatalError() }
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC15methodTakingAny1ayyp_tFTo : $@convention(objc_method) (AnyObject, SwiftIdLover) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC15methodTakingAny1ayyp_tFTo : $@convention(objc_method) (AnyObject, SwiftIdLover) -> ()
   // CHECK:     bb0([[ARG:%.*]] : @unowned $AnyObject, [[SELF:%.*]] : @unowned $SwiftIdLover):
   // CHECK:   function_ref [[BRIDGE_ANYOBJECT_TO_ANY:@\$ss018_bridgeAnyObjectToB0yypyXlSgF]] : $@convention(thin) (@guaranteed Optional<AnyObject>) -> @out Any
   // CHECK:  [[METHOD:%.*]] = function_ref @$s17objc_bridging_any12SwiftIdLoverC15methodTakingAny1ayyp_tF
   // CHECK-NEXT:  apply [[METHOD]]([[RESULT:%.*]], [[BORROWED_SELF_COPY:%.*]]) :
 
   @objc func methodTakingOptionalAny(a: Any?) { fatalError() }
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC23methodTakingOptionalAny1ayypSg_tF
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC23methodTakingOptionalAny1ayypSg_tF
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC23methodTakingOptionalAny1ayypSg_tFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC23methodTakingOptionalAny1ayypSg_tFTo
 
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC017methodTakingBlockH3AnyyyyypXEF : $@convention(method) (@noescape @callee_guaranteed (@in_guaranteed Any) -> (), @guaranteed SwiftIdLover) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC017methodTakingBlockH3AnyyyyypXEF : $@convention(method) (@noescape @callee_guaranteed (@in_guaranteed Any) -> (), @guaranteed SwiftIdLover) -> ()
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC017methodTakingBlockH3AnyyyyypXEFTo : $@convention(objc_method) (@convention(block) @noescape (AnyObject) -> (), SwiftIdLover) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC017methodTakingBlockH3AnyyyyypXEFTo : $@convention(objc_method) (@convention(block) @noescape (AnyObject) -> (), SwiftIdLover) -> ()
   // CHECK:    bb0([[BLOCK:%.*]] : @unowned $@convention(block) @noescape (AnyObject) -> (), [[SELF:%.*]] : @unowned $SwiftIdLover):
   // CHECK-NEXT:  [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK-NEXT:  [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -474,7 +474,7 @@
   // CHECK-NEXT:  destroy_value [[SELF_COPY]]
   // CHECK-NEXT:  return [[RESULT]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$syXlIyBy_ypIegn_TR
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$syXlIyBy_ypIegn_TR
   // CHECK:     bb0([[ANY:%.*]] : $*Any, [[BLOCK:%.*]] : @guaranteed $@convention(block) @noescape (AnyObject) -> ()):
   // CHECK-NEXT:  [[OPENED_ANY:%.*]] = open_existential_addr immutable_access [[ANY]] : $*Any to $*[[OPENED_TYPE:@opened.*Any]],
 	// CHECK:   [[TMP:%.*]] = alloc_stack
@@ -491,9 +491,9 @@
 
   @objc func methodTakingBlockTakingAny(_: (Any) -> ()) { fatalError() }
 
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC29methodReturningBlockTakingAnyyypcyF : $@convention(method) (@guaranteed SwiftIdLover) -> @owned @callee_guaranteed (@in_guaranteed Any) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC29methodReturningBlockTakingAnyyypcyF : $@convention(method) (@guaranteed SwiftIdLover) -> @owned @callee_guaranteed (@in_guaranteed Any) -> ()
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC29methodReturningBlockTakingAnyyypcyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased @convention(block) (AnyObject) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC29methodReturningBlockTakingAnyyypcyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased @convention(block) (AnyObject) -> ()
   // CHECK:     bb0([[SELF:%.*]] : @unowned $SwiftIdLover):
   // CHECK-NEXT:  [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK-NEXT:  [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -512,7 +512,7 @@
   // CHECK-NEXT:  dealloc_stack [[BLOCK_STORAGE]]
   // CHECK-NEXT:  return [[BLOCK]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypIegn_yXlIeyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@in_guaranteed Any) -> (), AnyObject) -> ()
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypIegn_yXlIeyBy_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed (@in_guaranteed Any) -> (), AnyObject) -> ()
   // CHECK:     bb0([[BLOCK_STORAGE:%.*]] : $*@block_storage @callee_guaranteed (@in_guaranteed Any) -> (), [[ANY:%.*]] : @unowned $AnyObject):
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage [[BLOCK_STORAGE]]
   // CHECK-NEXT:  [[FUNCTION:%.*]] = load [copy] [[BLOCK_STORAGE_ADDR]]
@@ -534,9 +534,9 @@
 
   @objc func methodReturningBlockTakingAny() -> ((Any) -> ()) { fatalError() }
 
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC29methodTakingBlockReturningAnyyyypyXEF : $@convention(method) (@noescape @callee_guaranteed () -> @out Any, @guaranteed SwiftIdLover) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC29methodTakingBlockReturningAnyyyypyXEF : $@convention(method) (@noescape @callee_guaranteed () -> @out Any, @guaranteed SwiftIdLover) -> () {
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC29methodTakingBlockReturningAnyyyypyXEFTo : $@convention(objc_method) (@convention(block) @noescape () -> @autoreleased AnyObject, SwiftIdLover) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC29methodTakingBlockReturningAnyyyypyXEFTo : $@convention(objc_method) (@convention(block) @noescape () -> @autoreleased AnyObject, SwiftIdLover) -> ()
   // CHECK:     bb0([[BLOCK:%.*]] : @unowned $@convention(block) @noescape () -> @autoreleased AnyObject, [[ANY:%.*]] : @unowned $SwiftIdLover):
   // CHECK-NEXT:  [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
   // CHECK-NEXT:  [[ANY_COPY:%.*]] = copy_value [[ANY]]
@@ -553,7 +553,7 @@
   // CHECK-NEXT:  destroy_value [[ANY_COPY]]
   // CHECK-NEXT:  return [[RESULT]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$syXlIyBa_ypIegr_TR : $@convention(thin) (@guaranteed @convention(block) @noescape () -> @autoreleased AnyObject) -> @out Any
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$syXlIyBa_ypIegr_TR : $@convention(thin) (@guaranteed @convention(block) @noescape () -> @autoreleased AnyObject) -> @out Any
   // CHECK:     bb0([[ANY_ADDR:%.*]] : $*Any, [[BLOCK:%.*]] : @guaranteed $@convention(block) @noescape () -> @autoreleased AnyObject):
   // CHECK-NEXT:  [[BRIDGED:%.*]] = apply [[BLOCK]]()
   // CHECK-NEXT:  [[OPTIONAL:%.*]] = unchecked_ref_cast [[BRIDGED]]
@@ -568,9 +568,9 @@
 
   @objc func methodTakingBlockReturningAny(_: () -> Any) { fatalError() }
 
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any12SwiftIdLoverC020methodReturningBlockH3AnyypycyF : $@convention(method) (@guaranteed SwiftIdLover) -> @owned @callee_guaranteed () -> @out Any
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any12SwiftIdLoverC020methodReturningBlockH3AnyypycyF : $@convention(method) (@guaranteed SwiftIdLover) -> @owned @callee_guaranteed () -> @out Any
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any12SwiftIdLoverC020methodReturningBlockH3AnyypycyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased @convention(block) () -> @autoreleased AnyObject
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any12SwiftIdLoverC020methodReturningBlockH3AnyypycyFTo : $@convention(objc_method) (SwiftIdLover) -> @autoreleased @convention(block) () -> @autoreleased AnyObject
   // CHECK:     bb0([[SELF:%.*]] : @unowned $SwiftIdLover):
   // CHECK-NEXT:  [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK-NEXT:  [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -590,7 +590,7 @@
   // CHECK-NEXT:  dealloc_stack [[BLOCK_STORAGE]]
   // CHECK-NEXT:  return [[BLOCK]]
 
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypIegr_yXlIeyBa_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed () -> @out Any) -> @autoreleased AnyObject
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypIegr_yXlIeyBa_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed () -> @out Any) -> @autoreleased AnyObject
   // CHECK:     bb0(%0 : $*@block_storage @callee_guaranteed () -> @out Any):
   // CHECK-NEXT:  [[BLOCK_STORAGE_ADDR:%.*]] = project_block_storage %0
   // CHECK-NEXT:  [[FUNCTION:%.*]] = load [copy] [[BLOCK_STORAGE_ADDR]]
@@ -616,7 +616,7 @@
   @objc func methodReturningBlockReturningAny() -> (() -> Any) { fatalError() }
 
   @objc func methodReturningBlockReturningOptionalAny() -> (() -> Any?) { fatalError() }
-  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypSgIegr_yXlSgIeyBa_TR
+  // CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypSgIegr_yXlSgIeyBa_TR
   // CHECK: function_ref @$ss27_bridgeAnythingToObjectiveC{{.*}}F
 
   override init() { fatalError() }
@@ -638,7 +638,7 @@
 }
 
 extension GenericClass {
-  // CHECK-LABEL: sil hidden @$sSo12GenericClassC17objc_bridging_anyE23pseudogenericAnyErasure1xypx_tF :
+  // CHECK-LABEL: sil hidden [ossa] @$sSo12GenericClassC17objc_bridging_anyE23pseudogenericAnyErasure1xypx_tF :
   @objc func pseudogenericAnyErasure(x: T) -> Any {
     // CHECK: bb0([[ANY_OUT:%.*]] : $*Any, [[ARG:%.*]] : @guaranteed $T, [[SELF:%.*]] : @guaranteed $GenericClass<T>
     // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -652,7 +652,7 @@
 
 // Make sure AnyHashable erasure marks Hashable conformance as used
 class AnyHashableClass : NSObject {
-  // CHECK-LABEL: sil hidden @$s17objc_bridging_any16AnyHashableClassC07returnsdE0s0dE0VyF
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any16AnyHashableClassC07returnsdE0s0dE0VyF
   // CHECK: [[FN:%.*]] = function_ref @$ss21_convertToAnyHashableys0cD0VxSHRzlF
   // CHECK: apply [[FN]]<GenericOption>({{.*}})
   func returnsAnyHashable() -> AnyHashable {
@@ -660,7 +660,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s17objc_bridging_any33bridgeOptionalFunctionToAnyObject2fnyXlyycSg_tF : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> ()>) -> @owned AnyObject
+// CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any33bridgeOptionalFunctionToAnyObject2fnyXlyycSg_tF : $@convention(thin) (@guaranteed Optional<@callee_guaranteed () -> ()>) -> @owned AnyObject
 // CHECK: [[BRIDGE:%.*]] = function_ref @$sSq19_bridgeToObjectiveCyXlyF
 // CHECK: [[FN:%.*]] = function_ref @$sIeg_ytIegr_TR
 // CHECK: partial_apply [callee_guaranteed] [[FN]]
@@ -674,18 +674,18 @@
 // turn them into `Any` using a runtime call that defends against the
 // possibility they still may be nil.
 
-// CHECK-LABEL: sil hidden @$s17objc_bridging_any22bridgeIncomingAnyValueyypSo9NSIdLoverCF
+// CHECK-LABEL: sil hidden [ossa] @$s17objc_bridging_any22bridgeIncomingAnyValueyypSo9NSIdLoverCF
 func bridgeIncomingAnyValue(_ receiver: NSIdLover) -> Any {
   // CHECK: function_ref [[BRIDGE_ANYOBJECT_TO_ANY]]
   return receiver.makesId()
 }
 
 class SwiftAnyEnjoyer: NSIdLover, NSIdLoving {
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any15SwiftAnyEnjoyerC7takesIdyyypFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any15SwiftAnyEnjoyerC7takesIdyyypFTo
   // CHECK: function_ref [[BRIDGE_ANYOBJECT_TO_ANY]]
   override func takesId(_ x: Any) { }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_bridging_any15SwiftAnyEnjoyerC7takesId11viaProtocolyyp_tFTo 
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_bridging_any15SwiftAnyEnjoyerC7takesId11viaProtocolyyp_tFTo 
   // CHECK: function_ref [[BRIDGE_ANYOBJECT_TO_ANY]]
   func takesId(viaProtocol x: Any) { }
 }
diff --git a/test/SILGen/objc_bridging_peephole.swift b/test/SILGen/objc_bridging_peephole.swift
index a36c9f1..35378a6 100644
--- a/test/SILGen/objc_bridging_peephole.swift
+++ b/test/SILGen/objc_bridging_peephole.swift
@@ -16,7 +16,7 @@
 
 /*** Return values ***********************************************************/
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole16testMethodResult5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole16testMethodResult5dummyySo10DummyClassC_tF
 func testMethodResult(dummy: DummyClass) {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[METHOD:%.*]] = objc_method [[SELF]] : $DummyClass, #DummyClass.fetchNullableString!1.foreign
@@ -61,7 +61,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole23testNonNullMethodResult5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole23testNonNullMethodResult5dummyySo10DummyClassC_tF
 func testNonNullMethodResult(dummy: DummyClass) {
   // CHECK: bb0([[ARG:%.*]] @guaranteed $DummyClass):
   // CHECK:      [[METHOD:%.*]] = objc_method
@@ -89,7 +89,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole22testForcedMethodResult5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole22testForcedMethodResult5dummyySo10DummyClassC_tF
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $DummyClass):
 func testForcedMethodResult(dummy: DummyClass) {
   // CHECK:      [[METHOD:%.*]] = objc_method
@@ -129,7 +129,7 @@
 
 /*** Property loads **********************************************************/
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole17testPropertyValue5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole17testPropertyValue5dummyySo10DummyClassC_tF
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $DummyClass):
 func testPropertyValue(dummy: DummyClass) {
   // CHECK: [[METHOD:%.*]] = objc_method
@@ -174,7 +174,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole24testNonNullPropertyValue5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole24testNonNullPropertyValue5dummyySo10DummyClassC_tF
 func testNonNullPropertyValue(dummy: DummyClass) {
   // CHECK:    bb0([[SELF:%.*]] : @guaranteed $DummyClass):
   // CHECK:       [[METHOD:%.*]] = objc_method
@@ -201,7 +201,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole23testForcedPropertyValue5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole23testForcedPropertyValue5dummyySo10DummyClassC_tF
 func testForcedPropertyValue(dummy: DummyClass) {
   // CHECK:    bb0([[ARG:%.*]] : @guaranteed $DummyClass):
   // CHECK:      [[METHOD:%.*]] = objc_method
@@ -242,7 +242,7 @@
 
 // FIXME: apply peepholes to indices, too!
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole23testNonnullSubscriptGet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole23testNonnullSubscriptGet6object5indexySo0eF0C_yXltF
 func testNonnullSubscriptGet(object: NonnullSubscript, index: AnyObject) {
   // CHECK:   bb0([[SELF:%.*]] : @guaranteed $NonnullSubscript,
   // CHECK:      [[BRIDGE_TO_ID:%.*]] = function_ref @$ss27_bridgeAnythingToObjectiveCyyXlxlF
@@ -269,7 +269,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole24testNullableSubscriptGet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole24testNullableSubscriptGet6object5indexySo0eF0C_yXltF
 func testNullableSubscriptGet(object: NullableSubscript, index: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $NullableSubscript,
   // CHECK:      [[BRIDGE_TO_ID:%.*]] = function_ref @$ss27_bridgeAnythingToObjectiveCyyXlxlF
@@ -284,7 +284,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole25testNullproneSubscriptGet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole25testNullproneSubscriptGet6object5indexySo0eF0C_yXltF
 func testNullproneSubscriptGet(object: NullproneSubscript, index: AnyObject) {
   // CHECK:   bb0([[ARG:%.*]] : @guaranteed $NullproneSubscript,
   // CHECK:      [[BRIDGE_TO_ID:%.*]] = function_ref @$ss27_bridgeAnythingToObjectiveCyyXlxlF
@@ -313,7 +313,7 @@
 
 /*** Call arguments **********************************************************/
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole18testMethodArgument5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole18testMethodArgument5dummyySo10DummyClassC_tF
 func testMethodArgument(dummy: DummyClass) {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $DummyClass):
   // CHECK:      // function_ref
@@ -345,7 +345,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole28testValueToOptMethodArgument5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole28testValueToOptMethodArgument5dummyySo10DummyClassC_tF
 func testValueToOptMethodArgument(dummy: DummyClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -367,7 +367,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole09testOptToE14MethodArgument5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole09testOptToE14MethodArgument5dummyySo10DummyClassC_tF
 func testOptToOptMethodArgument(dummy: DummyClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole9makeOptNSSo8NSStringCSgyF
@@ -389,7 +389,7 @@
 
 /*** Property assignments ****************************************************/
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole18testPropertySetter5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole18testPropertySetter5dummyySo10DummyClassC_tF
 func testPropertySetter(dummy: DummyClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -418,7 +418,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole28testValueToOptPropertySetter5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole28testValueToOptPropertySetter5dummyySo10DummyClassC_tF
 func testValueToOptPropertySetter(dummy: DummyClass) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -440,7 +440,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole09testOptToE14PropertySetter5dummyySo10DummyClassC_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole09testOptToE14PropertySetter5dummyySo10DummyClassC_tF
 func testOptToOptPropertySetter(dummy: DummyClass) {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $DummyClass):
   // CHECK: [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole9makeOptNSSo8NSStringCSgyF
@@ -464,7 +464,7 @@
 
 // FIXME: apply peepholes to indices, too!
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole23testNonnullSubscriptSet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole23testNonnullSubscriptSet6object5indexySo0eF0C_yXltF
 func testNonnullSubscriptSet(object: NonnullSubscript, index: AnyObject) {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $NonnullSubscript,
   // CHECK:      [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -480,7 +480,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole24testNullableSubscriptSet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole24testNullableSubscriptSet6object5indexySo0eF0C_yXltF
 func testNullableSubscriptSet(object: NullableSubscript, index: AnyObject) {
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $NullableSubscript,
   // CHECK:      [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -518,7 +518,7 @@
   // CHECK:      return
 }
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole25testNullproneSubscriptSet6object5indexySo0eF0C_yXltF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole25testNullproneSubscriptSet6object5indexySo0eF0C_yXltF
 func testNullproneSubscriptSet(object: NullproneSubscript, index: AnyObject) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $NullproneSubscript,
   // CHECK:      [[MAKE:%.*]] = function_ref @$s22objc_bridging_peephole6makeNSSo8NSStringCyF
@@ -568,7 +568,7 @@
 
 // rdar://35402853
 //   Make sure that we don't peephole AnyObject? -> Any? -> AnyObject naively.
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole017testOptionalToNonE6BridgeyyF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole017testOptionalToNonE6BridgeyyF
 func testOptionalToNonOptionalBridge() {
   // CHECK: apply {{.*}}() : $@convention(c) () -> @autoreleased Optional<AnyObject>
   // CHECK: function_ref @$ss018_bridgeAnyObjectToB0yypyXlSgF :
@@ -577,7 +577,7 @@
   useAnyObject(returnNullableId() as AnyObject)
 } // CHECK: end sil function '$s22objc_bridging_peephole017testOptionalToNonE6BridgeyyF'
 
-// CHECK-LABEL: sil hidden @$s22objc_bridging_peephole34testBlockToOptionalAnyObjectBridge5blockyyyXB_tF
+// CHECK-LABEL: sil hidden [ossa] @$s22objc_bridging_peephole34testBlockToOptionalAnyObjectBridge5blockyyyXB_tF
 func testBlockToOptionalAnyObjectBridge(block: @escaping @convention(block) () -> ()) {
   // CHECK:      [[T0:%.*]] = begin_borrow {{%.*}} : $@convention(block) () -> ()
   // CHECK-NEXT: [[T1:%.*]] = copy_value [[T0]]
diff --git a/test/SILGen/objc_currying.swift b/test/SILGen/objc_currying.swift
index 42cd1fe..2145855 100644
--- a/test/SILGen/objc_currying.swift
+++ b/test/SILGen/objc_currying.swift
@@ -11,7 +11,7 @@
 func curry_pod(_ x: CurryTest) -> (Int) -> Int {
   return x.pod
 }
-// CHECK-LABEL: sil hidden @$s13objc_currying9curry_podyS2icSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying9curry_podyS2icSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK:      bb0([[ARG1:%.*]] : @guaranteed $CurryTest):
 // CHECK:         [[THUNK:%.*]] = function_ref @[[THUNK_FOO_1:\$sSo9CurryTestC3podyS2iFTcTO]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK:         [[FN:%.*]] = apply [[THUNK]]([[ARG1]])
@@ -19,7 +19,7 @@
 // CHECK:         return [[FN]]
 // CHECK: } // end sil function '$s13objc_currying9curry_podyS2icSo9CurryTestCF'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_FOO_1]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (Int) -> Int
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_FOO_1]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK: bb0([[ARG1:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[THUNK:%.*]] = function_ref @[[THUNK_FOO_2:\$sSo9CurryTestC3podyS2iFTO]]
 // CHECK:   [[ARG1_COPY:%.*]] = copy_value [[ARG1]]
@@ -28,7 +28,7 @@
 // CHECK:   return [[FN]]
 // CHECK: } // end sil function '[[THUNK_FOO_1]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_FOO_2]] : $@convention(method) (Int, @guaranteed CurryTest) -> Int
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_FOO_2]] : $@convention(method) (Int, @guaranteed CurryTest) -> Int
 // CHECK: bb0([[ARG1:%.*]] : $Int, [[ARG2:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[COPIED_ARG2:%.*]] = copy_value [[ARG2]]
 // CHECK:   [[METHOD:%.*]] = objc_method [[COPIED_ARG2]] : $CurryTest, #CurryTest.pod!1.foreign
@@ -40,7 +40,7 @@
 func curry_bridged(_ x: CurryTest) -> (String?) -> String? {
   return x.bridged
 }
-// CHECK-LABEL: sil hidden @$s13objc_currying13curry_bridgedySSSgACcSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying13curry_bridgedySSSgACcSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
 // CHECK: bb0([[ARG1:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[THUNK:%.*]] = function_ref @[[THUNK_BAR_1:\$sSo9CurryTestC7bridgedySSSgADFTcTO]]
 // CHECK:   [[FN:%.*]] = apply [[THUNK]]([[ARG1]])
@@ -48,7 +48,7 @@
 // CHECK:   return [[FN]]
 // CHECK: } // end sil function '$s13objc_currying13curry_bridgedySSSgACcSo9CurryTestCF'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_BAR_1]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_BAR_1]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
 // CHECK: bb0([[ARG1:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[THUNK:%.*]] = function_ref @[[THUNK_BAR_2:\$sSo9CurryTestC7bridgedySSSgADFTO]]
 // CHECK:   [[COPY_ARG1:%.*]] = copy_value [[ARG1]]
@@ -56,7 +56,7 @@
 // CHECK:   return [[FN]]
 // CHECK: } // end sil function '[[THUNK_BAR_1]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_BAR_2]] : $@convention(method) (@guaranteed Optional<String>, @guaranteed CurryTest) -> @owned Optional<String>
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_BAR_2]] : $@convention(method) (@guaranteed Optional<String>, @guaranteed CurryTest) -> @owned Optional<String>
 // CHECK: bb0([[OPT_STRING:%.*]] : @guaranteed $Optional<String>, [[SELF:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[COPY_OPT_STRING:%.*]] = copy_value [[OPT_STRING]]
 // CHECK:   switch_enum [[COPY_OPT_STRING]] : $Optional<String>, case #Optional.some!enumelt.1: [[SOME_BB:bb[0-9]+]],
@@ -100,7 +100,7 @@
 func curry_returnsInnerPointer(_ x: CurryTest) -> () -> UnsafeMutableRawPointer? {
   return x.returnsInnerPointer
 }
-// CHECK-LABEL: sil hidden @$s13objc_currying25curry_returnsInnerPointerySvSgycSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer> {
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying25curry_returnsInnerPointerySvSgycSo9CurryTestCF : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer> {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[THUNK:%.*]] = function_ref @[[THUNK_RETURNSINNERPOINTER:\$sSo9CurryTestC19returnsInnerPointerSvSgyFTcTO]]
 // CHECK:   [[FN:%.*]] = apply [[THUNK]]([[SELF]])
@@ -108,7 +108,7 @@
 // CHECK:   return [[FN]]
 // CHECK: } // end sil function '$s13objc_currying25curry_returnsInnerPointerySvSgycSo9CurryTestCF'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_RETURNSINNERPOINTER]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer>
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_RETURNSINNERPOINTER]] : $@convention(thin) (@guaranteed CurryTest) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer>
 // CHECK: bb0([[ARG1:%.*]] : @guaranteed
 // CHECK:   [[THUNK:%.*]] = function_ref @[[THUNK_RETURNSINNERPOINTER_2:\$sSo9CurryTestC19returnsInnerPointerSvSgyFTO]]
 // CHECK:   [[COPY_ARG1:%.*]] = copy_value [[ARG1]]
@@ -116,7 +116,7 @@
 // CHECK:   return [[FN]]
 // CHECK: } // end sil function '[[THUNK_RETURNSINNERPOINTER]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK_RETURNSINNERPOINTER_2]] : $@convention(method) (@guaranteed CurryTest) -> Optional<UnsafeMutableRawPointer>
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK_RETURNSINNERPOINTER_2]] : $@convention(method) (@guaranteed CurryTest) -> Optional<UnsafeMutableRawPointer>
 // CHECK:  bb0([[ARG1:%.*]] : @guaranteed $CurryTest):
 // CHECK:   [[ARG1_COPY:%.*]] = copy_value [[ARG1]]
 // CHECK:   [[METHOD:%.*]] = objc_method [[ARG1_COPY]] : $CurryTest, #CurryTest.returnsInnerPointer!1.foreign
@@ -125,7 +125,7 @@
 // CHECK:   return [[RES]]
 // CHECK: } // end sil function '[[THUNK_RETURNSINNERPOINTER_2]]'
 
-// CHECK-LABEL: sil hidden @$s13objc_currying19curry_pod_AnyObjectyS2icyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying19curry_pod_AnyObjectyS2icyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -139,7 +139,7 @@
 }
 
 // normalOwnership requires a thunk to bring the method to Swift conventions
-// CHECK-LABEL: sil hidden @$s13objc_currying31curry_normalOwnership_AnyObjectySo9CurryTestCSgAEcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<CurryTest>) -> @owned Optional<CurryTest> {
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying31curry_normalOwnership_AnyObjectySo9CurryTestCSgAEcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<CurryTest>) -> @owned Optional<CurryTest> {
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -156,7 +156,7 @@
 
 // weirdOwnership is NS_RETURNS_RETAINED and NS_CONSUMES_SELF so already
 // follows Swift conventions
-// CHECK-LABEL: sil hidden @$s13objc_currying30curry_weirdOwnership_AnyObjectySo9CurryTestCSgAEcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<CurryTest>) -> @owned Optional<CurryTest>
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying30curry_weirdOwnership_AnyObjectySo9CurryTestCSgAEcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<CurryTest>) -> @owned Optional<CurryTest>
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -171,7 +171,7 @@
 }
 
 // bridged requires a thunk to handle bridging conversions
-// CHECK-LABEL: sil hidden @$s13objc_currying23curry_bridged_AnyObjectySSSgACcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying23curry_bridged_AnyObjectySSSgACcyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed (@guaranteed Optional<String>) -> @owned Optional<String>
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -183,7 +183,7 @@
 
 // check that we substitute Self = AnyObject correctly for Self-returning
 // methods
-// CHECK-LABEL: sil hidden @$s13objc_currying27curry_returnsSelf_AnyObjectyyXlSgycyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed () -> @owned Optional<AnyObject> {
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying27curry_returnsSelf_AnyObjectyyXlSgycyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed () -> @owned Optional<AnyObject> {
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -196,7 +196,7 @@
   return x.returnsSelf!
 }
 
-// CHECK-LABEL: sil hidden @$s13objc_currying35curry_returnsInnerPointer_AnyObjectySvSgycyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer> {
+// CHECK-LABEL: sil hidden [ossa] @$s13objc_currying35curry_returnsInnerPointer_AnyObjectySvSgycyXlF : $@convention(thin) (@guaranteed AnyObject) -> @owned @callee_guaranteed () -> Optional<UnsafeMutableRawPointer> {
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
diff --git a/test/SILGen/objc_dealloc.swift b/test/SILGen/objc_dealloc.swift
index 99df51a..d9a601e 100644
--- a/test/SILGen/objc_dealloc.swift
+++ b/test/SILGen/objc_dealloc.swift
@@ -9,13 +9,13 @@
 class SwiftGizmo : Gizmo {
   var x = X()
 
-  // CHECK-LABEL: sil hidden [transparent] @$s12objc_dealloc10SwiftGizmoC1xAA1XCvpfi : $@convention(thin) () -> @owned X
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s12objc_dealloc10SwiftGizmoC1xAA1XCvpfi : $@convention(thin) () -> @owned X
   // CHECK:      [[METATYPE:%.*]] = metatype $@thick X.Type
   // CHECK:      [[FN:%.*]] = function_ref @$s12objc_dealloc1XCACycfC : $@convention(method) (@thick X.Type) -> @owned X
   // CHECK-NEXT: [[RESULT:%.*]] = apply [[FN]]([[METATYPE]]) : $@convention(method) (@thick X.Type) -> @owned X
   // CHECK-NEXT: return [[RESULT]] : $X
 
-  // CHECK-LABEL: sil hidden @$s12objc_dealloc10SwiftGizmoC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s12objc_dealloc10SwiftGizmoC{{[_0-9a-zA-Z]*}}fc
   // CHECK: bb0([[SELF_PARAM:%[0-9]+]] : @owned $SwiftGizmo):
   override init() {
     // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var SwiftGizmo }, let, name "self"
@@ -32,7 +32,7 @@
     super.init()
   }
 
-  // CHECK-LABEL: sil hidden @$s12objc_dealloc10SwiftGizmoCfD : $@convention(method) (@owned SwiftGizmo) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s12objc_dealloc10SwiftGizmoCfD : $@convention(method) (@owned SwiftGizmo) -> ()
   deinit {
     // CHECK: bb0([[SELF:%[0-9]+]] : @owned $SwiftGizmo):
     // Call onDestruct()
@@ -53,7 +53,7 @@
   }
 
   // Objective-C deallocation deinit thunk (i.e., -dealloc).
-  // CHECK-LABEL: sil hidden [thunk] @$s12objc_dealloc10SwiftGizmoCfDTo : $@convention(objc_method) (SwiftGizmo) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s12objc_dealloc10SwiftGizmoCfDTo : $@convention(objc_method) (SwiftGizmo) -> ()
   // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $SwiftGizmo):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
 
@@ -62,7 +62,7 @@
   // CHECK:   return [[RESULT]] : $()
 
   // Objective-C IVar initializer (i.e., -.cxx_construct)
-  // CHECK-LABEL: sil hidden @$s12objc_dealloc10SwiftGizmoCfeTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo
+  // CHECK-LABEL: sil hidden [ossa] @$s12objc_dealloc10SwiftGizmoCfeTo : $@convention(objc_method) (@owned SwiftGizmo) -> @owned SwiftGizmo
   // CHECK: bb0([[SELF_PARAM:%[0-9]+]] : @owned $SwiftGizmo):
   // CHECK-NEXT:   debug_value [[SELF_PARAM]] : $SwiftGizmo, let, name "self"
   // CHECK-NEXT:   [[SELF:%[0-9]+]] = mark_uninitialized [rootself] [[SELF_PARAM]] : $SwiftGizmo
@@ -77,7 +77,7 @@
   // CHECK-NEXT:   return [[SELF]] : $SwiftGizmo
 
   // Objective-C IVar destroyer (i.e., -.cxx_destruct)
-  // CHECK-LABEL: sil hidden @$s12objc_dealloc10SwiftGizmoCfETo : $@convention(objc_method) (SwiftGizmo) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s12objc_dealloc10SwiftGizmoCfETo : $@convention(objc_method) (SwiftGizmo) -> ()
   // CHECK:      bb0([[SELF:%[0-9]+]] : @unowned $SwiftGizmo):
   // CHECK-NEXT: debug_value [[SELF]] : $SwiftGizmo, let, name "self"
   // CHECK-NEXT: [[SELF_BORROW:%.*]] = begin_borrow [[SELF]]
@@ -88,6 +88,6 @@
   // CHECK-NEXT: return [[RESULT]] : $()
 }
 
-// CHECK-NOT: sil hidden [thunk] @$sSo11SwiftGizmo2CfETo : $@convention(objc_method) (SwiftGizmo2) -> ()
+// CHECK-NOT: sil hidden [thunk] [ossa] @$sSo11SwiftGizmo2CfETo : $@convention(objc_method) (SwiftGizmo2) -> ()
 class SwiftGizmo2 : Gizmo {
 }
diff --git a/test/SILGen/objc_deprecated_objc_thunks.swift b/test/SILGen/objc_deprecated_objc_thunks.swift
index 6072e86..df00fb9 100644
--- a/test/SILGen/objc_deprecated_objc_thunks.swift
+++ b/test/SILGen/objc_deprecated_objc_thunks.swift
@@ -3,7 +3,7 @@
 import Foundation
 
 class ObjCSubclass : NSObject {
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC7nothingACyt_tcfcTo : $@convention(objc_method) (@owned ObjCSubclass) -> @owned ObjCSubclass {
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC7nothingACyt_tcfcTo : $@convention(objc_method) (@owned ObjCSubclass) -> @owned ObjCSubclass {
   // CHECK-SWIFT4: bb0(%0 : @owned $ObjCSubclass):
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL:string_literal.*"]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -13,7 +13,7 @@
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
   init(nothing: ()) { super.init() }
   
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3fooyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
   // CHECK-SWIFT4: bb0(%0 : @unowned $ObjCSubclass):
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -23,7 +23,7 @@
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
   func foo() { }
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgvgTo : $@convention(objc_method) (ObjCSubclass) -> @autoreleased Optional<NSObject>
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgvgTo : $@convention(objc_method) (ObjCSubclass) -> @autoreleased Optional<NSObject>
   // CHECK-SWIFT4: bb0(%0 : @unowned $ObjCSubclass):
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -32,7 +32,7 @@
   // CHECK-SWIFT4-NEXT: [[COLUMN:%.*]] = integer_literal $Builtin.Word, 3
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgvsTo : $@convention(objc_method) (Optional<NSObject>, ObjCSubclass) -> () {
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC3barSo8NSObjectCSgvsTo : $@convention(objc_method) (Optional<NSObject>, ObjCSubclass) -> () {
   // CHECK-SWIFT4: %0 : @unowned $Optional<NSObject>, %1 : @unowned $ObjCSubclass
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -42,7 +42,7 @@
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
   var bar: NSObject? = nil
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassCyyXlSicigTo : $@convention(objc_method) (Int, ObjCSubclass) -> @autoreleased AnyObject
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassCyyXlSicigTo : $@convention(objc_method) (Int, ObjCSubclass) -> @autoreleased AnyObject
   // CHECK-SWIFT4: bb0(%0 : $Int, %1 : @unowned $ObjCSubclass):
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -51,7 +51,7 @@
   // CHECK-SWIFT4-NEXT: [[COLUMN:%.*]] = integer_literal $Builtin.Word, 3
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassCyyXlSicisTo : $@convention(objc_method) (AnyObject, Int, ObjCSubclass) ->
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassCyyXlSicisTo : $@convention(objc_method) (AnyObject, Int, ObjCSubclass) ->
   // CHECK-SWIFT4: bb0(%0 : @unowned $AnyObject, %1 : $Int, %2 : @unowned $ObjCSubclass):
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -61,7 +61,7 @@
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
   subscript (i: Int) -> AnyObject { get { return self } set { } } 
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC9staticFooyyFZTo
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC9staticFooyyFZTo
   // CHECK-SWIFT4: bb0
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -71,7 +71,7 @@
   // CHECK-SWIFT4-NEXT: builtin "swift3ImplicitObjCEntrypoint"([[FILENAME]] : $Builtin.RawPointer, [[LENGTH]] : $Builtin.Word, [[LINE]] : $Builtin.Word, [[COLUMN]] : $Builtin.Word) : $() 
   static func staticFoo() {}
 
-  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [noinline] @$s016objc_deprecated_A7_thunks12ObjCSubclassC13dontInlineFooyyFTo
+  // CHECK-SWIFT4-LABEL: sil hidden [thunk] [noinline] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC13dontInlineFooyyFTo
   // CHECK-SWIFT4: bb0
   // CHECK-SWIFT4-NEXT: [[FILENAME:%.*]] = [[FILENAME_LITERAL]]
   // CHECK-SWIFT4-NEXT: [[LENGTH:%.*]] = integer_literal
@@ -83,7 +83,7 @@
 }
 
 extension ObjCSubclass {
-	// CHECK-SWIFT4-LABEL: sil hidden [thunk] @$s016objc_deprecated_A7_thunks12ObjCSubclassC13falsePositiveyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
+	// CHECK-SWIFT4-LABEL: sil hidden [thunk] [ossa] @$s016objc_deprecated_A7_thunks12ObjCSubclassC13falsePositiveyyFTo : $@convention(objc_method) (ObjCSubclass) -> ()
   // CHECK-SWIFT4: bb0(%0 : @unowned $ObjCSubclass):
   // CHECK-SWIFT4-NOT: builtin "swift3ImplicitObjCEntrypoint"
 	// CHECK-SWIFT4: return
diff --git a/test/SILGen/objc_dictionary_bridging.swift b/test/SILGen/objc_dictionary_bridging.swift
index e8c44f6..cb39be6 100644
--- a/test/SILGen/objc_dictionary_bridging.swift
+++ b/test/SILGen/objc_dictionary_bridging.swift
@@ -11,7 +11,7 @@
 
 @objc class Foo : NSObject {
   // Bridging dictionary parameters
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC23bridge_Dictionary_param{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC23bridge_Dictionary_param{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
   @objc func bridge_Dictionary_param(_ dict: Dictionary<Foo, Foo>) {
     // CHECK: bb0([[NSDICT:%[0-9]+]] : @unowned $NSDictionary, [[SELF:%[0-9]+]] : @unowned $Foo):
     // CHECK:   [[NSDICT_COPY:%.*]] = copy_value [[NSDICT]]
@@ -31,7 +31,7 @@
   // CHECK: } // end sil function '$s24objc_dictionary_bridging3FooC23bridge_Dictionary_param{{[_0-9a-zA-Z]*}}FTo'
 
   // Bridging dictionary results
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC24bridge_Dictionary_result{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC24bridge_Dictionary_result{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
   @objc func bridge_Dictionary_result() -> Dictionary<Foo, Foo> { 
     // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $Foo):
     // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -53,7 +53,7 @@
   @objc var property: Dictionary<Foo, Foo> = [:]
 
   // Property getter
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC8propertySDyA2CGvgTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC8propertySDyA2CGvgTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
   //                                 @$s24objc_dictionary_bridging3FooC8propertySDyA2CSo8NSObjectCSH10Foundationg_Gvpfi
   // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $Foo):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -71,7 +71,7 @@
   // CHECK: } // end sil function
 
   // Property setter
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC8propertySDyA2CGvsTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC8propertySDyA2CGvsTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
   // CHECK: bb0([[NSDICT:%[0-9]+]] : @unowned $NSDictionary, [[SELF:%[0-9]+]] : @unowned $Foo):
   // CHECK:   [[NSDICT_COPY:%.*]] = copy_value [[NSDICT]]
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -87,9 +87,9 @@
   // CHECK:   destroy_value [[SELF_COPY]]
   // CHECK:   return [[RESULT]] : $()
 
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSDictionary
 
-  // CHECK-LABEL: sil hidden [thunk] @$s24objc_dictionary_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s24objc_dictionary_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSDictionary, Foo) -> ()
   @objc var nonVerbatimProperty: Dictionary<String, Int> = [:]
 }
 
diff --git a/test/SILGen/objc_disable_brigding.swift b/test/SILGen/objc_disable_brigding.swift
index 105a112..61d10d3 100644
--- a/test/SILGen/objc_disable_brigding.swift
+++ b/test/SILGen/objc_disable_brigding.swift
@@ -10,7 +10,7 @@
 
 // This tests the -disable-swift-bridge-attr flag. Make sure we don't emit bridging code.
 
-// CHECK-LABEL: sil hidden @{{.*}}objc_disable_brigding16updateFridgeTemp
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}objc_disable_brigding16updateFridgeTemp
 func updateFridgeTemp(_ home: APPHouse, delta: Double) {
   // CHECK-NOT: function_ref @{{.*}}BridgeFromObjectiveC
   home.fridge.temperature += delta
diff --git a/test/SILGen/objc_dynamic_init.swift b/test/SILGen/objc_dynamic_init.swift
index 9c31493..2ea92ac 100644
--- a/test/SILGen/objc_dynamic_init.swift
+++ b/test/SILGen/objc_dynamic_init.swift
@@ -35,7 +35,7 @@
     }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s{{.*}}GadgetC{{.*}}CTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s{{.*}}GadgetC{{.*}}CTW
 // CHECK:         function_ref @{{.*}}Gadget{{.*}}fC :
 
 // CHECK-LABEL: sil_vtable Gadget {
diff --git a/test/SILGen/objc_enum.swift b/test/SILGen/objc_enum.swift
index 6739be1..a245f54 100644
--- a/test/SILGen/objc_enum.swift
+++ b/test/SILGen/objc_enum.swift
@@ -7,14 +7,14 @@
 import gizmo
 
 
-// CHECK-DAG: sil shared [serializable] @$sSo16NSRuncingOptionsV{{[_0-9a-zA-Z]*}}fC
-// CHECK-DAG: sil shared [serializable] @$sSo16NSRuncingOptionsV8rawValueSivg
+// CHECK-DAG: sil shared [serializable] [ossa] @$sSo16NSRuncingOptionsV{{[_0-9a-zA-Z]*}}fC
+// CHECK-DAG: sil shared [serializable] [ossa] @$sSo16NSRuncingOptionsV8rawValueSivg
 
 // Non-payload enum ctors don't need to be instantiated at all.
-// NEGATIVE-NOT: sil shared [transparent] @$sSo16NSRuncingOptionsV5MinceAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @$sSo16NSRuncingOptionsV12QuinceSlicedAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @$sSo16NSRuncingOptionsV15QuinceJuliennedAbBmF
-// NEGATIVE-NOT: sil shared [transparent] @$sSo16NSRuncingOptionsV11QuinceDicedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] [ossa] @$sSo16NSRuncingOptionsV5MinceAbBmF
+// NEGATIVE-NOT: sil shared [transparent] [ossa] @$sSo16NSRuncingOptionsV12QuinceSlicedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] [ossa] @$sSo16NSRuncingOptionsV15QuinceJuliennedAbBmF
+// NEGATIVE-NOT: sil shared [transparent] [ossa] @$sSo16NSRuncingOptionsV11QuinceDicedAbBmF
 
 var runcing: NSRuncingOptions = .mince
 
@@ -44,7 +44,7 @@
 // CHECK-DAG: sil_witness_table shared [serialized] NSRuncingOptions: Hashable module gizmo
 // CHECK-DAG: sil_witness_table shared [serialized] NSFungingMask: RawRepresentable module gizmo
 
-// CHECK-DAG: sil shared [transparent] [serialized] [thunk] @$sSo16NSRuncingOptionsVSYSCSY8rawValuexSg03RawD0Qz_tcfCTW
+// CHECK-DAG: sil shared [transparent] [serialized] [thunk] [ossa] @$sSo16NSRuncingOptionsVSYSCSY8rawValuexSg03RawD0Qz_tcfCTW
 
 // Extension conformances get linkage according to the protocol's accessibility, as normal.
 // CHECK-DAG: sil_witness_table hidden NSRuncingOptions: Bub module objc_enum
diff --git a/test/SILGen/objc_error.swift b/test/SILGen/objc_error.swift
index 902a8e0..7b4fe7c 100644
--- a/test/SILGen/objc_error.swift
+++ b/test/SILGen/objc_error.swift
@@ -8,7 +8,7 @@
 
 import Foundation
 
-// CHECK-LABEL: sil hidden @$s10objc_error20NSErrorError_erasureys0D0_pSo0C0CF : $@convention(thin) (@guaranteed NSError) -> @owned Error {
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error20NSErrorError_erasureys0D0_pSo0C0CF : $@convention(thin) (@guaranteed NSError) -> @owned Error {
 // CHECK:         bb0([[ERROR:%.*]] : @guaranteed $NSError):
 // CHECK:           [[ERROR_COPY:%.*]] = copy_value [[ERROR]]
 // CHECK:           [[ERROR_TYPE:%.*]] = init_existential_ref [[ERROR_COPY]] : $NSError : $NSError, $Error
@@ -19,7 +19,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error30NSErrorError_archetype_erasureys0D0_pxSo0C0CRbzlF : $@convention(thin) <T where T : NSError> (@guaranteed T) -> @owned Error {
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error30NSErrorError_archetype_erasureys0D0_pxSo0C0CRbzlF : $@convention(thin) <T where T : NSError> (@guaranteed T) -> @owned Error {
 // CHECK:         bb0([[ERROR:%.*]] : @guaranteed $T):
 // CHECK:           [[ERROR_COPY:%.*]] = copy_value [[ERROR]]
 // CHECK:           [[T0:%.*]] = upcast [[ERROR_COPY]] : $T to $NSError
@@ -54,7 +54,7 @@
 // Class-to-NSError casts must be done as indirect casts since they require
 // a representation change, and checked_cast_br currently doesn't allow that.
 
-// CHECK-LABEL: sil hidden @$s10objc_error20test_cast_to_nserroryyF
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error20test_cast_to_nserroryyF
 func test_cast_to_nserror() {
   let e = ErrorClass()
 
@@ -74,28 +74,28 @@
 
 // A class-constrained archetype may be NSError, so we can't use scalar casts
 // in that case either.
-// CHECK-LABEL: sil hidden @$s10objc_error28test_cast_to_class_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error28test_cast_to_class_archetype{{[_0-9a-zA-Z]*}}F
 func test_cast_to_class_archetype<T: AnyObject>(_: T) {
   // CHECK: unconditional_checked_cast_addr ErrorClass in {{%.*}} : $*ErrorClass to T in {{.*}} : $*T
   let e = ErrorClass()
   let forcedCast = e as! T
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error15testAcceptError{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error15testAcceptError{{[_0-9a-zA-Z]*}}F
 func testAcceptError(error: Error) {
   // CHECK-NOT: return
   // CHECK: function_ref @$s10Foundation22_convertErrorToNSErrorySo0E0Cs0C0_pF
   acceptError(error)
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error16testProduceError{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error16testProduceError{{[_0-9a-zA-Z]*}}F
 func testProduceError() -> Error {
   // CHECK: function_ref @produceError : $@convention(c) () -> @autoreleased NSError
   // CHECK: init_existential_ref {{.*}} : $NSError : $NSError, $Error
   return produceError()
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error24testProduceOptionalError{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error24testProduceOptionalError{{[_0-9a-zA-Z]*}}F
 func testProduceOptionalError() -> Error? {
   // CHECK: function_ref @produceOptionalError
   // CHECK: init_existential_ref {{.*}} : $NSError : $NSError, $Error
@@ -108,7 +108,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error14eraseMyNSError{{[_0-9a-zA-Z]*}}F : $@convention(thin) () -> @owned Error {
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error14eraseMyNSError{{[_0-9a-zA-Z]*}}F : $@convention(thin) () -> @owned Error {
 // CHECK: bb0:
 // CHECK:   [[NSERROR_SUBCLASS:%.*]] = apply {{.*}}({{.*}}) : $@convention(method) (@thick MyNSError.Type) -> @owned MyNSError
 // CHECK:   [[UPCAST:%.*]] = upcast [[NSERROR_SUBCLASS]] : $MyNSError to $NSError
@@ -124,7 +124,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_error25eraseFictionalServerErrors0F0_pyF
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_error25eraseFictionalServerErrors0F0_pyF
 func eraseFictionalServerError() -> Error {
   // CHECK-NOT: return
   // CHECK: [[NSERROR:%[0-9]+]] = struct_extract {{.*}} : $FictionalServerError, #FictionalServerError._nsError
@@ -137,7 +137,7 @@
 
 // SR-1562
 extension Error {
-  // CHECK-LABEL: sil hidden @$ss5ErrorP10objc_errorE16convertToNSErrorSo0F0CyF
+  // CHECK-LABEL: sil hidden [ossa] @$ss5ErrorP10objc_errorE16convertToNSErrorSo0F0CyF
   // CHECK: bb0([[SELF:%[0-9]+]] : $*Self)
 	func convertToNSError() -> NSError {
     // CHECK: [[COPY:%.*]] = alloc_stack $Self
@@ -170,6 +170,6 @@
 }
 
 class Gizmoid : NSObject {
-  // CHECK-LABEL: sil hidden [thunk] @$s10objc_error7GizmoidC3fooACyt_tKcfcTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @owned Gizmoid) -> @owned Optional<Gizmoid>
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s10objc_error7GizmoidC3fooACyt_tKcfcTo : $@convention(objc_method) (Optional<AutoreleasingUnsafeMutablePointer<Optional<NSError>>>, @owned Gizmoid) -> @owned Optional<Gizmoid>
   @objc init(foo: ()) throws {}
 }
diff --git a/test/SILGen/objc_extensions.swift b/test/SILGen/objc_extensions.swift
index 357c837..ed34a30 100644
--- a/test/SILGen/objc_extensions.swift
+++ b/test/SILGen/objc_extensions.swift
@@ -16,7 +16,7 @@
 
     // Make sure that we are generating the @objc thunk and are calling the actual method.
     //
-    // CHECK-LABEL: sil hidden [thunk] @$s15objc_extensions3SubC4propSSSgvgTo : $@convention(objc_method) (Sub) -> @autoreleased Optional<NSString> {
+    // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_extensions3SubC4propSSSgvgTo : $@convention(objc_method) (Sub) -> @autoreleased Optional<NSString> {
     // CHECK: bb0([[SELF:%.*]] : @unowned $Sub):
     // CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
     // CHECK: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -27,7 +27,7 @@
     // CHECK: } // end sil function '$s15objc_extensions3SubC4propSSSgvgTo'
 
     // Then check the body of the getter calls the super_method.
-    // CHECK-LABEL: sil hidden @$s15objc_extensions3SubC4propSSSgvg : $@convention(method) (@guaranteed Sub) -> @owned Optional<String> {
+    // CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions3SubC4propSSSgvg : $@convention(method) (@guaranteed Sub) -> @owned Optional<String> {
     // CHECK: bb0([[SELF:%.*]] : @guaranteed $Sub):
     // CHECK: [[SELF_COPY:%.*]] = copy_value [[SELF]]
     // CHECK: [[SELF_COPY_CAST:%.*]] = upcast [[SELF_COPY]] : $Sub to $Base
@@ -42,7 +42,7 @@
 
     // Then check the setter @objc thunk.
     //
-    // CHECK-LABEL: sil hidden [thunk] @$s15objc_extensions3SubC4propSSSgvsTo : $@convention(objc_method) (Optional<NSString>, Sub) -> () {
+    // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_extensions3SubC4propSSSgvsTo : $@convention(objc_method) (Optional<NSString>, Sub) -> () {
     // CHECK: bb0([[NEW_VALUE:%.*]] : @unowned $Optional<NSString>, [[SELF:%.*]] : @unowned $Sub):
     // CHECK:   [[NEW_VALUE_COPY:%.*]] = copy_value [[NEW_VALUE]]
     // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Sub
@@ -59,7 +59,7 @@
 
     // Then check the body of the actually setter value and make sure that we
     // call the didSet function.
-    // CHECK-LABEL: sil hidden @$s15objc_extensions3SubC4propSSSgvs : $@convention(method) (@owned Optional<String>, @guaranteed Sub) -> () {
+    // CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions3SubC4propSSSgvs : $@convention(method) (@owned Optional<String>, @guaranteed Sub) -> () {
 
     // First we get the old value.
     // CHECK: bb0([[NEW_VALUE:%.*]] : @owned $Optional<String>, [[SELF:%.*]] : @guaranteed $Sub):
@@ -105,7 +105,7 @@
   @objc override func objCBaseMethod() {}
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_extensions20testOverridePropertyyyAA3SubCF
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions20testOverridePropertyyyAA3SubCF
 func testOverrideProperty(_ obj: Sub) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Sub):
   // CHECK: = objc_method [[ARG]] : $Sub, #Sub.prop!setter.1.foreign : (Sub) -> (String?) -> ()
@@ -114,10 +114,10 @@
 
 testOverrideProperty(Sub())
 
-// CHECK-LABEL: sil shared [thunk] @$s15objc_extensions3SubC3fooyyFTc
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s15objc_extensions3SubC3fooyyFTc
 // CHECK:         function_ref @$s15objc_extensions3SubC3fooyyFTD
 // CHECK: } // end sil function '$s15objc_extensions3SubC3fooyyFTc'
-// CHECK:       sil shared [transparent] [serializable] [thunk] @$s15objc_extensions3SubC3fooyyFTD
+// CHECK:       sil shared [transparent] [serializable] [thunk] [ossa] @$s15objc_extensions3SubC3fooyyFTD
 // CHECK:       bb0([[SELF:%.*]] : @guaranteed $Sub):
 // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
 // CHECK:         objc_method [[SELF_COPY]] : $Sub, #Sub.foo!1.foreign
@@ -134,7 +134,7 @@
 }
 
 class SubSub : Sub {
-  // CHECK-LABEL: sil hidden @$s15objc_extensions03SubC0C14objCBaseMethodyyF :
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions03SubC0C14objCBaseMethodyyF :
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $SubSub):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:   [[UPCAST_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $SubSub to $Sub
@@ -149,7 +149,7 @@
 }
 
 extension SubSub {
-  // CHECK-LABEL: sil hidden @$s15objc_extensions03SubC0C9otherPropSSvs
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions03SubC0C9otherPropSSvs
   // CHECK: bb0([[NEW_VALUE:%.*]] : @owned $String, [[SELF:%.*]] : @guaranteed $SubSub):
   // CHECK:   [[SELF_COPY_1:%.*]] = copy_value [[SELF]]
   // CHECK:   [[UPCAST_SELF_COPY_1:%.*]] = upcast [[SELF_COPY_1]] : $SubSub to $Sub
@@ -177,7 +177,7 @@
   fileprivate static var x = 1
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_extensions19testStaticVarAccessyyF
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_extensions19testStaticVarAccessyyF
 func testStaticVarAccess() {
   // CHECK: [[F:%.*]] = function_ref @$sSo4BaseC15objc_extensionsE1x33_1F05E59585E0BB585FCA206FBFF1A92DLLSivau
   // CHECK: [[PTR:%.*]] = apply [[F]]()
diff --git a/test/SILGen/objc_factory_init.swift b/test/SILGen/objc_factory_init.swift
index ce2944a..5d5777c 100644
--- a/test/SILGen/objc_factory_init.swift
+++ b/test/SILGen/objc_factory_init.swift
@@ -5,7 +5,7 @@
 import Foundation
 import ImportAsMember.Class
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo4HiveC5queenABSgSo3BeeCSg_tcfCTO : $@convention(method) (@owned Optional<Bee>, @thick Hive.Type) -> @owned Optional<Hive>
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo4HiveC5queenABSgSo3BeeCSg_tcfCTO : $@convention(method) (@owned Optional<Bee>, @thick Hive.Type) -> @owned Optional<Hive>
 func testInstanceTypeFactoryMethod(queen: Bee) {
   // CHECK: bb0([[QUEEN:%[0-9]+]] : @owned $Optional<Bee>, [[HIVE_META:%[0-9]+]] : $@thick Hive.Type):
   // CHECK-NEXT:   [[HIVE_META_OBJC:%[0-9]+]] = thick_to_objc_metatype [[HIVE_META]] : $@thick Hive.Type to $@objc_metatype Hive.Type
@@ -21,7 +21,7 @@
   // not a convenience initializer, which means it does not have an initializing
   // entry point at all.
 
-  // CHECK-LABEL: sil hidden @$sSo4HiveC17objc_factory_initE10otherQueenABSo3BeeC_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo4HiveC17objc_factory_initE10otherQueenABSo3BeeC_tcfC
   // CHECK: bb0([[QUEEN:%.*]] : @owned $Bee, [[META:%.*]] : $@thick Hive.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var Hive }, let, name "self"
   // CHECK:   [[MU:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
@@ -45,7 +45,7 @@
 }
 
 extension SomeClass {
-  // CHECK-LABEL: sil hidden @$sSo12IAMSomeClassC17objc_factory_initE6doubleABSd_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo12IAMSomeClassC17objc_factory_initE6doubleABSd_tcfC
   // CHECK: bb0([[DOUBLE:%.*]] : $Double,
   // CHECK-NOT: value_metatype
   // CHECK: [[FNREF:%[0-9]+]] = function_ref @MakeIAMSomeClass
@@ -56,7 +56,7 @@
 }
 
 class SubHive : Hive {
-  // CHECK-LABEL: sil hidden @$s17objc_factory_init7SubHiveC20delegatesToInheritedACyt_tcfC
+  // CHECK-LABEL: sil hidden [ossa] @$s17objc_factory_init7SubHiveC20delegatesToInheritedACyt_tcfC
   // CHECK: bb0([[METATYPE:%.*]] : $@thick SubHive.Type):
   // CHECK:   [[SELF_BOX:%.*]] = alloc_box ${ var SubHive }, let, name "self"
   // CHECK:   [[MU:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]] : ${ var SubHive }
diff --git a/test/SILGen/objc_final.swift b/test/SILGen/objc_final.swift
index 172caba..15426af 100644
--- a/test/SILGen/objc_final.swift
+++ b/test/SILGen/objc_final.swift
@@ -6,14 +6,14 @@
 
 final class Foo {
   @objc func foo() {}
-  // CHECK-LABEL: sil hidden [thunk] @$s10objc_final3FooC3foo{{[_0-9a-zA-Z]*}}FTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s10objc_final3FooC3foo{{[_0-9a-zA-Z]*}}FTo
 
   @objc var prop: Int = 0
-  // CHECK-LABEL: sil hidden [transparent] [thunk] @$s10objc_final3FooC4propSivgTo
-  // CHECK-LABEL: sil hidden [transparent] [thunk] @$s10objc_final3FooC4propSivsTo
+  // CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s10objc_final3FooC4propSivgTo
+  // CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s10objc_final3FooC4propSivsTo
 }
 
-// CHECK-LABEL: sil hidden @$s10objc_final7callFooyyAA0D0CF
+// CHECK-LABEL: sil hidden [ossa] @$s10objc_final7callFooyyAA0D0CF
 func callFoo(_ x: Foo) {
   // Calls to the final @objc method statically reference the native entry
   // point.
diff --git a/test/SILGen/objc_generic_class.swift b/test/SILGen/objc_generic_class.swift
index 8c9e655..696ac46 100644
--- a/test/SILGen/objc_generic_class.swift
+++ b/test/SILGen/objc_generic_class.swift
@@ -8,16 +8,16 @@
 // to ObjC yet, a generic subclass of an ObjC class must still use ObjC
 // deallocation.
 
-// CHECK-NOT: sil hidden @$sSo7GenericCfd
-// CHECK-NOT: sil hidden @$sSo8NSObjectCfd
+// CHECK-NOT: sil hidden [ossa] @$sSo7GenericCfd
+// CHECK-NOT: sil hidden [ossa] @$sSo8NSObjectCfd
 
 class Generic<T>: NSObject {
   var x: Int = 10
 
-  // CHECK-LABEL: sil hidden @$s18objc_generic_class7GenericCfD : $@convention(method) <T> (@owned Generic<T>) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s18objc_generic_class7GenericCfD : $@convention(method) <T> (@owned Generic<T>) -> () {
   // CHECK:       bb0({{%.*}} : @owned $Generic<T>):
   // CHECK: } // end sil function '$s18objc_generic_class7GenericCfD'
-  // CHECK-LABEL: sil hidden [thunk] @$s18objc_generic_class7GenericCfDTo : $@convention(objc_method) <T> (Generic<T>) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s18objc_generic_class7GenericCfDTo : $@convention(objc_method) <T> (Generic<T>) -> () {
   // CHECK:       bb0([[SELF:%.*]] : @unowned $Generic<T>):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[NATIVE:%.*]] = function_ref @$s18objc_generic_class7GenericCfD
@@ -30,10 +30,10 @@
   }
 }
 
-// CHECK-NOT: sil hidden @$s18objc_generic_class7GenericCfd
-// CHECK-NOT: sil hidden @$sSo8NSObjectCfd
+// CHECK-NOT: sil hidden [ossa] @$s18objc_generic_class7GenericCfd
+// CHECK-NOT: sil hidden [ossa] @$sSo8NSObjectCfd
 
-// CHECK-LABEL: sil hidden @$s18objc_generic_class11SubGeneric1CfD : $@convention(method) <U, V> (@owned SubGeneric1<U, V>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s18objc_generic_class11SubGeneric1CfD : $@convention(method) <U, V> (@owned SubGeneric1<U, V>) -> () {
 // CHECK:       bb0([[SELF:%.*]] : @owned $SubGeneric1<U, V>):
 // CHECK:         [[SUPER_DEALLOC:%.*]] = objc_super_method [[SELF]] : $SubGeneric1<U, V>, #Generic.deinit!deallocator.1.foreign : <T> (Generic<T>) -> () -> (), $@convention(objc_method) <τ_0_0> (Generic<τ_0_0>) -> ()
 // CHECK:         [[SUPER:%.*]] = upcast [[SELF:%.*]] : $SubGeneric1<U, V> to $Generic<Int>
diff --git a/test/SILGen/objc_imported_generic.swift b/test/SILGen/objc_imported_generic.swift
index 72b96b8..a0a741a 100644
--- a/test/SILGen/objc_imported_generic.swift
+++ b/test/SILGen/objc_imported_generic.swift
@@ -11,21 +11,21 @@
   _ = GenericClass(thing: NSObject())
 }
 
-// CHECK-LABEL: sil shared [serializable] @$sSo12GenericClassC5thingAByxGSgxSg_tcfC
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo12GenericClassC5thingAByxGSgxSg_tcfC
 // CHECK:         thick_to_objc_metatype {{%.*}} : $@thick GenericClass<T>.Type to $@objc_metatype GenericClass<T>.Type
 
 public func genericMethodOnAnyObject(o: AnyObject, b: Bool) -> AnyObject {
   return o.thing!()!
 }
 
-// CHECK-LABEL: sil @$s21objc_imported_generic0C17MethodOnAnyObject{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic0C17MethodOnAnyObject{{[_0-9a-zA-Z]*}}F
 // CHECK:         objc_method {{%.*}} : $@opened([[TAG:.*]]) AnyObject, #GenericClass.thing!1.foreign : <T where T : AnyObject> (GenericClass<T>) -> () -> T?, $@convention(objc_method) (@opened([[TAG]]) AnyObject) -> @autoreleased Optional<AnyObject>
 
 public func genericMethodOnAnyObjectChained(o: AnyObject, b: Bool) -> AnyObject? {
   return o.thing?()
 }
 
-// CHECK-LABEL: sil @$s21objc_imported_generic0C24MethodOnAnyObjectChained1o1byXlSgyXl_SbtF
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic0C24MethodOnAnyObjectChained1o1byXlSgyXl_SbtF
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject, [[BOOL:%.*]] : $Bool):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -37,7 +37,7 @@
   return o[0 as UInt16]
 }
 
-// CHECK-LABEL: sil @$s21objc_imported_generic0C20SubscriptOnAnyObject1o1byXlSgyXl_SbtF
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic0C20SubscriptOnAnyObject1o1byXlSgyXl_SbtF
 // CHECK: bb0([[ANY:%.*]]
 // CHCEK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -49,7 +49,7 @@
   return o.propertyThing
 }
 
-// CHECK-LABEL: sil @$s21objc_imported_generic0C19PropertyOnAnyObject1o1byXlSgSgyXl_SbtF
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic0C19PropertyOnAnyObject1o1byXlSgSgyXl_SbtF
 // CHECK: bb0([[ANY:%.*]] : @guaranteed $AnyObject, [[BOOL:%.*]] : $Bool):
 // CHECK:   [[OPENED_ANY:%.*]] = open_existential_ref [[ANY]]
 // CHECK:   [[OPENED_ANY_COPY:%.*]] = copy_value [[OPENED_ANY]]
@@ -79,13 +79,13 @@
   x.performBlock(onThings: block)
 }
 
-// CHECK-LABEL: sil @$s21objc_imported_generic0C13BlockBridging{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic0C13BlockBridging{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[BLOCK_TO_FUNC:%.*]] = function_ref @$sxxIeyBya_xxIeggo_21objc_imported_generic7AnsibleRzlTR
 // CHECK:         partial_apply [callee_guaranteed] [[BLOCK_TO_FUNC]]<T>
 // CHECK:         [[FUNC_TO_BLOCK:%.*]] = function_ref @$sxxIeggo_xxIeyBya_21objc_imported_generic7AnsibleRzlTR
 // CHECK:         init_block_storage_header {{.*}} invoke [[FUNC_TO_BLOCK]]<T>
 
-// CHECK-LABEL: sil @$s21objc_imported_generic20arraysOfGenericParam{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil [ossa] @$s21objc_imported_generic20arraysOfGenericParam{{[_0-9a-zA-Z]*}}F
 public func arraysOfGenericParam<T: AnyObject>(y: Array<T>) {
   // CHECK:         function_ref @$sSo12GenericClassC13arrayOfThingsAByxGSgSayxG_tcfC : $@convention(method) <τ_0_0 where τ_0_0 : AnyObject> (@owned Array<τ_0_0>, @thick GenericClass<τ_0_0>.Type) -> @owned Optional<GenericClass<τ_0_0>>
   let x = GenericClass<T>(arrayOfThings: y)!
@@ -97,7 +97,7 @@
   x.propertyArrayOfThings = y
 }
 
-// CHECK-LABEL: sil private @$s21objc_imported_generic0C4FuncyyxmRlzClFyycfU_ : $@convention(thin) <V where V : AnyObject> () -> () {
+// CHECK-LABEL: sil private [ossa] @$s21objc_imported_generic0C4FuncyyxmRlzClFyycfU_ : $@convention(thin) <V where V : AnyObject> () -> () {
 // CHECK:  [[META:%.*]] = metatype $@thick GenericClass<V>.Type
 // CHECK:  [[INIT:%.*]] = function_ref @$sSo12GenericClassCAByxGycfC : $@convention(method) <τ_0_0 where τ_0_0 : AnyObject> (@thick GenericClass<τ_0_0>.Type) -> @owned GenericClass<τ_0_0>
 // CHECK:  apply [[INIT]]<V>([[META]])
@@ -108,7 +108,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s21objc_imported_generic23configureWithoutOptionsyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s21objc_imported_generic23configureWithoutOptionsyyF : $@convention(thin) () -> ()
 // CHECK: enum $Optional<Dictionary<GenericOption, Any>>, #Optional.none!enumelt
 // CHECK: return
 func configureWithoutOptions() {
@@ -117,13 +117,13 @@
 
 // This gets emitted down here for some reason
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo12GenericClassC13arrayOfThingsAByxGSgSayxG_tcfcTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo12GenericClassC13arrayOfThingsAByxGSgSayxG_tcfcTO
 // CHECK:         objc_method {{%.*}} : $GenericClass<T>, #GenericClass.init!initializer.1.foreign {{.*}}, $@convention(objc_method) @pseudogeneric <τ_0_0 where τ_0_0 : AnyObject> (NSArray, @owned GenericClass<τ_0_0>) -> @owned Optional<GenericClass<τ_0_0>>
 
 // foreign to native thunk for init(options:), uses GenericOption : Hashable
 // conformance
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo12GenericClassC7optionsAByxGSgSDySo0A6OptionaypGSg_tcfcTO : $@convention(method) <T where T : AnyObject> (@owned Optional<Dictionary<GenericOption, Any>>, @owned GenericClass<T>) -> @owned Optional<GenericClass<T>>
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo12GenericClassC7optionsAByxGSgSDySo0A6OptionaypGSg_tcfcTO : $@convention(method) <T where T : AnyObject> (@owned Optional<Dictionary<GenericOption, Any>>, @owned GenericClass<T>) -> @owned Optional<GenericClass<T>>
 // CHECK: [[FN:%.*]] = function_ref @$sSD10FoundationE19_bridgeToObjectiveCSo12NSDictionaryCyF : $@convention(method) <τ_0_0, τ_0_1 where τ_0_0 : Hashable> (@guaranteed Dictionary<τ_0_0, τ_0_1>) -> @owned NSDictionary
 // CHECK: apply [[FN]]<GenericOption, Any>({{.*}}) : $@convention(method) <τ_0_0, τ_0_1 where τ_0_0 : Hashable> (@guaranteed Dictionary<τ_0_0, τ_0_1>) -> @owned NSDictionary
 // CHECK: return
diff --git a/test/SILGen/objc_imported_init.swift b/test/SILGen/objc_imported_init.swift
index 77bec2b..3ddb95e 100644
--- a/test/SILGen/objc_imported_init.swift
+++ b/test/SILGen/objc_imported_init.swift
@@ -4,7 +4,7 @@
 
 // Ensure we emit allocating constructor thunks for ObjC initializers that
 // were inherited.
-// CHECK-LABEL: sil shared [serializable] @$sSo3FooCABycfC : $@convention(method) (@thick Foo.Type) -> @owned Foo {
+// CHECK-LABEL: sil shared [serializable] [ossa] @$sSo3FooCABycfC : $@convention(method) (@thick Foo.Type) -> @owned Foo {
 func foo() {
   _ = Foo()
 }
diff --git a/test/SILGen/objc_init_ref_delegation.swift b/test/SILGen/objc_init_ref_delegation.swift
index e58fb57..de635cc 100644
--- a/test/SILGen/objc_init_ref_delegation.swift
+++ b/test/SILGen/objc_init_ref_delegation.swift
@@ -3,7 +3,7 @@
 import gizmo
 
 extension Gizmo {
-  // CHECK-LABEL: sil hidden @$sSo5GizmoC24objc_init_ref_delegationE{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$sSo5GizmoC24objc_init_ref_delegationE{{[_0-9a-zA-Z]*}}fC
   convenience init(int i: Int) {
     // CHECK: bb0([[I:%[0-9]+]] : $Int, [[SELF_META:%[0-9]+]] : $@thick Gizmo.Type):
     // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box ${ var Gizmo }
diff --git a/test/SILGen/objc_local.swift b/test/SILGen/objc_local.swift
index 009f7dd..aa9ce20 100644
--- a/test/SILGen/objc_local.swift
+++ b/test/SILGen/objc_local.swift
@@ -5,7 +5,7 @@
 import Foundation
 
 func foo() {
-  // CHECK-LABEL: sil private [thunk] @$s10objc_local3fooyyF3FooL_C1xSivgTo
-  // CHECK-LABEL: sil private [thunk] @$s10objc_local3fooyyF3FooL_C1xSivsTo
+  // CHECK-LABEL: sil private [thunk] [ossa] @$s10objc_local3fooyyF3FooL_C1xSivgTo
+  // CHECK-LABEL: sil private [thunk] [ossa] @$s10objc_local3fooyyF3FooL_C1xSivsTo
   class Foo : NSObject { @objc var x: Int = 0 }
 }
diff --git a/test/SILGen/objc_metatypes.swift b/test/SILGen/objc_metatypes.swift
index 6966638..667bdf2 100644
--- a/test/SILGen/objc_metatypes.swift
+++ b/test/SILGen/objc_metatypes.swift
@@ -5,9 +5,9 @@
 @objc class ObjCClass {}
 
 class A {
-  // CHECK-LABEL: sil hidden @$s14objc_metatypes1AC3foo{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s14objc_metatypes1AC3foo{{[_0-9a-zA-Z]*}}F
 
-  // CHECK-LABEL: sil hidden [thunk] @$s14objc_metatypes1AC3fooyAA9ObjCClassCmAFmFTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_metatypes1AC3fooyAA9ObjCClassCmAFmFTo
   @objc dynamic func foo(_ m: ObjCClass.Type) -> ObjCClass.Type {
     // CHECK: bb0([[M:%[0-9]+]] : $@objc_metatype ObjCClass.Type, [[SELF:%[0-9]+]] : @unowned $A):
     // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $A
@@ -23,9 +23,9 @@
     return m
   }
 
-  // CHECK-LABEL: sil hidden @$s14objc_metatypes1AC3bar{{[_0-9a-zA-Z]*}}FZ
+  // CHECK-LABEL: sil hidden [ossa] @$s14objc_metatypes1AC3bar{{[_0-9a-zA-Z]*}}FZ
 
-  // CHECK-LABEL: sil hidden [thunk] @$s14objc_metatypes1AC3bar{{[_0-9a-zA-Z]*}}FZTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_metatypes1AC3bar{{[_0-9a-zA-Z]*}}FZTo
   // CHECK: bb0([[SELF:%[0-9]+]] : $@objc_metatype A.Type):
   // CHECK-NEXT:   [[OBJC_SELF:%[0-9]+]] = objc_to_thick_metatype [[SELF]] : $@objc_metatype A.Type to $@thick A.Type
   // CHECK:   [[BAR:%[0-9]+]] = function_ref @$s14objc_metatypes1AC3bar{{[_0-9a-zA-Z]*}}FZ
@@ -35,7 +35,7 @@
 
   @objc dynamic func takeGizmo(_ g: Gizmo.Type) { }
 
-  // CHECK-LABEL: sil hidden @$s14objc_metatypes1AC7callFoo{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s14objc_metatypes1AC7callFoo{{[_0-9a-zA-Z]*}}F
   func callFoo() {
     // Make sure we peephole Type/thick_to_objc_metatype.
     // CHECK-NOT: thick_to_objc_metatype
diff --git a/test/SILGen/objc_ownership_conventions.swift b/test/SILGen/objc_ownership_conventions.swift
index 3a8cde7..d89c161 100644
--- a/test/SILGen/objc_ownership_conventions.swift
+++ b/test/SILGen/objc_ownership_conventions.swift
@@ -2,7 +2,7 @@
 
 import gizmo
 
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test3So8NSObjectCyF
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test3So8NSObjectCyF
 func test3() -> NSObject {
   // initializer returns at +1
   return Gizmo()
@@ -12,7 +12,7 @@
   // CHECK: [[GIZMO_NS:%[0-9]+]] = upcast [[GIZMO:%[0-9]+]] : $Gizmo to $NSObject
   // CHECK: return [[GIZMO_NS]] : $NSObject
 
-  // CHECK-LABEL: sil shared [serializable] @$sSo5GizmoC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick Gizmo.Type) -> @owned Optional<Gizmo>
+  // CHECK-LABEL: sil shared [serializable] [ossa] @$sSo5GizmoC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@thick Gizmo.Type) -> @owned Optional<Gizmo>
   // alloc is implicitly ns_returns_retained
   // init is implicitly ns_consumes_self and ns_returns_retained
   // CHECK: bb0([[GIZMO_META:%[0-9]+]] : $@thick Gizmo.Type):
@@ -27,7 +27,7 @@
 
 
 // Normal message send with argument, no transfers.
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test5{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test5{{[_0-9a-zA-Z]*}}F
 func test5(_ g: Gizmo) {
   var g = g
   Gizmo.inspect(g)
@@ -49,7 +49,7 @@
 // CHECK: } // end sil function '$s26objc_ownership_conventions5test5{{[_0-9a-zA-Z]*}}F'
 
 // The argument to consume is __attribute__((ns_consumed)).
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test6{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test6{{[_0-9a-zA-Z]*}}F
 func test6(_ g: Gizmo) {
   var g = g
   Gizmo.consume(g)
@@ -73,7 +73,7 @@
 // CHECK: } // end sil function '$s26objc_ownership_conventions5test6{{[_0-9a-zA-Z]*}}F'
 
 // fork is __attribute__((ns_consumes_self)).
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test7{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test7{{[_0-9a-zA-Z]*}}F
 func test7(_ g: Gizmo) {
   var g = g
   g.fork()
@@ -95,7 +95,7 @@
 // CHECK: } // end sil function '$s26objc_ownership_conventions5test7{{[_0-9a-zA-Z]*}}F'
 
 // clone is __attribute__((ns_returns_retained)).
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test8{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test8{{[_0-9a-zA-Z]*}}F
 func test8(_ g: Gizmo) -> Gizmo {
   return g.clone()
   // CHECK: bb0([[G:%.*]] : @guaranteed $Gizmo):
@@ -108,7 +108,7 @@
   // CHECK-NEXT: return [[RESULT]]
 }
 // duplicate returns an autoreleased object at +0.
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions5test9{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions5test9{{[_0-9a-zA-Z]*}}F
 func test9(_ g: Gizmo) -> Gizmo {
   return g.duplicate()
   // CHECK: bb0([[G:%.*]] : @guaranteed $Gizmo):
@@ -122,7 +122,7 @@
   // CHECK-NEXT: return [[RESULT]]
 }
 
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions6test10{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions6test10{{[_0-9a-zA-Z]*}}F
 func test10(_ g: Gizmo) -> AnyClass {
   // CHECK: bb0([[G:%[0-9]+]] : @guaranteed $Gizmo):
   // CHECK:      [[G_COPY:%.*]] = copy_value [[G]]
@@ -143,7 +143,7 @@
   return g.classProp
 }
 
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions6test11{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions6test11{{[_0-9a-zA-Z]*}}F
 func test11(_ g: Gizmo) -> AnyClass {
   // CHECK: bb0([[G:%[0-9]+]] : @guaranteed $Gizmo):
   // CHECK: [[G_COPY:%.*]] = copy_value [[G]]
@@ -168,7 +168,7 @@
 
 // ObjC blocks should have cdecl calling convention and follow C/ObjC
 // ownership conventions, where the callee, arguments, and return are all +0.
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions10applyBlock{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions10applyBlock{{[_0-9a-zA-Z]*}}F
 func applyBlock(_ f: @convention(block) (Gizmo) -> Gizmo, x: Gizmo) -> Gizmo {
   // CHECK:     bb0([[BLOCK:%.*]] : @guaranteed $@convention(block) @noescape (Gizmo) -> @autoreleased Gizmo, [[ARG:%.*]] : @guaranteed $Gizmo):
   // CHECK:       [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
@@ -184,7 +184,7 @@
   return f(x)
 }
 
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions15maybeApplyBlock{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions15maybeApplyBlock{{[_0-9a-zA-Z]*}}F
 func maybeApplyBlock(_ f: (@convention(block) (Gizmo) -> Gizmo)?, x: Gizmo) -> Gizmo? {
   // CHECK:     bb0([[BLOCK:%.*]] : @guaranteed $Optional<@convention(block) (Gizmo) -> @autoreleased Gizmo>, [[ARG:%.*]] : @guaranteed $Gizmo):
   // CHECK:       [[BLOCK_COPY:%.*]] = copy_block [[BLOCK]]
@@ -194,7 +194,7 @@
 func useInnerPointer(_ p: UnsafeMutableRawPointer) {}
 
 // Handle inner-pointer methods by autoreleasing self after the call.
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions18innerPointerMethodyySo5GizmoCF : $@convention(thin) (@guaranteed Gizmo) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions18innerPointerMethodyySo5GizmoCF : $@convention(thin) (@guaranteed Gizmo) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Gizmo):
 // CHECK:         [[METHOD:%.*]] = objc_method [[ARG]] : $Gizmo, #Gizmo.getBytes!1.foreign : (Gizmo) -> () -> UnsafeMutableRawPointer, $@convention(objc_method) (Gizmo) -> @unowned_inner_pointer UnsafeMutableRawPointer
 // CHECK:         [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -209,7 +209,7 @@
   useInnerPointer(g.getBytes())
 }
 
-// CHECK-LABEL: sil hidden @$s26objc_ownership_conventions20innerPointerPropertyyySo5GizmoCF : $@convention(thin) (@guaranteed Gizmo) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s26objc_ownership_conventions20innerPointerPropertyyySo5GizmoCF : $@convention(thin) (@guaranteed Gizmo) -> () {
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $Gizmo):
 // CHECK:         [[METHOD:%.*]] = objc_method [[ARG]] : $Gizmo, #Gizmo.innerProperty!getter.1.foreign : (Gizmo) -> () -> UnsafeMutableRawPointer, $@convention(objc_method) (Gizmo) -> @unowned_inner_pointer UnsafeMutableRawPointer
 // CHECK:         [[ARG_COPY:%.*]] = copy_value [[ARG]]
diff --git a/test/SILGen/objc_properties.swift b/test/SILGen/objc_properties.swift
index 2361d38..db29e87 100644
--- a/test/SILGen/objc_properties.swift
+++ b/test/SILGen/objc_properties.swift
@@ -14,7 +14,7 @@
   }
 
   // Regular methods go through the @objc property accessors.
-  // CHECK-LABEL: sil hidden @$s15objc_properties1AC6method{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1AC6method{{[_0-9a-zA-Z]*}}F
   // CHECK: objc_method {{.*}} #A.prop
   func method(_ x: Int) {
     prop = x
@@ -23,7 +23,7 @@
 
   // Initializers and destructors always directly access stored properties, even
   // when they are @objc.
-  // CHECK-LABEL: sil hidden @$s15objc_properties1AC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1AC{{[_0-9a-zA-Z]*}}fc
   // CHECK-NOT: class_method {{.*}} #A.prop
   init() {
     prop = 5
@@ -33,7 +33,7 @@
 
   // rdar://15858869 - However, direct access only applies to (implicit or
   // explicit) 'self' ivar references, not ALL ivar refs.
-  // CHECK-LABEL: sil hidden @$s15objc_properties1AC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1AC{{[_0-9a-zA-Z]*}}fc
   // CHECK: bb0(%0 : @owned $A, %1 : $Int, [[OLD_SELF:%.*]] : @owned $A):
   // CHECK: [[SELF:%[0-9]+]] = mark_uninitialized [rootself] [[OLD_SELF]] : $A
   init(other : A, x : Int) {
@@ -50,7 +50,7 @@
     other.prop = x
   }
 
-  // CHECK-LABEL: sil hidden @$s15objc_properties1ACfd : $@convention(method) (@guaranteed A) -> @owned Builtin.NativeObject {
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1ACfd : $@convention(method) (@guaranteed A) -> @owned Builtin.NativeObject {
   // CHECK-NOT:     class_method {{.*}} #A.prop
   // CHECK:       }
   deinit {
@@ -60,25 +60,25 @@
 
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_properties11testPropGet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties11testPropGet{{[_0-9a-zA-Z]*}}F
 func testPropGet(_ a: A) -> Int {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.prop!getter.1.foreign : (A) -> () -> Int, $@convention(objc_method) (A) -> Int
   return a.prop
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_properties11testPropSet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties11testPropSet{{[_0-9a-zA-Z]*}}F
 func testPropSet(_ a: A, i: Int) {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.prop!setter.1.foreign : (A) -> (Int) -> (), $@convention(objc_method) (Int, A) -> ()
   a.prop = i
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_properties19testComputedPropGet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties19testComputedPropGet{{[_0-9a-zA-Z]*}}F
 func testComputedPropGet(_ a: A) -> Int {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.computedProp!getter.1.foreign : (A) -> () -> Int, $@convention(objc_method) (A) -> Int
   return a.computedProp
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_properties19testComputedPropSet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties19testComputedPropSet{{[_0-9a-zA-Z]*}}F
 func testComputedPropSet(_ a: A, i: Int) {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.computedProp!setter.1.foreign : (A) -> (Int) -> (), $@convention(objc_method) (Int, A) -> ()
   a.computedProp = i
@@ -87,12 +87,12 @@
 // 'super' property references.
 class B : A {
   @objc override var computedProp: Int {
-    // CHECK-LABEL: sil hidden @$s15objc_properties1BC12computedPropSivg : $@convention(method) (@guaranteed B) -> Int
+    // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1BC12computedPropSivg : $@convention(method) (@guaranteed B) -> Int
     get {
       // CHECK: objc_super_method [[SELF:%[0-9]+]] : $B, #A.computedProp!getter.1.foreign : (A) -> () -> Int, $@convention(objc_method) (A) -> Int
       return super.computedProp
     }
-    // CHECK-LABEL: sil hidden @$s15objc_properties1BC12computedPropSivs : $@convention(method) (Int, @guaranteed B) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties1BC12computedPropSivs : $@convention(method) (Int, @guaranteed B) -> ()
     set(value) {
       // CHECK: objc_super_method [[SELF:%[0-9]+]] : $B, #A.computedProp!setter.1.foreign : (A) -> (Int) -> (), $@convention(objc_method) (Int, A) -> ()
       super.computedProp = value
@@ -103,7 +103,7 @@
 
 // Test the @NSCopying attribute.
 class TestNSCopying {
-  // CHECK-LABEL: sil hidden [transparent] @$s15objc_properties13TestNSCopyingC8propertySo8NSStringCvs : $@convention(method) (@owned NSString, @guaranteed TestNSCopying) -> ()
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s15objc_properties13TestNSCopyingC8propertySo8NSStringCvs : $@convention(method) (@owned NSString, @guaranteed TestNSCopying) -> ()
   // CHECK: bb0([[ARG0:%.*]] : @owned $NSString, [[ARG1:%.*]] : @guaranteed $TestNSCopying):
   // CHECK:   [[BORROWED_ARG0:%.*]] = begin_borrow [[ARG0]]
   // CHECK:   objc_method [[BORROWED_ARG0]] : $NSString, #NSString.copy!1.foreign
@@ -135,29 +135,29 @@
 }
 
 class Singleton : NSObject {
-  // CHECK-DAG: sil hidden @$s15objc_properties9SingletonC14sharedInstanceACvgZ : $@convention(method) (@thick Singleton.Type) -> @owned Singleton
-  // CHECK-DAG: sil hidden [thunk] @$s15objc_properties9SingletonC14sharedInstanceACvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> @autoreleased Singleton {
+  // CHECK-DAG: sil hidden [ossa] @$s15objc_properties9SingletonC14sharedInstanceACvgZ : $@convention(method) (@thick Singleton.Type) -> @owned Singleton
+  // CHECK-DAG: sil hidden [thunk] [ossa] @$s15objc_properties9SingletonC14sharedInstanceACvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> @autoreleased Singleton {
   @objc static let sharedInstance = Singleton()
 
-  // CHECK-DAG: sil hidden @$s15objc_properties9SingletonC1iSivgZ : $@convention(method) (@thick Singleton.Type) -> Int
-  // CHECK-DAG: sil hidden [thunk] @$s15objc_properties9SingletonC1iSivgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> Int
+  // CHECK-DAG: sil hidden [ossa] @$s15objc_properties9SingletonC1iSivgZ : $@convention(method) (@thick Singleton.Type) -> Int
+  // CHECK-DAG: sil hidden [thunk] [ossa] @$s15objc_properties9SingletonC1iSivgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> Int
   @objc static let i = 2
 
-  // CHECK-DAG: sil hidden @$s15objc_properties9SingletonC1jSSvgZ : $@convention(method) (@thick Singleton.Type) -> @owned String
-  // CHECK-DAG: sil hidden [thunk] @$s15objc_properties9SingletonC1jSSvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> @autoreleased NSString
-  // CHECK-DAG: sil hidden @$s15objc_properties9SingletonC1jSSvsZ : $@convention(method) (@owned String, @thick Singleton.Type) -> ()
-  // CHECK-DAG: sil hidden [thunk] @$s15objc_properties9SingletonC1jSSvsZTo : $@convention(objc_method) (NSString, @objc_metatype Singleton.Type) -> ()
+  // CHECK-DAG: sil hidden [ossa] @$s15objc_properties9SingletonC1jSSvgZ : $@convention(method) (@thick Singleton.Type) -> @owned String
+  // CHECK-DAG: sil hidden [thunk] [ossa] @$s15objc_properties9SingletonC1jSSvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> @autoreleased NSString
+  // CHECK-DAG: sil hidden [ossa] @$s15objc_properties9SingletonC1jSSvsZ : $@convention(method) (@owned String, @thick Singleton.Type) -> ()
+  // CHECK-DAG: sil hidden [thunk] [ossa] @$s15objc_properties9SingletonC1jSSvsZTo : $@convention(objc_method) (NSString, @objc_metatype Singleton.Type) -> ()
   @objc static var j = "Hello"
 
-  // CHECK-DAG: sil hidden [thunk] @$s15objc_properties9SingletonC1kSdvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> Double
-  // CHECK-DAG: sil hidden @$s15objc_properties9SingletonC1kSdvgZ : $@convention(method) (@thick Singleton.Type) -> Double
+  // CHECK-DAG: sil hidden [thunk] [ossa] @$s15objc_properties9SingletonC1kSdvgZTo : $@convention(objc_method) (@objc_metatype Singleton.Type) -> Double
+  // CHECK-DAG: sil hidden [ossa] @$s15objc_properties9SingletonC1kSdvgZ : $@convention(method) (@thick Singleton.Type) -> Double
   @objc static var k: Double {
     return 7.7
   }
 }
 
 class HasUnmanaged : NSObject {
-  // CHECK-LABEL: sil hidden [thunk] @$s15objc_properties12HasUnmanagedC3refs0D0VyyXlGSgvgTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_properties12HasUnmanagedC3refs0D0VyyXlGSgvgTo
   // CHECK: bb0([[CLS:%.*]] : @unowned $HasUnmanaged):
   // CHECK:     [[CLS_COPY:%.*]] = copy_value [[CLS]]
   // CHECK:     [[BORROWED_CLS_COPY:%.*]] = begin_borrow [[CLS_COPY]]
@@ -170,7 +170,7 @@
   // CHECK:     return [[RESULT]] : $Optional<Unmanaged<AnyObject>>
   // CHECK: } // end sil function '$s15objc_properties12HasUnmanagedC3refs0D0VyyXlGSgvgTo'
 
-  // CHECK-LABEL: sil hidden [thunk] @$s15objc_properties12HasUnmanagedC3refs0D0VyyXlGSgvsTo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_properties12HasUnmanagedC3refs0D0VyyXlGSgvsTo
   // CHECK: bb0([[NEW_VALUE:%.*]] : $Optional<Unmanaged<AnyObject>>, [[SELF:%.*]] : @unowned $HasUnmanaged):
   // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value [[SELF]] : $HasUnmanaged
   // CHECK-NEXT: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -194,7 +194,7 @@
     property = newValue
   }
 
-  // CHECK-LABEL: sil hidden @$s15objc_properties016NonObjCClassWithD9CPropertyC11usePropertyyyF : $@convention(method) (@guaranteed NonObjCClassWithObjCProperty) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s15objc_properties016NonObjCClassWithD9CPropertyC11usePropertyyyF : $@convention(method) (@guaranteed NonObjCClassWithObjCProperty) -> () {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $NonObjCClassWithObjCProperty):
   // CHECK: [[MODIFY:%.*]] = class_method [[ARG]] : $NonObjCClassWithObjCProperty, #NonObjCClassWithObjCProperty.property!modify.1
   // CHECK: ([[OBJECT:%.*]], [[TOKEN:%.*]]) = begin_apply [[MODIFY]]([[ARG]])
@@ -222,8 +222,8 @@
   }
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s15objc_properties12ObjCSubclassC8propertySivgTo
-// CHECK-LABEL: sil hidden [thunk] @$s15objc_properties12ObjCSubclassC8propertySivsTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_properties12ObjCSubclassC8propertySivgTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s15objc_properties12ObjCSubclassC8propertySivsTo
 
 // Make sure lazy properties that witness @objc protocol requirements are
 // correctly formed
@@ -242,13 +242,13 @@
   lazy var window = self.instanceMethod()
 }
 
-// CHECK-LABEL: sil hidden @$s15objc_properties15HasLazyPropertyC6windowSo8NSObjectCSgvg : $@convention(method) (@guaranteed HasLazyProperty) -> @owned Optional<NSObject> {
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties15HasLazyPropertyC6windowSo8NSObjectCSgvg : $@convention(method) (@guaranteed HasLazyProperty) -> @owned Optional<NSObject> {
 // CHECK: class_method %0 : $HasLazyProperty, #HasLazyProperty.instanceMethod!1 : (HasLazyProperty) -> () -> NSObject?
 // CHECK: return
 
 //   The way we import this setter splits the name into the parameter list,
 //   which can cause fits for SILGenApply the way it's currently implemented.
-// CHECK-LABEL: sil hidden @$s15objc_properties26testPropSetWithPreposition
+// CHECK-LABEL: sil hidden [ossa] @$s15objc_properties26testPropSetWithPreposition
 func testPropSetWithPreposition(object: ObjectWithSplitProperty?) {
   // CHECK: #ObjectWithSplitProperty.flagForSomething!setter.1.foreign : (ObjectWithSplitProperty) -> (Bool) -> (), $@convention(objc_method) ({{Bool|ObjCBool}}, ObjectWithSplitProperty) -> ()
   object?.flagForSomething = false
diff --git a/test/SILGen/objc_protocol_native_thunk.swift b/test/SILGen/objc_protocol_native_thunk.swift
index 97fe463..44217a4 100644
--- a/test/SILGen/objc_protocol_native_thunk.swift
+++ b/test/SILGen/objc_protocol_native_thunk.swift
@@ -11,7 +11,7 @@
   func c(_: String) {}
 }
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$s{{.*}}1P{{.*}}1p{{.*}} : $@convention(method) <Self where Self : P> (@guaranteed String, @guaranteed Self) -> ()
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$s{{.*}}1P{{.*}}1p{{.*}} : $@convention(method) <Self where Self : P> (@guaranteed String, @guaranteed Self) -> ()
 func foo(x: Bool, y: C & P) -> (String) -> () {
   return x ? y.c : y.p
 }
diff --git a/test/SILGen/objc_protocols.swift b/test/SILGen/objc_protocols.swift
index 935040d..425f01c 100644
--- a/test/SILGen/objc_protocols.swift
+++ b/test/SILGen/objc_protocols.swift
@@ -25,7 +25,7 @@
   func anse()
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols0A8_generic{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols0A8_generic{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[THIS:%.*]] : @guaranteed $T):
 // -- Result of runce is autoreleased according to default objc conv
 // CHECK: [[METHOD:%.*]] = objc_method [[THIS]] : {{\$.*}},  #NSRuncing.runce!1.foreign
@@ -41,7 +41,7 @@
   return (x.runce(), x.copyRuncing())
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols0A22_generic_partial_applyyyxAA9NSRuncingRzlF : $@convention(thin) <T where T : NSRuncing> (@guaranteed T) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols0A22_generic_partial_applyyyxAA9NSRuncingRzlF : $@convention(thin) <T where T : NSRuncing> (@guaranteed T) -> () {
 func objc_generic_partial_apply<T : NSRuncing>(_ x: T) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $T):
   // CHECK:   [[FN:%.*]] = function_ref @[[THUNK1:\$s14objc_protocols9NSRuncingP5runceSo8NSObjectCyFTcTO]] :
@@ -63,7 +63,7 @@
 }
 // CHECK: } // end sil function '$s14objc_protocols0A22_generic_partial_applyyyxAA9NSRuncingRzlF'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK1]] :
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK1]] :
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $Self):
 // CHECK:   [[FN:%.*]] = function_ref @[[THUNK1_THUNK:\$s14objc_protocols9NSRuncingP5runceSo8NSObjectCyFTO]] :
 // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
@@ -71,7 +71,7 @@
 // CHECK:   return [[METHOD]]
 // CHECK: } // end sil function '[[THUNK1]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK1_THUNK]]
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK1_THUNK]]
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $Self):
 // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
 // CHECK:   [[FN:%.*]] = objc_method [[SELF_COPY]] : $Self, #NSRuncing.runce!1.foreign
@@ -80,20 +80,20 @@
 // CHECK:   return [[RESULT]]
 // CHECK: } // end sil function '[[THUNK1_THUNK]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK2]] :
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK2]] :
 // CHECK:   [[FN:%.*]] = function_ref @[[THUNK2_THUNK:\$s14objc_protocols9NSRuncingP5minceSo8NSObjectCyFZTO]]
 // CHECK:   [[METHOD:%.*]] = partial_apply [callee_guaranteed] [[FN]]<Self>(%0)
 // CHECK:   return [[METHOD]]
 // CHECK: } // end sil function '[[THUNK2]]'
 
-// CHECK: sil shared [serializable] [thunk] @[[THUNK2_THUNK]] :
+// CHECK: sil shared [serializable] [thunk] [ossa] @[[THUNK2_THUNK]] :
 // CHECK:      [[METATYPE:%.*]] = thick_to_objc_metatype %0
 // CHECK:      [[FN:%.*]] = objc_method [[METATYPE]] : $@objc_metatype Self.Type, #NSRuncing.mince!1.foreign
 // CHECK-NEXT: [[RESULT:%.*]] = apply [[FN]]<Self>([[METATYPE]])
 // CHECK-NEXT: return [[RESULT]]
 // CHECK: } // end sil function '[[THUNK2_THUNK]]'
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols0A9_protocol{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols0A9_protocol{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[THIS:%.*]] : @guaranteed $NSRuncing):
 // -- Result of runce is autoreleased according to default objc conv
 // CHECK: [[THIS1:%.*]] = open_existential_ref [[THIS]] : $NSRuncing to $[[OPENED:@opened(.*) NSRuncing]]
@@ -111,7 +111,7 @@
   return (x.runce(), x.copyRuncing())
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols0A23_protocol_partial_applyyyAA9NSRuncing_pF : $@convention(thin) (@guaranteed NSRuncing) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols0A23_protocol_partial_applyyyAA9NSRuncing_pF : $@convention(thin) (@guaranteed NSRuncing) -> () {
 func objc_protocol_partial_apply(_ x: NSRuncing) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $NSRuncing):
   // CHECK:   [[OPENED_ARG:%.*]] = open_existential_ref [[ARG]] : $NSRuncing to $[[OPENED:@opened(.*) NSRuncing]]
@@ -126,7 +126,7 @@
 }
 // CHECK : } // end sil function '$s14objc_protocols0A23_protocol_partial_applyyyAA9NSRuncing_pF'
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols0A21_protocol_composition{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols0A21_protocol_composition{{[_0-9a-zA-Z]*}}F
 func objc_protocol_composition(_ x: NSRuncing & NSFunging) {
   // CHECK: [[THIS:%.*]] = open_existential_ref [[THIS_ORIG:%.*]] : $NSFunging & NSRuncing to $[[OPENED:@opened(.*) NSFunging & NSRuncing]]
   // CHECK: [[METHOD:%.*]] = objc_method [[THIS]] : $[[OPENED]], #NSRuncing.runce!1.foreign
@@ -157,11 +157,11 @@
   func anse() {}
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3FooC5runce{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3FooC11copyRuncing{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3FooC5funge{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3FooC3foo{{[_0-9a-zA-Z]*}}FTo
-// CHECK-NOT: sil hidden @_TToF{{.*}}anse{{.*}}
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3FooC5runce{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3FooC11copyRuncing{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3FooC5funge{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3FooC3foo{{[_0-9a-zA-Z]*}}FTo
+// CHECK-NOT: sil hidden [ossa] @_TToF{{.*}}anse{{.*}}
 
 class Bar { }
 
@@ -172,9 +172,9 @@
   @objc static func mince() -> NSObject { return NSObject() }
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3BarC5runce{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3BarC11copyRuncing{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3BarC3foo{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3BarC5runce{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3BarC11copyRuncing{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3BarC3foo{{[_0-9a-zA-Z]*}}FTo
 
 // class Bas from objc_protocols_Bas module
 extension Bas : NSRuncing {
@@ -184,8 +184,8 @@
   @objc static func mince() -> NSObject { return NSObject() }
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s18objc_protocols_Bas0C0C0a1_B0E11copyRuncing{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s18objc_protocols_Bas0C0C0a1_B0E3foo{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s18objc_protocols_Bas0C0C0a1_B0E11copyRuncing{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s18objc_protocols_Bas0C0C0a1_B0E3foo{{[_0-9a-zA-Z]*}}FTo
 
 // -- Inherited objc protocols
 
@@ -196,8 +196,8 @@
   @objc func foo() {}
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3ZimC5funge{{[_0-9a-zA-Z]*}}FTo
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols3ZimC3foo{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3ZimC5funge{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols3ZimC3foo{{[_0-9a-zA-Z]*}}FTo
 
 // class Zang from objc_protocols_Bas module
 extension Zang : Fungible {
@@ -205,7 +205,7 @@
   @objc func foo() {}
 }
 
-// CHECK-LABEL: sil hidden [thunk] @$s18objc_protocols_Bas4ZangC0a1_B0E3foo{{[_0-9a-zA-Z]*}}FTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s18objc_protocols_Bas4ZangC0a1_B0E3foo{{[_0-9a-zA-Z]*}}FTo
 
 // -- objc protocols with property requirements in extensions
 //    <rdar://problem/16284574>
@@ -219,14 +219,14 @@
 }
 
 extension StoredPropertyCount: NSCounting {}
-// CHECK-LABEL: sil hidden [transparent] [thunk] @$s14objc_protocols19StoredPropertyCountC5countSivgTo
+// CHECK-LABEL: sil hidden [transparent] [thunk] [ossa] @$s14objc_protocols19StoredPropertyCountC5countSivgTo
 
 class ComputedPropertyCount {
   @objc var count: Int { return 0 }
 }
 
 extension ComputedPropertyCount: NSCounting {}
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols21ComputedPropertyCountC5countSivgTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols21ComputedPropertyCountC5countSivgTo
 
 // -- adding @objc protocol conformances to native ObjC classes should not
 //    emit thunks since the methods are already available to ObjC.
@@ -247,7 +247,7 @@
   init(int: Int)
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_protocols28testInitializableExistential_1iAA0D0_pAaD_pXp_SitF : $@convention(thin) (@thick Initializable.Type, Int) -> @owned Initializable {
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_protocols28testInitializableExistential_1iAA0D0_pAaD_pXp_SitF : $@convention(thin) (@thick Initializable.Type, Int) -> @owned Initializable {
 func testInitializableExistential(_ im: Initializable.Type, i: Int) -> Initializable {
   // CHECK: bb0([[META:%[0-9]+]] : $@thick Initializable.Type, [[I:%[0-9]+]] : $Int):
   // CHECK:   [[I2_BOX:%[0-9]+]] = alloc_box ${ var Initializable }
@@ -271,7 +271,7 @@
 class InitializableConformer: Initializable {
   @objc required init(int: Int) {}
 }
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols22InitializableConformerC{{[_0-9a-zA-Z]*}}fcTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols22InitializableConformerC{{[_0-9a-zA-Z]*}}fcTo
 
 final class InitializableConformerByExtension {
   init() {}
@@ -282,7 +282,7 @@
     self.init()
   }
 }
-// CHECK-LABEL: sil hidden [thunk] @$s14objc_protocols33InitializableConformerByExtensionC{{[_0-9a-zA-Z]*}}fcTo
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s14objc_protocols33InitializableConformerByExtensionC{{[_0-9a-zA-Z]*}}fcTo
 
 // Make sure we're crashing from trying to use materializeForSet here.
 @objc protocol SelectionItem {
@@ -301,7 +301,7 @@
 
 // Make sure we emit an withoutActuallyEscaping sentinel.
 
-// CHECK-LABEL: sil @$s14objc_protocols19couldActuallyEscapeyyyyc_AA16DangerousEscaper_ptF : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @guaranteed DangerousEscaper) -> () {
+// CHECK-LABEL: sil [ossa] @$s14objc_protocols19couldActuallyEscapeyyyyc_AA16DangerousEscaper_ptF : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @guaranteed DangerousEscaper) -> () {
 // CHECK: bb0([[CLOSURE_ARG:%.*]] : @guaranteed $@callee_guaranteed () -> (), [[SELF:%.*]] : @guaranteed $DangerousEscaper):
 // CHECK:  [[OE:%.*]] = open_existential_ref [[SELF]]
 // CHECK:  [[CLOSURE_COPY1:%.*]]  = copy_value [[CLOSURE_ARG]]
diff --git a/test/SILGen/objc_set_bridging.swift b/test/SILGen/objc_set_bridging.swift
index 586c0b6..83d6777 100644
--- a/test/SILGen/objc_set_bridging.swift
+++ b/test/SILGen/objc_set_bridging.swift
@@ -11,7 +11,7 @@
 
 @objc class Foo : NSObject {
   // Bridging set parameters
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC16bridge_Set_param{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (NSSet, Foo) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC16bridge_Set_param{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (NSSet, Foo) -> ()
   @objc func bridge_Set_param(_ s: Set<Foo>) {
     // CHECK: bb0([[NSSET:%[0-9]+]] : @unowned $NSSet, [[SELF:%[0-9]+]] : @unowned $Foo):
     // CHECK:   [[NSSET_COPY:%.*]] = copy_value [[NSSET]] : $NSSet
@@ -31,7 +31,7 @@
   // CHECK: // end sil function '$s17objc_set_bridging3FooC16bridge_Set_param{{[_0-9a-zA-Z]*}}FTo'
 
   // Bridging set results
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC17bridge_Set_result{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC17bridge_Set_result{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet {
   @objc func bridge_Set_result() -> Set<Foo> { 
     // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $Foo):
     // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Foo
@@ -52,7 +52,7 @@
   @objc var property: Set<Foo> = Set()
 
   // Property getter
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC8property{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC8property{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet
   // CHECK: bb0([[SELF:%[0-9]+]] : @unowned $Foo):
   // CHECK:   [[SELF_COPY]] = copy_value [[SELF]] : $Foo
   // CHECK:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -69,7 +69,7 @@
   // CHECK: } // end sil function '$s17objc_set_bridging3FooC8property{{[_0-9a-zA-Z]*}}vgTo'
   
   // Property setter
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC8property{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSSet, Foo) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC8property{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSSet, Foo) -> () {
   // CHECK: bb0([[NSSET:%[0-9]+]] : @unowned $NSSet, [[SELF:%[0-9]+]] : @unowned $Foo):
   // CHECK:   [[NSSET_COPY:%.*]] = copy_value [[NSSET]] : $NSSet
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Foo
@@ -84,8 +84,8 @@
   // CHECK:   destroy_value [[SELF_COPY]] : $Foo
   // CHECK:   return [[RESULT]] : $()
   
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet
-  // CHECK-LABEL: sil hidden [thunk] @$s17objc_set_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSSet, Foo) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vgTo : $@convention(objc_method) (Foo) -> @autoreleased NSSet
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s17objc_set_bridging3FooC19nonVerbatimProperty{{[_0-9a-zA-Z]*}}vsTo : $@convention(objc_method) (NSSet, Foo) -> () {
   @objc var nonVerbatimProperty: Set<String> = Set()
 }
 
diff --git a/test/SILGen/objc_subscript.swift b/test/SILGen/objc_subscript.swift
index 60a1032..aa20490 100644
--- a/test/SILGen/objc_subscript.swift
+++ b/test/SILGen/objc_subscript.swift
@@ -18,13 +18,13 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_subscript16testSubscriptGet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_subscript16testSubscriptGet{{[_0-9a-zA-Z]*}}F
 func testSubscriptGet(a: A, i: Int) -> ObjCClass {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.subscript!getter.1.foreign : (A) -> (Int) -> ObjCClass, $@convention(objc_method) (Int, A) -> @autoreleased ObjCClass
   return a[i]
 }
 
-// CHECK-LABEL: sil hidden @$s14objc_subscript16testSubscriptSet{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s14objc_subscript16testSubscriptSet{{[_0-9a-zA-Z]*}}F
 func testSubscriptSet(a: A, i: Int, v: ObjCClass) {
   // CHECK: objc_method [[OBJ:%[0-9]+]] : $A, #A.subscript!setter.1.foreign : (A) -> (ObjCClass, Int) -> (), $@convention(objc_method) (ObjCClass, Int, A) -> ()
   a[i] = v
@@ -33,12 +33,12 @@
 // 'super' subscript usage
 class B : A {
   @objc override subscript (i: Int) -> ObjCClass {
-    // CHECK-LABEL: sil hidden @$s14objc_subscript1BCyAA9ObjCClassCSicig : $@convention(method) (Int, @guaranteed B) -> @owned ObjCClass
+    // CHECK-LABEL: sil hidden [ossa] @$s14objc_subscript1BCyAA9ObjCClassCSicig : $@convention(method) (Int, @guaranteed B) -> @owned ObjCClass
     get {
       // CHECK: objc_super_method [[SELF:%[0-9]+]] : $B, #A.subscript!getter.1.foreign : (A) -> (Int) -> ObjCClass, $@convention(objc_method) (Int, A) -> @autoreleased ObjCClass
       return super[i]
     }
-    // CHECK-LABEL: sil hidden @$s14objc_subscript1BCyAA9ObjCClassCSicis : $@convention(method) (@owned ObjCClass, Int, @guaranteed B) -> ()
+    // CHECK-LABEL: sil hidden [ossa] @$s14objc_subscript1BCyAA9ObjCClassCSicis : $@convention(method) (@owned ObjCClass, Int, @guaranteed B) -> ()
     set(value) {
       // CHECK: objc_super_method [[SELF:%[0-9]+]] : $B, #A.subscript!setter.1.foreign : (A) -> (ObjCClass, Int) -> (), $@convention(objc_method) (ObjCClass, Int, A) -> ()
       super[i] = value
@@ -51,10 +51,10 @@
 }
 extension Guisemeau: SubscriptProto {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$sSo9GuisemeauC14objc_subscript14SubscriptProtoA2cDPyypSgSicigTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$sSo9GuisemeauC14objc_subscript14SubscriptProtoA2cDPyypSgSicigTW
 // CHECK: function_ref @$sSo9GuisemeauCyypSgSicigTO
 // CHECK: end sil function '$sSo9GuisemeauC14objc_subscript14SubscriptProtoA2cDPyypSgSicigTW'
 
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo9GuisemeauCyypSgSicigTO
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo9GuisemeauCyypSgSicigTO
 // CHECK: objc_method {{%[0-9]+}} : $Guisemeau, #Guisemeau.subscript!getter.1.foreign : (Guisemeau) -> (Int) -> Any?, $@convention(objc_method) (Int, Guisemeau) -> @autoreleased Optional<AnyObject>
 // CHECK: end sil function '$sSo9GuisemeauCyypSgSicigTO'
diff --git a/test/SILGen/objc_super.swift b/test/SILGen/objc_super.swift
index 0ae3020..870ab0a 100644
--- a/test/SILGen/objc_super.swift
+++ b/test/SILGen/objc_super.swift
@@ -6,19 +6,19 @@
 // a super_method instruction.
 class Hoozit : Gizmo {
 
-  // CHECK-LABEL: sil hidden @$s10objc_super6HoozitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned Hoozit) -> @owned Hoozit
+  // CHECK-LABEL: sil hidden [ossa] @$s10objc_super6HoozitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned Hoozit) -> @owned Hoozit
   override init() {
     // CHECK: objc_super_method {{%.*}} : $Hoozit, #Gizmo.init!initializer.1.foreign
     super.init()
   }
 
-  // CHECK-LABEL: sil hidden @$s10objc_super6HoozitC5runce{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (@thick Hoozit.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s10objc_super6HoozitC5runce{{[_0-9a-zA-Z]*}}FZ : $@convention(method) (@thick Hoozit.Type) -> ()
   override class func runce() {
     // CHECK: objc_super_method {{%.*}} : $@thick Hoozit.Type, #Gizmo.runce!1.foreign
     super.runce()
   }
 
-  // CHECK-LABEL: sil hidden @$s10objc_super6HoozitC4frob{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed Hoozit) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s10objc_super6HoozitC4frob{{[_0-9a-zA-Z]*}}F : $@convention(method) (@guaranteed Hoozit) -> ()
   override func frob() {
     // CHECK: objc_super_method {{%.*}} : $Hoozit, #Gizmo.frob!1.foreign
     super.frob()
@@ -38,7 +38,7 @@
 }
 
 class NonObjCSuperInit : Wotsit {
-  // CHECK-LABEL: sil hidden @$s10objc_super16NonObjCSuperInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned NonObjCSuperInit) -> @owned NonObjCSuperInit
+  // CHECK-LABEL: sil hidden [ossa] @$s10objc_super16NonObjCSuperInitC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned NonObjCSuperInit) -> @owned NonObjCSuperInit
   init() {
     // CHECK: function_ref @$s10objc_super9NotInObjCVACyxGycfC : $@convention(method) <τ_0_0> (@thin NotInObjC<τ_0_0>.Type) -> NotInObjC<τ_0_0>
     super.init(nope: NotInObjC<Int>())
diff --git a/test/SILGen/objc_thunks.swift b/test/SILGen/objc_thunks.swift
index 18b9a25..3ddf592 100644
--- a/test/SILGen/objc_thunks.swift
+++ b/test/SILGen/objc_thunks.swift
@@ -9,7 +9,7 @@
 
 class Hoozit : Gizmo {
   @objc func typical(_ x: Int, y: Gizmo) -> Gizmo { return y }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC7typical_1ySo5GizmoCSi_AGtFTo : $@convention(objc_method) (Int, Gizmo, Hoozit) -> @autoreleased Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC7typical_1ySo5GizmoCSi_AGtFTo : $@convention(objc_method) (Int, Gizmo, Hoozit) -> @autoreleased Gizmo {
   // CHECK: bb0([[X:%.*]] : $Int, [[Y:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[Y_COPY:%.*]] = copy_value [[Y]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -27,7 +27,7 @@
 
   // NS_CONSUMES_SELF by inheritance
   override func fork() { }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC4forkyyFTo : $@convention(objc_method) (@owned Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC4forkyyFTo : $@convention(objc_method) (@owned Hoozit) -> () {
   // CHECK: bb0([[THIS:%.*]] : @owned $Hoozit):
   // CHECK-NEXT:   [[BORROWED_THIS:%.*]] = begin_borrow [[THIS]]
   // CHECK-NEXT:   // function_ref
@@ -40,7 +40,7 @@
 
   // NS_CONSUMED 'gizmo' argument by inheritance
   override class func consume(_ gizmo: Gizmo?) { }
-   // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC7consumeyySo5GizmoCSgFZTo : $@convention(objc_method) (@owned Optional<Gizmo>, @objc_metatype Hoozit.Type) -> () {
+   // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC7consumeyySo5GizmoCSgFZTo : $@convention(objc_method) (@owned Optional<Gizmo>, @objc_metatype Hoozit.Type) -> () {
   // CHECK: bb0([[GIZMO:%.*]] : @owned $Optional<Gizmo>, [[THIS:%.*]] : $@objc_metatype Hoozit.Type):
   // CHECK-NEXT: [[BORROWED_GIZMO:%.*]] = begin_borrow [[GIZMO]]
   // CHECK-NEXT: [[THICK_THIS:%[0-9]+]] = objc_to_thick_metatype [[THIS]] : $@objc_metatype Hoozit.Type to $@thick Hoozit.Type
@@ -53,7 +53,7 @@
 
   // NS_RETURNS_RETAINED by family (-copy)
   @objc func copyFoo() -> Gizmo { return self }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC7copyFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC7copyFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -67,7 +67,7 @@
 
   // NS_RETURNS_RETAINED by family (-mutableCopy)
   @objc func mutableCopyFoo() -> Gizmo { return self }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC14mutableCopyFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC14mutableCopyFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -83,7 +83,7 @@
   // normal notion of CamelCase, but it's what Clang does, so we should match 
   // it.
   @objc func copy8() -> Gizmo { return self }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC5copy8So5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC5copy8So5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -97,7 +97,7 @@
 
   // NS_RETURNS_RETAINED by family (-copy)
   @objc(copyDuplicate) func makeDuplicate() -> Gizmo { return self }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC13makeDuplicateSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC13makeDuplicateSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -112,7 +112,7 @@
   // Override the normal family conventions to make this non-consuming and
   // returning at +0.
   @objc func initFoo() -> Gizmo { return self }
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC7initFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC7initFooSo5GizmoCyFTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -126,7 +126,7 @@
 
   @objc var typicalProperty: Gizmo
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
   // CHECK: bb0([[SELF:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK-NEXT:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -138,7 +138,7 @@
   // CHECK-NEXT:   return [[RES]] : $Gizmo
   // CHECK-NEXT: }
   
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvg : $@convention(method) (@guaranteed Hoozit) -> @owned Gizmo
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvg : $@convention(method) (@guaranteed Hoozit) -> @owned Gizmo
   // CHECK: bb0(%0 : @guaranteed $Hoozit):
   // CHECK-NEXT:   debug_value %0
   // CHECK-NEXT:   [[ADDR:%.*]] = ref_element_addr %0 : {{.*}}, #Hoozit.typicalProperty
@@ -148,7 +148,7 @@
   // CHECK-NEXT:   return [[RES]]
 
   // -- setter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]] : $Gizmo
   // CHECK:   [[THIS_COPY:%.*]] = copy_value [[THIS]] : $Hoozit
@@ -161,7 +161,7 @@
   // CHECK:   return [[RES]] : $(), loc {{.*}}, scope {{.*}} // id: {{.*}} line:[[@LINE-34]]:13:auto_gen
   // CHECK: } // end sil function '$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvsTo'
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvs
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC15typicalPropertySo5GizmoCvs
   // CHECK: bb0([[ARG0:%.*]] : @owned $Gizmo, [[ARG1:%.*]] : @guaranteed $Hoozit):
   // CHECK:   [[BORROWED_ARG0:%.*]] = begin_borrow [[ARG0]]
   // CHECK:   [[ARG0_COPY:%.*]] = copy_value [[BORROWED_ARG0]]
@@ -176,7 +176,7 @@
   // NS_RETURNS_RETAINED getter by family (-copy)
   @objc var copyProperty: Gizmo
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo {
   // CHECK: bb0([[SELF:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK-NEXT:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -188,7 +188,7 @@
   // CHECK-NEXT:   return [[RES]]
   // CHECK-NEXT: }
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvg
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvg
   // CHECK: bb0(%0 : @guaranteed $Hoozit):
   // CHECK:        [[ADDR:%.*]] = ref_element_addr %0 : {{.*}}, #Hoozit.copyProperty
   // CHECK-NEXT:   [[READ:%.*]] = begin_access [read] [dynamic] [[ADDR]] : $*Gizmo
@@ -197,7 +197,7 @@
   // CHECK-NEXT:   return [[RES]]
 
   // -- setter is normal
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -209,7 +209,7 @@
   // CHECK-NEXT:   destroy_value [[THIS_COPY]]
   // CHECK-NEXT:   return [[RES]]
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvs
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC12copyPropertySo5GizmoCvs
   // CHECK: bb0([[ARG1:%.*]] : @owned $Gizmo, [[SELF:%.*]] : @guaranteed $Hoozit):
   // CHECK:   [[BORROWED_ARG1:%.*]] = begin_borrow [[ARG1]]
   // CHECK:   [[ARG1_COPY:%.*]] = copy_value [[BORROWED_ARG1]]
@@ -223,7 +223,7 @@
 
   @objc var roProperty: Gizmo { return self }
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC10roPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC10roPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -236,7 +236,7 @@
   // CHECK-NEXT: } // end sil function '$s11objc_thunks6HoozitC10roPropertySo5GizmoCvgTo'
 
   // -- no setter
-  // CHECK-NOT: sil hidden [thunk] @$s11objc_thunks6HoozitC10roPropertySo5GizmoCvsTo
+  // CHECK-NOT: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC10roPropertySo5GizmoCvsTo
 
   @objc var rwProperty: Gizmo {
     get {
@@ -245,10 +245,10 @@
     set {}
   }
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC10rwPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo 
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC10rwPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo 
 
   // -- setter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC10rwPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC10rwPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -268,7 +268,7 @@
     set {}
   }
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC14copyRWPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC14copyRWPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @owned Gizmo {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -282,7 +282,7 @@
   // CHECK-NEXT: }
 
   // -- setter is normal
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC14copyRWPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC14copyRWPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -297,7 +297,7 @@
 
   @objc var initProperty: Gizmo
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12initPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12initPropertySo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -310,7 +310,7 @@
   // CHECK-NEXT: }
 
   // -- setter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12initPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12initPropertySo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -328,7 +328,7 @@
     @objc(initPropComputedSetter:) set {}
   }
   // -- getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12propComputedSo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12propComputedSo5GizmoCvgTo : $@convention(objc_method) (Hoozit) -> @autoreleased Gizmo {
   // CHECK: bb0([[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
   // CHECK-NEXT:   [[BORROWED_THIS_COPY:%.*]] = begin_borrow [[THIS_COPY]]
@@ -341,7 +341,7 @@
   // CHECK-NEXT: }
 
   // -- setter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC12propComputedSo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC12propComputedSo5GizmoCvsTo : $@convention(objc_method) (Gizmo, Hoozit) -> () {
   // CHECK: bb0([[VALUE:%.*]] : @unowned $Gizmo, [[THIS:%.*]] : @unowned $Hoozit):
   // CHECK-NEXT:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]]
   // CHECK-NEXT:   [[THIS_COPY:%.*]] = copy_value [[THIS]]
@@ -356,10 +356,10 @@
 
   // Don't export generics to ObjC yet
   func generic<T>(_ x: T) {}
-  // CHECK-NOT: sil hidden [thunk] @_TToFC11objc_thunks6Hoozit7generic{{.*}}
+  // CHECK-NOT: sil hidden [thunk] [ossa] @_TToFC11objc_thunks6Hoozit7generic{{.*}}
 
   // Constructor.
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC7bellsOnACSi_tcfc : $@convention(method) (Int, @owned Hoozit) -> @owned Hoozit {
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC7bellsOnACSi_tcfc : $@convention(method) (Int, @owned Hoozit) -> @owned Hoozit {
   // CHECK: [[SELF_BOX:%[0-9]+]] = alloc_box ${ var Hoozit }
   // CHECK: [[MARKED_SELF_BOX:%[0-9]+]] = mark_uninitialized [derivedself] [[SELF_BOX]]
   // CHECK: [[PB_BOX:%.*]] = project_box [[MARKED_SELF_BOX]]
@@ -380,7 +380,7 @@
   // Subscript
   @objc subscript (i: Int) -> Hoozit {
   // Getter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitCyACSicigTo : $@convention(objc_method) (Int, Hoozit) -> @autoreleased Hoozit
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitCyACSicigTo : $@convention(objc_method) (Int, Hoozit) -> @autoreleased Hoozit
   // CHECK: bb0([[I:%[0-9]+]] : $Int, [[SELF:%[0-9]+]] : @unowned $Hoozit):
   // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Hoozit
   // CHECK-NEXT: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -395,7 +395,7 @@
   }
 
   // Setter
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitCyACSicisTo : $@convention(objc_method) (Hoozit, Int, Hoozit) -> ()
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitCyACSicisTo : $@convention(objc_method) (Hoozit, Int, Hoozit) -> ()
   // CHECK: bb0([[VALUE:%[0-9]+]] : @unowned $Hoozit, [[I:%[0-9]+]] : $Int, [[SELF:%[0-9]+]] : @unowned $Hoozit):
   // CHECK:   [[VALUE_COPY:%.*]] = copy_value [[VALUE]] : $Hoozit
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Hoozit
@@ -411,7 +411,7 @@
 }
 
 class Wotsit<T> : Gizmo {
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6WotsitC5plainyyFTo : $@convention(objc_method) <T> (Wotsit<T>) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6WotsitC5plainyyFTo : $@convention(objc_method) <T> (Wotsit<T>) -> () {
   // CHECK: bb0([[SELF:%.*]] : @unowned $Wotsit<T>):
   // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Wotsit<T>
   // CHECK-NEXT: [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -433,7 +433,7 @@
     super.init()
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6WotsitC11descriptionSSvgTo : $@convention(objc_method) <T> (Wotsit<T>) -> @autoreleased NSString {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6WotsitC11descriptionSSvgTo : $@convention(objc_method) <T> (Wotsit<T>) -> @autoreleased NSString {
   // CHECK: bb0([[SELF:%.*]] : @unowned $Wotsit<T>):
   // CHECK-NEXT:   [[SELF_COPY:%.*]] = copy_value [[SELF]] : $Wotsit<T>
   // CHECK-NEXT:   [[BORROWED_SELF_COPY:%.*]] = begin_borrow [[SELF_COPY]]
@@ -454,22 +454,22 @@
     return "Hello, world."
   }
 
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6WotsitCACyxGSgycfcTo : $@convention(objc_method) <T> (@owned Wotsit<T>) -> @owned Optional<Wotsit<T>>
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6WotsitCACyxGSgycfcTo : $@convention(objc_method) <T> (@owned Wotsit<T>) -> @owned Optional<Wotsit<T>>
 
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6WotsitC7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned Wotsit<T>) -> @owned Optional<Wotsit<T>>
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6WotsitC7bellsOnACyxGSgSi_tcfcTo : $@convention(objc_method) <T> (Int, @owned Wotsit<T>) -> @owned Optional<Wotsit<T>>
 
   // Ivar destroyer
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6WotsitCfETo
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6WotsitCfETo
 }
 
-// CHECK-NOT: sil hidden [thunk] @_TToF{{.*}}Wotsit{{.*}}
+// CHECK-NOT: sil hidden [thunk] [ossa] @_TToF{{.*}}Wotsit{{.*}}
 
 // Extension initializers, properties and methods need thunks too.
 extension Hoozit {
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC3intACSi_tcfcTo : $@convention(objc_method) (Int, @owned Hoozit) -> @owned Hoozit
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC3intACSi_tcfcTo : $@convention(objc_method) (Int, @owned Hoozit) -> @owned Hoozit
   @objc dynamic convenience init(int i: Int) { self.init(bellsOn: i) }
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC6doubleACSd_tcfC : $@convention(method) (Double, @thick Hoozit.Type) -> @owned Hoozit
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC6doubleACSd_tcfC : $@convention(method) (Double, @thick Hoozit.Type) -> @owned Hoozit
   convenience init(double d: Double) { 
     var x = X()
     self.init(int:Int(d))
@@ -477,15 +477,15 @@
   }
 
   @objc func foof() {}
-  // CHECK-LABEL: sil hidden [thunk] @$s11objc_thunks6HoozitC4foofyyFTo : $@convention(objc_method) (Hoozit) -> () {
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s11objc_thunks6HoozitC4foofyyFTo : $@convention(objc_method) (Hoozit) -> () {
 
   var extensionProperty: Int { return 0 }
-  // CHECK-LABEL: sil hidden @$s11objc_thunks6HoozitC17extensionPropertySivg : $@convention(method) (@guaranteed Hoozit) -> Int
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks6HoozitC17extensionPropertySivg : $@convention(method) (@guaranteed Hoozit) -> Int
 }
 
 // Calling objc methods of subclass should go through native entry points
 func useHoozit(_ h: Hoozit) {
-// sil @$s11objc_thunks9useHoozit1hyAA0D0C_tF
+// sil [ossa] @$s11objc_thunks9useHoozit1hyAA0D0C_tF
   // In the class decl, overrides importd method, 'dynamic' was inferred
   h.fork()
   // CHECK: objc_method {{%.*}} : {{.*}}, #Hoozit.fork!1.foreign
@@ -496,7 +496,7 @@
 }
 
 func useWotsit(_ w: Wotsit<String>) {
-// sil @$s11objc_thunks9useWotsit1wySo0D0CySSG_tF
+// sil [ossa] @$s11objc_thunks9useWotsit1wySo0D0CySSG_tF
   w.plain()
   // CHECK: class_method {{%.*}} : {{.*}}, #Wotsit.plain!1 :
   w.generic(2)
@@ -511,14 +511,14 @@
 
 class X { }
 
-// CHECK-LABEL: sil hidden @$s11objc_thunks8propertyySiSo5GizmoCF
+// CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks8propertyySiSo5GizmoCF
 func property(_ g: Gizmo) -> Int {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Gizmo):
   // CHECK:   objc_method [[ARG]] : $Gizmo, #Gizmo.count!getter.1.foreign
   return g.count
 }
 
-// CHECK-LABEL: sil hidden @$s11objc_thunks13blockPropertyyySo5GizmoCF
+// CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks13blockPropertyyySo5GizmoCF
 func blockProperty(_ g: Gizmo) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $Gizmo):
   // CHECK:   objc_method [[ARG]] : $Gizmo, #Gizmo.block!setter.1.foreign
@@ -532,26 +532,26 @@
 
   override init() { i = 5 }
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks15DesignatedStubsC7bellsOnACSgSi_tcfc
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks15DesignatedStubsC7bellsOnACSgSi_tcfc
   // CHECK: string_literal utf8 "objc_thunks.DesignatedStubs"
   // CHECK: string_literal utf8 "init(bellsOn:)"
   // CHECK: string_literal utf8 "{{.*}}objc_thunks.swift"
   // CHECK: function_ref @$ss25_unimplementedInitializer9className04initD04file4line6columns5NeverOs12StaticStringV_A2JS2utF
   // CHECK: return
 
-  // CHECK-NOT: sil hidden @_TFCSo15DesignatedStubsc{{.*}}
+  // CHECK-NOT: sil hidden [ossa] @_TFCSo15DesignatedStubsc{{.*}}
 }
 
 class DesignatedOverrides : Gizmo {
   var i: Int = 5
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks19DesignatedOverridesCACSgycfc
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks19DesignatedOverridesCACSgycfc
   // CHECK-NOT: return
   // CHECK: function_ref @$s11objc_thunks19DesignatedOverridesC1iSivpfi : $@convention(thin) () -> Int
   // CHECK: objc_super_method [[SELF:%[0-9]+]] : $DesignatedOverrides, #Gizmo.init!initializer.1.foreign : (Gizmo.Type) -> () -> Gizmo?, $@convention(objc_method) (@owned Gizmo) -> @owned Optional<Gizmo>
   // CHECK: return
 
-  // CHECK-LABEL: sil hidden @$s11objc_thunks19DesignatedOverridesC7bellsOnACSgSi_tcfc
+  // CHECK-LABEL: sil hidden [ossa] @$s11objc_thunks19DesignatedOverridesC7bellsOnACSgSi_tcfc
   // CHECK: function_ref @$s11objc_thunks19DesignatedOverridesC1iSivpfi : $@convention(thin) () -> Int
   // CHECK: objc_super_method [[SELF:%[0-9]+]] : $DesignatedOverrides, #Gizmo.init!initializer.1.foreign : (Gizmo.Type) -> (Int) -> Gizmo?, $@convention(objc_method) (Int, @owned Gizmo) -> @owned Optional<Gizmo>
   // CHECK: return
@@ -566,7 +566,7 @@
 @_silgen_name("noescape")
 func noescape(f: @convention(block) () -> ())
 
-// CHECK: sil hidden @$s11objc_thunks21testObjCNoescapeThunkyyF : $@convention(thin) () -> () {
+// CHECK: sil hidden [ossa] @$s11objc_thunks21testObjCNoescapeThunkyyF : $@convention(thin) () -> () {
 // CHECK: [[REABSTRACT:%.*]] = function_ref @$sIeg_IyB_TR
 // CHECK: init_block_storage_header {{.*}} : $*@block_storage @callee_guaranteed () -> (), invoke [[REABSTRACT]]
 // CHECK: return
@@ -577,7 +577,7 @@
 
 // Noescape verification relies on there not being a retain/release in order to
 // work in the presence of a objective c throwing implementation function.
-// CHECK: sil {{.*}} @$sIeg_IyB_TR
+// CHECK: sil {{.*}} [ossa] @$sIeg_IyB_TR
 // CHECK: bb0([[T0:%.*]] : $*@block_storage @callee_guaranteed () -> ()):
 // CHECK-NEXT:  [[T1:%.*]] = project_block_storage [[T0]]
 // CHECK-NEXT:  [[T2:%.*]] = load_borrow [[T1]]
diff --git a/test/SILGen/objc_witnesses.swift b/test/SILGen/objc_witnesses.swift
index cfbf9e6..90be686 100644
--- a/test/SILGen/objc_witnesses.swift
+++ b/test/SILGen/objc_witnesses.swift
@@ -19,7 +19,7 @@
 }
 
 // witness for Foo.foo uses the foreign-to-native thunk:
-// CHECK-LABEL: sil private [transparent] [thunk] @$sSo3FooC14objc_witnesses7FooableA2cDP3foo{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$sSo3FooC14objc_witnesses7FooableA2cDP3foo{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         function_ref @$sSo3FooC3foo{{[_0-9a-zA-Z]*}}FTO
 
 // witness for Phoûx.foo uses the Swift vtable
@@ -37,7 +37,7 @@
 extension Gizmo : Bells {
 }
 
-// CHECK: sil private [transparent] [thunk] @$sSo5GizmoC14objc_witnesses5BellsA2cDP{{[_0-9a-zA-Z]*}}fCTW
+// CHECK: sil private [transparent] [thunk] [ossa] @$sSo5GizmoC14objc_witnesses5BellsA2cDP{{[_0-9a-zA-Z]*}}fCTW
 // CHECK: bb0([[SELF:%[0-9]+]] : $*Gizmo, [[I:%[0-9]+]] : $Int, [[META:%[0-9]+]] : $@thick Gizmo.Type):
 
 // CHECK:   [[INIT:%[0-9]+]] = function_ref @$sSo5GizmoC{{[_0-9a-zA-Z]*}}fC : $@convention(method) (Int, @thick Gizmo.Type) -> @owned Optional<Gizmo>
@@ -62,9 +62,9 @@
   subscript(x: Int) -> Any { get }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$sSo7NSArrayC14objc_witnesses13SubscriptableA2cDPyypSicigTW : $@convention(witness_method: Subscriptable) (Int, @in_guaranteed NSArray) -> @out Any {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$sSo7NSArrayC14objc_witnesses13SubscriptableA2cDPyypSicigTW : $@convention(witness_method: Subscriptable) (Int, @in_guaranteed NSArray) -> @out Any {
 // CHECK:         function_ref @$sSo7NSArrayCyypSicigTO : $@convention(method) (Int, @guaranteed NSArray) -> @out Any
-// CHECK-LABEL: sil shared [serializable] [thunk] @$sSo7NSArrayCyypSicigTO : $@convention(method) (Int, @guaranteed NSArray) -> @out Any {
+// CHECK-LABEL: sil shared [serializable] [thunk] [ossa] @$sSo7NSArrayCyypSicigTO : $@convention(method) (Int, @guaranteed NSArray) -> @out Any {
 // CHECK:         objc_method {{%.*}} : $NSArray, #NSArray.subscript!getter.1.foreign
 extension NSArray: Subscriptable {}
 
@@ -78,11 +78,11 @@
   @objc dynamic var quantumNumber: Int = 0
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s14objc_witnesses8ElectronCAA7OrbitalA2aDP13quantumNumberSivgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s14objc_witnesses8ElectronC13quantumNumberSivgTD
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s14objc_witnesses8ElectronCAA7OrbitalA2aDP13quantumNumberSivgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s14objc_witnesses8ElectronC13quantumNumberSivgTD
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s14objc_witnesses8ElectronCAA7OrbitalA2aDP13quantumNumberSivsTW
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s14objc_witnesses8ElectronC13quantumNumberSivsTD
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s14objc_witnesses8ElectronCAA7OrbitalA2aDP13quantumNumberSivsTW
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s14objc_witnesses8ElectronC13quantumNumberSivsTD
 
 // witness is a dynamic thunk and is public:
 
@@ -94,8 +94,8 @@
   @objc public dynamic var spin: Float = 0.5
 }
 
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$s14objc_witnesses8PositronCAA6LeptonA2aDP4spinSfvgTW
-// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] @$s14objc_witnesses8PositronC4spinSfvgTD
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$s14objc_witnesses8PositronCAA6LeptonA2aDP4spinSfvgTW
+// CHECK-LABEL: sil shared [transparent] [serializable] [thunk] [ossa] @$s14objc_witnesses8PositronC4spinSfvgTD
 
 // Override of property defined in @objc extension
 
@@ -109,7 +109,7 @@
   @objc var valence: Int { get { return 1 } set { } }
 }
 
-// CHECK-LABEL: sil shared @$sSo8NSObjectC14objc_witnessesE7valenceSivM : $@yield_once @convention(method) (@guaranteed NSObject) -> @yields @inout Int {
+// CHECK-LABEL: sil shared [ossa] @$sSo8NSObjectC14objc_witnessesE7valenceSivM : $@yield_once @convention(method) (@guaranteed NSObject) -> @yields @inout Int {
 // CHECK: objc_method %0 : $NSObject, #NSObject.valence!getter.1.foreign
 // CHECK: yield
 // CHECK: objc_method %0 : $NSObject, #NSObject.valence!setter.1.foreign
diff --git a/test/SILGen/opaque_ownership.swift b/test/SILGen/opaque_ownership.swift
index 82bd47a..4e22aea 100644
--- a/test/SILGen/opaque_ownership.swift
+++ b/test/SILGen/opaque_ownership.swift
@@ -20,7 +20,7 @@
 
 // Test open_existential_value ownership
 // ---
-// CHECK-LABEL: sil @$ss11takeDecoder4fromBi1_s0B0_p_tKF : $@convention(thin) (@in_guaranteed Decoder) -> (Builtin.Int1, @error Error) {
+// CHECK-LABEL: sil [ossa] @$ss11takeDecoder4fromBi1_s0B0_p_tKF : $@convention(thin) (@in_guaranteed Decoder) -> (Builtin.Int1, @error Error) {
 // CHECK: bb0(%0 : @guaranteed $Decoder):
 // CHECK:  [[OPENED:%.*]] = open_existential_value %0 : $Decoder to $@opened("{{.*}}") Decoder
 // CHECK:  [[WT:%.*]] = witness_method $@opened("{{.*}}") Decoder, #Decoder.unkeyedContainer!1 : <Self where Self : Decoder> (Self) -> () throws -> UnkeyedDecodingContainer, %3 : $@opened("{{.*}}") Decoder : $@convention(witness_method: Decoder) <τ_0_0 where τ_0_0 : Decoder> (@in_guaranteed τ_0_0) -> (@out UnkeyedDecodingContainer, @error Error)
@@ -43,7 +43,7 @@
 
 // Test unsafe_bitwise_cast nontrivial ownership.
 // ---
-// CHECK-LABEL: sil @$ss13unsafeBitCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
+// CHECK-LABEL: sil [ossa] @$ss13unsafeBitCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $T, [[ARG1:%.*]] : $@thick U.Type):
 // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG0]] : $T
 // CHECK:   [[RESULT:%.*]] = unchecked_bitwise_cast [[ARG_COPY]] : $T to $U
@@ -152,7 +152,7 @@
 
 // Test ownership of multi-case Enum values in the context of to @in thunks.
 // ---
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$ss17FloatingPointSignOSQsSQ2eeoiySbx_xtFZTW : $@convention(witness_method: Equatable) (@in_guaranteed FloatingPointSign, @in_guaranteed FloatingPointSign, @thick FloatingPointSign.Type) -> Bool {
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$ss17FloatingPointSignOSQsSQ2eeoiySbx_xtFZTW : $@convention(witness_method: Equatable) (@in_guaranteed FloatingPointSign, @in_guaranteed FloatingPointSign, @thick FloatingPointSign.Type) -> Bool {
 // CHECK: bb0(%0 : $FloatingPointSign, %1 : $FloatingPointSign, %2 : $@thick FloatingPointSign.Type):
 // CHECK:   %3 = function_ref @$ss2eeoiySbx_xtSYRzSQ8RawValueRpzlF : $@convention(thin) <τ_0_0 where τ_0_0 : RawRepresentable, τ_0_0.RawValue : Equatable> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool
 // CHECK:   %4 = apply %3<FloatingPointSign>(%0, %1) : $@convention(thin) <τ_0_0 where τ_0_0 : RawRepresentable, τ_0_0.RawValue : Equatable> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> Bool
@@ -170,7 +170,7 @@
 // Test open_existential_value used in a conversion context.
 // (the actual bridging call is dropped because we don't import Swift).
 // ---
-// CHECK-OSX-LABEL: sil @$ss26_unsafeDowncastToAnyObject04fromD0yXlyp_tF : $@convention(thin) (@in_guaranteed Any) -> @owned AnyObject {
+// CHECK-OSX-LABEL: sil [ossa] @$ss26_unsafeDowncastToAnyObject04fromD0yXlyp_tF : $@convention(thin) (@in_guaranteed Any) -> @owned AnyObject {
 // CHECK-OSX: bb0(%0 : @guaranteed $Any):
 // CHECK-OSX:   [[COPY:%.*]] = copy_value %0 : $Any
 // CHECK-OSX:   [[BORROW2:%.*]] = begin_borrow [[COPY]] : $Any
@@ -192,7 +192,7 @@
 #if os(macOS)
 // Test open_existential_box_value in a conversion context.
 // ---
-// CHECK-OSX-LABEL: sil @$ss3foo1eys5Error_pSg_tF : $@convention(thin) (@guaranteed Optional<Error>) -> () {
+// CHECK-OSX-LABEL: sil [ossa] @$ss3foo1eys5Error_pSg_tF : $@convention(thin) (@guaranteed Optional<Error>) -> () {
 // CHECK-OSX: [[BORROW:%.*]] = begin_borrow %{{.*}} : $Error
 // CHECK-OSX: [[VAL:%.*]] = open_existential_box_value [[BORROW]] : $Error to $@opened
 // CHECK-OSX: [[COPY:%.*]] = copy_value [[VAL]] : $@opened
@@ -234,7 +234,7 @@
 
 // Test passing a +1 RValue to @in_guaranteed.
 // ---
-// CHECK-LABEL: sil @$ss7EnumSeqV12makeIterators0A4IterVy0D0QzGyF : $@convention(method) <Base where Base : Seq> (@in_guaranteed EnumSeq<Base>) -> @out EnumIter<Base.Iterator> {
+// CHECK-LABEL: sil [ossa] @$ss7EnumSeqV12makeIterators0A4IterVy0D0QzGyF : $@convention(method) <Base where Base : Seq> (@in_guaranteed EnumSeq<Base>) -> @out EnumIter<Base.Iterator> {
 // CHECK: bb0(%0 : @guaranteed $EnumSeq<Base>):
 // CHECK:  [[MT:%.*]] = metatype $@thin EnumIter<Base.Iterator>.Type
 // CHECK:  [[FIELD:%.*]] = struct_extract %0 : $EnumSeq<Base>, #EnumSeq._base
diff --git a/test/SILGen/opaque_values_silgen_lib.swift b/test/SILGen/opaque_values_silgen_lib.swift
index 970c0163..23eba1e 100644
--- a/test/SILGen/opaque_values_silgen_lib.swift
+++ b/test/SILGen/opaque_values_silgen_lib.swift
@@ -14,7 +14,7 @@
 
 // Tests Empty protocol + Builtin.NativeObject enum (including opaque tuples as a return value)
 // ---
-// CHECK-LABEL: sil hidden @$ss21s010______PAndS_casesyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss21s010______PAndS_casesyyF : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:   [[MTYPE:%.*]] = metatype $@thin PAndSEnum.Type
 // CHECK:   [[EAPPLY:%.*]] = apply {{.*}}([[MTYPE]]) : $@convention(thin) (@thin PAndSEnum.Type) -> @owned @callee_guaranteed (@in_guaranteed EmptyP, @guaranteed String) -> @out PAndSEnum
@@ -27,7 +27,7 @@
 
 // Test emitBuiltinReinterpretCast.
 // ---
-// CHECK-LABEL: sil hidden @$ss21s020__________bitCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
+// CHECK-LABEL: sil hidden [ossa] @$ss21s020__________bitCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T,
 // CHECK: [[COPY:%.*]] = copy_value [[ARG]] : $T
 // CHECK: [[CAST:%.*]] = unchecked_bitwise_cast [[COPY]] : $T to $U
@@ -41,7 +41,7 @@
 
 // Test emitBuiltinCastReference
 // ---
-// CHECK-LABEL: sil hidden @$ss21s030__________refCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
+// CHECK-LABEL: sil hidden [ossa] @$ss21s030__________refCast_2toq_x_q_mtr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @thick U.Type) -> @out U {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $T, %1 : $@thick U.Type):
 // CHECK: [[COPY:%.*]] = copy_value [[ARG]] : $T
 // CHECK: [[SRC:%.*]] = alloc_stack $T
@@ -60,13 +60,13 @@
 
 // Init of Empty protocol + Builtin.NativeObject enum (including opaque tuples as a return value)
 // ---
-// CHECK-LABEL: sil shared [transparent] @$ss9PAndSEnumO1AyABs6EmptyP_p_SStcABmF : $@convention(method) (@in EmptyP, @owned String, @thin PAndSEnum.Type) -> @out PAndSEnum {
+// CHECK-LABEL: sil shared [transparent] [ossa] @$ss9PAndSEnumO1AyABs6EmptyP_p_SStcABmF : $@convention(method) (@in EmptyP, @owned String, @thin PAndSEnum.Type) -> @out PAndSEnum {
 // CHECK: bb0([[ARG0:%.*]] : @owned $EmptyP, [[ARG1:%.*]]  : @owned $String, [[ARG2:%.*]] : $@thin PAndSEnum.Type):
 // CHECK:   [[RTUPLE:%.*]] = tuple ([[ARG0]] : $EmptyP, [[ARG1]] : $String)
 // CHECK:   [[RETVAL:%.*]] = enum $PAndSEnum, #PAndSEnum.A!enumelt.1, [[RTUPLE]] : $(EmptyP, String)
 // CHECK:   return [[RETVAL]] : $PAndSEnum
 // CHECK-LABEL: } // end sil function '$ss9PAndSEnumO1AyABs6EmptyP_p_SStcABmF'
-// CHECK-LABEL: sil shared [transparent] [thunk] @$ss9PAndSEnumO1AyABs6EmptyP_p_SStcABmFTc : $@convention(thin) (@thin PAndSEnum.Type) -> @owned @callee_guaranteed (@in_guaranteed EmptyP, @guaranteed String) -> @out PAndSEnum {
+// CHECK-LABEL: sil shared [transparent] [thunk] [ossa] @$ss9PAndSEnumO1AyABs6EmptyP_p_SStcABmFTc : $@convention(thin) (@thin PAndSEnum.Type) -> @owned @callee_guaranteed (@in_guaranteed EmptyP, @guaranteed String) -> @out PAndSEnum {
 // CHECK: bb0([[ARG:%.*]] : $@thin PAndSEnum.Type):
 // CHECK:   [[RETVAL:%.*]] = partial_apply [callee_guaranteed] {{.*}}([[ARG]]) : $@convention(method) (@in EmptyP, @owned String, @thin PAndSEnum.Type) -> @out PAndSEnum
 // CHECK:   [[CANONICAL_THUNK_FN:%.*]] = function_ref @$ss6EmptyP_pSSs9PAndSEnumOIegixr_sAA_pSSACIegngr_TR : $@convention(thin) (@in_guaranteed EmptyP, @guaranteed String, @guaranteed @callee_guaranteed (@in EmptyP, @owned String) -> @out PAndSEnum) -> @out PAndSEnum
diff --git a/test/SILGen/optional-cast.swift b/test/SILGen/optional-cast.swift
index a5e2b46..37c959e 100644
--- a/test/SILGen/optional-cast.swift
+++ b/test/SILGen/optional-cast.swift
@@ -4,7 +4,7 @@
 class A {}
 class B : A {}
 
-// CHECK-LABEL: sil hidden @$s4main3fooyyAA1ACSgF : $@convention(thin) (@guaranteed Optional<A>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s4main3fooyyAA1ACSgF : $@convention(thin) (@guaranteed Optional<A>) -> () {
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Optional<A>):
 // CHECK:      [[X:%.*]] = alloc_box ${ var Optional<B> }, var, name "x"
 // CHECK-NEXT: [[PB:%.*]] = project_box [[X]]
@@ -48,7 +48,7 @@
   var x = (y as? B)
 }
 
-// CHECK-LABEL: sil hidden @$s4main3baryyAA1ACSgSgSgSgF : $@convention(thin) (@guaranteed Optional<Optional<Optional<Optional<A>>>>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s4main3baryyAA1ACSgSgSgSgF : $@convention(thin) (@guaranteed Optional<Optional<Optional<Optional<A>>>>) -> () {
 // CHECK:    bb0([[ARG:%.*]] : @guaranteed $Optional<Optional<Optional<Optional<A>>>>):
 // CHECK:      [[X:%.*]] = alloc_box ${ var Optional<Optional<Optional<B>>> }, var, name "x"
 // CHECK-NEXT: [[PB:%.*]] = project_box [[X]]
@@ -133,7 +133,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s4main3bazyyyXlSgF : $@convention(thin) (@guaranteed Optional<AnyObject>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s4main3bazyyyXlSgF : $@convention(thin) (@guaranteed Optional<AnyObject>) -> () {
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $Optional<AnyObject>):
 // CHECK:         [[X:%.*]] = alloc_box ${ var Optional<B> }, var, name "x"
 // CHECK-NEXT:    [[PB:%.*]] = project_box [[X]]
@@ -154,7 +154,7 @@
 
 // <rdar://problem/17013042> T! <-> T? conversions should not produce a diamond
 
-// CHECK-LABEL: sil hidden @$s4main07opt_to_B8_trivialySiSgACF
+// CHECK-LABEL: sil hidden [ossa] @$s4main07opt_to_B8_trivialySiSgACF
 // CHECK:       bb0(%0 : $Optional<Int>):
 // CHECK-NEXT:  debug_value %0 : $Optional<Int>, let, name "x"
 // CHECK-NEXT:  return %0 : $Optional<Int>
@@ -163,7 +163,7 @@
   return x
 }
 
-// CHECK-LABEL: sil hidden @$s4main07opt_to_B10_referenceyAA1CCSgAEF
+// CHECK-LABEL: sil hidden [ossa] @$s4main07opt_to_B10_referenceyAA1CCSgAEF
 // CHECK:  bb0([[ARG:%.*]] : @guaranteed $Optional<C>):
 // CHECK:    debug_value [[ARG]] : $Optional<C>, let, name "x"
 // CHECK:    [[RESULT:%.*]] = copy_value [[ARG]]
@@ -172,7 +172,7 @@
 // CHECK: } // end sil function '$s4main07opt_to_B10_referenceyAA1CCSgAEF'
 func opt_to_opt_reference(_ x : C!) -> C? { return x }
 
-// CHECK-LABEL: sil hidden @$s4main07opt_to_B12_addressOnly{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s4main07opt_to_B12_addressOnly{{[_0-9a-zA-Z]*}}F
 // CHECK:       bb0(%0 : $*Optional<T>, %1 : $*Optional<T>):
 // CHECK-NEXT:  debug_value_addr %1 : $*Optional<T>, let, name "x"
 // CHECK-NEXT:  copy_addr %1 to [initialization] %0
@@ -184,7 +184,7 @@
 public struct TestAddressOnlyStruct<T> {
   func f(_ a : T?) {}
   
-  // CHECK-LABEL: sil hidden @$s4main21TestAddressOnlyStructV8testCall{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s4main21TestAddressOnlyStructV8testCall{{[_0-9a-zA-Z]*}}F
   // CHECK: bb0(%0 : $*Optional<T>, %1 : $TestAddressOnlyStruct<T>):
   // CHECK: apply {{.*}}<T>(%0, %1)
   func testCall(_ a : T!) {
@@ -192,7 +192,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s4main35testContextualInitOfNonAddrOnlyTypeyySiSgF
+// CHECK-LABEL: sil hidden [ossa] @$s4main35testContextualInitOfNonAddrOnlyTypeyySiSgF
 // CHECK: bb0(%0 : $Optional<Int>):
 // CHECK-NEXT: debug_value %0 : $Optional<Int>, let, name "a"
 // CHECK-NEXT: [[X:%.*]] = alloc_box ${ var Optional<Int> }, var, name "x"
diff --git a/test/SILGen/optional.swift b/test/SILGen/optional.swift
index bdad60c..05beac0 100644
--- a/test/SILGen/optional.swift
+++ b/test/SILGen/optional.swift
@@ -4,7 +4,7 @@
 func testCall(_ f: (() -> ())?) {
   f?()
 }
-// CHECK:    sil hidden @{{.*}}testCall{{.*}}
+// CHECK:    sil hidden [ossa] @{{.*}}testCall{{.*}}
 // CHECK:    bb0([[T0:%.*]] : @guaranteed $Optional<@callee_guaranteed () -> ()>):
 // CHECK:      [[T0_COPY:%.*]] = copy_value [[T0]]
 // CHECK-NEXT: switch_enum [[T0_COPY]] : $Optional<@callee_guaranteed () -> ()>, case #Optional.some!enumelt.1: [[SOME:bb[0-9]+]], case #Optional.none!enumelt: [[NONE:bb[0-9]+]]
@@ -29,7 +29,7 @@
   var f = f
   var x = f?()
 }
-// CHECK-LABEL: sil hidden @{{.*}}testAddrOnlyCallResult{{.*}} : $@convention(thin) <T> (@guaranteed Optional<@callee_guaranteed () -> @out T>) -> ()
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testAddrOnlyCallResult{{.*}} : $@convention(thin) <T> (@guaranteed Optional<@callee_guaranteed () -> @out T>) -> ()
 // CHECK:    bb0([[T0:%.*]] : @guaranteed $Optional<@callee_guaranteed () -> @out T>):
 // CHECK: [[F:%.*]] = alloc_box $<τ_0_0> { var Optional<@callee_guaranteed () -> @out τ_0_0> } <T>, var, name "f"
 // CHECK-NEXT: [[PBF:%.*]] = project_box [[F]]
@@ -73,7 +73,7 @@
 
 func wrap<T>(_ x: T) -> T? { return x }
 
-// CHECK-LABEL: sil hidden @$s8optional16wrap_then_unwrap{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional16wrap_then_unwrap{{[_0-9a-zA-Z]*}}F
 func wrap_then_unwrap<T>(_ x: T) -> T {
   // CHECK:   switch_enum_addr {{.*}}, case #Optional.some!enumelt.1: [[OK:bb[0-9]+]], case #Optional.none!enumelt: [[FAIL:bb[0-9]+]]
   // CHECK: [[FAIL]]:
@@ -83,7 +83,7 @@
   return wrap(x)!
 }
 
-// CHECK-LABEL: sil hidden @$s8optional10tuple_bind{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional10tuple_bind{{[_0-9a-zA-Z]*}}F
 func tuple_bind(_ x: (Int, String)?) -> String? {
   return x?.1
   // CHECK:   switch_enum {{%.*}}, case #Optional.some!enumelt.1: [[NONNULL:bb[0-9]+]], case #Optional.none!enumelt: [[NULL:bb[0-9]+]]
@@ -96,7 +96,7 @@
 
 // rdar://21883752 - We were crashing on this function because the deallocation happened
 // out of scope.
-// CHECK-LABEL: sil hidden @$s8optional16crash_on_deallocyySDySiSaySiGGFfA_
+// CHECK-LABEL: sil hidden [ossa] @$s8optional16crash_on_deallocyySDySiSaySiGGFfA_
 func crash_on_dealloc(_ dict : [Int : [Int]] = [:]) {
   var dict = dict
   dict[1]?.append(2)
@@ -104,7 +104,7 @@
 
 func use_unwrapped(_: Int) {}
 
-// CHECK-LABEL: sil hidden @$s8optional15explicit_unwrap{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional15explicit_unwrap{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "{{.*}}optional.swift"
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
 // CHECK-NEXT:         [[FILEASC:%.*]] = integer_literal $Builtin.Int1, 
@@ -117,7 +117,7 @@
   use_unwrapped(value!)
 }
 
-// CHECK-LABEL: sil hidden @$s8optional19explicit_iuo_unwrap{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional19explicit_iuo_unwrap{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "{{.*}}optional.swift"
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
 // CHECK-NEXT:         [[FILEASC:%.*]] = integer_literal $Builtin.Int1, 
@@ -130,7 +130,7 @@
   use_unwrapped(value!)
 }
 
-// CHECK-LABEL: sil hidden @$s8optional19implicit_iuo_unwrap{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional19implicit_iuo_unwrap{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "{{.*}}optional.swift"
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
 // CHECK-NEXT:         [[FILEASC:%.*]] = integer_literal $Builtin.Int1, 
@@ -143,7 +143,7 @@
   use_unwrapped(value)
 }
 
-// CHECK-LABEL: sil hidden @$s8optional34implicit_iuo_unwrap_sourceLocation{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s8optional34implicit_iuo_unwrap_sourceLocation{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "custom.swuft"
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
 // CHECK-NEXT:         [[FILEASC:%.*]] = integer_literal $Builtin.Int1, 
diff --git a/test/SILGen/optional_lvalue.swift b/test/SILGen/optional_lvalue.swift
index 83fa487..e90b05f 100644
--- a/test/SILGen/optional_lvalue.swift
+++ b/test/SILGen/optional_lvalue.swift
@@ -1,7 +1,7 @@
 
 // RUN: %target-swift-emit-silgen -module-name optional_lvalue %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue07assign_a1_B0yySiSgz_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue07assign_a1_B0yySiSgz_SitF
 // CHECK:         [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Optional<Int>
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
@@ -17,7 +17,7 @@
   x! = y
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue011assign_iuo_B0yySiSgz_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue011assign_iuo_B0yySiSgz_SitF
 // CHECK:         [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Optional<Int>
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
@@ -42,7 +42,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue011assign_iuo_B9_implicityyAA1SVSgz_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue011assign_iuo_B9_implicityyAA1SVSgz_SitF
 // CHECK:         [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*Optional<S>
 // CHECK:         [[FILESTR:%.*]] = string_literal utf8 "
 // CHECK-NEXT:         [[FILESIZ:%.*]] = integer_literal $Builtin.Word, 
@@ -62,7 +62,7 @@
   var value: T?
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue07assign_a1_B13_reabstractedyyAA6StructVyS2icGz_S2ictF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue07assign_a1_B13_reabstractedyyAA6StructVyS2icGz_S2ictF
 // CHECK:         [[REABSTRACT:%.*]] = function_ref @$sS2iIegyd_S2iIegnr_TR
 // CHECK:         [[REABSTRACTED:%.*]] = partial_apply [callee_guaranteed] [[REABSTRACT]]
 // CHECK:         assign [[REABSTRACTED]] to {{%.*}} : $*@callee_guaranteed (@in_guaranteed Int) -> @out Int
@@ -71,7 +71,7 @@
   x.value! = y
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue07assign_a1_B9_computedySiAA1SVSgz_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue07assign_a1_B9_computedySiAA1SVSgz_SitF
 // CHECK:         function_ref @$s15optional_lvalue1SV8computedSivs
 // CHECK:         function_ref @$s15optional_lvalue1SV8computedSivg
 func assign_optional_lvalue_computed(_ x: inout S?, _ y: Int) -> Int {
@@ -81,7 +81,7 @@
 
 func generate_int() -> Int { return 0 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue013assign_bound_a1_B0yySiSgzF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue013assign_bound_a1_B0yySiSgzF
 // CHECK:         [[HASVALUE:%.*]] = select_enum_addr {{%.*}}
 // CHECK:         cond_br [[HASVALUE]], [[SOME:bb[0-9]+]], [[NONE:bb[0-9]+]]
 //
@@ -101,7 +101,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue013assign_bound_a10_computed_B0yyAA16ComputedOptionalVzF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue013assign_bound_a10_computed_B0yyAA16ComputedOptionalVzF
 // CHECK:  [[SELF:%.*]] = begin_access [modify] [unknown] %0 : $*ComputedOptional
 // CHECK:  [[TEMP:%.*]] = alloc_stack $Optional<Int>
 // CHECK:  [[T0:%.*]] = load [trivial] [[SELF]] : $*ComputedOptional
@@ -123,7 +123,7 @@
   co.computedOptional? = generate_int()
 }
 
-// CHECK-LABEL: sil hidden @$s15optional_lvalue014assign_forced_a10_computed_B0yyAA16ComputedOptionalVzF
+// CHECK-LABEL: sil hidden [ossa] @$s15optional_lvalue014assign_forced_a10_computed_B0yyAA16ComputedOptionalVzF
 // CHECK:  [[GENERATOR:%.*]] = function_ref @$s15optional_lvalue12generate_intSiyF
 // CHECK:  [[VALUE:%.*]] = apply [[GENERATOR]]()
 // CHECK:  [[SELF:%.*]] = begin_access [modify] [unknown] %0 : $*ComputedOptional
diff --git a/test/SILGen/optional_to_bool.swift b/test/SILGen/optional_to_bool.swift
index 8b1a02e..db08b0a 100644
--- a/test/SILGen/optional_to_bool.swift
+++ b/test/SILGen/optional_to_bool.swift
@@ -5,10 +5,10 @@
 
 public class A {}
 public class B: A {
-  // CHECK-LABEL: sil @$s16optional_to_bool1BC1x{{[_0-9a-zA-Z]*}}vg
+  // CHECK-LABEL: sil [ossa] @$s16optional_to_bool1BC1x{{[_0-9a-zA-Z]*}}vg
   // CHECK:         select_enum {{%.*}} : $Optional<Int>
   public lazy var x: Int = 0
-  // CHECK-LABEL: sil @$s16optional_to_bool1BC1y{{[_0-9a-zA-Z]*}}vg
+  // CHECK-LABEL: sil [ossa] @$s16optional_to_bool1BC1y{{[_0-9a-zA-Z]*}}vg
   // CHECK:         select_enum_addr {{%.*}} : $*Optional<P>
   public lazy var y: P = 0
 }
@@ -16,7 +16,7 @@
 // Collection casting is not implemented in non-ObjC runtime
 #if _runtime(_ObjC)
 
-// CHECK-objc-LABEL: sil @$s16optional_to_bool3foo{{[_0-9a-zA-Z]*}}F
+// CHECK-objc-LABEL: sil [ossa] @$s16optional_to_bool3foo{{[_0-9a-zA-Z]*}}F
 public func foo(x: inout [A]) -> Bool {
   // CHECK-objc:       select_enum {{%.*}} : $Optional<Array<B>>
   return x is [B]
diff --git a/test/SILGen/owned.swift b/test/SILGen/owned.swift
index a3e694e..54433e5 100644
--- a/test/SILGen/owned.swift
+++ b/test/SILGen/owned.swift
@@ -5,7 +5,7 @@
 class RefAggregate {}
 struct ValueAggregate { let x = RefAggregate() }
 
-// CHECK-LABEL: sil hidden @$s5owned0A10_arguments7trivial5value3refySin_AA14ValueAggregateVnAA03RefG0CntF : $@convention(thin) (Int, @owned ValueAggregate, @owned RefAggregate) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s5owned0A10_arguments7trivial5value3refySin_AA14ValueAggregateVnAA03RefG0CntF : $@convention(thin) (Int, @owned ValueAggregate, @owned RefAggregate) -> () {
 func owned_arguments(trivial : __owned Int, value : __owned ValueAggregate, ref : __owned RefAggregate) {
     let t = trivial
     let v = value
@@ -15,7 +15,7 @@
 struct Foo {
     var x: ValueAggregate
 
-    // CHECK-LABEL: sil hidden @$s5owned3FooV20methodOwnedArguments7trivial5value3refySin_AA14ValueAggregateVnAA03RefJ0CntF : $@convention(method) (Int, @owned ValueAggregate, @owned RefAggregate, @guaranteed Foo) -> () {
+    // CHECK-LABEL: sil hidden [ossa] @$s5owned3FooV20methodOwnedArguments7trivial5value3refySin_AA14ValueAggregateVnAA03RefJ0CntF : $@convention(method) (Int, @owned ValueAggregate, @owned RefAggregate, @guaranteed Foo) -> () {
     func methodOwnedArguments(trivial : __owned Int, value : __owned ValueAggregate, ref : __owned RefAggregate) {
         let t = trivial
         let v = value
@@ -24,7 +24,7 @@
 }
 
 // rdar://problem/38390524
-// CHECK-LABEL: sil hidden @$s5owned19oneUnnamedArgument1yyAA14ValueAggregateVnF : $@convention(thin) (@owned ValueAggregate) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s5owned19oneUnnamedArgument1yyAA14ValueAggregateVnF : $@convention(thin) (@owned ValueAggregate) -> () {
 func oneUnnamedArgument1(_: __owned ValueAggregate) {}
-// CHECK-LABEL: sil hidden @$s5owned19oneUnnamedArgument2yyAA12RefAggregateCnF : $@convention(thin) (@owned RefAggregate) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s5owned19oneUnnamedArgument2yyAA12RefAggregateCnF : $@convention(thin) (@owned RefAggregate) -> () {
 func oneUnnamedArgument2(_: __owned RefAggregate) {}
diff --git a/test/SILGen/partial_apply_generic.swift b/test/SILGen/partial_apply_generic.swift
index 25a92ca..dd4a0b9 100644
--- a/test/SILGen/partial_apply_generic.swift
+++ b/test/SILGen/partial_apply_generic.swift
@@ -12,7 +12,7 @@
   func makesSelfNonCanonical<T : Panda>(_: T) where T.Cuddles == Self
 }
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic14getStaticFunc1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic14getStaticFunc1{{[_0-9a-zA-Z]*}}F
 func getStaticFunc1<T: Foo>(t: T.Type) -> () -> () {
 // CHECK: [[REF:%.*]] = function_ref @$s21partial_apply_generic3FooP10staticFunc{{[_0-9a-zA-Z]*}}FZ
 // CHECK-NEXT: apply [[REF]]<T>(%0)
@@ -20,12 +20,12 @@
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s21partial_apply_generic3FooP10staticFunc{{[_0-9a-zA-Z]*}}FZ
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s21partial_apply_generic3FooP10staticFunc{{[_0-9a-zA-Z]*}}FZ
 // CHECK: [[REF:%.*]] = witness_method $Self, #Foo.staticFunc!1
 // CHECK-NEXT: partial_apply [callee_guaranteed] [[REF]]<Self>(%0)
 // CHECK-NEXT: return
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic14getStaticFunc2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic14getStaticFunc2{{[_0-9a-zA-Z]*}}F
 func getStaticFunc2<T: Foo>(t: T) -> () -> () {
 // CHECK: [[REF:%.*]] = function_ref @$s21partial_apply_generic3FooP10staticFunc{{[_0-9a-zA-Z]*}}FZ
 // CHECK: apply [[REF]]<T>
@@ -34,7 +34,7 @@
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic16getInstanceFunc1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic16getInstanceFunc1{{[_0-9a-zA-Z]*}}F
 func getInstanceFunc1<T: Foo>(t: T) -> () -> () {
 // CHECK-NOT: alloc_stack $T
 // CHECK-NOT: copy_addr %0 to [initialization]
@@ -46,7 +46,7 @@
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s21partial_apply_generic3FooP12instanceFunc{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s21partial_apply_generic3FooP12instanceFunc{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG:%.*]] : $*Self):
 // CHECK: [[REF:%.*]] = witness_method $Self, #Foo.instanceFunc!1
 // CHECK-NEXT: [[STACK:%.*]] = alloc_stack $Self
@@ -55,7 +55,7 @@
 // CHECK-NEXT: dealloc_stack
 // CHECK-NEXT: return
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic16getInstanceFunc2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic16getInstanceFunc2{{[_0-9a-zA-Z]*}}F
 func getInstanceFunc2<T: Foo>(t: T) -> (T) -> () -> () {
 // CHECK: [[REF:%.*]] = function_ref @$s21partial_apply_generic3FooP12instanceFunc{{[_0-9a-zA-Z]*}}F
 // CHECK-NEXT: partial_apply [callee_guaranteed] [[REF]]<T>(
@@ -64,7 +64,7 @@
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic16getInstanceFunc3{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic16getInstanceFunc3{{[_0-9a-zA-Z]*}}F
 func getInstanceFunc3<T: Foo>(t: T.Type) -> (T) -> () -> () {
 // CHECK: [[REF:%.*]] = function_ref @$s21partial_apply_generic3FooP12instanceFunc{{[_0-9a-zA-Z]*}}F
 // CHECK-NEXT: partial_apply [callee_guaranteed] [[REF]]<T>(
@@ -72,7 +72,7 @@
 // CHECK-NEXT: return
 }
 
-// CHECK-LABEL: sil hidden @$s21partial_apply_generic23getNonCanonicalSelfFunc1tyq_cxcxm_t7CuddlesQy_RszAA5PandaR_r0_lF : $@convention(thin) <T, U where T == U.Cuddles, U : Panda> (@thick T.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @owned @callee_guaranteed (@in_guaranteed U) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21partial_apply_generic23getNonCanonicalSelfFunc1tyq_cxcxm_t7CuddlesQy_RszAA5PandaR_r0_lF : $@convention(thin) <T, U where T == U.Cuddles, U : Panda> (@thick T.Type) -> @owned @callee_guaranteed (@in_guaranteed T) -> @owned @callee_guaranteed (@in_guaranteed U) -> () {
 func getNonCanonicalSelfFunc<T : Foo, U : Panda>(t: T.Type) -> (T) -> (U) -> () where U.Cuddles == T {
 // CHECK: [[REF:%.*]] = function_ref @$s21partial_apply_generic3FooP21makesSelfNonCanonicalyyqd__7CuddlesQyd__RszAA5PandaRd__lFTc : $@convention(thin) <τ_0_0><τ_1_0 where τ_0_0 == τ_1_0.Cuddles, τ_1_0 : Panda> (@in_guaranteed τ_0_0) -> @owned @callee_guaranteed (@in_guaranteed τ_1_0) -> ()
 // CHECK-NEXT: [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[REF]]<T, U>()
@@ -81,7 +81,7 @@
 }
 
 // curry thunk of Foo.makesSelfNonCanonical<A where ...> (A1) -> ()
-// CHECK-LABEL: sil shared [thunk] @$s21partial_apply_generic3FooP21makesSelfNonCanonicalyyqd__7CuddlesQyd__RszAA5PandaRd__lFTc : $@convention(thin) <Self><T where Self == T.Cuddles, T : Panda> (@in_guaranteed Self) -> @owned @callee_guaranteed (@in_guaranteed T) -> () {
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s21partial_apply_generic3FooP21makesSelfNonCanonicalyyqd__7CuddlesQyd__RszAA5PandaRd__lFTc : $@convention(thin) <Self><T where Self == T.Cuddles, T : Panda> (@in_guaranteed Self) -> @owned @callee_guaranteed (@in_guaranteed T) -> () {
 // CHECK: bb0([[ARG:%.*]] : $*Self):
 // CHECK: [[REF:%.*]] = witness_method $Self, #Foo.makesSelfNonCanonical!1 : <Self><T where Self == T.Cuddles, T : Panda> (Self) -> (T) -> () : $@convention(witness_method: Foo) <τ_0_0><τ_1_0 where τ_0_0 == τ_1_0.Cuddles, τ_1_0 : Panda> (@in_guaranteed τ_1_0, @in_guaranteed τ_0_0) -> ()
 // CHECK-NEXT: [[STACK:%.*]] = alloc_stack $Self
diff --git a/test/SILGen/partial_apply_init.swift b/test/SILGen/partial_apply_init.swift
index e8b522e..b50703d 100644
--- a/test/SILGen/partial_apply_init.swift
+++ b/test/SILGen/partial_apply_init.swift
@@ -20,7 +20,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s18partial_apply_init06class_c1_a1_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18partial_apply_init06class_c1_a1_B0{{[_0-9a-zA-Z]*}}F
 func class_init_partial_apply(c: C.Type) {
   // Partial applications at the static metatype use the direct (_TTd) thunk.
   // CHECK: function_ref @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fCTcTd
@@ -34,14 +34,14 @@
   let requiredM: (Double) -> C = c.init
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fCTcTd
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fCTcTd
 // CHECK:         function_ref @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fC
-// CHECK-LABEL: sil shared [thunk] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fCTcTd
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fCTcTd
 // CHECK:         function_ref @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fC
-// CHECK-LABEL: sil shared [thunk] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fC
 // CHECK:         class_method %0 : $@thick C.Type, #C.init!allocator.1
 
-// CHECK-LABEL: sil hidden @$s18partial_apply_init010archetype_c1_a1_B0{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s18partial_apply_init010archetype_c1_a1_B0{{[_0-9a-zA-Z]*}}F
 func archetype_init_partial_apply<T: C>(t: T.Type) where T: P {
   // Archetype initializations are always dynamic, whether applied to the type or a metatype.
   // CHECK: function_ref @$s18partial_apply_init1CC{{[_0-9a-zA-Z]*}}fC
@@ -59,8 +59,8 @@
   let protoExtM: (Float) -> T = t.init
 }
 
-// CHECK-LABEL: sil shared [thunk] @$s18partial_apply_init1PP{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18partial_apply_init1PP{{[_0-9a-zA-Z]*}}fC
 // CHECK:         witness_method $Self, #P.init!allocator.1
-// CHECK-LABEL: sil shared [thunk] @$s18partial_apply_init1PPAAE{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s18partial_apply_init1PPAAE{{[_0-9a-zA-Z]*}}fC
 // CHECK:         function_ref @$s18partial_apply_init1PPAAE{{[_0-9a-zA-Z]*}}fC
 
diff --git a/test/SILGen/partial_apply_protocol.swift b/test/SILGen/partial_apply_protocol.swift
index 14cc282..3a065de 100644
--- a/test/SILGen/partial_apply_protocol.swift
+++ b/test/SILGen/partial_apply_protocol.swift
@@ -16,7 +16,7 @@
 // Partial apply of methods returning Self-derived types
 //===----------------------------------------------------------------------===//
 
-// CHECK-LABEL: sil hidden @$s22partial_apply_protocol12testClonable1cyAA0E0_p_tF : $@convention(thin) (@in_guaranteed Clonable) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s22partial_apply_protocol12testClonable1cyAA0E0_p_tF : $@convention(thin) (@in_guaranteed Clonable) -> ()
 func testClonable(c: Clonable) {
   // CHECK: [[THUNK_FN:%.*]] = function_ref @$sxIegr_22partial_apply_protocol8Clonable_pIegr_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_0_0) -> @out Clonable
   // CHECK: [[THUNK:%.*]] = partial_apply [callee_guaranteed] [[THUNK_FN]]<@opened("{{.*}}") Clonable>({{.*}})
@@ -41,7 +41,7 @@
   let _: () -> () -> Clonable = c.getCloneFn
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxIegr_22partial_apply_protocol8Clonable_pIegr_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_0_0) -> @out Clonable
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxIegr_22partial_apply_protocol8Clonable_pIegr_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_0_0) -> @out Clonable
 // CHECK:       bb0(%0 : $*Clonable, %1 : @guaranteed $@callee_guaranteed () -> @out τ_0_0):
 // CHECK-NEXT:    [[INNER_RESULT:%.*]] = alloc_stack $τ_0_0
 // CHECK-NEXT:    apply %1([[INNER_RESULT]])
@@ -53,7 +53,7 @@
 
 // FIXME: This is horribly inefficient, too much alloc_stack / copy_addr!
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxSgIegr_22partial_apply_protocol8Clonable_pSgIegr_AbCRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out Optional<τ_0_0>) -> @out Optional<Clonable>
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxSgIegr_22partial_apply_protocol8Clonable_pSgIegr_AbCRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out Optional<τ_0_0>) -> @out Optional<Clonable>
 // CHECK:       bb0(%0 : $*Optional<Clonable>, %1 : @guaranteed $@callee_guaranteed () -> @out Optional<τ_0_0>):
 // CHECK-NEXT:    [[INNER_RESULT:%.*]] = alloc_stack $Optional<τ_0_0>
 // CHECK-NEXT:    apply %1([[INNER_RESULT]])
@@ -79,13 +79,13 @@
 // CHECK-NEXT:    dealloc_stack [[INNER_RESULT]]
 // CHECK-NEXT:    return [[EMPTY]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxXMTIegd_22partial_apply_protocol8Clonable_pXmTIegd_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @thick τ_0_0.Type) -> @thick Clonable.Type
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxXMTIegd_22partial_apply_protocol8Clonable_pXmTIegd_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @thick τ_0_0.Type) -> @thick Clonable.Type
 // CHECK:       bb0(%0 : @guaranteed $@callee_guaranteed () -> @thick τ_0_0.Type):
 // CHECK-NEXT:    [[INNER_RESULT:%.*]] = apply %0()
 // CHECK-NEXT:    [[OUTER_RESULT:%.*]] = init_existential_metatype [[INNER_RESULT]]
 // CHECK-NEXT:    return [[OUTER_RESULT]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxIegr_Iego_22partial_apply_protocol8Clonable_pIegr_Iego_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @owned @callee_guaranteed () -> @out τ_0_0) -> @owned @callee_guaranteed () -> @out Clonable
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxIegr_Iego_22partial_apply_protocol8Clonable_pIegr_Iego_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @owned @callee_guaranteed () -> @out τ_0_0) -> @owned @callee_guaranteed () -> @out Clonable
 // CHECK:       bb0(%0 : @guaranteed $@callee_guaranteed () -> @owned @callee_guaranteed () -> @out τ_0_0):
 // CHECK-NEXT:    [[INNER_RESULT:%.*]] = apply %0()
 // CHECK:         [[THUNK_FN:%.*]] = function_ref @$sxIegr_22partial_apply_protocol8Clonable_pIegr_AaBRzlTR
@@ -98,7 +98,7 @@
 // Make sure the thunk only has the context generic parameters if needed!
 //===----------------------------------------------------------------------===//
 
-// CHECK-LABEL: sil hidden @$s22partial_apply_protocol28testClonableInGenericContext1c1tyAA0E0_p_xtlF : $@convention(thin) <T> (@in_guaranteed Clonable, @in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s22partial_apply_protocol28testClonableInGenericContext1c1tyAA0E0_p_xtlF : $@convention(thin) <T> (@in_guaranteed Clonable, @in_guaranteed T) -> ()
 func testClonableInGenericContext<T>(c: Clonable, t: T) {
   // CHECK: [[THUNK_FN:%.*]] = function_ref @$sxIegr_22partial_apply_protocol8Clonable_pIegr_AaBRzlTR : $@convention(thin) <τ_0_0 where τ_0_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_0_0) -> @out Clonable
   // CHECK: [[THUNK:%.*]] = partial_apply [callee_guaranteed] [[THUNK_FN]]<@opened("{{.*}}") Clonable>({{.*}})
@@ -131,7 +131,7 @@
   let _: (T) -> () -> Clonable = c.genericGetCloneFn
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxqd__Iegnr_x22partial_apply_protocol8Clonable_pIegnr_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_1_0) -> @out Clonable
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxqd__Iegnr_x22partial_apply_protocol8Clonable_pIegnr_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_1_0) -> @out Clonable
 // CHECK:         bb0(%0 : $*Clonable, %1 : $*τ_0_0, %2 : @guaranteed $@callee_guaranteed (@in_guaranteed τ_0_0) -> @out τ_1_0):
 // CHECK-NEXT:      [[INNER_RESULT:%.*]] = alloc_stack $τ_1_0
 // CHECK-NEXT:      apply %2([[INNER_RESULT]], %1)
@@ -141,14 +141,14 @@
 // CHECK-NEXT:      dealloc_stack [[INNER_RESULT]]
 // CHECK-NEXT:      return [[EMPTY]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sxqd__Iegr_Iegno_x22partial_apply_protocol8Clonable_pIegr_Iegno_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in_guaranteed τ_0_0) -> @owned @callee_guaranteed () -> @out τ_1_0) -> @owned @callee_guaranteed () -> @out Clonable
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sxqd__Iegr_Iegno_x22partial_apply_protocol8Clonable_pIegr_Iegno_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@in_guaranteed τ_0_0, @guaranteed @callee_guaranteed (@in_guaranteed τ_0_0) -> @owned @callee_guaranteed () -> @out τ_1_0) -> @owned @callee_guaranteed () -> @out Clonable
 // CHECK:         bb0(%0 : $*τ_0_0, %1 : @guaranteed $@callee_guaranteed (@in_guaranteed τ_0_0) -> @owned @callee_guaranteed () -> @out τ_1_0):
 // CHECK-NEXT:      [[RES:%.*]] = apply %1(%0)
 // CHECK:           [[THUNK_FN:%.*]] = function_ref @$sqd__Iegr_22partial_apply_protocol8Clonable_pIegr_AaBRd__r__lTR
 // CHECK-NEXT:      [[RESULT:%.*]] = partial_apply [callee_guaranteed] [[THUNK_FN]]<τ_0_0, τ_1_0>([[RES]])
 // CHECK-NEXT:      return [[RESULT]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sqd__Iegr_22partial_apply_protocol8Clonable_pIegr_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_1_0) -> @out Clonable {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sqd__Iegr_22partial_apply_protocol8Clonable_pIegr_AaBRd__r__lTR : $@convention(thin) <τ_0_0><τ_1_0 where τ_1_0 : Clonable> (@guaranteed @callee_guaranteed () -> @out τ_1_0) -> @out Clonable {
 // CHECK:         bb0(%0 : $*Clonable, %1 : @guaranteed $@callee_guaranteed () -> @out τ_1_0):
 // CHECK-NEXT:      [[INNER_RESULT:%.*]] = alloc_stack $τ_1_0
 // CHECK-NEXT:      apply %1([[INNER_RESULT]])
diff --git a/test/SILGen/partial_apply_protocol_class_refinement_method.swift b/test/SILGen/partial_apply_protocol_class_refinement_method.swift
index 7e58222..2201676 100644
--- a/test/SILGen/partial_apply_protocol_class_refinement_method.swift
+++ b/test/SILGen/partial_apply_protocol_class_refinement_method.swift
@@ -4,7 +4,7 @@
 protocol P { func foo() }
 protocol Q: class, P {}
 
-// CHECK-LABEL: sil hidden @$s46partial_apply_protocol_class_refinement_method0A5ApplyyyycAA1Q_pF : $@convention
+// CHECK-LABEL: sil hidden [ossa] @$s46partial_apply_protocol_class_refinement_method0A5ApplyyyycAA1Q_pF : $@convention
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Q):
 func partialApply(_ q: Q) -> () -> () {
   // CHECK: [[OPENED:%.*]] = open_existential_ref [[ARG]]
diff --git a/test/SILGen/partial_apply_super.swift b/test/SILGen/partial_apply_super.swift
index d81d8dd..ad1fe9b 100644
--- a/test/SILGen/partial_apply_super.swift
+++ b/test/SILGen/partial_apply_super.swift
@@ -38,7 +38,7 @@
 }
 
 class Child : Parent {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super5ChildC6methodyyF : $@convention(method) (@guaranteed Child) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super5ChildC6methodyyF : $@convention(method) (@guaranteed Child) -> ()
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $Child):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:   [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $Child to $Parent
@@ -52,7 +52,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super5ChildC11classMethodyyFZ : $@convention(method) (@thick Child.Type) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super5ChildC11classMethodyyFZ : $@convention(method) (@thick Child.Type) -> () {
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick Child.Type to $@thick Parent.Type
   // CHECK: [[SUPER_METHOD:%.*]] = function_ref @$s19partial_apply_super6ParentC11classMethodyyFZTcTd : $@convention(thin) (@thick Parent.Type) -> @owned @callee_guaranteed () -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = apply [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(thin) (@thick Parent.Type) -> @owned @callee_guaranteed () -> ()
@@ -64,7 +64,7 @@
     doFoo(super.classMethod)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super5ChildC20callFinalSuperMethodyyF : $@convention(method) (@guaranteed Child) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super5ChildC20callFinalSuperMethodyyF : $@convention(method) (@guaranteed Child) -> ()
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $Child):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $Child to $Parent
@@ -78,7 +78,7 @@
     doFoo(super.finalMethod)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super5ChildC25callFinalSuperClassMethodyyFZ : $@convention(method) (@thick Child.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super5ChildC25callFinalSuperClassMethodyyFZ : $@convention(method) (@thick Child.Type) -> ()
   // CHECK: bb0([[ARG:%.*]] : $@thick Child.Type):
   // CHECK:   [[CASTED_SELF:%.*]] = upcast [[ARG]] : $@thick Child.Type to $@thick Parent.Type
   // CHECK:   [[SUPER_METHOD:%.*]] = function_ref @$s19partial_apply_super6ParentC16finalClassMethodyyFZTc : $@convention(thin) (@thick Parent.Type) -> @owned @callee_guaranteed () -> ()
@@ -96,7 +96,7 @@
   override init(a: A) {
     super.init(a: a)
   }
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super12GenericChildC6methodyyF : $@convention(method) <A> (@guaranteed GenericChild<A>) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super12GenericChildC6methodyyF : $@convention(method) <A> (@guaranteed GenericChild<A>) -> ()
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $GenericChild<A>):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $GenericChild<A> to $GenericParent<A>
@@ -110,7 +110,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super12GenericChildC11classMethodyyFZ : $@convention(method) <A> (@thick GenericChild<A>.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super12GenericChildC11classMethodyyFZ : $@convention(method) <A> (@thick GenericChild<A>.Type) -> ()
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick GenericChild<A>.Type to $@thick GenericParent<A>.Type
   // CHECK: [[SUPER_METHOD:%.*]] = function_ref @$s19partial_apply_super13GenericParentC11classMethodyyFZTcTd : $@convention(thin) <τ_0_0> (@thick GenericParent<τ_0_0>.Type) -> @owned @callee_guaranteed () -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = apply [[SUPER_METHOD]]<A>([[CASTED_SELF]]) : $@convention(thin) <τ_0_0> (@thick GenericParent<τ_0_0>.Type) -> @owned @callee_guaranteed () -> ()
@@ -124,7 +124,7 @@
 }
 
 class ChildToFixedOutsideParent : OutsideParent {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super25ChildToFixedOutsideParentC6methodyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super25ChildToFixedOutsideParentC6methodyyF
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $ChildToFixedOutsideParent):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:   [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $ChildToFixedOutsideParent to $OutsideParent
@@ -140,7 +140,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super25ChildToFixedOutsideParentC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super25ChildToFixedOutsideParentC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick ChildToFixedOutsideParent.Type to $@thick OutsideParent.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick ChildToFixedOutsideParent.Type, #OutsideParent.classMethod!1 : (OutsideParent.Type) -> () -> (), $@convention(method) (@thick OutsideParent.Type) -> (){{.*}}
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(method) (@thick OutsideParent.Type) -> ()
@@ -154,7 +154,7 @@
 }
 
 class ChildToResilientOutsideParent : ResilientOutsideParent {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super29ChildToResilientOutsideParentC6methodyyF : $@convention
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super29ChildToResilientOutsideParentC6methodyyF : $@convention
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $ChildToResilientOutsideParent):
   // CHECK:   [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:   [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $ChildToResilientOutsideParent to $ResilientOutsideParent
@@ -171,7 +171,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super29ChildToResilientOutsideParentC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super29ChildToResilientOutsideParentC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick ChildToResilientOutsideParent.Type to $@thick ResilientOutsideParent.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick ChildToResilientOutsideParent.Type, #ResilientOutsideParent.classMethod!1 : (ResilientOutsideParent.Type) -> () -> (), $@convention(method) (@thick ResilientOutsideParent.Type) -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(method) (@thick ResilientOutsideParent.Type) -> ()
@@ -185,7 +185,7 @@
 }
 
 class GrandchildToFixedOutsideChild : OutsideChild {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super29GrandchildToFixedOutsideChildC6methodyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super29GrandchildToFixedOutsideChildC6methodyyF
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $GrandchildToFixedOutsideChild):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $GrandchildToFixedOutsideChild to $OutsideChild
@@ -202,7 +202,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super29GrandchildToFixedOutsideChildC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super29GrandchildToFixedOutsideChildC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick GrandchildToFixedOutsideChild.Type to $@thick OutsideChild.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick GrandchildToFixedOutsideChild.Type, #OutsideChild.classMethod!1 : (OutsideChild.Type) -> () -> (), $@convention(method) (@thick OutsideChild.Type) -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(method) (@thick OutsideChild.Type) -> ()
@@ -216,7 +216,7 @@
 }
 
 class GrandchildToResilientOutsideChild : ResilientOutsideChild {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super33GrandchildToResilientOutsideChildC6methodyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super33GrandchildToResilientOutsideChildC6methodyyF
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $GrandchildToResilientOutsideChild):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $GrandchildToResilientOutsideChild to $ResilientOutsideChild
@@ -233,7 +233,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super33GrandchildToResilientOutsideChildC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super33GrandchildToResilientOutsideChildC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick GrandchildToResilientOutsideChild.Type to $@thick ResilientOutsideChild.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick GrandchildToResilientOutsideChild.Type, #ResilientOutsideChild.classMethod!1 : (ResilientOutsideChild.Type) -> () -> (), $@convention(method) (@thick ResilientOutsideChild.Type) -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]([[CASTED_SELF]]) : $@convention(method) (@thick ResilientOutsideChild.Type) -> ()
@@ -247,7 +247,7 @@
 }
 
 class GenericChildToFixedGenericOutsideParent<A> : GenericOutsideParent<A> {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super019GenericChildToFixedD13OutsideParentC6methodyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super019GenericChildToFixedD13OutsideParentC6methodyyF
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $GenericChildToFixedGenericOutsideParent<A>):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $GenericChildToFixedGenericOutsideParent<A> to $GenericOutsideParent<A>
@@ -264,7 +264,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super019GenericChildToFixedD13OutsideParentC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super019GenericChildToFixedD13OutsideParentC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick GenericChildToFixedGenericOutsideParent<A>.Type to $@thick GenericOutsideParent<A>.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick GenericChildToFixedGenericOutsideParent<A>.Type, #GenericOutsideParent.classMethod!1 : <A> (GenericOutsideParent<A>.Type) -> () -> (), $@convention(method) <τ_0_0> (@thick GenericOutsideParent<τ_0_0>.Type) -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]<A>([[CASTED_SELF]]) : $@convention(method) <τ_0_0> (@thick GenericOutsideParent<τ_0_0>.Type) -> ()
@@ -278,7 +278,7 @@
 }
 
 class GenericChildToResilientGenericOutsideParent<A> : ResilientGenericOutsideParent<A> {
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super023GenericChildToResilientD13OutsideParentC6methodyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super023GenericChildToResilientD13OutsideParentC6methodyyF
   // CHECK: bb0([[SELF:%.*]] : @guaranteed $GenericChildToResilientGenericOutsideParent<A>):
   // CHECK:     [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:     [[CASTED_SELF_COPY:%.*]] = upcast [[SELF_COPY]] : $GenericChildToResilientGenericOutsideParent<A> to $ResilientGenericOutsideParent<A>
@@ -295,7 +295,7 @@
     doFoo(super.method)
   }
 
-  // CHECK-LABEL: sil hidden @$s19partial_apply_super023GenericChildToResilientD13OutsideParentC11classMethodyyFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s19partial_apply_super023GenericChildToResilientD13OutsideParentC11classMethodyyFZ
   // CHECK: [[CASTED_SELF:%.*]] = upcast %0 : $@thick GenericChildToResilientGenericOutsideParent<A>.Type to $@thick ResilientGenericOutsideParent<A>.Type
   // CHECK: [[SUPER_METHOD:%.*]] = super_method %0 : $@thick GenericChildToResilientGenericOutsideParent<A>.Type, #ResilientGenericOutsideParent.classMethod!1 : <A> (ResilientGenericOutsideParent<A>.Type) -> () -> (), $@convention(method) <τ_0_0> (@thick ResilientGenericOutsideParent<τ_0_0>.Type) -> ()
   // CHECK: [[PARTIAL_APPLY:%.*]] = partial_apply [callee_guaranteed] [[SUPER_METHOD]]<A>([[CASTED_SELF]]) : $@convention(method) <τ_0_0> (@thick ResilientGenericOutsideParent<τ_0_0>.Type) -> ()
diff --git a/test/SILGen/pointer_conversion.swift b/test/SILGen/pointer_conversion.swift
index 79a3767..4e0ade7 100644
--- a/test/SILGen/pointer_conversion.swift
+++ b/test/SILGen/pointer_conversion.swift
@@ -1,8 +1,8 @@
 
-// RUN: %target-swift-emit-silgen -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 -enable-objc-interop | %FileCheck %s
 
 // FIXME: rdar://problem/19648117 Needs splitting objc parts out
-// XFAIL: linux
+// REQUIRES: objc_interop
 
 import Foundation
 
@@ -21,7 +21,7 @@
 func takesOptConstRawPointer(_ x: UnsafeRawPointer?, and: Int) {}
 func takesOptOptConstRawPointer(_ x: UnsafeRawPointer??, and: Int) {}
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion0A9ToPointeryySpySiG_SPySiGSvtF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion0A9ToPointeryySpySiG_SPySiGSvtF
 // CHECK: bb0([[MP:%.*]] : $UnsafeMutablePointer<Int>, [[CP:%.*]] : $UnsafePointer<Int>, [[MRP:%.*]] : $UnsafeMutableRawPointer):
 func pointerToPointer(_ mp: UnsafeMutablePointer<Int>,
   _ cp: UnsafePointer<Int>, _ mrp: UnsafeMutableRawPointer) {
@@ -84,7 +84,7 @@
   // CHECK: apply [[TAKES_CONST_RAW_POINTER]]
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion14arrayToPointeryyF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion14arrayToPointeryyF
 func arrayToPointer() {
   var ints = [1,2,3]
 
@@ -137,7 +137,7 @@
   // CHECK: destroy_value [[OWNER]]
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion15stringToPointeryySSF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion15stringToPointeryySSF
 func stringToPointer(_ s: String) {
   takesConstVoidPointer(s)
   // CHECK: [[CONVERT_STRING:%.*]] = function_ref @$ss40_convertConstStringToUTF8PointerArgument{{[_0-9a-zA-Z]*}}F
@@ -170,7 +170,7 @@
   // CHECK: destroy_value [[OWNER]]
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion14inoutToPointeryyF 
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion14inoutToPointeryyF 
 func inoutToPointer() {
   var int = 0
   // CHECK: [[INT:%.*]] = alloc_box ${ var Int }
@@ -222,7 +222,7 @@
 func takesPlusZeroPointer(_ x: AutoreleasingUnsafeMutablePointer<C>) {}
 func takesPlusZeroOptionalPointer(_ x: AutoreleasingUnsafeMutablePointer<C?>) {}
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion19classInoutToPointeryyF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion19classInoutToPointeryyF
 func classInoutToPointer() {
   var c = C()
   // CHECK: [[VAR:%.*]] = alloc_box ${ var C }
@@ -256,14 +256,14 @@
 
 // Check that pointer types don't bridge anymore.
 @objc class ObjCMethodBridging : NSObject {
-  // CHECK-LABEL: sil hidden [thunk] @$s18pointer_conversion18ObjCMethodBridgingC0A4Args{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (UnsafeMutablePointer<Int>, UnsafePointer<Int>, AutoreleasingUnsafeMutablePointer<ObjCMethodBridging>, ObjCMethodBridging)
+  // CHECK-LABEL: sil hidden [thunk] [ossa] @$s18pointer_conversion18ObjCMethodBridgingC0A4Args{{[_0-9a-zA-Z]*}}FTo : $@convention(objc_method) (UnsafeMutablePointer<Int>, UnsafePointer<Int>, AutoreleasingUnsafeMutablePointer<ObjCMethodBridging>, ObjCMethodBridging)
   @objc func pointerArgs(_ x: UnsafeMutablePointer<Int>,
                          y: UnsafePointer<Int>,
                          z: AutoreleasingUnsafeMutablePointer<ObjCMethodBridging>) {}
 }
 
 // rdar://problem/21505805
-// CHECK-LABEL: sil hidden @$s18pointer_conversion22functionInoutToPointeryyF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion22functionInoutToPointeryyF
 func functionInoutToPointer() {
   // CHECK: [[BOX:%.*]] = alloc_box ${ var @callee_guaranteed () -> () }
   var f: () -> () = {}
@@ -274,7 +274,7 @@
 }
 
 // rdar://problem/31781386
-// CHECK-LABEL: sil hidden @$s18pointer_conversion20inoutPointerOrderingyyF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion20inoutPointerOrderingyyF
 func inoutPointerOrdering() {
   // CHECK: [[ARRAY_BOX:%.*]] = alloc_box ${ var Array<Int> }
   // CHECK: [[ARRAY:%.*]] = project_box [[ARRAY_BOX]] :
@@ -303,7 +303,7 @@
 }
 
 // rdar://problem/31542269
-// CHECK-LABEL: sil hidden @$s18pointer_conversion20optArrayToOptPointer5arrayySaySiGSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion20optArrayToOptPointer5arrayySaySiGSg_tF
 func optArrayToOptPointer(array: [Int]?) {
   // CHECK:   [[COPY:%.*]] = copy_value %0
   // CHECK:   [[SIDE1:%.*]] = function_ref @$s18pointer_conversion11sideEffect1SiyF
@@ -332,7 +332,7 @@
   takesOptConstPointer(array, and: sideEffect1())
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion013optOptArrayTodD7Pointer5arrayySaySiGSgSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion013optOptArrayTodD7Pointer5arrayySaySiGSgSg_tF
 func optOptArrayToOptOptPointer(array: [Int]??) {
   // CHECK:   [[COPY:%.*]] = copy_value %0
   // CHECK:   [[SIDE1:%.*]] = function_ref @$s18pointer_conversion11sideEffect1SiyF
@@ -372,7 +372,7 @@
   takesOptOptConstPointer(array, and: sideEffect1())
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion21optStringToOptPointer6stringySSSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion21optStringToOptPointer6stringySSSg_tF
 func optStringToOptPointer(string: String?) {
   // CHECK:   [[COPY:%.*]] = copy_value %0
   // CHECK:   [[SIDE1:%.*]] = function_ref @$s18pointer_conversion11sideEffect1SiyF
@@ -401,7 +401,7 @@
   takesOptConstRawPointer(string, and: sideEffect1())
 }
 
-// CHECK-LABEL: sil hidden @$s18pointer_conversion014optOptStringTodD7Pointer6stringySSSgSg_tF
+// CHECK-LABEL: sil hidden [ossa] @$s18pointer_conversion014optOptStringTodD7Pointer6stringySSSgSg_tF
 func optOptStringToOptOptPointer(string: String??) {
   // CHECK:   [[COPY:%.*]] = copy_value %0
   // CHECK:   [[SIDE1:%.*]] = function_ref @$s18pointer_conversion11sideEffect1SiyF
diff --git a/test/SILGen/pointer_conversion_nonaccessing.swift b/test/SILGen/pointer_conversion_nonaccessing.swift
index 6dfcfdd..044dea1 100644
--- a/test/SILGen/pointer_conversion_nonaccessing.swift
+++ b/test/SILGen/pointer_conversion_nonaccessing.swift
@@ -7,56 +7,56 @@
 
 var global = 0
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing6testEq3ptrSbSV_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing6testEq3ptrSbSV_tF
 func testEq(ptr: UnsafeRawPointer) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global == ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSV_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSV_tF
 func testNeq(ptr: UnsafeRawPointer) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global != ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing6testEq3ptrSbSv_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing6testEq3ptrSbSv_tF
 func testEq(ptr: UnsafeMutableRawPointer) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global == ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSv_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSv_tF
 func testNeq(ptr: UnsafeMutableRawPointer) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global != ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing6testEq3ptrSbSPySiG_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing6testEq3ptrSbSPySiG_tF
 func testEq(ptr: UnsafePointer<Int>) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global == ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSPySiG_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSPySiG_tF
 func testNeq(ptr: UnsafePointer<Int>) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global != ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing6testEq3ptrSbSpySiG_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing6testEq3ptrSbSpySiG_tF
 func testEq(ptr: UnsafeMutablePointer<Int>) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
   return &global == ptr
 }
 
-// CHECK-LABEL: sil hidden @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSpySiG_tF
+// CHECK-LABEL: sil hidden [ossa] @$s31pointer_conversion_nonaccessing7testNeq3ptrSbSpySiG_tF
 func testNeq(ptr: UnsafeMutablePointer<Int>) -> Bool {
   // CHECK: [[T0:%.*]] = global_addr @$s31pointer_conversion_nonaccessing6globalSiv
   // CHECK: address_to_pointer [[T0]]
diff --git a/test/SILGen/pointer_conversion_nonaccessing_objc.swift b/test/SILGen/pointer_conversion_nonaccessing_objc.swift
index 6c959b1..48e9099 100644
--- a/test/SILGen/pointer_conversion_nonaccessing_objc.swift
+++ b/test/SILGen/pointer_conversion_nonaccessing_objc.swift
@@ -11,14 +11,14 @@
 
 var global = 0
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc15testAddObserver6object8observerySo8NSObjectC_AFtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc15testAddObserver6object8observerySo8NSObjectC_AFtF
 func testAddObserver(object: NSObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
   object.addObserver(observer, forKeyPath: "", options: 0, context: &global)
 }
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc18testRemoveObserver6object8observerySo8NSObjectC_AFtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc18testRemoveObserver6object8observerySo8NSObjectC_AFtF
 func testRemoveObserver(object: NSObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
@@ -28,28 +28,28 @@
 // rdar://33850465
 //   Make sure this applies to AnyObject dispatch, too.
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc28testDynamicForcedAddObserver6object8observeryyXl_So8NSObjectCtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc28testDynamicForcedAddObserver6object8observeryyXl_So8NSObjectCtF
 func testDynamicForcedAddObserver(object: AnyObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
   object.addObserver!(observer, forKeyPath: "", options: 0, context: &global)
 }
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc31testDynamicForcedRemoveObserver6object8observeryyXl_So8NSObjectCtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc31testDynamicForcedRemoveObserver6object8observeryyXl_So8NSObjectCtF
 func testDynamicForcedRemoveObserver(object: AnyObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
   object.removeObserver!(observer, forKeyPath: "", context: &global)
 }
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc30testDynamicOptionalAddObserver6object8observeryyXl_So8NSObjectCtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc30testDynamicOptionalAddObserver6object8observeryyXl_So8NSObjectCtF
 func testDynamicOptionalAddObserver(object: AnyObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
   object.addObserver?(observer, forKeyPath: "", options: 0, context: &global)
 }
 
-// CHECK-LABEL: sil hidden @$s36pointer_conversion_nonaccessing_objc33testDynamicOptionalRemoveObserver6object8observeryyXl_So8NSObjectCtF
+// CHECK-LABEL: sil hidden [ossa] @$s36pointer_conversion_nonaccessing_objc33testDynamicOptionalRemoveObserver6object8observeryyXl_So8NSObjectCtF
 func testDynamicOptionalRemoveObserver(object: AnyObject, observer: NSObject) {
   // CHECK: [[T0:%.*]] = global_addr @$s36pointer_conversion_nonaccessing_objc6globalSiv
   // CHECK: address_to_pointer [[T0]] :
diff --git a/test/SILGen/pound_assert.swift b/test/SILGen/pound_assert.swift
index dabe175..3e0ce39 100644
--- a/test/SILGen/pound_assert.swift
+++ b/test/SILGen/pound_assert.swift
@@ -1,20 +1,18 @@
 // RUN: %target-swift-frontend -enable-experimental-static-assert -emit-silgen %s | %FileCheck %s
 
-// CHECK-LABEL: sil hidden @$s12pound_assert15noCustomMessage{{[_0-9a-zA-Z]*}}
+// CHECK-LABEL: sil hidden [ossa] @$s12pound_assert15noCustomMessage{{[_0-9a-zA-Z]*}}
 func noCustomMessage() {
   #assert(true)
-  // CHECK: [[GET_LOGIC_VALUE:%.*]] = function_ref {{.*}}_getBuiltinLogicValue
-  // CHECK-NEXT: [[LOGIC_VALUE:%.*]] = apply [[GET_LOGIC_VALUE]]
+  // CHECK: [[LOGIC_VALUE:%.*]] = struct_extract {{.*}}
   // CHECK-NEXT: [[MESSAGE:%.*]] = string_literal utf8 ""
   // CHECK-NEXT: builtin "poundAssert"([[LOGIC_VALUE]] : $Builtin.Int1, [[MESSAGE]] : $Builtin.RawPointer)
 }
 // CHECK: } // end sil function '$s12pound_assert15noCustomMessage{{[_0-9a-zA-Z]*}}'
 
-// CHECK-LABEL: sil hidden @$s12pound_assert13customMessage{{[_0-9a-zA-Z]*}}
+// CHECK-LABEL: sil hidden [ossa] @$s12pound_assert13customMessage{{[_0-9a-zA-Z]*}}
 func customMessage() {
   #assert(true, "custom message")
-  // CHECK: [[GET_LOGIC_VALUE:%.*]] = function_ref {{.*}}_getBuiltinLogicValue
-  // CHECK-NEXT: [[LOGIC_VALUE:%.*]] = apply [[GET_LOGIC_VALUE]]
+  // CHECK: [[LOGIC_VALUE:%.*]] = struct_extract {{.*}}
   // CHECK-NEXT: [[MESSAGE:%.*]] = string_literal utf8 "custom message"
   // CHECK-NEXT: builtin "poundAssert"([[LOGIC_VALUE]] : $Builtin.Int1, [[MESSAGE]] : $Builtin.RawPointer)
 }
diff --git a/test/SILGen/private_import_other.swift b/test/SILGen/private_import_other.swift
index 93e3440..dc336a7 100644
--- a/test/SILGen/private_import_other.swift
+++ b/test/SILGen/private_import_other.swift
@@ -18,7 +18,7 @@
   publicFoo.foo()
 }
 
-// CHECK-LABEL: sil hidden @$s4main4test11internalFoo06publicD0yAA0D4ImplV_AA06PublicdF0VtF
+// CHECK-LABEL: sil hidden [ossa] @$s4main4test11internalFoo06publicD0yAA0D4ImplV_AA06PublicdF0VtF
 // CHECK: [[USE_1:%.+]] = function_ref @$s4main3useyyxAA7FooableRzlF
 // CHECK: = apply [[USE_1]]<FooImpl>({{%.+}}) : $@convention(thin) <τ_0_0 where τ_0_0 : Fooable> (@in_guaranteed τ_0_0) -> ()
 // CHECK: [[USE_2:%.+]] = function_ref @$s4main3useyyxAA7FooableRzlF
@@ -34,7 +34,7 @@
   publicSub.foo()
 }
 
-// CHECK-LABEL: sil hidden @$s4main4test11internalSub06publicD0yAA0D0C_AA06PublicD0CtF
+// CHECK-LABEL: sil hidden [ossa] @$s4main4test11internalSub06publicD0yAA0D0C_AA06PublicD0CtF
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Sub, [[ARG1:%.*]] : @guaranteed $PublicSub):
 // CHECK: = class_method [[ARG0]] : $Sub, #Sub.foo!1
 // CHECK: = class_method [[ARG1]] : $PublicSub, #PublicSub.foo!1
diff --git a/test/SILGen/properties.swift b/test/SILGen/properties.swift
index d153d83..dad7225 100644
--- a/test/SILGen/properties.swift
+++ b/test/SILGen/properties.swift
@@ -7,7 +7,7 @@
 func use(_: Double) {}
 func getInt() -> Int { return zero }
 
-// CHECK-LABEL: sil hidden @{{.*}}physical_tuple_lvalue
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}physical_tuple_lvalue
 // CHECK: bb0(%0 : $Int):
 func physical_tuple_lvalue(_ c: Int) {
   var x : (Int, Int)
@@ -22,7 +22,7 @@
 
 func tuple_rvalue() -> (Int, Int) {}
 
-// CHECK-LABEL: sil hidden @{{.*}}physical_tuple_rvalue
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}physical_tuple_rvalue
 func physical_tuple_rvalue() -> Int {
   return tuple_rvalue().1
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s10properties12tuple_rvalue{{[_0-9a-zA-Z]*}}F
@@ -31,7 +31,7 @@
   // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties16tuple_assignment{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties16tuple_assignment{{[_0-9a-zA-Z]*}}F
 func tuple_assignment(_ a: inout Int, b: inout Int) {
   // CHECK: bb0([[A_ADDR:%[0-9]+]] : $*Int, [[B_ADDR:%[0-9]+]] : $*Int):
   // CHECK: [[READ:%.*]] = begin_access [read] [unknown] [[B_ADDR]]
@@ -45,7 +45,7 @@
   (a, b) = (b, a)
 }
 
-// CHECK-LABEL: sil hidden @$s10properties18tuple_assignment_2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18tuple_assignment_2{{[_0-9a-zA-Z]*}}F
 func tuple_assignment_2(_ a: inout Int, b: inout Int, xy: (Int, Int)) {
   // CHECK: bb0([[A_ADDR:%[0-9]+]] : $*Int, [[B_ADDR:%[0-9]+]] : $*Int, [[X:%[0-9]+]] : $Int, [[Y:%[0-9]+]] : $Int):
   (a, b) = xy
@@ -94,7 +94,7 @@
   subscript(i: Int) -> Float { get {} set {} }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties22physical_struct_lvalue{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties22physical_struct_lvalue{{[_0-9a-zA-Z]*}}F
 func physical_struct_lvalue(_ c: Int) {
   var v : Val
   // CHECK: [[VADDR:%[0-9]+]] = alloc_box ${ var Val }
@@ -104,7 +104,7 @@
   // CHECK: assign %0 to [[YADDR]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties21physical_class_lvalue{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Ref, Int) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s10properties21physical_class_lvalue{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Ref, Int) -> ()
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Ref,
  func physical_class_lvalue(_ r: Ref, a: Int) {
     r.y = a
@@ -113,7 +113,7 @@
   }
 
 
-// CHECK-LABEL: sil hidden @$s10properties24physical_subclass_lvalue{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties24physical_subclass_lvalue{{[_0-9a-zA-Z]*}}F
 func physical_subclass_lvalue(_ r: RefSubclass, a: Int) {
   // CHECK: bb0([[ARG1:%.*]] : @guaranteed $RefSubclass, [[ARG2:%.*]] : $Int):
   r.y = a
@@ -134,7 +134,7 @@
 
 func struct_rvalue() -> Val {}
 
-// CHECK-LABEL: sil hidden @$s10properties22physical_struct_rvalue{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties22physical_struct_rvalue{{[_0-9a-zA-Z]*}}F
 func physical_struct_rvalue() -> Int {
   return struct_rvalue().y
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s10properties13struct_rvalueAA3ValVyF
@@ -148,7 +148,7 @@
 
 func class_rvalue() -> Ref {}
 
-// CHECK-LABEL: sil hidden @$s10properties21physical_class_rvalue{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties21physical_class_rvalue{{[_0-9a-zA-Z]*}}F
 func physical_class_rvalue() -> Int {
   return class_rvalue().y
   // CHECK: [[FUNC:%[0-9]+]] = function_ref @$s10properties12class_rvalueAA3RefCyF
@@ -159,7 +159,7 @@
   // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties18logical_struct_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18logical_struct_get{{[_0-9a-zA-Z]*}}F
 func logical_struct_get() -> Int {
   return struct_rvalue().z
   // CHECK: [[GET_RVAL:%[0-9]+]] = function_ref @$s10properties13struct_rvalue{{[_0-9a-zA-Z]*}}F
@@ -170,7 +170,7 @@
   // CHECK: return [[VALUE]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties18logical_struct_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18logical_struct_set{{[_0-9a-zA-Z]*}}F
 func logical_struct_set(_ value: inout Val, z: Int) {
   // CHECK: bb0([[VAL:%[0-9]+]] : $*Val, [[Z:%[0-9]+]] : $Int):
   value.z = z
@@ -180,7 +180,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s10properties27logical_struct_in_tuple_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties27logical_struct_in_tuple_set{{[_0-9a-zA-Z]*}}F
 func logical_struct_in_tuple_set(_ value: inout (Int, Val), z: Int) {
   // CHECK: bb0([[VAL:%[0-9]+]] : $*(Int, Val), [[Z:%[0-9]+]] : $Int):
   value.1.z = z
@@ -191,7 +191,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s10properties29logical_struct_in_reftype_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties29logical_struct_in_reftype_set{{[_0-9a-zA-Z]*}}F
 func logical_struct_in_reftype_set(_ value: inout Val, z1: Int) {
   // CHECK: bb0([[VAL:%[0-9]+]] : $*Val, [[Z1:%[0-9]+]] : $Int):
   value.ref.val_prop.z_tuple.1 = z1
@@ -231,12 +231,12 @@
 
 func reftype_rvalue() -> Ref {}
 
-// CHECK-LABEL: sil hidden @$s10properties18reftype_rvalue_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18reftype_rvalue_set{{[_0-9a-zA-Z]*}}F
 func reftype_rvalue_set(_ value: Val) {
   reftype_rvalue().val_prop = value
 }
 
-// CHECK-LABEL: sil hidden @$s10properties27tuple_in_logical_struct_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties27tuple_in_logical_struct_set{{[_0-9a-zA-Z]*}}F
 func tuple_in_logical_struct_set(_ value: inout Val, z1: Int) {
   // CHECK: bb0([[VAL:%[0-9]+]] : $*Val, [[Z1:%[0-9]+]] : $Int):
   value.z_tuple.1 = z1
@@ -261,17 +261,17 @@
 }
 
 var global_prop : Int {
-  // CHECK-LABEL: sil hidden @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vg
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vg
   get {
     return zero
   }
-  // CHECK-LABEL: sil hidden @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vs
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vs
   set {
     use(newValue)
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties18logical_global_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18logical_global_get{{[_0-9a-zA-Z]*}}F
 func logical_global_get() -> Int {
   return global_prop
   // CHECK: [[GET:%[0-9]+]] = function_ref @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vg
@@ -279,14 +279,14 @@
   // CHECK: return [[VALUE]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties18logical_global_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties18logical_global_set{{[_0-9a-zA-Z]*}}F
 func logical_global_set(_ x: Int) {
   global_prop = x
   // CHECK: [[SET:%[0-9]+]] = function_ref @$s10properties11global_prop{{[_0-9a-zA-Z]*}}vs
   // CHECK: apply [[SET]](%0)
 }
 
-// CHECK-LABEL: sil hidden @$s10properties17logical_local_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties17logical_local_get{{[_0-9a-zA-Z]*}}F
 func logical_local_get(_ x: Int) -> Int {
   var prop : Int {
     get {
@@ -319,7 +319,7 @@
   _ = prop2
 }
 
-// CHECK-LABEL: sil hidden @$s10properties26logical_local_captured_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties26logical_local_captured_get{{[_0-9a-zA-Z]*}}F
 func logical_local_captured_get(_ x: Int) -> Int {
   var prop : Int {
     get {
@@ -334,12 +334,12 @@
   // CHECK: [[FUNC_REF:%[0-9]+]] = function_ref @$s10properties26logical_local_captured_getyS2iF0E5_propL_SiyF
   // CHECK: apply [[FUNC_REF]](%0)
 }
-// CHECK: sil private @$s10properties26logical_local_captured_get{{.*}}vg
+// CHECK: sil private [ossa] @$s10properties26logical_local_captured_get{{.*}}vg
 // CHECK: bb0(%{{[0-9]+}} : $Int):
 
 func inout_arg(_ x: inout Int) {}
 
-// CHECK-LABEL: sil hidden @$s10properties14physical_inout{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties14physical_inout{{[_0-9a-zA-Z]*}}F
 func physical_inout(_ x: Int) {
   var x = x
   // CHECK: [[XADDR:%[0-9]+]] = alloc_box ${ var Int }
@@ -354,7 +354,7 @@
 /* TODO check writeback to more complex logical prop, check that writeback
  * reuses temporaries */
 
-// CHECK-LABEL: sil hidden @$s10properties17val_subscript_get{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Val, Int) -> Float
+// CHECK-LABEL: sil hidden [ossa] @$s10properties17val_subscript_get{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@guaranteed Val, Int) -> Float
 // CHECK: bb0([[VVAL:%[0-9]+]] : @guaranteed $Val, [[I:%[0-9]+]] : $Int):
 func val_subscript_get(_ v: Val, i: Int) -> Float {
   return v[i]
@@ -363,7 +363,7 @@
   // CHECK: return [[RET]]
 }
 
-// CHECK-LABEL: sil hidden @$s10properties17val_subscript_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties17val_subscript_set{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0(%0 : @guaranteed $Val, [[I:%[0-9]+]] : $Int, [[X:%[0-9]+]] : $Float):
 func val_subscript_set(_ v: Val, i: Int, x: Float) {
   var v = v
@@ -384,27 +384,27 @@
 
   subscript(x: T) -> T { get {} set {} }
 
-  // CHECK-LABEL: sil hidden @$s10properties7GenericV19copy_typevar_member{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties7GenericV19copy_typevar_member{{[_0-9a-zA-Z]*}}F
   mutating
   func copy_typevar_member(_ x: Generic<T>) {
     typevar_member = x.typevar_member
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties21generic_mono_phys_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties21generic_mono_phys_get{{[_0-9a-zA-Z]*}}F
 func generic_mono_phys_get<T>(_ g: Generic<T>) -> Int {
   return g.mono_phys
   // CHECK: struct_element_addr %{{.*}}, #Generic.mono_phys
 }
 
-// CHECK-LABEL: sil hidden @$s10properties20generic_mono_log_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties20generic_mono_log_get{{[_0-9a-zA-Z]*}}F
 func generic_mono_log_get<T>(_ g: Generic<T>) -> Int {
   return g.mono_log
   // CHECK: [[GENERIC_GET_METHOD:%[0-9]+]] = function_ref @$s10properties7GenericV8mono_log{{[_0-9a-zA-Z]*}}vg
   // CHECK: apply [[GENERIC_GET_METHOD]]<
 }
 
-// CHECK-LABEL: sil hidden @$s10properties20generic_mono_log_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties20generic_mono_log_set{{[_0-9a-zA-Z]*}}F
 func generic_mono_log_set<T>(_ g: Generic<T>, x: Int) {
   var g = g
   g.mono_log = x
@@ -412,34 +412,34 @@
   // CHECK: apply [[GENERIC_SET_METHOD]]<
 }
 
-// CHECK-LABEL: sil hidden @$s10properties26generic_mono_subscript_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties26generic_mono_subscript_get{{[_0-9a-zA-Z]*}}F
 func generic_mono_subscript_get<T>(_ g: Generic<T>, i: Int) -> Float {
   return g[i]
   // CHECK: [[GENERIC_GET_METHOD:%[0-9]+]] = function_ref @$s10properties7GenericV{{[_0-9a-zA-Z]*}}ig
   // CHECK: apply [[GENERIC_GET_METHOD]]<
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}generic_mono_subscript_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}generic_mono_subscript_set
 func generic_mono_subscript_set<T>(_ g: inout Generic<T>, i: Int, x: Float) {
   g[i] = x
   // CHECK: [[GENERIC_SET_METHOD:%[0-9]+]] = function_ref @$s10properties7GenericV{{[_0-9a-zA-Z]*}}is
   // CHECK: apply [[GENERIC_SET_METHOD]]<
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}bound_generic_mono_phys_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}bound_generic_mono_phys_get
 func bound_generic_mono_phys_get(_ g: inout Generic<UnicodeScalar>, x: Int) -> Int {
   return g.mono_phys
   // CHECK: struct_element_addr %{{.*}}, #Generic.mono_phys
 }
 
-// CHECK-LABEL: sil hidden @$s10properties26bound_generic_mono_log_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties26bound_generic_mono_log_get{{[_0-9a-zA-Z]*}}F
 func bound_generic_mono_log_get(_ g: Generic<UnicodeScalar>, x: Int) -> Int {
   return g.mono_log
 // CHECK: [[GENERIC_GET_METHOD:%[0-9]+]] = function_ref @$s10properties7GenericV8mono_log{{[_0-9a-zA-Z]*}}vg
   // CHECK: apply [[GENERIC_GET_METHOD]]<
 }
 
-// CHECK-LABEL: sil hidden @$s10properties22generic_subscript_type{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties22generic_subscript_type{{[_0-9a-zA-Z]*}}F
 func generic_subscript_type<T>(_ g: Generic<T>, i: T, x: T) -> T {
   var g = g
   g[i] = x
@@ -457,13 +457,13 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties10static_get{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties10static_get{{[_0-9a-zA-Z]*}}F
 // CHECK:   function_ref @$s10properties14StaticPropertyV3foo{{[_0-9a-zA-Z]*}}vgZ : $@convention(method) (@thin StaticProperty.Type) -> Int
 func static_get() -> Int {
   return StaticProperty.foo
 }
 
-// CHECK-LABEL: sil hidden @$s10properties10static_set{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties10static_set{{[_0-9a-zA-Z]*}}F
 // CHECK:   function_ref @$s10properties14StaticPropertyV3foo{{[_0-9a-zA-Z]*}}vsZ : $@convention(method) (Int, @thin StaticProperty.Type) -> ()
 func static_set(_ x: Int) {
   StaticProperty.foo = x
@@ -476,7 +476,7 @@
 }
 
 struct DidSetWillSetTests: ForceAccessors {
-  // CHECK-LABEL: sil hidden @$s10properties010DidSetWillC5TestsV{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties010DidSetWillC5TestsV{{[_0-9a-zA-Z]*}}fC
   init(x : Int) {
     // Accesses to didset/willset variables are direct in init methods and dtors.
     a = x
@@ -494,7 +494,7 @@
   }
 
   var a: Int {
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
     willSet(newA) {
       // CHECK: bb0(%0 : $Int, %1 : $*DidSetWillSetTests):
       // CHECK-NEXT: debug_value %0
@@ -529,7 +529,7 @@
       // CHECK-NEXT: assign [[ZERO]] to [[AADDR]]
     }
 
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
     didSet {
       // CHECK: bb0(%0 : $Int, %1 : $*DidSetWillSetTests):
       // CHECK-NEXT: debug
@@ -562,14 +562,14 @@
 
   // This is the synthesized getter and setter for the willset/didset variable.
 
-  // CHECK-LABEL: sil hidden [transparent] @$s10properties010DidSetWillC5TestsV1aSivg
+  // CHECK-LABEL: sil hidden [transparent] [ossa] @$s10properties010DidSetWillC5TestsV1aSivg
   // CHECK: bb0(%0 : $DidSetWillSetTests):
   // CHECK-NEXT:   debug_value %0
   // CHECK-NEXT:   %2 = struct_extract %0 : $DidSetWillSetTests, #DidSetWillSetTests.a
   // CHECK-NEXT:   return %2 : $Int{{.*}}                      // id: %3
 
 
-  // CHECK-LABEL: sil hidden @$s10properties010DidSetWillC5TestsV1aSivs
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties010DidSetWillC5TestsV1aSivs
   // CHECK: bb0(%0 : $Int, %1 : $*DidSetWillSetTests):
   // CHECK-NEXT: debug_value %0
   // CHECK-NEXT: debug_value_addr %1
@@ -594,7 +594,7 @@
   // CHECK-NEXT: [[DIDSETFN:%.*]] = function_ref @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW : $@convention(method) (Int, @inout DidSetWillSetTests) -> ()
   // CHECK-NEXT: apply [[DIDSETFN]]([[OLDVAL]], [[WRITE]]) : $@convention(method) (Int, @inout DidSetWillSetTests) -> ()
 
-  // CHECK-LABEL: sil hidden @$s10properties010DidSetWillC5TestsV8testReadSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties010DidSetWillC5TestsV8testReadSiyF
   // CHECK:         [[SELF:%.*]] = begin_access [read] [unknown] %0 : $*DidSetWillSetTests
   // CHECK-NEXT:    [[PROP:%.*]] = struct_element_addr [[SELF]] : $*DidSetWillSetTests
   // CHECK-NEXT:    [[LOAD:%.*]] = load [trivial] [[PROP]] : $*Int
@@ -604,7 +604,7 @@
     return a
   }
 
-  // CHECK-LABEL: sil hidden @$s10properties010DidSetWillC5TestsV9testWrite5inputySi_tF
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties010DidSetWillC5TestsV9testWrite5inputySi_tF
   // CHECK:         [[SELF:%.*]] = begin_access [modify] [unknown] %1 : $*DidSetWillSetTests
   // CHECK-NEXT:    // function_ref properties.DidSetWillSetTests.a.setter
   // CHECK-NEXT:    [[SETTER:%.*]] = function_ref @$s10properties010DidSetWillC5TestsV1aSivs
@@ -616,7 +616,7 @@
     a = input
   }
 
-  // CHECK-LABEL: sil hidden @$s10properties010DidSetWillC5TestsV13testReadWrite5inputySi_tF
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties010DidSetWillC5TestsV13testReadWrite5inputySi_tF
   // CHECK:         [[SELF:%.*]] = begin_access [modify] [unknown] %1 : $*DidSetWillSetTests
   // CHECK-NEXT:    [[TEMP:%.*]] = alloc_stack $Int
   // CHECK-NEXT:    [[PROP:%.*]] = struct_element_addr [[SELF]] : $*DidSetWillSetTests
@@ -641,7 +641,7 @@
 
 var global_observing_property : Int = zero {
   // The variable is initialized with "zero".
-  // CHECK-LABEL: sil private @globalinit_{{.*}}_func1 : $@convention(c) () -> () {
+  // CHECK-LABEL: sil private [ossa] @globalinit_{{.*}}_func1 : $@convention(c) () -> () {
   // CHECK: bb0:
   // CHECK-NEXT: alloc_global @$s10properties25global_observing_propertySiv
   // CHECK-NEXT: %1 = global_addr @$s10properties25global_observing_propertySivp : $*Int
@@ -650,13 +650,13 @@
 
   // global_observing_property's setter needs to call didSet.
 
-  // CHECK-LABEL: sil hidden @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vs
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vs
   // CHECK: function_ref properties.global_observing_property.unsafeMutableAddressor
   // CHECK-NEXT:  function_ref @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vau
   // CHECK: function_ref properties.global_observing_property.didset
   // CHECK-NEXT: function_ref @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vW
 
-  // CHECK-LABEL: sil private @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vW
+  // CHECK-LABEL: sil private [ossa] @$s10properties25global_observing_property{{[_0-9a-zA-Z]*}}vW
   didSet {
     // The didSet implementation needs to call takeInt.
     takeInt(global_observing_property)
@@ -693,7 +693,7 @@
 
 // Test local observing properties.
 
-// CHECK-LABEL: sil hidden @$s10properties24local_observing_property{{[_0-9a-zA-Z]*}}SiF
+// CHECK-LABEL: sil hidden [ossa] @$s10properties24local_observing_property{{[_0-9a-zA-Z]*}}SiF
 func local_observing_property(_ arg: Int) {
   var localproperty: Int = arg {
     didSet {
@@ -715,7 +715,7 @@
 // didSet of localproperty (above)
 // Ensure that setting the variable from within its own didSet doesn't recursively call didSet.
 
-// CHECK-LABEL: sil private @$s10properties24local_observing_property{{[_0-9a-zA-Z]*}}SiF13localproperty{{[_0-9a-zA-Z]*}}SivW
+// CHECK-LABEL: sil private [ossa] @$s10properties24local_observing_property{{[_0-9a-zA-Z]*}}SiF13localproperty{{[_0-9a-zA-Z]*}}SivW
 // CHECK: bb0(%0 : $Int, %1 : @guaranteed ${ var Int })
 // CHECK: [[POINTER:%.*]] = project_box %1 : ${ var Int }, 0
 // CHECK: // function_ref properties.zero.unsafeMutableAddressor : Swift.Int
@@ -779,7 +779,7 @@
 }
 
 class rdar16151899Derived : rdar16151899Base {
-    // CHECK-LABEL: sil hidden @$s10properties19rdar16151899DerivedC{{[_0-9a-zA-Z]*}}fc
+    // CHECK-LABEL: sil hidden [ossa] @$s10properties19rdar16151899DerivedC{{[_0-9a-zA-Z]*}}fc
     override init() {
         super.init()
         // CHECK: upcast {{.*}} : $rdar16151899Derived to $rdar16151899Base
@@ -812,7 +812,7 @@
 }
 
 // CHECK: // setter of p #1 : Swift.Int in properties.propertyWithDidSetTakingOldValue()
-// CHECK-NEXT: sil {{.*}} @$s10properties32propertyWithDidSetTakingOldValueyyF1pL_Sivs
+// CHECK-NEXT: sil {{.*}} [ossa] @$s10properties32propertyWithDidSetTakingOldValueyyF1pL_Sivs
 // CHECK: bb0([[ARG1:%.*]] : $Int, [[ARG2:%.*]] : @guaranteed ${ var Int }):
 // CHECK-NEXT:  debug_value [[ARG1]] : $Int, let, name "newValue", argno 1
 // CHECK-NEXT:  [[ARG2_PB:%.*]] = project_box [[ARG2]]
@@ -848,7 +848,7 @@
 
 // rdar://16381392 - Super property references in non-objc classes should be direct.
 
-// CHECK-LABEL: sil hidden @$s10properties15DerivedPropertyC24super_property_referenceSiyF : $@convention(method) (@guaranteed DerivedProperty) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s10properties15DerivedPropertyC24super_property_referenceSiyF : $@convention(method) (@guaranteed DerivedProperty) -> Int {
 // CHECK: bb0([[SELF:%.*]] : @guaranteed $DerivedProperty):
 // CHECK:   [[SELF_COPY:%[0-9]+]] = copy_value [[SELF]]
 // CHECK:   [[BASEPTR:%[0-9]+]] = upcast [[SELF_COPY]] : $DerivedProperty to $BaseProperty
@@ -867,7 +867,7 @@
   func testRValueUnowned() -> Ref {
     return p1
   }
-// CHECK: sil hidden @{{.*}}testRValueUnowned{{.*}} : $@convention(method) (@guaranteed ReferenceStorageTypeRValues) -> @owned Ref {
+// CHECK: sil hidden [ossa] @{{.*}}testRValueUnowned{{.*}} : $@convention(method) (@guaranteed ReferenceStorageTypeRValues) -> @owned Ref {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $ReferenceStorageTypeRValues):
 // CHECK-NEXT:   debug_value [[ARG]] : $ReferenceStorageTypeRValues
 // CHECK-NEXT:   [[UNOWNED_ARG_FIELD:%.*]] = struct_extract [[ARG]] : $ReferenceStorageTypeRValues, #ReferenceStorageTypeRValues.p1
@@ -923,7 +923,7 @@
   var x: Int
 }
 
-// CHECK-LABEL: sil hidden @$s10properties4getX{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties4getX{{[_0-9a-zA-Z]*}}F
 // CHECK:         struct_extract {{%.*}} : $SomeGenericStruct<T>, #SomeGenericStruct.x
 func getX<T>(_ g: SomeGenericStruct<T>) -> Int {
   return g.x
@@ -977,7 +977,7 @@
   init() { fatalError("scaffold") }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties12genericPropsyyAA12GenericClassCySSGF : $@convention(thin) (@guaranteed GenericClass<String>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10properties12genericPropsyyAA12GenericClassCySSGF : $@convention(thin) (@guaranteed GenericClass<String>) -> () {
 func genericProps(_ x: GenericClass<String>) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $GenericClass<String>):
   // CHECK:   class_method [[ARG]] : $GenericClass<String>, #GenericClass.x!getter.1
@@ -993,7 +993,7 @@
   let _ = x.z
 }
 
-// CHECK-LABEL: sil hidden @$s10properties28genericPropsInGenericContext{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties28genericPropsInGenericContext{{[_0-9a-zA-Z]*}}F
 func genericPropsInGenericContext<U>(_ x: GenericClass<U>) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $GenericClass<U>):
   // CHECK:   [[Z:%.*]] = ref_element_addr [[ARG]] : $GenericClass<U>, #GenericClass.z
@@ -1009,7 +1009,7 @@
 
   // We shouldn't have any dynamic dispatch within this method, just load p.
   func ReturnConstant() -> Int { return p }
-// CHECK-LABEL: sil hidden @$s10properties20ClassWithLetPropertyC14ReturnConstant{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties20ClassWithLetPropertyC14ReturnConstant{{[_0-9a-zA-Z]*}}F
 // CHECK:       bb0([[ARG:%.*]] : @guaranteed $ClassWithLetProperty):
 // CHECK-NEXT:    debug_value
 // CHECK-NEXT:    [[PTR:%[0-9]+]] = ref_element_addr [[ARG]] : $ClassWithLetProperty, #ClassWithLetProperty.p
@@ -1019,7 +1019,7 @@
 
   // This property is marked dynamic, so go through the getter, always.
   func ReturnDynamicConstant() -> Int { return q }
-// CHECK-LABEL: sil hidden @$s10properties20ClassWithLetPropertyC21ReturnDynamicConstant{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties20ClassWithLetPropertyC21ReturnDynamicConstant{{[_0-9a-zA-Z]*}}F
 // CHECK: objc_method %0 : $ClassWithLetProperty, #ClassWithLetProperty.q!getter.1.foreign
 }
 
@@ -1034,7 +1034,7 @@
   }
   
 // Accessing the "pi" property should not copy_value/release self.
-// CHECK-LABEL: sil hidden @$s10properties16r19254812DerivedC{{[_0-9a-zA-Z]*}}fc
+// CHECK-LABEL: sil hidden [ossa] @$s10properties16r19254812DerivedC{{[_0-9a-zA-Z]*}}fc
 // CHECK: [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [derivedself]
 // CHECK: [[PB_BOX:%.*]] = project_box [[MARKED_SELF_BOX]]
 
@@ -1065,7 +1065,7 @@
   func testMethod1() {
     f = RedundantSelfRetains()
   }
-  // CHECK-LABEL: sil hidden @$s10properties20RedundantSelfRetainsC11testMethod1{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties20RedundantSelfRetainsC11testMethod1{{[_0-9a-zA-Z]*}}F
   // CHECK: bb0(%0 : @guaranteed $RedundantSelfRetains):
 
   // CHECK-NOT: copy_value
@@ -1086,7 +1086,7 @@
   a.field = 4  // no copy_value/release of a necessary here.
 }
 
-// CHECK-LABEL: sil hidden @$s10properties20testRedundantRetainsyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10properties20testRedundantRetainsyyF : $@convention(thin) () -> () {
 // CHECK: [[A:%[0-9]+]] = apply
 // CHECK-NOT: copy_value
 // CHECK: destroy_value [[A]] : $RedundantRetains
@@ -1108,7 +1108,7 @@
   x.prop = 0
   return x.prop
 }
-// CHECK-LABEL: sil hidden @$s10properties30addressOnlyNonmutatingProperty{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10properties30addressOnlyNonmutatingProperty{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[SET:%.*]] = function_ref @$s10properties25AddressOnlyNonmutatingSetV4propSivs
 // CHECK:         apply [[SET]]<T>({{%.*}}, [[TMP:%[0-9]*]])
 // CHECK:         destroy_addr [[TMP]]
@@ -1125,7 +1125,7 @@
   subscript(z: Int) -> Int { return z }
 }
 
-// CHECK-LABEL: sil hidden @$s10properties015addressOnlyReadC24SubscriptFromMutableBase
+// CHECK-LABEL: sil hidden [ossa] @$s10properties015addressOnlyReadC24SubscriptFromMutableBase
 // CHECK:         [[BASE:%.*]] = alloc_box ${ var AddressOnlyReadOnlySubscript }
 // CHECK:         copy_addr [[BASE:%.*]] to [initialization] [[COPY:%.*]] :
 // CHECK:         copy_addr [[COPY:%.*]] to [initialization] [[COPY2:%.*]] :
@@ -1144,7 +1144,7 @@
     mutating get {  }
   }
 
-  // CHECK-LABEL: sil hidden @$s10properties20MutatingGetterStructV4test
+  // CHECK-LABEL: sil hidden [ossa] @$s10properties20MutatingGetterStructV4test
   // CHECK: [[X:%.*]] = alloc_box ${ var MutatingGetterStruct }, var, name "x"
   // CHECK-NEXT: [[PB:%.*]] = project_box [[X]]
   // CHECK: store {{.*}} to [trivial] [[PB]] : $*MutatingGetterStruct
@@ -1179,9 +1179,9 @@
   }
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s10properties29BaseClassWithInternalPropertyC1xytvg
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s10properties29BaseClassWithInternalPropertyC1xytvg
 
-// CHECK-LABEL: sil [transparent] [serialized] @$s10properties30DerivedClassWithPublicPropertyC1xytvg
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s10properties30DerivedClassWithPublicPropertyC1xytvg
 // CHECK:       bb0([[SELF:%.*]] : @guaranteed $DerivedClassWithPublicProperty):
 // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]] : $DerivedClassWithPublicProperty
 // CHECK-NEXT:    [[SUPER:%.*]] = upcast [[SELF_COPY]] : $DerivedClassWithPublicProperty to $BaseClassWithInternalProperty
@@ -1210,7 +1210,7 @@
   var x: Int { get nonmutating set }
 }
 
-// sil hidden @$s10properties19overlappingLoadExpr1cyAA13ReferenceTypeCz_tF : $@convention(thin) (@inout ReferenceType) -> () {
+// sil hidden [ossa] @$s10properties19overlappingLoadExpr1cyAA13ReferenceTypeCz_tF : $@convention(thin) (@inout ReferenceType) -> () {
 // CHECK:        [[C_INOUT:%.*]] = begin_access [read] [unknown] %0 : $*ReferenceType
 // CHECK-NEXT:   [[C:%.*]] = load [copy] [[C_INOUT:%.*]] : $*ReferenceType
 // CHECK-NEXT:   end_access [[C_INOUT]] : $*ReferenceType
diff --git a/test/SILGen/properties_swift4.swift b/test/SILGen/properties_swift4.swift
index a45d855..1fc547a 100644
--- a/test/SILGen/properties_swift4.swift
+++ b/test/SILGen/properties_swift4.swift
@@ -13,7 +13,7 @@
   }
 
   var a: Int {
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
     willSet(newA) {
       // CHECK: bb0(%0 : $Int, %1 : $*DidSetWillSetTests):
 
@@ -57,7 +57,7 @@
       // CHECK-NEXT: end_access [[WRITE]] : $*DidSetWillSetTests
     }
 
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
     didSet {
       (self).a = zero  // reassign, but don't infinite loop.
 
diff --git a/test/SILGen/properties_swift5.swift b/test/SILGen/properties_swift5.swift
index 6775c9b..92b791a 100644
--- a/test/SILGen/properties_swift5.swift
+++ b/test/SILGen/properties_swift5.swift
@@ -13,7 +13,7 @@
   }
 
   var a: Int {
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vw
     willSet(newA) {
       // CHECK: bb0(%0 : $Int, %1 : $*DidSetWillSetTests):
 
@@ -59,7 +59,7 @@
       // CHECK-NEXT: end_access [[WRITE]] : $*DidSetWillSetTests
     }
 
-    // CHECK-LABEL: sil private @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
+    // CHECK-LABEL: sil private [ossa] @$s10properties010DidSetWillC5TestsV1a{{[_0-9a-zA-Z]*}}vW
     didSet {
       (self).a = zero  // reassign, but don't infinite loop, as accessing on 'self'.
 
diff --git a/test/SILGen/property_abstraction.swift b/test/SILGen/property_abstraction.swift
index d339248..5194672 100644
--- a/test/SILGen/property_abstraction.swift
+++ b/test/SILGen/property_abstraction.swift
@@ -11,7 +11,7 @@
   var g: T
 }
 
-// CHECK-LABEL: sil hidden @$s20property_abstraction4getF{{[_0-9a-zA-Z]*}}Foo{{.*}}F : $@convention(thin) (@guaranteed Foo<Int, Int>) -> @owned @callee_guaranteed (Int) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction4getF{{[_0-9a-zA-Z]*}}Foo{{.*}}F : $@convention(thin) (@guaranteed Foo<Int, Int>) -> @owned @callee_guaranteed (Int) -> Int {
 // CHECK:       bb0([[X_ORIG:%.*]] : @guaranteed $Foo<Int, Int>):
 // CHECK:         [[F_ORIG:%.*]] = struct_extract [[X_ORIG]] : $Foo<Int, Int>, #Foo.f
 // CHECK:         [[F_ORIG_COPY:%.*]] = copy_value [[F_ORIG]]
@@ -23,7 +23,7 @@
   return x.f
 }
 
-// CHECK-LABEL: sil hidden @$s20property_abstraction4setF{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction4setF{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[REABSTRACT_FN:%.*]] = function_ref @$s{{.*}}TR :
 // CHECK:         [[F_ORIG:%.*]] = partial_apply [callee_guaranteed] [[REABSTRACT_FN]]({{%.*}})
 // CHECK:         [[F_ADDR:%.*]] = struct_element_addr {{%.*}} : $*Foo<Int, Int>, #Foo.f
@@ -34,7 +34,7 @@
 
 func inOutFunc(_ f: inout ((Int) -> Int)) { }
 
-// CHECK-LABEL: sil hidden @$s20property_abstraction6inOutF{{[_0-9a-zA-Z]*}}F : 
+// CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction6inOutF{{[_0-9a-zA-Z]*}}F : 
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Foo<Int, Int>):
 // CHECK:   [[XBOX:%.*]] = alloc_box ${ var Foo<Int, Int> }, var, name "x"
 // CHECK:   [[XBOX_PB:%.*]] = project_box [[XBOX]] : ${ var Foo<Int, Int> }, 0
@@ -62,7 +62,7 @@
 
 // Don't produce a writeback for generic lvalues when there's no real
 // abstraction difference. <rdar://problem/16530674>
-// CHECK-LABEL: sil hidden @$s20property_abstraction23noAbstractionDifference{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction23noAbstractionDifference{{[_0-9a-zA-Z]*}}F
 func noAbstractionDifference(_ x: Foo<Int, Int>) {
   var x = x
   // CHECK: [[ADDR:%.*]] = struct_element_addr {{%.*}}, #Foo.g
@@ -77,7 +77,7 @@
   let makeAddressOnly: P
 }
 
-// CHECK-LABEL: sil hidden @$s20property_abstraction34getAddressOnlyReabstractedProperty{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@in_guaranteed AddressOnlyLet<Int>) -> @owned @callee_guaranteed (Int) -> Int
+// CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction34getAddressOnlyReabstractedProperty{{[_0-9a-zA-Z]*}}F : $@convention(thin) (@in_guaranteed AddressOnlyLet<Int>) -> @owned @callee_guaranteed (Int) -> Int
 // CHECK: bb0([[ARG:%.*]] : $*AddressOnlyLet<Int>):
 // CHECK:   [[CLOSURE_ADDR:%.*]] = struct_element_addr {{%.*}} : $*AddressOnlyLet<Int>, #AddressOnlyLet.f
 // CHECK:   [[CLOSURE_ORIG:%.*]] = load [copy] [[CLOSURE_ADDR]]
@@ -114,7 +114,7 @@
 struct T20341012 {
     private var options: ArrayLike<Test20341012> { get {} set {} }
 
-    // CHECK-LABEL: sil hidden @$s20property_abstraction9T20341012V1t{{[_0-9a-zA-Z]*}}F
+    // CHECK-LABEL: sil hidden [ossa] @$s20property_abstraction9T20341012V1t{{[_0-9a-zA-Z]*}}F
     // CHECK:         [[TMP1:%.*]] = alloc_stack $(title: (), action: @callee_guaranteed () -> @out ())
     // CHECK:         apply {{.*}}<(title: (), action: () -> ())>([[TMP1]],
     mutating func t() {
@@ -133,7 +133,7 @@
 func setBuilder<F: Factory>(_ factory: inout F) where F.Product == MyClass {
   factory.builder = { return MyClass() }
 }
-// CHECK: sil hidden @$s20property_abstraction10setBuilder{{[_0-9a-zA-Z]*}}F : $@convention(thin) <F where F : Factory, F.Product == MyClass> (@inout F) -> ()
+// CHECK: sil hidden [ossa] @$s20property_abstraction10setBuilder{{[_0-9a-zA-Z]*}}F : $@convention(thin) <F where F : Factory, F.Product == MyClass> (@inout F) -> ()
 // CHECK: bb0(%0 : $*F):
 // CHECK:   [[F0:%.*]] = function_ref @$s20property_abstraction10setBuilder{{[_0-9a-zA-Z]*}} : $@convention(thin) () -> @owned MyClass
 // CHECK:   [[F1:%.*]] = thin_to_thick_function [[F0]]
diff --git a/test/SILGen/protocol_class_refinement.swift b/test/SILGen/protocol_class_refinement.swift
index b7b0697..7ee46da 100644
--- a/test/SILGen/protocol_class_refinement.swift
+++ b/test/SILGen/protocol_class_refinement.swift
@@ -25,7 +25,7 @@
 
 class Base {}
 
-// CHECK-LABEL: sil hidden @$s25protocol_class_refinement12getObjectUID{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s25protocol_class_refinement12getObjectUID{{[_0-9a-zA-Z]*}}F
 func getObjectUID<T: ObjectUID>(x: T) -> (Int, Int, Int, Int) {
   var x = x
   // CHECK: [[XBOX:%.*]] = alloc_box $<τ_0_0 where τ_0_0 : ObjectUID> { var τ_0_0 } <T>
@@ -79,7 +79,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s25protocol_class_refinement16getBaseObjectUID{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s25protocol_class_refinement16getBaseObjectUID{{[_0-9a-zA-Z]*}}F
 func getBaseObjectUID<T: UID>(x: T) -> (Int, Int, Int) where T: Base {
   var x = x
   // CHECK: [[XBOX:%.*]] = alloc_box $<τ_0_0 where τ_0_0 : Base, τ_0_0 : UID> { var τ_0_0 } <T>
diff --git a/test/SILGen/protocol_extensions.swift b/test/SILGen/protocol_extensions.swift
index 460af0e..ec5f283 100644
--- a/test/SILGen/protocol_extensions.swift
+++ b/test/SILGen/protocol_extensions.swift
@@ -11,7 +11,7 @@
 }
 
 extension P1 {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions2P1PAAE6extP1a{{[_0-9a-zA-Z]*}}F : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions2P1PAAE6extP1a{{[_0-9a-zA-Z]*}}F : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> () {
   // CHECK: bb0([[SELF:%[0-9]+]] : $*Self):
   func extP1a() {
     // CHECK: [[WITNESS:%[0-9]+]] = witness_method $Self, #P1.reqP1a!1 : {{.*}} : $@convention(witness_method: P1) <τ_0_0 where τ_0_0 : P1> (@in_guaranteed τ_0_0) -> ()
@@ -20,7 +20,7 @@
     // CHECK: return
   }
 
-  // CHECK-LABEL: sil @$s19protocol_extensions2P1PAAE6extP1b{{[_0-9a-zA-Z]*}}F : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> () {
+  // CHECK-LABEL: sil [ossa] @$s19protocol_extensions2P1PAAE6extP1b{{[_0-9a-zA-Z]*}}F : $@convention(method) <Self where Self : P1> (@in_guaranteed Self) -> () {
   // CHECK: bb0([[SELF:%[0-9]+]] : $*Self):
   public func extP1b() {
     // CHECK: [[FN:%[0-9]+]] = function_ref @$s19protocol_extensions2P1PAAE6extP1a{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0 where τ_0_0 : P1> (@in_guaranteed τ_0_0) -> ()
@@ -40,7 +40,7 @@
   func callSubscript() -> Int {
     // But here we have to do a witness method call:
 
-    // CHECK-LABEL: sil hidden @$s19protocol_extensions2P1PAAE13callSubscript{{[_0-9a-zA-Z]*}}F
+    // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions2P1PAAE13callSubscript{{[_0-9a-zA-Z]*}}F
     // CHECK: bb0(%0 : $*Self):
     // CHECK: witness_method $Self, #P1.subscript!getter.1
     // CHECK: return
@@ -70,7 +70,7 @@
 }
 
 //   (modify test from above)
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_extensions1CCAA2P1A2aDPyS2iciMTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_extensions1CCAA2P1A2aDPyS2iciMTW
 // CHECK: bb0(%0 : $Int, %1 : $*τ_0_0):
 // CHECK: function_ref @$s19protocol_extensions2P1PAAEyS2icig
 // CHECK: return
@@ -96,7 +96,7 @@
 
 func inout_func(_ n: inout Int) {}
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions5testD_2dd1dyAA10MetaHolderV_AA1DCmAHtF : $@convention(thin) (MetaHolder, @thick D.Type, @guaranteed D) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions5testD_2dd1dyAA10MetaHolderV_AA1DCmAHtF : $@convention(thin) (MetaHolder, @thick D.Type, @guaranteed D) -> ()
 // CHECK: bb0([[M:%[0-9]+]] : $MetaHolder, [[DD:%[0-9]+]] : $@thick D.Type, [[D:%[0-9]+]] : @guaranteed $D):
 func testD(_ m: MetaHolder, dd: D.Type, d: D) {
   // CHECK: [[D2:%[0-9]+]] = alloc_box ${ var D }
@@ -219,7 +219,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions5testS_2ssyAA10MetaHolderV_AA1SVmtF
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions5testS_2ssyAA10MetaHolderV_AA1SVmtF
 func testS(_ m: MetaHolder, ss: S.Type) {
   // CHECK: metatype $@thick S.Type
   // CHECK: function_ref @$s19protocol_extensions2P1PAAE22staticReadOnlyPropertySivgZ
@@ -344,7 +344,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions5testG{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions5testG{{[_0-9a-zA-Z]*}}F
 func testG<T>(_ m: GenericMetaHolder<T>, gg: G<T>.Type) {
   // CHECK: metatype $@thick G<T>.Type
   // CHECK: function_ref @$s19protocol_extensions2P1PAAE22staticReadOnlyPropertySivgZ
@@ -496,7 +496,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions17testExistentials1{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions17testExistentials1{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%[0-9]+]] : $*P1, [[B:%[0-9]+]] : $Bool, [[I:%[0-9]+]] : $Int64):
 func testExistentials1(_ p1: P1, b: Bool, i: Int64) {
   // CHECK: [[POPENED:%[0-9]+]] = open_existential_addr immutable_access [[P]] : $*P1 to $*@opened([[UUID:".*"]])
@@ -522,7 +522,7 @@
   var b3 = p1.prop
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions17testExistentials2{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions17testExistentials2{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%[0-9]+]] : $*P1):
 func testExistentials2(_ p1: P1) {
   // CHECK: [[P1A:%[0-9]+]] = alloc_box ${ var P1 }
@@ -534,7 +534,7 @@
   var p1a: P1 = p1.returnsSelf()
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions23testExistentialsGetters{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions23testExistentialsGetters{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%[0-9]+]] : $*P1):
 func testExistentialsGetters(_ p1: P1) {
   // CHECK: [[POPENED:%[0-9]+]] = open_existential_addr immutable_access [[P]] : $*P1 to $*@opened([[UUID:".*"]]) P1
@@ -550,7 +550,7 @@
   let b2: Bool = p1[b]
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions22testExistentialSetters{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions22testExistentialSetters{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[P:%[0-9]+]] : $*P1, [[B:%[0-9]+]] : $Bool):
 func testExistentialSetters(_ p1: P1, b: Bool) {
   var p1 = p1
@@ -583,7 +583,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions29testLogicalExistentialSetters{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions29testLogicalExistentialSetters{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[HASP1:%[0-9]+]] : $*HasAP1, [[B:%[0-9]+]] : $Bool)
 func testLogicalExistentialSetters(_ hasAP1: HasAP1, _ b: Bool) {
   var hasAP1 = hasAP1
@@ -608,7 +608,7 @@
 
 func plusOneP1() -> P1 {}
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions38test_open_existential_semantics_opaque{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions38test_open_existential_semantics_opaque{{[_0-9a-zA-Z]*}}F
 func test_open_existential_semantics_opaque(_ guaranteed: P1,
                                             immediate: P1) {
   var immediate = immediate
@@ -649,7 +649,7 @@
 
 func plusOneCP1() -> CP1 {}
 
-// CHECK-LABEL: sil hidden @$s19protocol_extensions37test_open_existential_semantics_class{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions37test_open_existential_semantics_class{{[_0-9a-zA-Z]*}}F
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $CP1, [[ARG1:%.*]] : @guaranteed $CP1):
 func test_open_existential_semantics_class(_ guaranteed: CP1,
                                            immediate: CP1) {
@@ -690,7 +690,7 @@
 }
 
 extension InitRequirement {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions15InitRequirementPAAE1dxAA1DC_tcfC : $@convention(method) <Self where Self : InitRequirement> (@owned D, @thick Self.Type) -> @out Self
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions15InitRequirementPAAE1dxAA1DC_tcfC : $@convention(method) <Self where Self : InitRequirement> (@owned D, @thick Self.Type) -> @out Self
   // CHECK:       bb0([[OUT:%.*]] : $*Self, [[ARG:%.*]] : @owned $D, [[SELF_TYPE:%.*]] : $@thick Self.Type):
   init(d: D) {
     // CHECK:      [[SELF_BOX:%.*]] = alloc_box
@@ -712,7 +712,7 @@
     self.init(c: d)
   }
 
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions15InitRequirementPAAE2d2xAA1DC_tcfC : $@convention(method)
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions15InitRequirementPAAE2d2xAA1DC_tcfC : $@convention(method)
   // CHECK:       bb0([[OUT:%.*]] : $*Self, [[ARG:%.*]] : @owned $D, [[SELF_TYPE:%.*]] : $@thick Self.Type):
   init(d2: D) {
     // CHECK:      [[SELF_BOX:%.*]] = alloc_box
@@ -733,7 +733,7 @@
     self.init(d: d2)
   }
 
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions15InitRequirementPAAE2c2xAA1CC_tcfC  : $@convention(method)
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions15InitRequirementPAAE2c2xAA1CC_tcfC  : $@convention(method)
   // CHECK:       bb0([[OUT:%.*]] : $*Self, [[ARG:%.*]] : @owned $C, [[SELF_TYPE:%.*]] : $@thick Self.Type):
   init(c2: C) {
     // CHECK:      [[SELF_BOX:%.*]] = alloc_box
@@ -763,7 +763,7 @@
 }
 
 extension ClassInitRequirement {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions20ClassInitRequirementPAAE{{[_0-9a-zA-Z]*}}fC : $@convention(method) <Self where Self : ClassInitRequirement> (@owned D, @thick Self.Type) -> @owned Self
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions20ClassInitRequirementPAAE{{[_0-9a-zA-Z]*}}fC : $@convention(method) <Self where Self : ClassInitRequirement> (@owned D, @thick Self.Type) -> @owned Self
   // CHECK:       bb0([[ARG:%.*]] : @owned $D, [[SELF_TYPE:%.*]] : $@thick Self.Type):
   // CHECK:         [[BORROWED_ARG:%.*]] = begin_borrow [[ARG]]
   // CHECK:         [[ARG_COPY:%.*]] = copy_value [[BORROWED_ARG]]
@@ -790,7 +790,7 @@
 }
 
 extension ObjCInitRequirement {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions19ObjCInitRequirementPAAE{{[_0-9a-zA-Z]*}}fC : $@convention(method) <Self where Self : ObjCInitRequirement> (@owned OD, @thick Self.Type) -> @owned Self
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions19ObjCInitRequirementPAAE{{[_0-9a-zA-Z]*}}fC : $@convention(method) <Self where Self : ObjCInitRequirement> (@owned OD, @thick Self.Type) -> @owned Self
   // CHECK:       bb0([[ARG:%.*]] : @owned $OD, [[SELF_TYPE:%.*]] : $@thick Self.Type):
   // CHECK:         [[OBJC_SELF_TYPE:%.*]] = thick_to_objc_metatype [[SELF_TYPE]]
   // CHECK:         [[SELF:%.*]] = alloc_ref_dynamic [objc] [[OBJC_SELF_TYPE]] : $@objc_metatype Self.Type, $Self
@@ -817,7 +817,7 @@
 protocol ProtoDelegatesToObjC { }
 
 extension ProtoDelegatesToObjC where Self : ObjCInitClass {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions20ProtoDelegatesToObjCPA2A0F10CInitClassC{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions20ProtoDelegatesToObjCPA2A0F10CInitClassC{{[_0-9a-zA-Z]*}}fC
   // CHECK: bb0([[STR:%[0-9]+]] : @owned $String, [[SELF_META:%[0-9]+]] : $@thick Self.Type):
   init(string: String) {
     // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box $<τ_0_0 where τ_0_0 : ObjCInitClass, τ_0_0 : ProtoDelegatesToObjC> { var τ_0_0 } <Self>
@@ -841,7 +841,7 @@
 protocol ProtoDelegatesToRequired { }
 
 extension ProtoDelegatesToRequired where Self : RequiredInitClass {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions24ProtoDelegatesToRequiredPA2A0F9InitClassC{{[_0-9a-zA-Z]*}}fC 
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions24ProtoDelegatesToRequiredPA2A0F9InitClassC{{[_0-9a-zA-Z]*}}fC 
   // CHECK: bb0([[STR:%[0-9]+]] : @owned $String, [[SELF_META:%[0-9]+]] : $@thick Self.Type):
   init(string: String) {
   // CHECK:   [[SELF_BOX:%[0-9]+]] = alloc_box $<τ_0_0 where τ_0_0 : RequiredInitClass, τ_0_0 : ProtoDelegatesToRequired> { var τ_0_0 } <Self>
@@ -868,7 +868,7 @@
 }
 
 extension P2 {
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions2P2PAAE2f1{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions2P2PAAE2f1{{[_0-9a-zA-Z]*}}F
   // CHECK: witness_method $Self, #P2.f2!1
   // CHECK: function_ref @$s19protocol_extensions2P2PAAE2f3{{[_0-9a-zA-Z]*}}F
   // CHECK: return
@@ -877,7 +877,7 @@
     f3(a)
   }
 
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions2P2PAAE2f2{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions2P2PAAE2f2{{[_0-9a-zA-Z]*}}F
   // CHECK: witness_method $Self, #P2.f1!1
   // CHECK: function_ref @$s19protocol_extensions2P2PAAE2f3{{[_0-9a-zA-Z]*}}F
   // CHECK: return
@@ -888,7 +888,7 @@
 
   func f3(_ a: A) {}
 
-  // CHECK-LABEL: sil hidden @$s19protocol_extensions2P2PAAE2f4{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s19protocol_extensions2P2PAAE2f4{{[_0-9a-zA-Z]*}}F
   // CHECK: witness_method $Self, #P2.f1!1
   // CHECK: witness_method $Self, #P2.f2!1
   // CHECK: return
diff --git a/test/SILGen/protocol_optional.swift b/test/SILGen/protocol_optional.swift
index ab50b00..4a0842d 100644
--- a/test/SILGen/protocol_optional.swift
+++ b/test/SILGen/protocol_optional.swift
@@ -9,7 +9,7 @@
   @objc optional subscript (i: Int) -> Int { get }
 }
 
-// CHECK-LABEL: sil hidden @$s17protocol_optional0B13MethodGeneric1tyx_tAA2P1RzlF : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17protocol_optional0B13MethodGeneric1tyx_tAA2P1RzlF : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
 func optionalMethodGeneric<T : P1>(t t : T) {
   var t = t
   // CHECK: bb0([[T:%[0-9]+]] : @guaranteed $T):
@@ -27,7 +27,7 @@
 }
 // CHECK: } // end sil function '$s17protocol_optional0B13MethodGeneric1tyx_tAA2P1RzlF'
 
-// CHECK-LABEL: sil hidden @$s17protocol_optional0B15PropertyGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17protocol_optional0B15PropertyGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
 func optionalPropertyGeneric<T : P1>(t t : T) {
   var t = t
   // CHECK: bb0([[T:%[0-9]+]] : @guaranteed $T):
@@ -45,7 +45,7 @@
 }
 // CHECK: } // end sil function '$s17protocol_optional0B15PropertyGeneric{{[_0-9a-zA-Z]*}}F'
 
-// CHECK-LABEL: sil hidden @$s17protocol_optional0B16SubscriptGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17protocol_optional0B16SubscriptGeneric{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : P1> (@guaranteed T) -> ()
 func optionalSubscriptGeneric<T : P1>(t t : T) {
   var t = t
   // CHECK: bb0([[T:%[0-9]+]] : @guaranteed $T):
diff --git a/test/SILGen/protocol_resilience.swift b/test/SILGen/protocol_resilience.swift
index 69e287f..ec4b1a5 100644
--- a/test/SILGen/protocol_resilience.swift
+++ b/test/SILGen/protocol_resilience.swift
@@ -31,31 +31,31 @@
 
 extension ResilientMethods {
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP14defaultWitnessyyF
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE14defaultWitnessyyF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP14defaultWitnessyyF
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE14defaultWitnessyyF
   public func defaultWitness() {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP21anotherDefaultWitnessyxSiF
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE21anotherDefaultWitnessyxSiF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP21anotherDefaultWitnessyxSiF
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE21anotherDefaultWitnessyxSiF
   public func anotherDefaultWitness(_ x: Int) -> Self {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP32defaultWitnessWithAssociatedTypeyy05AssocI0QzF
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE32defaultWitnessWithAssociatedTypeyy05AssocI0QzF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP32defaultWitnessWithAssociatedTypeyy05AssocI0QzF
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE32defaultWitnessWithAssociatedTypeyy05AssocI0QzF
   public func defaultWitnessWithAssociatedType(_ a: AssocType) {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP41defaultWitnessMoreAbstractThanRequirement_1by9AssocTypeQz_SitF
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE41defaultWitnessMoreAbstractThanRequirement_1byqd___qd_0_tr0_lF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP41defaultWitnessMoreAbstractThanRequirement_1by9AssocTypeQz_SitF
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE41defaultWitnessMoreAbstractThanRequirement_1byqd___qd_0_tr0_lF
   public func defaultWitnessMoreAbstractThanRequirement<A, T>(_ a: A, b: T) {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP48defaultWitnessMoreAbstractThanGenericRequirement_1ty9AssocTypeQz_qd__tlF
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE48defaultWitnessMoreAbstractThanGenericRequirement_1tyqd___qd_0_tr0_lF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP48defaultWitnessMoreAbstractThanGenericRequirement_1ty9AssocTypeQz_qd__tlF
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE48defaultWitnessMoreAbstractThanGenericRequirement_1tyqd___qd_0_tr0_lF
   public func defaultWitnessMoreAbstractThanGenericRequirement<A, T>(_ a: A, t: T) {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientMethodsP20staticDefaultWitnessyxSiFZ
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientMethodsPAAE20staticDefaultWitnessyxSiFZ
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientMethodsP20staticDefaultWitnessyxSiFZ
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientMethodsPAAE20staticDefaultWitnessyxSiFZ
   public static func staticDefaultWitness(_ x: Int) -> Self {}
 
-// CHECK-LABEL: sil private @$s19protocol_resilience16ResilientMethodsPAAE25defaultWitnessIsNotPublic{{.*}}F
+// CHECK-LABEL: sil private [ossa] @$s19protocol_resilience16ResilientMethodsPAAE25defaultWitnessIsNotPublic{{.*}}F
   private func defaultWitnessIsNotPublic() {}
 
 }
@@ -71,24 +71,24 @@
 
 extension ResilientConstructors {
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience21ResilientConstructorsP7defaultxyt_tcfC
-// CHECK-LABEL: sil @$s19protocol_resilience21ResilientConstructorsPAAE7defaultxyt_tcfC
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience21ResilientConstructorsP7defaultxyt_tcfC
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience21ResilientConstructorsPAAE7defaultxyt_tcfC
   public init(default: ()) {
     self.init(noDefault: ())
   }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience21ResilientConstructorsP17defaultIsOptionalxSgyt_tcfC
-// CHECK-LABEL: sil @$s19protocol_resilience21ResilientConstructorsPAAE17defaultIsOptionalxSgyt_tcfC
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience21ResilientConstructorsP17defaultIsOptionalxSgyt_tcfC
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience21ResilientConstructorsPAAE17defaultIsOptionalxSgyt_tcfC
   public init?(defaultIsOptional: ()) {
     self.init(noDefault: ())
   }
 
-// CHECK-LABEL: sil @$s19protocol_resilience21ResilientConstructorsPAAE20defaultIsNotOptionalxyt_tcfC
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience21ResilientConstructorsPAAE20defaultIsNotOptionalxyt_tcfC
   public init(defaultIsNotOptional: ()) {
     self.init(noDefault: ())
   }
 
-// CHECK-LABEL: sil @$s19protocol_resilience21ResilientConstructorsPAAE19optionalityMismatchxSgyt_tcfC
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience21ResilientConstructorsPAAE19optionalityMismatchxSgyt_tcfC
   public init?(optionalityMismatch: ()) {
     self.init(noDefault: ())
   }
@@ -111,17 +111,17 @@
 
 extension ResilientStorage {
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP19propertyWithDefaultSivg
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE19propertyWithDefaultSivg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP19propertyWithDefaultSivg
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE19propertyWithDefaultSivg
   public var propertyWithDefault: Int {
     get { return 0 }
   }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivg
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE26mutablePropertyWithDefaultSivg
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivs
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE26mutablePropertyWithDefaultSivs
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivM
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivg
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE26mutablePropertyWithDefaultSivg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivs
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE26mutablePropertyWithDefaultSivs
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP26mutablePropertyWithDefaultSivM
   public var mutablePropertyWithDefault: Int {
     get { return 0 }
     set { }
@@ -132,11 +132,11 @@
     set { }
   }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvg
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE33mutableGenericPropertyWithDefault1TQzvg
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvs
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE33mutableGenericPropertyWithDefault1TQzvs
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvM
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvg
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE33mutableGenericPropertyWithDefault1TQzvg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvs
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE33mutableGenericPropertyWithDefault1TQzvs
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP33mutableGenericPropertyWithDefault1TQzvM
   public var mutableGenericPropertyWithDefault: T {
     get {
       return T(default: ())
@@ -144,11 +144,11 @@
     set { }
   }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStoragePy1TQzAEcig
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAEy1TQzAEcig
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStoragePy1TQzAEcis
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAEy1TQzAEcis
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStoragePy1TQzAEciM
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStoragePy1TQzAEcig
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAEy1TQzAEcig
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStoragePy1TQzAEcis
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAEy1TQzAEcis
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStoragePy1TQzAEciM
   public subscript(x: T) -> T {
     get {
       return x
@@ -156,11 +156,11 @@
     set { }
   }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivg
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE36mutatingGetterWithNonMutatingDefaultSivg
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivs
-// CHECK-LABEL: sil @$s19protocol_resilience16ResilientStoragePAAE36mutatingGetterWithNonMutatingDefaultSivs
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivM
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivg
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE36mutatingGetterWithNonMutatingDefaultSivg
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivs
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience16ResilientStoragePAAE36mutatingGetterWithNonMutatingDefaultSivs
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience16ResilientStorageP36mutatingGetterWithNonMutatingDefaultSivM
   public var mutatingGetterWithNonMutatingDefault: Int {
     get {
       return 0
@@ -179,23 +179,23 @@
   static func <===><T : ResilientOperators>(t: T, s: Self) -> T.AssocType
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience18ResilientOperatorsP3tttopyyxFZ
-// CHECK-LABEL: sil @$s19protocol_resilience3tttopyyxlF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience18ResilientOperatorsP3tttopyyxFZ
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience3tttopyyxlF
 public prefix func ~~~<S>(s: S) {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience18ResilientOperatorsP3lmgoiyyx_qd__tlFZ
-// CHECK-LABEL: sil @$s19protocol_resilience3lmgoiyyq__xtr0_lF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience18ResilientOperatorsP3lmgoiyyx_qd__tlFZ
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience3lmgoiyyq__xtr0_lF
 public func <*><T, S>(s: S, t: T) {}
 
 // Swap the generic parameters to make sure we don't mix up our DeclContexts
 // when mapping interface types in and out
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience18ResilientOperatorsP4lmmgoiy9AssocTypeQzqd___xtlFZ
-// CHECK-LABEL: sil @$s19protocol_resilience4lmmgoiy9AssocTypeQzq__xtAA18ResilientOperatorsRzr0_lF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience18ResilientOperatorsP4lmmgoiy9AssocTypeQzqd___xtlFZ
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience4lmmgoiy9AssocTypeQzq__xtAA18ResilientOperatorsRzr0_lF
 public func <**><S : ResilientOperators, T>(t: T, s: S) -> S.AssocType {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience18ResilientOperatorsP5leeegoiy9AssocTypeQyd__qd___xtAaBRd__lFZ
-// CHECK-LABEL: sil @$s19protocol_resilience5leeegoiy9AssocTypeQzx_q_tAA18ResilientOperatorsRzAaER_r0_lF
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience18ResilientOperatorsP5leeegoiy9AssocTypeQyd__qd___xtAaBRd__lFZ
+// CHECK-LABEL: sil [ossa] @$s19protocol_resilience5leeegoiy9AssocTypeQzx_q_tAA18ResilientOperatorsRzAaER_r0_lF
 public func <===><T : ResilientOperators, S : ResilientOperators>(t: T, s: S) -> T.AssocType {}
 
 
@@ -218,7 +218,7 @@
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s19protocol_resilience21ReabstractSelfRefinedP8callbackyxxcvg : $@convention(witness_method: ReabstractSelfRefined) <τ_0_0 where τ_0_0 : ReabstractSelfRefined> (@guaranteed τ_0_0) -> @owned @callee_guaranteed (@guaranteed τ_0_0) -> @owned τ_0_0
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s19protocol_resilience21ReabstractSelfRefinedP8callbackyxxcvg : $@convention(witness_method: ReabstractSelfRefined) <τ_0_0 where τ_0_0 : ReabstractSelfRefined> (@guaranteed τ_0_0) -> @owned @callee_guaranteed (@guaranteed τ_0_0) -> @owned τ_0_0
 // CHECK: [[SELF_BOX:%.*]] = alloc_stack $τ_0_0
 // CHECK-NEXT: [[SELF_COPY:%.*]] = copy_value %0 : $τ_0_0
 // CHECK-NEXT: store [[SELF_COPY]] to [init] [[SELF_BOX]] : $*τ_0_0
@@ -234,7 +234,7 @@
 
 func inoutFunc(_ x: inout Int) {}
 
-// CHECK-LABEL: sil hidden @$s19protocol_resilience22inoutResilientProtocolyy010resilient_A005OtherdE0_pzF
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_resilience22inoutResilientProtocolyy010resilient_A005OtherdE0_pzF
 func inoutResilientProtocol(_ x: inout OtherResilientProtocol) {
   // CHECK: function_ref @$s18resilient_protocol22OtherResilientProtocolPAAE19propertyInExtensionSivM
   inoutFunc(&x.propertyInExtension)
@@ -242,7 +242,7 @@
 
 struct OtherConformingType : OtherResilientProtocol {}
 
-// CHECK-LABEL: sil hidden @$s19protocol_resilience22inoutResilientProtocolyyAA19OtherConformingTypeVzF
+// CHECK-LABEL: sil hidden [ossa] @$s19protocol_resilience22inoutResilientProtocolyyAA19OtherConformingTypeVzF
 func inoutResilientProtocol(_ x: inout OtherConformingType) {
   // CHECK: function_ref @$s18resilient_protocol22OtherResilientProtocolPAAE19propertyInExtensionSivM
   inoutFunc(&x.propertyInExtension)
diff --git a/test/SILGen/protocol_with_superclass.swift b/test/SILGen/protocol_with_superclass.swift
index 7e694f6..73afd34 100644
--- a/test/SILGen/protocol_with_superclass.swift
+++ b/test/SILGen/protocol_with_superclass.swift
@@ -22,7 +22,7 @@
 }
 
 extension ProtoRefinesClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass17ProtoRefinesClassPAAE019extensionMethodUsesF5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesClass> (@guaranteed String, Int, Int, @guaranteed Self) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass17ProtoRefinesClassPAAE019extensionMethodUsesF5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesClass> (@guaranteed String, Int, Int, @guaranteed Self) -> ()
   func extensionMethodUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -75,7 +75,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass22usesProtoRefinesClass1yyAA0eF5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesClass) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass22usesProtoRefinesClass1yyAA0eF5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesClass) -> ()
 func usesProtoRefinesClass1(_ t: ProtoRefinesClass) {
   let x: ProtoRefinesClass.ConcreteAlias = "hi"
   _ = ProtoRefinesClass.ConcreteAlias.self
@@ -96,7 +96,7 @@
   let _: BaseProto & Concrete = t
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass22usesProtoRefinesClass2yyxAA0eF5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesClass> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass22usesProtoRefinesClass2yyxAA0eF5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesClass> (@guaranteed T) -> ()
 func usesProtoRefinesClass2<T : ProtoRefinesClass>(_ t: T) {
   let x: T.ConcreteAlias = "hi"
   _ = T.ConcreteAlias.self
@@ -118,7 +118,7 @@
 }
 
 class GoodConformingClass : Generic<Int>, ProtoRefinesClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass19GoodConformingClassC015requirementUsesF5TypesyySS_Si_SittF : $@convention(method) (@guaranteed String, Int, Int, @guaranteed GoodConformingClass) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass19GoodConformingClassC015requirementUsesF5TypesyySS_Si_SittF : $@convention(method) (@guaranteed String, Int, Int, @guaranteed GoodConformingClass) -> ()
   func requirementUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -132,7 +132,7 @@
 protocol ProtoRefinesProtoWithClass : ProtoRefinesClass {}
 
 extension ProtoRefinesProtoWithClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass012ProtoRefinesD9WithClassPAAE026anotherExtensionMethodUsesG5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesProtoWithClass> (@guaranteed String, Int, Int, @guaranteed Self) -> () 
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass012ProtoRefinesD9WithClassPAAE026anotherExtensionMethodUsesG5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesProtoWithClass> (@guaranteed String, Int, Int, @guaranteed Self) -> () 
   func anotherExtensionMethodUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -148,7 +148,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass016usesProtoRefinesE10WithClass1yyAA0efeG5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesProtoWithClass) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass016usesProtoRefinesE10WithClass1yyAA0efeG5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesProtoWithClass) -> ()
 func usesProtoRefinesProtoWithClass1(_ t: ProtoRefinesProtoWithClass) {
   let x: ProtoRefinesProtoWithClass.ConcreteAlias = "hi"
   _ = ProtoRefinesProtoWithClass.ConcreteAlias.self
@@ -169,7 +169,7 @@
   let _: BaseProto & Concrete = t
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass016usesProtoRefinesE10WithClass2yyxAA0efeG5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesProtoWithClass> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass016usesProtoRefinesE10WithClass2yyxAA0efeG5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesProtoWithClass> (@guaranteed T) -> ()
 func usesProtoRefinesProtoWithClass2<T : ProtoRefinesProtoWithClass>(_ t: T) {
   let x: T.ConcreteAlias = "hi"
   _ = T.ConcreteAlias.self
@@ -198,7 +198,7 @@
 
 protocol ProtocolWithClassInits : ClassWithInits<Int> {}
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass26useProtocolWithClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolWithClassInits.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass26useProtocolWithClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolWithClassInits.Type) -> ()
 func useProtocolWithClassInits1(_ t: ProtocolWithClassInits.Type) {
   // CHECK: [[OPENED:%.*]] = open_existential_metatype %0 : $@thick ProtocolWithClassInits.Type
   // CHECK-NEXT: [[UPCAST:%.*]] = upcast [[OPENED]] : $@thick (@opened("{{.*}}") ProtocolWithClassInits).Type to $@thick ClassWithInits<Int>.Type
@@ -210,7 +210,7 @@
   let _: ProtocolWithClassInits = t.init(requiredInit: ())
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass26useProtocolWithClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolWithClassInits> (@thick T.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass26useProtocolWithClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolWithClassInits> (@thick T.Type) -> ()
 func useProtocolWithClassInits2<T : ProtocolWithClassInits>(_ t: T.Type) {
   let _: T = T(requiredInit: ())
 
@@ -219,12 +219,12 @@
 
 protocol ProtocolRefinesClassInits : ProtocolWithClassInits {}
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass29useProtocolRefinesClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolRefinesClassInits.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass29useProtocolRefinesClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolRefinesClassInits.Type) -> ()
 func useProtocolRefinesClassInits1(_ t: ProtocolRefinesClassInits.Type) {
   let _: ProtocolRefinesClassInits = t.init(requiredInit: ())
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass29useProtocolRefinesClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolRefinesClassInits> (@thick T.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass29useProtocolRefinesClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolRefinesClassInits> (@thick T.Type) -> ()
 func useProtocolRefinesClassInits2<T : ProtocolRefinesClassInits>(_ t: T.Type) {
   let _: T = T(requiredInit: ())
 
@@ -241,7 +241,7 @@
 
 class ConformsToSillyDefault : ClassWithDefault<Int>, SillyDefault {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s24protocol_with_superclass22ConformsToSillyDefaultCAA0fG0A2aDP5makeTSiyFTW : $@convention(witness_method: SillyDefault) (@guaranteed ConformsToSillyDefault) -> Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s24protocol_with_superclass22ConformsToSillyDefaultCAA0fG0A2aDP5makeTSiyFTW : $@convention(witness_method: SillyDefault) (@guaranteed ConformsToSillyDefault) -> Int
 // CHECK: class_method %1 : $ClassWithDefault<Int>, #ClassWithDefault.makeT!1 : <T> (ClassWithDefault<T>) -> () -> T, $@convention(method) <τ_0_0> (@guaranteed ClassWithDefault<τ_0_0>) -> @out τ_0_0
 // CHECK: return
 
@@ -255,7 +255,7 @@
   takesBaseProtocol(r)
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass21passesRefinedProtocolyyAA0E5Proto_pF : $@convention(thin) (@guaranteed RefinedProto) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass21passesRefinedProtocolyyAA0E5Proto_pF : $@convention(thin) (@guaranteed RefinedProto) -> ()
 // CHECK:     bb0(%0 : @guaranteed $RefinedProto):
 // CHECK:       [[OPENED:%.*]] = open_existential_ref %0 : $RefinedProto to $@opened("{{.*}}") RefinedProto
 // CHECK-NEXT:  [[BASE:%.*]] = alloc_stack $BaseProto
diff --git a/test/SILGen/protocol_with_superclass_where_clause.swift b/test/SILGen/protocol_with_superclass_where_clause.swift
index f69f671..d7401c8 100644
--- a/test/SILGen/protocol_with_superclass_where_clause.swift
+++ b/test/SILGen/protocol_with_superclass_where_clause.swift
@@ -22,7 +22,7 @@
 }
 
 extension ProtoRefinesClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass17ProtoRefinesClassPAAE019extensionMethodUsesF5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesClass> (@guaranteed String, Int, Int, @guaranteed Self) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass17ProtoRefinesClassPAAE019extensionMethodUsesF5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesClass> (@guaranteed String, Int, Int, @guaranteed Self) -> ()
   func extensionMethodUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -75,7 +75,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass22usesProtoRefinesClass1yyAA0eF5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesClass) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass22usesProtoRefinesClass1yyAA0eF5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesClass) -> ()
 func usesProtoRefinesClass1(_ t: ProtoRefinesClass) {
   let x: ProtoRefinesClass.ConcreteAlias = "hi"
   _ = ProtoRefinesClass.ConcreteAlias.self
@@ -96,7 +96,7 @@
   let _: BaseProto & Concrete = t
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass22usesProtoRefinesClass2yyxAA0eF5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesClass> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass22usesProtoRefinesClass2yyxAA0eF5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesClass> (@guaranteed T) -> ()
 func usesProtoRefinesClass2<T : ProtoRefinesClass>(_ t: T) {
   let x: T.ConcreteAlias = "hi"
   _ = T.ConcreteAlias.self
@@ -118,7 +118,7 @@
 }
 
 class GoodConformingClass : Generic<Int>, ProtoRefinesClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass19GoodConformingClassC015requirementUsesF5TypesyySS_Si_SittF : $@convention(method) (@guaranteed String, Int, Int, @guaranteed GoodConformingClass) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass19GoodConformingClassC015requirementUsesF5TypesyySS_Si_SittF : $@convention(method) (@guaranteed String, Int, Int, @guaranteed GoodConformingClass) -> ()
   func requirementUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -132,7 +132,7 @@
 protocol ProtoRefinesProtoWithClass where Self : ProtoRefinesClass {}
 
 extension ProtoRefinesProtoWithClass {
-  // CHECK-LABEL: sil hidden @$s24protocol_with_superclass012ProtoRefinesD9WithClassPAAE026anotherExtensionMethodUsesG5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesProtoWithClass> (@guaranteed String, Int, Int, @guaranteed Self) -> () 
+  // CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass012ProtoRefinesD9WithClassPAAE026anotherExtensionMethodUsesG5TypesyySS_Si_SittF : $@convention(method) <Self where Self : ProtoRefinesProtoWithClass> (@guaranteed String, Int, Int, @guaranteed Self) -> () 
   func anotherExtensionMethodUsesClassTypes(_ x: ConcreteAlias, _ y: GenericAlias) {
     _ = ConcreteAlias.self
     _ = GenericAlias.self
@@ -148,7 +148,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass016usesProtoRefinesE10WithClass1yyAA0efeG5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesProtoWithClass) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass016usesProtoRefinesE10WithClass1yyAA0efeG5Class_pF : $@convention(thin) (@guaranteed ProtoRefinesProtoWithClass) -> ()
 func usesProtoRefinesProtoWithClass1(_ t: ProtoRefinesProtoWithClass) {
   let x: ProtoRefinesProtoWithClass.ConcreteAlias = "hi"
   _ = ProtoRefinesProtoWithClass.ConcreteAlias.self
@@ -169,7 +169,7 @@
   let _: BaseProto & Concrete = t
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass016usesProtoRefinesE10WithClass2yyxAA0efeG5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesProtoWithClass> (@guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass016usesProtoRefinesE10WithClass2yyxAA0efeG5ClassRzlF : $@convention(thin) <T where T : ProtoRefinesProtoWithClass> (@guaranteed T) -> ()
 func usesProtoRefinesProtoWithClass2<T : ProtoRefinesProtoWithClass>(_ t: T) {
   let x: T.ConcreteAlias = "hi"
   _ = T.ConcreteAlias.self
@@ -198,7 +198,7 @@
 
 protocol ProtocolWithClassInits where Self : ClassWithInits<Int> {}
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass26useProtocolWithClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolWithClassInits.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass26useProtocolWithClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolWithClassInits.Type) -> ()
 func useProtocolWithClassInits1(_ t: ProtocolWithClassInits.Type) {
   // CHECK: [[OPENED:%.*]] = open_existential_metatype %0 : $@thick ProtocolWithClassInits.Type
   // CHECK-NEXT: [[UPCAST:%.*]] = upcast [[OPENED]] : $@thick (@opened("{{.*}}") ProtocolWithClassInits).Type to $@thick ClassWithInits<Int>.Type
@@ -210,7 +210,7 @@
   let _: ProtocolWithClassInits = t.init(requiredInit: ())
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass26useProtocolWithClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolWithClassInits> (@thick T.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass26useProtocolWithClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolWithClassInits> (@thick T.Type) -> ()
 func useProtocolWithClassInits2<T : ProtocolWithClassInits>(_ t: T.Type) {
   let _: T = T(requiredInit: ())
 
@@ -219,12 +219,12 @@
 
 protocol ProtocolRefinesClassInits where Self : ProtocolWithClassInits {}
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass29useProtocolRefinesClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolRefinesClassInits.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass29useProtocolRefinesClassInits1yyAA0efG5Inits_pXpF : $@convention(thin) (@thick ProtocolRefinesClassInits.Type) -> ()
 func useProtocolRefinesClassInits1(_ t: ProtocolRefinesClassInits.Type) {
   let _: ProtocolRefinesClassInits = t.init(requiredInit: ())
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass29useProtocolRefinesClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolRefinesClassInits> (@thick T.Type) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass29useProtocolRefinesClassInits2yyxmAA0efG5InitsRzlF : $@convention(thin) <T where T : ProtocolRefinesClassInits> (@thick T.Type) -> ()
 func useProtocolRefinesClassInits2<T : ProtocolRefinesClassInits>(_ t: T.Type) {
   let _: T = T(requiredInit: ())
 
@@ -241,7 +241,7 @@
 
 class ConformsToSillyDefault : ClassWithDefault<Int>, SillyDefault {}
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s24protocol_with_superclass22ConformsToSillyDefaultCAA0fG0A2aDP5makeTSiyFTW : $@convention(witness_method: SillyDefault) (@guaranteed ConformsToSillyDefault) -> Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s24protocol_with_superclass22ConformsToSillyDefaultCAA0fG0A2aDP5makeTSiyFTW : $@convention(witness_method: SillyDefault) (@guaranteed ConformsToSillyDefault) -> Int
 // CHECK: class_method %1 : $ClassWithDefault<Int>, #ClassWithDefault.makeT!1 : <T> (ClassWithDefault<T>) -> () -> T, $@convention(method) <τ_0_0> (@guaranteed ClassWithDefault<τ_0_0>) -> @out τ_0_0
 // CHECK: return
 
@@ -255,7 +255,7 @@
   takesBaseProtocol(r)
 }
 
-// CHECK-LABEL: sil hidden @$s24protocol_with_superclass21passesRefinedProtocolyyAA0E5Proto_pF : $@convention(thin) (@guaranteed RefinedProto) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s24protocol_with_superclass21passesRefinedProtocolyyAA0E5Proto_pF : $@convention(thin) (@guaranteed RefinedProto) -> ()
 // CHECK:     bb0(%0 : @guaranteed $RefinedProto):
 // CHECK:       [[OPENED:%.*]] = open_existential_ref %0 : $RefinedProto to $@opened("{{.*}}") RefinedProto
 // CHECK-NEXT:  [[BASE:%.*]] = alloc_stack $BaseProto
diff --git a/test/SILGen/protocols.swift b/test/SILGen/protocols.swift
index 2da8d2c..eac4691 100644
--- a/test/SILGen/protocols.swift
+++ b/test/SILGen/protocols.swift
@@ -20,7 +20,7 @@
   return subscriptableGet[i]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_rvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_rvalue_get
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols16subscriptableGetAA013SubscriptableC0_pvp : $*SubscriptableGet
 // CHECK: [[READ:%.*]] = begin_access [read] [dynamic] [[GLOB]] : $*SubscriptableGet
@@ -42,7 +42,7 @@
   return subscriptableGetSet[i]
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_lvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_lvalue_get
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols19subscriptableGetSetAA013SubscriptablecD0_pvp : $*SubscriptableGetSet
 // CHECK: [[READ:%.*]] = begin_access [read] [dynamic] [[GLOB]] : $*SubscriptableGetSet
@@ -60,7 +60,7 @@
   subscriptableGetSet[i] = i
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_lvalue_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_lvalue_set
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols19subscriptableGetSetAA013SubscriptablecD0_pvp : $*SubscriptableGetSet
 // CHECK: [[READ:%.*]] = begin_access [modify] [dynamic] [[GLOB]] : $*SubscriptableGetSet
@@ -76,7 +76,7 @@
 func use_subscript_archetype_rvalue_get<T : SubscriptableGet>(_ generic : T, idx : Int) -> Int {
   return generic[idx]
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_archetype_rvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_archetype_rvalue_get
 // CHECK: bb0(%0 : $*T, %1 : $Int):
 // CHECK: [[STACK:%[0-9]+]] = alloc_stack $T
 // CHECK: copy_addr %0 to [initialization] [[STACK]]
@@ -90,7 +90,7 @@
 func use_subscript_archetype_lvalue_get<T : SubscriptableGetSet>(_ generic: inout T, idx : Int) -> Int {
   return generic[idx]
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_archetype_lvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_archetype_lvalue_get
 // CHECK: bb0(%0 : $*T, %1 : $Int):
 // CHECK: [[READ:%.*]] = begin_access [read] [unknown] %0 : $*T
 // CHECK: [[GUARANTEEDSTACK:%[0-9]+]] = alloc_stack $T
@@ -106,7 +106,7 @@
 func use_subscript_archetype_lvalue_set<T : SubscriptableGetSet>(_ generic: inout T, idx : Int) {
   generic[idx] = idx
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_subscript_archetype_lvalue_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_subscript_archetype_lvalue_set
 // CHECK: bb0(%0 : $*T, %1 : $Int):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*T
 // CHECK: [[METH:%[0-9]+]] = witness_method $T, #SubscriptableGetSet.subscript!setter.1
@@ -132,7 +132,7 @@
 func use_property_rvalue_get() -> Int {
   return propertyGet.a
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_property_rvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_rvalue_get
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols11propertyGetAA18PropertyWithGetter_pvp : $*PropertyWithGetter
 // CHECK: [[READ:%.*]] = begin_access [read] [dynamic] [[GLOB]] : $*PropertyWithGetter
 // CHECK: [[PROJ:%[0-9]+]] = open_existential_addr immutable_access [[READ]] : $*PropertyWithGetter to $*[[OPENED:@opened(.*) PropertyWithGetter]]
@@ -147,7 +147,7 @@
 func use_property_lvalue_get() -> Int {
   return propertyGetSet.b
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_property_lvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_lvalue_get
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols14propertyGetSetAA24PropertyWithGetterSetter_pvp : $*PropertyWithGetterSetter
 // CHECK: [[READ:%.*]] = begin_access [read] [dynamic] [[GLOB]] : $*PropertyWithGetterSetter
 // CHECK: [[PROJ:%[0-9]+]] = open_existential_addr immutable_access [[READ]] : $*PropertyWithGetterSetter to $*[[OPENED:@opened(.*) PropertyWithGetterSetter]]
@@ -160,7 +160,7 @@
   propertyGetSet.b = x
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_property_lvalue_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_lvalue_set
 // CHECK: bb0(%0 : $Int):
 // CHECK: [[GLOB:%[0-9]+]] = global_addr @$s9protocols14propertyGetSetAA24PropertyWithGetterSetter_pvp : $*PropertyWithGetterSetter
 // CHECK: [[READ:%.*]] = begin_access [modify] [dynamic] [[GLOB]] : $*PropertyWithGetterSetter
@@ -176,7 +176,7 @@
   return generic.a
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_property_archetype_rvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_archetype_rvalue_get
 // CHECK: bb0(%0 : $*T):
 // CHECK: [[STACK:%[0-9]+]] = alloc_stack $T
 // CHECK: copy_addr %0 to [initialization] [[STACK]]
@@ -191,7 +191,7 @@
   return generic.b
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}use_property_archetype_lvalue_get
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_archetype_lvalue_get
 // CHECK: bb0(%0 : $*T):
 // CHECK: [[STACK:%[0-9]+]] = alloc_stack $T
 // CHECK: copy_addr %0 to [initialization] [[STACK]] : $*T
@@ -205,7 +205,7 @@
 func use_property_archetype_lvalue_set<T : PropertyWithGetterSetter>(_ generic: inout T, v : Int) {
   generic.b = v
 }
-// CHECK-LABEL: sil hidden @{{.*}}use_property_archetype_lvalue_set
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}use_property_archetype_lvalue_set
 // CHECK: bb0(%0 : $*T, %1 : $Int):
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*T
 // CHECK: [[METH:%[0-9]+]] = witness_method $T, #PropertyWithGetterSetter.b!setter.1
@@ -218,7 +218,7 @@
   init(int: Int)
 }
 
-// CHECK-LABEL: sil hidden @$s9protocols27use_initializable_archetype{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9protocols27use_initializable_archetype{{[_0-9a-zA-Z]*}}F
 func use_initializable_archetype<T: Initializable>(_ t: T, i: Int) {
   // CHECK:   [[T_RESULT:%[0-9]+]] = alloc_stack $T
   // CHECK:   [[T_META:%[0-9]+]] = metatype $@thick T.Type
@@ -231,7 +231,7 @@
   T(int: i)
 }
 
-// CHECK: sil hidden @$s9protocols29use_initializable_existential{{[_0-9a-zA-Z]*}}F
+// CHECK: sil hidden [ossa] @$s9protocols29use_initializable_existential{{[_0-9a-zA-Z]*}}F
 func use_initializable_existential(_ im: Initializable.Type, i: Int) {
 // CHECK: bb0([[IM:%[0-9]+]] : $@thick Initializable.Type, [[I:%[0-9]+]] : $Int):
 // CHECK:   [[ARCHETYPE_META:%[0-9]+]] = open_existential_metatype [[IM]] : $@thick Initializable.Type to $@thick (@opened([[N:".*"]]) Initializable).Type
@@ -260,7 +260,7 @@
 
 // Make sure we are generating a protocol witness that calls the class method on
 // ClassWithGetter.
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9protocols15ClassWithGetterCAA08PropertycD0A2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed ClassWithGetter) -> Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9protocols15ClassWithGetterCAA08PropertycD0A2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed ClassWithGetter) -> Int {
 // CHECK: bb0([[C:%.*]] : $*ClassWithGetter):
 // CHECK-NEXT: [[CCOPY_LOADED:%.*]] = load_borrow %0
 // CHECK-NEXT: [[FUN:%.*]] = class_method [[CCOPY_LOADED]] : $ClassWithGetter, #ClassWithGetter.a!getter.1 : (ClassWithGetter) -> () -> Int, $@convention(method) (@guaranteed ClassWithGetter) -> Int
@@ -283,7 +283,7 @@
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9protocols21ClassWithGetterSetterCAA08PropertycdE0A2aDP1bSivgTW : $@convention(witness_method: PropertyWithGetterSetter) (@in_guaranteed ClassWithGetterSetter) -> Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9protocols21ClassWithGetterSetterCAA08PropertycdE0A2aDP1bSivgTW : $@convention(witness_method: PropertyWithGetterSetter) (@in_guaranteed ClassWithGetterSetter) -> Int {
 // CHECK: bb0([[C:%.*]] : $*ClassWithGetterSetter):
 // CHECK-NEXT: [[CCOPY_LOADED:%.*]] = load_borrow %0
 // CHECK-NEXT: [[FUN:%.*]] = class_method [[CCOPY_LOADED]] : $ClassWithGetterSetter, #ClassWithGetterSetter.b!getter.1 : (ClassWithGetterSetter) -> () -> Int, $@convention(method) (@guaranteed ClassWithGetterSetter) -> Int
@@ -300,7 +300,7 @@
   func methodUsingProperty() -> Int {
     return a
   }
-  // CHECK-LABEL: sil hidden @$s9protocols23ClassWithStoredPropertyC011methodUsingE0SiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s9protocols23ClassWithStoredPropertyC011methodUsingE0SiyF
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $ClassWithStoredProperty):
   // CHECK-NEXT: debug_value [[ARG]]
   // CHECK-NOT: copy_value
@@ -317,7 +317,7 @@
   func methodUsingProperty() -> Int {
     return a
   }
-  // CHECK-LABEL: sil hidden @$s9protocols24StructWithStoredPropertyV011methodUsingE0SiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s9protocols24StructWithStoredPropertyV011methodUsingE0SiyF
   // CHECK: bb0(%0 : $StructWithStoredProperty):
   // CHECK-NEXT: debug_value %0
   // CHECK-NEXT: %2 = struct_extract %0 : $StructWithStoredProperty, #StructWithStoredProperty.a
@@ -334,7 +334,7 @@
 // thunking code being too dumb but it is harmless to program
 // correctness.
 //
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9protocols24StructWithStoredPropertyVAA0eC6GetterA2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed StructWithStoredProperty) -> Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9protocols24StructWithStoredPropertyVAA0eC6GetterA2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed StructWithStoredProperty) -> Int {
 // CHECK: bb0([[C:%.*]] : $*StructWithStoredProperty):
 // CHECK-NEXT: [[CCOPY_LOADED:%.*]] = load [trivial] [[C]]
 // CHECK-NEXT: function_ref
@@ -354,14 +354,14 @@
   func methodUsingProperty() -> Int {
     return a
   }
-  // CHECK-LABEL: sil hidden @$s9protocols29StructWithStoredClassPropertyV011methodUsingF0SiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s9protocols29StructWithStoredClassPropertyV011methodUsingF0SiyF
   // CHECK: bb0(%0 : @guaranteed $StructWithStoredClassProperty):
   // CHECK-NEXT: debug_value %0
   // CHECK-NEXT: %2 = struct_extract %0 : $StructWithStoredClassProperty, #StructWithStoredClassProperty.a
   // CHECK-NEXT: return %2 : $Int
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9protocols29StructWithStoredClassPropertyVAA0fC6GetterA2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed StructWithStoredClassProperty) -> Int {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9protocols29StructWithStoredClassPropertyVAA0fC6GetterA2aDP1aSivgTW : $@convention(witness_method: PropertyWithGetter) (@in_guaranteed StructWithStoredClassProperty) -> Int {
 // CHECK: bb0([[C:%.*]] : $*StructWithStoredClassProperty):
 // CHECK-NEXT: [[CCOPY_LOADED:%.*]] = load_borrow [[C]]
 // CHECK-NEXT: function_ref
@@ -379,7 +379,7 @@
 func testExistentialPropertyRead<T: ExistentialProperty>(_ t: inout T) {
     let b = t.p.b
 }
-// CHECK-LABEL: sil hidden @$s9protocols27testExistentialPropertyRead{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9protocols27testExistentialPropertyRead{{[_0-9a-zA-Z]*}}F
 // CHECK:      [[READ:%.*]] = begin_access [read] [unknown] %0 : $*T
 // CHECK:      [[P_TEMP:%.*]] = alloc_stack $PropertyWithGetterSetter
 // CHECK:      [[T_TEMP:%.*]] = alloc_stack $T
@@ -402,7 +402,7 @@
 func modifyProperty<T : PropertyWithGetterSetter>(_ x: inout T) {
   modify(&x.b)
 }
-// CHECK-LABEL: sil hidden @$s9protocols14modifyPropertyyyxzAA0C16WithGetterSetterRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s9protocols14modifyPropertyyyxzAA0C16WithGetterSetterRzlF
 // CHECK:      [[WRITE:%.*]] = begin_access [modify] [unknown] %0 : $*T
 // CHECK:      [[WITNESS_FN:%.*]] = witness_method $T, #PropertyWithGetterSetter.b!modify.1
 // CHECK:      ([[ADDR:%.*]], [[TOKEN:%.*]]) = begin_apply [[WITNESS_FN]]<T>
@@ -422,7 +422,7 @@
   p.val.x += 1
 }
 
-// CHECK-LABEL: sil @$s9protocols4testyyAA5Proto_pF : $@convention(thin) (@in_guaranteed Proto) -> ()
+// CHECK-LABEL: sil [ossa] @$s9protocols4testyyAA5Proto_pF : $@convention(thin) (@in_guaranteed Proto) -> ()
 // CHECK: [[OPEN:%.*]] = open_existential_addr immutable_access
 // CHECK: [[MAT:%.*]] = witness_method $@opened("{{.*}}") Proto, #Proto.val!modify
 // CHECK: ([[BUF:%.*]], [[TOKEN:%.*]]) = begin_apply [[MAT]]
diff --git a/test/SILGen/reabstract-tuple.swift b/test/SILGen/reabstract-tuple.swift
index 62c90fb..f04ff22 100644
--- a/test/SILGen/reabstract-tuple.swift
+++ b/test/SILGen/reabstract-tuple.swift
@@ -11,7 +11,7 @@
     }
 }
 
-// CHECK: sil @$s4main7testBoxyyF : $@convention(thin) () -> () {
+// CHECK: sil [ossa] @$s4main7testBoxyyF : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:   // function_ref closure #1 in testBox()
 // CHECK:   [[CLOSURE:%.*]] = function_ref @$s4main7testBoxyyFyycfU_ : $@convention(thin) () -> ()
diff --git a/test/SILGen/reabstract.swift b/test/SILGen/reabstract.swift
index 567b9cc..d1e09d3 100644
--- a/test/SILGen/reabstract.swift
+++ b/test/SILGen/reabstract.swift
@@ -8,7 +8,7 @@
 func test0() {
   takeFn(liftOptional)
 }
-// CHECK:    sil hidden @$s10reabstract5test0yyF : $@convention(thin) () -> () {
+// CHECK:    sil hidden [ossa] @$s10reabstract5test0yyF : $@convention(thin) () -> () {
 //   Emit a generalized reference to liftOptional.
 //   TODO: just emit a globalized thunk
 // CHECK:      reabstract.liftOptional
@@ -49,14 +49,14 @@
 // MANDATORY-NEXT: return
 // MANDATORY-NEXT: } // end sil function '$s10reabstract5test0yyF'
 
-// CHECK:    sil shared [transparent] [serializable] [reabstraction_thunk] [[THUNK]] : $@convention(thin) (@in_guaranteed Int, @noescape @callee_guaranteed (Int) -> Optional<Int>) -> @out Optional<Int> {
+// CHECK:    sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] [[THUNK]] : $@convention(thin) (@in_guaranteed Int, @noescape @callee_guaranteed (Int) -> Optional<Int>) -> @out Optional<Int> {
 // CHECK:      [[T0:%.*]] = load [trivial] %1 : $*Int
 // CHECK-NEXT: [[T1:%.*]] = apply %2([[T0]])
 // CHECK-NEXT: store [[T1]] to [trivial] %0
 // CHECK-NEXT: tuple ()
 // CHECK-NEXT: return
 
-// CHECK-LABEL: sil hidden @$s10reabstract10testThrowsyyypF
+// CHECK-LABEL: sil hidden [ossa] @$s10reabstract10testThrowsyyypF
 // CHECK:         function_ref @$sytIegr_Ieg_TR
 // CHECK:         function_ref @$syts5Error_pIegrzo_sAA_pIegzo_TR
 func testThrows(_ x: Any) {
@@ -80,7 +80,7 @@
   box.t(&c, i)
 }
 
-// CHECK-LABEL: sil hidden @$s10reabstract15testInoutOpaque_1iyAA1CC_SitF
+// CHECK-LABEL: sil hidden [ossa] @$s10reabstract15testInoutOpaque_1iyAA1CC_SitF
 // CHECK:         function_ref @$s10reabstract6notFun_1iyAA1CCz_SitF
 // CHECK:         thin_to_thick_function {{%[0-9]+}}
 // CHECK:         function_ref @$s10reabstract1CCSiIegly_ACSiytIeglnr_TR
@@ -92,13 +92,13 @@
 // CHECK:         apply
 // CHECK: } // end sil function '$s10reabstract15testInoutOpaque_1iyAA1CC_SitF'
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s10reabstract1CCSiIegly_ACSiytIeglnr_TR : $@convention(thin) (@inout C, @in_guaranteed Int, @guaranteed @callee_guaranteed (@inout C, Int) -> ()) -> @out () {
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s10reabstract1CCSiytIeglnr_ACSiIegly_TR : $@convention(thin) (@inout C, Int, @guaranteed @callee_guaranteed (@inout C, @in_guaranteed Int) -> @out ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s10reabstract1CCSiIegly_ACSiytIeglnr_TR : $@convention(thin) (@inout C, @in_guaranteed Int, @guaranteed @callee_guaranteed (@inout C, Int) -> ()) -> @out () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s10reabstract1CCSiytIeglnr_ACSiIegly_TR : $@convention(thin) (@inout C, Int, @guaranteed @callee_guaranteed (@inout C, @in_guaranteed Int) -> @out ()) -> () {
 
 func closureTakingOptional(_ fn: (Int?) -> ()) {}
 closureTakingOptional({ (_: Any) -> () in })
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sypIgn_SiSgIegy_TR : $@convention(thin) (Optional<Int>, @noescape @callee_guaranteed (@in_guaranteed Any) -> ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sypIgn_SiSgIegy_TR : $@convention(thin) (Optional<Int>, @noescape @callee_guaranteed (@in_guaranteed Any) -> ()) -> ()
 // CHECK:   [[ANYADDR:%.*]] = alloc_stack $Any
 // CHECK:   [[OPTADDR:%.*]] = init_existential_addr [[ANYADDR]] : $*Any, $Optional<Int>
 // CHECK:   store %0 to [trivial] [[OPTADDR]] : $*Optional<Int>
@@ -107,8 +107,8 @@
 // Same behavior as above with other ownership qualifiers.
 func evenLessFun(_ s: __shared C, _ o: __owned C) {}
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s10reabstract1CCACIeggx_A2CytIegnir_TR : $@convention(thin) (@in_guaranteed C, @in C, @guaranteed @callee_guaranteed (@guaranteed C, @owned C) -> ()) -> @out ()
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s10reabstract1CCACytIegnir_A2CIeggx_TR : $@convention(thin) (@guaranteed C, @owned C, @guaranteed @callee_guaranteed (@in_guaranteed C, @in C) -> @out ()) -> ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s10reabstract1CCACIeggx_A2CytIegnir_TR : $@convention(thin) (@in_guaranteed C, @in C, @guaranteed @callee_guaranteed (@guaranteed C, @owned C) -> ()) -> @out ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s10reabstract1CCACytIegnir_A2CIeggx_TR : $@convention(thin) (@guaranteed C, @owned C, @guaranteed @callee_guaranteed (@in_guaranteed C, @in C) -> @out ()) -> ()
 func testSharedOwnedOpaque(_ s: C, o: C) {
   let box = Box(t: evenLessFun)
   box.t(s, o)
diff --git a/test/SILGen/reabstract_lvalue.swift b/test/SILGen/reabstract_lvalue.swift
index 27be882..8e6ef48 100644
--- a/test/SILGen/reabstract_lvalue.swift
+++ b/test/SILGen/reabstract_lvalue.swift
@@ -3,15 +3,15 @@
 
 struct MyMetatypeIsThin {}
 
-// CHECK-LABEL: sil hidden @$s17reabstract_lvalue19consumeGenericInOut{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@inout T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17reabstract_lvalue19consumeGenericInOut{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@inout T) -> ()
 func consumeGenericInOut<T>(_ x: inout T) {}
 
-// CHECK-LABEL: sil hidden @$s17reabstract_lvalue9transformySdSiF : $@convention(thin) (Int) -> Double
+// CHECK-LABEL: sil hidden [ossa] @$s17reabstract_lvalue9transformySdSiF : $@convention(thin) (Int) -> Double
 func transform(_ i: Int) -> Double {
   return Double(i)
 }
 
-// CHECK-LABEL: sil hidden @$s17reabstract_lvalue0A13FunctionInOutyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17reabstract_lvalue0A13FunctionInOutyyF : $@convention(thin) () -> ()
 func reabstractFunctionInOut() {
   // CHECK: [[BOX:%.*]] = alloc_box ${ var @callee_guaranteed (Int) -> Double }
   // CHECK: [[PB:%.*]] = project_box [[BOX]]
@@ -33,10 +33,10 @@
   consumeGenericInOut(&minimallyAbstracted)
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSiSdIegyd_SiSdIegnr_TR : $@convention(thin) (@in_guaranteed Int, @guaranteed @callee_guaranteed (Int) -> Double) -> @out Double
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSiSdIegnr_SiSdIegyd_TR : $@convention(thin) (Int, @guaranteed @callee_guaranteed (@in_guaranteed Int) -> @out Double) -> Double
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSiSdIegyd_SiSdIegnr_TR : $@convention(thin) (@in_guaranteed Int, @guaranteed @callee_guaranteed (Int) -> Double) -> @out Double
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSiSdIegnr_SiSdIegyd_TR : $@convention(thin) (Int, @guaranteed @callee_guaranteed (@in_guaranteed Int) -> @out Double) -> Double
 
-// CHECK-LABEL: sil hidden @$s17reabstract_lvalue0A13MetatypeInOutyyF : $@convention(thin) () -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17reabstract_lvalue0A13MetatypeInOutyyF : $@convention(thin) () -> ()
 func reabstractMetatypeInOut() {
   var thinMetatype = MyMetatypeIsThin.self
   // CHECK: [[BOX:%.*]] = alloc_stack $@thick MyMetatypeIsThin.Type
diff --git a/test/SILGen/read_accessor.swift b/test/SILGen/read_accessor.swift
index fe41cfd..ef31e0c 100644
--- a/test/SILGen/read_accessor.swift
+++ b/test/SILGen/read_accessor.swift
@@ -4,7 +4,7 @@
   var stored: String
 
   var readable: String {
-// CHECK-LABEL: sil hidden @$s13read_accessor10SimpleTestV8readableSSvr
+// CHECK-LABEL: sil hidden [ossa] @$s13read_accessor10SimpleTestV8readableSSvr
 // CHECK-SAME:    : $@yield_once @convention(method) (@guaranteed SimpleTest) -> @yields @guaranteed String {
 // CHECK:         [[T0:%.*]] = struct_extract %0 : $SimpleTest, #SimpleTest.stored
 // CHECK-NEXT:    yield [[T0]] : $String, resume bb1, unwind bb2
@@ -18,7 +18,7 @@
     }
   }
 
-// CHECK-LABEL: sil hidden @$s13read_accessor10SimpleTestV3getSSyF
+// CHECK-LABEL: sil hidden [ossa] @$s13read_accessor10SimpleTestV3getSSyF
 // CHECK:         [[T0:%.*]] = begin_access [read] [unknown] %0
 // CHECK-NEXT:    [[SELF:%.*]] = load [copy] [[T0]] : $*SimpleTest
 // CHECK-NEXT:    end_access [[T0]]
@@ -39,7 +39,7 @@
 class GetterSynthesis {
   var stored: String = "hello"
   var readable: String {
-// CHECK-LABEL: sil hidden [transparent] @$s13read_accessor15GetterSynthesisC8readableSSvg
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s13read_accessor15GetterSynthesisC8readableSSvg
 // CHECK:         [[READFN:%.*]] = function_ref @$s13read_accessor15GetterSynthesisC8readableSSvr
 // CHECK-NEXT:    ([[VALUE:%.*]], [[TOKEN:%.*]]) = begin_apply [[READFN]](%0)
 // CHECK-NEXT:    [[RET:%.*]] = copy_value [[VALUE]] : $String
@@ -64,7 +64,7 @@
   func index() -> Int { return 0 }
 
   var readable: ((String, ()), String, ()) {
-// CHECK-LABEL: sil hidden @$s13read_accessor11TupleReaderV8readableSS_ytt_SSyttvr
+// CHECK-LABEL: sil hidden [ossa] @$s13read_accessor11TupleReaderV8readableSS_ytt_SSyttvr
 // CHECK:         debug_value %0
 // CHECK-NEXT:    // function_ref
 // CHECK-NEXT:    [[INDEXFN:%.*]] = function_ref @$s13read_accessor11TupleReaderV5indexSiyF
@@ -95,7 +95,7 @@
     }
   }
 
-// CHECK-LABEL: sil hidden @$s13read_accessor11TupleReaderV11useReadableyyF
+// CHECK-LABEL: sil hidden [ossa] @$s13read_accessor11TupleReaderV11useReadableyyF
 // CHECK:         [[READFN:%.*]] = function_ref @$s13read_accessor11TupleReaderV8readableSS_ytt_SSyttvr
 // CHECK-NEXT:    ([[FIRST:%.*]], [[SECOND:%.*]], [[TOKEN:%.*]]) = begin_apply [[READFN]](%0)
 //   FIXME: this materialization is silly
@@ -122,7 +122,7 @@
     return compute()
   }
 
-// CHECK-LABEL: sil hidden @$s13read_accessor11TupleReaderV0A8ComputedSSvr
+// CHECK-LABEL: sil hidden [ossa] @$s13read_accessor11TupleReaderV0A8ComputedSSvr
 // CHECK:         [[GETTER:%.*]] = function_ref @$s13read_accessor11TupleReaderV8computedSSvg
 // CHECK-NEXT:    [[VALUE:%.]] = apply [[GETTER]](%0)
 // CHECK-NEXT:    [[BORROW:%.*]] = begin_borrow [[VALUE]] : $String
@@ -149,7 +149,7 @@
   }
 }
 //   Key-path getter for TestKeyPath.readable
-// CHECK-LABEL: sil shared [thunk] @$s13read_accessor11TestKeyPathV8readableSSvpACTK
+// CHECK-LABEL: sil shared [thunk] [ossa] @$s13read_accessor11TestKeyPathV8readableSSvpACTK
 // CHECK:       bb0(%0 : $*String, %1 : $*TestKeyPath):
 // CHECK-NEXT:    [[SELF:%.*]] = load [trivial] %1
 // CHECK-NEXT:    // function_ref
@@ -164,11 +164,11 @@
 
 //   Check that we emit a read coroutine but not a getter for this.
 //   This test assumes that we emit accessors in a particular order.
-// CHECK-LABEL: sil [transparent] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvpfi
-// CHECK-NOT:   sil [transparent] [serialized] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvg
-// CHECK:       sil [transparent] [serialized] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvr
-// CHECK-NOT:   sil [transparent] [serialized] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvg
-// CHECK-LABEL: sil [transparent] [serialized] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvs
+// CHECK-LABEL: sil [transparent] [ossa] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvpfi
+// CHECK-NOT:   sil [transparent] [serialized] [ossa] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvg
+// CHECK:       sil [transparent] [serialized] [ossa] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvr
+// CHECK-NOT:   sil [transparent] [serialized] [ossa] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvg
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s13read_accessor20TestBorrowedPropertyV14borrowedStringSSvs
 public struct TestBorrowedProperty {
   @_borrowed
   public var borrowedString = ""
@@ -182,11 +182,11 @@
   var title: String = ""
 }
 //   The concrete read accessor is generated on-demand and does a class dispatch to the getter.
-// CHECK-LABEL: sil shared @$s13read_accessor17OverridableGetterC5titleSSvr
+// CHECK-LABEL: sil shared [ossa] @$s13read_accessor17OverridableGetterC5titleSSvr
 // CHECK:       class_method %0 : $OverridableGetter, #OverridableGetter.title!getter.1
 // CHECK-LABEL: // end sil function '$s13read_accessor17OverridableGetterC5titleSSvr'
 //   The read witness thunk does a direct call to the concrete read accessor.
-// CHECK-LABEL: sil private [transparent] [thunk] @$s13read_accessor17OverridableGetterCAA13ReadableTitleA2aDP5titleSSvrTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s13read_accessor17OverridableGetterCAA13ReadableTitleA2aDP5titleSSvrTW
 // CHECK:       function_ref @$s13read_accessor17OverridableGetterC5titleSSvr
 // CHECK-LABEL: // end sil function '$s13read_accessor17OverridableGetterCAA13ReadableTitleA2aDP5titleSSvrTW'
 
@@ -198,10 +198,10 @@
   var title: String = ""
 }
 //   The concrete getter is generated on-demand and does a class dispatch to the read accessor.
-// CHECK-LABEL: sil shared @$s13read_accessor17OverridableReaderC5titleSSvg
+// CHECK-LABEL: sil shared [ossa] @$s13read_accessor17OverridableReaderC5titleSSvg
 // CHECK:       class_method %0 : $OverridableReader, #OverridableReader.title!read.1
 // CHECK-LABEL: // end sil function '$s13read_accessor17OverridableReaderC5titleSSvg'
 //   The getter witness thunk does a direct call to the concrete getter.
-// CHECK-LABEL: sil private [transparent] [thunk] @$s13read_accessor17OverridableReaderCAA13GettableTitleA2aDP5titleSSvgTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s13read_accessor17OverridableReaderCAA13GettableTitleA2aDP5titleSSvgTW
 // CHECK:       function_ref @$s13read_accessor17OverridableReaderC5titleSSvg
 // CHECK-LABEL: // end sil function '$s13read_accessor17OverridableReaderCAA13GettableTitleA2aDP5titleSSvgTW'
diff --git a/test/SILGen/required_init.swift b/test/SILGen/required_init.swift
index b522602..e3fa788 100644
--- a/test/SILGen/required_init.swift
+++ b/test/SILGen/required_init.swift
@@ -4,7 +4,7 @@
   let x: Bar = 1.0
   return x
 }
-// CHECK-LABEL: sil hidden @$s13required_init20subclassFloatLiteralAA3BarCyF
+// CHECK-LABEL: sil hidden [ossa] @$s13required_init20subclassFloatLiteralAA3BarCyF
 // CHECK:         class_method {{%.*}} : $@thick Foo.Type, #Foo.init!allocator.1
 
 class Foo: ExpressibleByFloatLiteral {
diff --git a/test/SILGen/result_abstraction.swift b/test/SILGen/result_abstraction.swift
index 1bfc011..87e1503 100644
--- a/test/SILGen/result_abstraction.swift
+++ b/test/SILGen/result_abstraction.swift
@@ -11,7 +11,7 @@
 }
 
 struct ConformsToReturnsMetatype : ReturnsMetatype {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s18result_abstraction25ConformsToReturnsMetatypeVAA0eF0A2aDP08getAssocF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsMetatype) (@inout ConformsToReturnsMetatype) -> @thick S.Type
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s18result_abstraction25ConformsToReturnsMetatypeVAA0eF0A2aDP08getAssocF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsMetatype) (@inout ConformsToReturnsMetatype) -> @thick S.Type
   // CHECK:         function_ref @$s18result_abstraction25ConformsToReturnsMetatypeV08getAssocF0{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout ConformsToReturnsMetatype) -> @thin S.Type
   mutating
   func getAssocMetatype() -> S.Type {
@@ -26,7 +26,7 @@
 }
 
 struct ConformsToReturnsFunction : ReturnsFunction {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s18result_abstraction25ConformsToReturnsFunctionVAA0eF0A2aDP7getFunc{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsFunction) (@in_guaranteed ConformsToReturnsFunction) -> @owned @callee_guaranteed (@in_guaranteed S) -> @out R
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s18result_abstraction25ConformsToReturnsFunctionVAA0eF0A2aDP7getFunc{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsFunction) (@in_guaranteed ConformsToReturnsFunction) -> @owned @callee_guaranteed (@in_guaranteed S) -> @out R
   // CHECK:         function_ref @$s18result_abstraction1SVAA1RVIegyd_AcEIegnr_TR : $@convention(thin) (@in_guaranteed S, @guaranteed @callee_guaranteed (S) -> R) -> @out R
   func getFunc() -> (S) -> R {
     return {s in R()}
@@ -41,7 +41,7 @@
 
 struct ConformsToReturnsAssocWithMetatype : ReturnsAssoc {
   typealias Assoc = S.Type
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s18result_abstraction34ConformsToReturnsAssocWithMetatypeVAA0eF0A2aDP03getF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsAssoc) (@inout ConformsToReturnsAssocWithMetatype) -> @out @thick S.Type
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s18result_abstraction34ConformsToReturnsAssocWithMetatypeVAA0eF0A2aDP03getF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsAssoc) (@inout ConformsToReturnsAssocWithMetatype) -> @out @thick S.Type
   // CHECK:         function_ref @$s18result_abstraction34ConformsToReturnsAssocWithMetatypeV03getF0{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout ConformsToReturnsAssocWithMetatype) -> @thin S.Type
   mutating
   func getAssoc() -> S.Type {
@@ -51,7 +51,7 @@
 
 struct ConformsToReturnsAssocWithFunction : ReturnsAssoc {
   typealias Assoc = (S) -> R
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s18result_abstraction34ConformsToReturnsAssocWithFunctionVAA0eF0A2aDP03getF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsAssoc) (@inout ConformsToReturnsAssocWithFunction) -> @out @callee_guaranteed (@in_guaranteed S) -> @out R
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s18result_abstraction34ConformsToReturnsAssocWithFunctionVAA0eF0A2aDP03getF0{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ReturnsAssoc) (@inout ConformsToReturnsAssocWithFunction) -> @out @callee_guaranteed (@in_guaranteed S) -> @out R
   // CHECK:         function_ref @$s18result_abstraction34ConformsToReturnsAssocWithFunctionV03getF0{{[_0-9a-zA-Z]*}}F : $@convention(method) (@inout ConformsToReturnsAssocWithFunction) -> @owned @callee_guaranteed (S) -> R
   mutating
   func getAssoc() -> (S) -> R {
diff --git a/test/SILGen/same_type_abstraction.swift b/test/SILGen/same_type_abstraction.swift
index b76a52e..ea0e7fa 100644
--- a/test/SILGen/same_type_abstraction.swift
+++ b/test/SILGen/same_type_abstraction.swift
@@ -11,7 +11,7 @@
 struct S1 {}
 struct S2 {}
 
-// CHECK-LABEL: sil hidden @$s21same_type_abstraction28callClosureWithConcreteTypes{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s21same_type_abstraction28callClosureWithConcreteTypes{{[_0-9a-zA-Z]*}}F
 // CHECK:         function_ref @$s{{.*}}TR :
 func callClosureWithConcreteTypes<T: Associated, U: Associated>(x: Abstracted<T, U>, arg: S1) -> S2 where T.Assoc == S1, U.Assoc == S2 {
   return x.closure(arg)
@@ -27,7 +27,7 @@
 }
 
 extension MyProtocol where Data == (ReadData, ReadData) {
-  // CHECK-LABEL: sil hidden @$s21same_type_abstraction10MyProtocolPAA8ReadDataQz_AEt0G0RtzrlE07currentG0AE_AEtyF : $@convention(method) <Self where Self : MyProtocol, Self.Data == (Self.ReadData, Self.ReadData)> (@in_guaranteed Self) -> (@out Self.ReadData, @out Self.ReadData)
+  // CHECK-LABEL: sil hidden [ossa] @$s21same_type_abstraction10MyProtocolPAA8ReadDataQz_AEt0G0RtzrlE07currentG0AE_AEtyF : $@convention(method) <Self where Self : MyProtocol, Self.Data == (Self.ReadData, Self.ReadData)> (@in_guaranteed Self) -> (@out Self.ReadData, @out Self.ReadData)
   func currentData() -> Data {
     // CHECK: bb0(%0 : $*Self.ReadData, %1 : $*Self.ReadData, %2 : $*Self):
     // CHECK:   [[READ_FN:%.*]] = witness_method $Self, #MyProtocol.readData!1 : {{.*}} : $@convention(witness_method: MyProtocol) <τ_0_0 where τ_0_0 : MyProtocol> (@in_guaranteed τ_0_0) -> @out τ_0_0.ReadData
@@ -50,7 +50,7 @@
 }
 
 extension Refined {
-  // CHECK-LABEL: sil hidden @$s21same_type_abstraction7RefinedPAAE12withElementsx5AssocQz_tcfC : $@convention(method) <Self where Self : Refined> (@in Self.Assoc, @thick Self.Type) -> @out Self
+  // CHECK-LABEL: sil hidden [ossa] @$s21same_type_abstraction7RefinedPAAE12withElementsx5AssocQz_tcfC : $@convention(method) <Self where Self : Refined> (@in Self.Assoc, @thick Self.Type) -> @out Self
   init(withElements newElements: Key) {
     self.init()
   }
diff --git a/test/SILGen/same_type_across_generic_depths.swift b/test/SILGen/same_type_across_generic_depths.swift
index 535c185..9289754 100644
--- a/test/SILGen/same_type_across_generic_depths.swift
+++ b/test/SILGen/same_type_across_generic_depths.swift
@@ -3,9 +3,9 @@
 // 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>>
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}Foo{{.*}}bar{{.*}} : $@convention(method) <T><U where T == X<U>>
   func bar<U>(_: U) where T == X<U> {}
 
-  // CHECK-LABEL: sil hidden @{{.*}}Foo{{.*}}bar{{.*}} : $@convention(method) <T><U where T : X<U>>
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}Foo{{.*}}bar{{.*}} : $@convention(method) <T><U where T : X<U>>
   func bar<U>(_: U) where T: X<U> {}
 }
diff --git a/test/SILGen/semanticsattr.swift b/test/SILGen/semanticsattr.swift
index 78af33e..993c9f0 100644
--- a/test/SILGen/semanticsattr.swift
+++ b/test/SILGen/semanticsattr.swift
@@ -1,5 +1,5 @@
 // RUN: %target-swift-emit-silgen -parse-stdlib %s | %FileCheck %s
 
-// CHECK: [_semantics "123"] [_semantics "223"] @func1
+// CHECK: [_semantics "123"] [_semantics "223"] [ossa] @func1
 @_semantics("223") @_semantics("123")
 @_silgen_name("func1") func func1() { }
diff --git a/test/SILGen/sil_locations.swift b/test/SILGen/sil_locations.swift
index a5b8fa7..60814ac 100644
--- a/test/SILGen/sil_locations.swift
+++ b/test/SILGen/sil_locations.swift
@@ -9,7 +9,7 @@
     x+=1
   }
   return x
-  // CHECK-LABEL: sil hidden @$s13sil_locations6ifexprSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations6ifexprSiyF
   // CHECK: apply {{.*}}, loc "{{.*}}":[[@LINE-5]]:6
   // CHECK: cond_br {{%.*}}, [[TRUE_BB:bb[0-9]+]], [[FALSE_BB:bb[0-9]+]], loc "{{.*}}":[[@LINE-6]]:6
   // CHECK: [[TRUE_BB]]:
@@ -26,7 +26,7 @@
     x-=1
   }
   return x
-  // CHECK-LABEL: sil hidden @$s13sil_locations10ifelseexprSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations10ifelseexprSiyF
   // CHECK: cond_br {{%.*}}, [[TRUE_BB:bb[0-9]+]], [[FALSE_BB:bb[0-9]+]], loc "{{.*}}":[[@LINE-7]]:6
   // CHECK: [[TRUE_BB]]:
   // CHECK: br bb{{[0-9]+}}, loc "{{.*}}":[[@LINE-7]]:3
@@ -43,7 +43,7 @@
     return 5
   }
   return 6
-  // CHECK-LABEL: sil hidden @$s13sil_locations13ifexpr_returnSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations13ifexpr_returnSiyF
   // CHECK: apply {{.*}}, loc "{{.*}}":[[@LINE-5]]:6
   // CHECK: cond_br {{%.*}}, [[TRUE_BB:bb[0-9]+]], [[FALSE_BB:bb[0-9]+]], loc "{{.*}}":[[@LINE-6]]:6
   // CHECK: [[TRUE_BB]]:
@@ -56,7 +56,7 @@
 func ifexpr_rval() -> Int {
   var x = true ? 5 : 6
   return x
-  // CHECK-LABEL: sil hidden @$s13sil_locations11ifexpr_rvalSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations11ifexpr_rvalSiyF
   // CHECK: apply {{.*}}, loc "{{.*}}":[[@LINE-3]]:11
   // CHECK: cond_br {{%.*}}, [[TRUE_BB:bb[0-9]+]], [[FALSE_BB:bb[0-9]+]], loc "{{.*}}":[[@LINE-4]]:11
   // CHECK: [[TRUE_BB]]:
@@ -68,7 +68,7 @@
 // --- Test function calls.
 func simpleDirectCallTest(_ i: Int) -> Int {
   return simpleDirectCallTest(i)
-  // CHECK-LABEL: sil hidden @$s13sil_locations20simpleDirectCallTestyS2iF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations20simpleDirectCallTestyS2iF
   // CHECK: function_ref @$s13sil_locations20simpleDirectCallTestyS2iF : {{.*}}, loc "{{.*}}":[[@LINE-2]]:10
   // CHECK: {{%.*}} apply {{%.*}} line:[[@LINE-3]]:10
 }
@@ -78,7 +78,7 @@
 }
 func useTemplateTest() -> Int {
   return templateTest(5);
-  // CHECK-LABEL: sil hidden @$s13sil_locations15useTemplateTestSiyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations15useTemplateTestSiyF
   // CHECK: function_ref @$sSi2{{[_0-9a-zA-Z]*}}fC :{{.*}}, loc "{{.*}}":[[@LINE-2]]
 }
 
@@ -87,7 +87,7 @@
     return x + y
   }
   return bar(1)
-  // CHECK-LABEL: sil hidden @$s13sil_locations3foo{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations3foo{{[_0-9a-zA-Z]*}}F
   // CHECK: [[CLOSURE:%[0-9]+]] = function_ref {{.*}}, loc "{{.*}}":[[@LINE-2]]:10
   // CHECK: apply [[CLOSURE:%[0-9]+]]
 }
@@ -98,7 +98,7 @@
 func testMethodCall() {
   var l: LocationClass
   l.mem();
-  // CHECK-LABEL: sil hidden @$s13sil_locations14testMethodCallyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations14testMethodCallyyF
   
   // CHECK: class_method {{.[0-9]+}} : $LocationClass, #LocationClass.mem!1 {{.*}}, loc "{{.*}}":[[@LINE-3]]:5
 }
@@ -109,7 +109,7 @@
     return
   }
   x += 1
-  // CHECK-LABEL: sil hidden @$s13sil_locations34multipleReturnsImplicitAndExplicityyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations34multipleReturnsImplicitAndExplicityyF
   // CHECK: cond_br
   // CHECK: br bb{{[0-9]+}}, loc "{{.*}}":[[@LINE-5]]:5, {{.*}}:return
   // CHECK: br bb{{[0-9]+}}, loc "{{.*}}":[[@LINE+2]]:1, {{.*}}:imp_return
@@ -118,14 +118,14 @@
 
 func simplifiedImplicitReturn() -> () {
   var y = 0 
-  // CHECK-LABEL: sil hidden @$s13sil_locations24simplifiedImplicitReturnyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations24simplifiedImplicitReturnyyF
   // CHECK: return {{.*}}, loc "{{.*}}":[[@LINE+1]]:1, {{.*}}:imp_return
 }
 
 func switchfoo() -> Int { return 0 }
 func switchbar() -> Int { return 0 }
 
-// CHECK-LABEL: sil hidden @$s13sil_locations10testSwitchyyF
+// CHECK-LABEL: sil hidden [ossa] @$s13sil_locations10testSwitchyyF
 func testSwitch() {
   var x:Int
   x = 0
@@ -154,7 +154,7 @@
   } else {
     var x:Int
   }
-  // CHECK-LABEL: sil hidden @$s13sil_locations6testIfyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations6testIfyyF
   //
   // FIXME: Missing location info here.
   // CHECK: function_ref
@@ -176,7 +176,7 @@
     continue
   }
 
-  // CHECK-LABEL: sil hidden @$s13sil_locations7testForyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations7testForyyF
   // CHECK: [[VAR_Y_IN_FOR:%[0-9]+]]  = alloc_box ${ var Int }, var, name "y", loc "{{.*}}":[[@LINE-10]]:9
   // CHECK: integer_literal $Builtin.IntLiteral, 300, loc "{{.*}}":[[@LINE-11]]:18
   // CHECK: destroy_value [[VAR_Y_IN_FOR]] : ${ var Int }
@@ -191,7 +191,7 @@
   var t = (2,3)
   var tt = (2, (4,5))
   var d = "foo"
-  // CHECK-LABEL: sil hidden @$s13sil_locations10testTuplesyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations10testTuplesyyF
   // CHECK: tuple_element_addr {{.*}}, loc "{{.*}}":[[@LINE-4]]:11
   // CHECK: integer_literal $Builtin.IntLiteral, 2, loc "{{.*}}":[[@LINE-5]]:12
   // CHECK: integer_literal $Builtin.IntLiteral, 3, loc "{{.*}}":[[@LINE-6]]:14
@@ -210,18 +210,18 @@
 
 func captures_tuple<T, U>(x: (T, U)) -> () -> (T, U) {
   return {x}
-  // CHECK-LABEL: sil hidden @$s13sil_locations14captures_tuple{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations14captures_tuple{{[_0-9a-zA-Z]*}}F
   // CHECK: tuple_element_addr {{.*}}, loc "{{.*}}":[[@LINE-3]]:27
   // CHECK: copy_addr {{.*}}, loc "{{.*}}":[[@LINE-4]]:27
   // CHECK: function_ref {{.*}}, loc "{{.*}}":[[@LINE-4]]:10
 
-  // CHECK-LABEL: sil private @$s13sil_locations14captures_tuple{{.*}}fU_
+  // CHECK-LABEL: sil private [ossa] @$s13sil_locations14captures_tuple{{.*}}fU_
   // CHECK: copy_addr {{.*}}, loc "{{.*}}":[[@LINE-7]]:11
 }
 
 func interpolated_string(_ x: Int, y: String) -> String {
   return "The \(x) Million Dollar \(y)"
-  // CHECK-LABEL: sil hidden @$s13sil_locations19interpolated_string{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations19interpolated_string{{[_0-9a-zA-Z]*}}F
   // CHECK: function_ref @$ss26DefaultStringInterpolationV15literalCapacity18interpolationCountABSi_SitcfC
   // CHECK-NEXT: apply{{.*}}, loc "{{.*}}":[[@LINE-3]]:10
   
@@ -250,7 +250,7 @@
 func tuple() -> (Int, Float) { return (1, 1.0) }  
 func tuple_element(_ x: (Int, Float)) {
   int(tuple().0)
-  // CHECK-LABEL: sil hidden @$s13sil_locations13tuple_element{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations13tuple_element{{[_0-9a-zA-Z]*}}F
 
   // CHECK: apply {{.*}} line:[[@LINE-3]]:7
   // CHECK: destructure_tuple {{.*}}line:[[@LINE-4]]:7
@@ -260,7 +260,7 @@
 
 func containers() -> ([Int], Dictionary<String, Int>) {
   return ([1, 2, 3], ["Ankeny": 1, "Burnside": 2, "Couch": 3])
-  // CHECK-LABEL: sil hidden @$s13sil_locations10containers{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations10containers{{[_0-9a-zA-Z]*}}F
   // CHECK: apply {{%.*}}<(String, Int)>({{%.*}}), loc "{{.*}}":[[@LINE-2]]:22
   
   // CHECK: string_literal utf8 "Ankeny", loc "{{.*}}":[[@LINE-4]]:23
@@ -287,7 +287,7 @@
   
 
 
-  // CHECK-LABEL: sil hidden @$s13sil_locations10test_isa_2{{[_0-9a-zA-Z]*}}F
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations10test_isa_2{{[_0-9a-zA-Z]*}}F
   // CHECK: alloc_stack $(P, Int), loc "{{.*}}":[[@LINE-10]]:10
   // CHECK: tuple_element_addr{{.*}} $*(P, Int), 0, loc "{{.*}}":[[@LINE-11]]:10
   // CHECK: tuple_element_addr{{.*}} $*(P, Int), 1, loc "{{.*}}":[[@LINE-12]]:10
@@ -315,7 +315,7 @@
   }
   
   
-  // CHECK_LABEL: sil hidden @$s13sil_locations29printSinglePayloadAddressOnly{{[_0-9a-zA-Z]*}}F
+  // CHECK_LABEL: sil hidden [ossa] @$s13sil_locations29printSinglePayloadAddressOnly{{[_0-9a-zA-Z]*}}F
   // CHECK: bb0
   // CHECK: switch_enum_addr {{.*}} [[FALSE_BB:bb[0-9]+]], {{.*}}line:[[@LINE-10]]:3
   // CHECK: [[FALSE_BB]]:
@@ -332,10 +332,10 @@
     }
   }
   
-  // CHECK-LABEL: sil hidden @$s13sil_locations21testStringForEachStmtyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations21testStringForEachStmtyyF
   // CHECK: br {{.*}} line:[[@LINE-8]]:3
   // CHECK: switch_enum {{.*}} line:[[@LINE-9]]:3
-  // CHECK: cond_br {{.*}} line:[[@LINE-8]]:8
+  // CHECK: cond_br {{.*}} line:[[@LINE-8]]:10
   // Break branch:
   // CHECK: br {{.*}} line:[[@LINE-9]]:7
   // Looping back branch:
@@ -386,11 +386,11 @@
   } while (m < 200)
   
   
-  // CHECK-LABEL: sil hidden @$s13sil_locations15testRepeatWhileyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations15testRepeatWhileyyF
   // CHECK: br {{.*}} line:[[@LINE-6]]:3
-  // CHECK: cond_br {{.*}} line:[[@LINE-5]]:11
+  // CHECK: cond_br {{.*}} line:[[@LINE-5]]:14
   // Loop back branch:
-  // CHECK: br {{.*}} line:[[@LINE-7]]:11  
+  // CHECK: br {{.*}} line:[[@LINE-7]]:14
 }
 
 
@@ -405,12 +405,12 @@
     m += 1
   }
   
-  // CHECK-LABEL: sil hidden @$s13sil_locations9testWhileyyF
+  // CHECK-LABEL: sil hidden [ossa] @$s13sil_locations9testWhileyyF
   // CHECK: br {{.*}} line:[[@LINE-9]]:3
   // While loop conditional branch:
-  // CHECK: cond_br {{.*}} line:[[@LINE-11]]:9
+  // CHECK: cond_br {{.*}} line:[[@LINE-11]]:11
   // If stmt condition branch:
-  // CHECK: cond_br {{.*}} line:[[@LINE-11]]:8
+  // CHECK: cond_br {{.*}} line:[[@LINE-11]]:10
   // Break branch:
   // CHECK: br {{.*}} line:[[@LINE-12]]:7
   // Looping back branch:
diff --git a/test/SILGen/sil_locations_top_level.swift b/test/SILGen/sil_locations_top_level.swift
index ababfcc..8018173 100644
--- a/test/SILGen/sil_locations_top_level.swift
+++ b/test/SILGen/sil_locations_top_level.swift
@@ -15,13 +15,13 @@
 }
 var topLevelObject2:TopLevelObjectTyWithoutDestructor
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 // CHECK: integer_literal ${{.*}}, 0, {{.*}} top_level
 // CHECK: return    {{.*}} top_level
 
 // Check allocating initializer
 // CHECK-LABEL: sil_locations_top_level.TopLevelObjectTy.__allocating_init
-// CHECK: sil hidden @$s23sil_locations_top_level16TopLevelObjectTyC{{[_0-9a-zA-Z]*}}fC
+// CHECK: sil hidden [ossa] @$s23sil_locations_top_level16TopLevelObjectTyC{{[_0-9a-zA-Z]*}}fC
 // CHECK: alloc_ref {{.*}}line:5:3:auto_gen
 // CHECK: function_ref
 
@@ -31,7 +31,7 @@
 // CHECK: return {{.*}}// {{.*}} line:5:12
 
 // Check explicit destructor
-// CHECK_LABEL: sil hidden @$s23sil_locations_top_level16TopLevelObjectTyCfd
+// CHECK_LABEL: sil hidden [ossa] @$s23sil_locations_top_level16TopLevelObjectTyCfd
 // CHECK:   return {{.*}}// {{.*}} line:8:3
 
 // Check allocating constructor
@@ -40,9 +40,9 @@
 
 // Check explicit constructor
 // FIXME: The ConstructorDecl location is wrong here (looks like it's wrong in the AST).
-// CHECK-LABEL: sil hidden @$s23sil_locations_top_level33TopLevelObjectTyWithoutDestructorC{{[_0-9a-zA-Z]*}}fc
+// CHECK-LABEL: sil hidden [ossa] @$s23sil_locations_top_level33TopLevelObjectTyWithoutDestructorC{{[_0-9a-zA-Z]*}}fc
 // CHECK: return {{.*}}// {{.*}} line:14:3:imp_return
 
 // Check implicit destructor
-// CHECK_LABEL: sil hidden @$s23sil_locations_top_level33TopLevelObjectTyWithoutDestructorCfd
+// CHECK_LABEL: sil hidden [ossa] @$s23sil_locations_top_level33TopLevelObjectTyWithoutDestructorCfd
 // CHECK:   return {{.*}}// {{.*}} line:12:7:imp_return:auto_gen
diff --git a/test/SILGen/specialize_attr.swift b/test/SILGen/specialize_attr.swift
index 6ee536b..139c9d2 100644
--- a/test/SILGen/specialize_attr.swift
+++ b/test/SILGen/specialize_attr.swift
@@ -33,9 +33,9 @@
   }
 }
 
-// CHECK-LABEL: sil hidden [_specialize exported: false, kind: full, where T == Int, U == Float] @$s15specialize_attr0A4This_1uyx_q_tr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @in_guaranteed U) -> () {
+// CHECK-LABEL: sil hidden [_specialize exported: false, kind: full, where T == Int, U == Float] [ossa] @$s15specialize_attr0A4This_1uyx_q_tr0_lF : $@convention(thin) <T, U> (@in_guaranteed T, @in_guaranteed U) -> () {
 
-// CHECK-LABEL: sil [noinline] [_specialize exported: false, kind: full, where T == RR, U == SS] @$s15specialize_attr2CCC3foo_1gqd___AA2GGVyxGtqd___AHtAA2QQRd__lF : $@convention(method) <T where T : PP><U where U : QQ> (@in_guaranteed U, GG<T>, @guaranteed CC<T>) -> (@out U, GG<T>) {
+// CHECK-LABEL: sil [noinline] [_specialize exported: false, kind: full, where T == RR, U == SS] [ossa] @$s15specialize_attr2CCC3foo_1gqd___AA2GGVyxGtqd___AHtAA2QQRd__lF : $@convention(method) <T where T : PP><U where U : QQ> (@in_guaranteed U, GG<T>, @guaranteed CC<T>) -> (@out U, GG<T>) {
 
 // -----------------------------------------------------------------------------
 // Test user-specialized subscript accessors.
@@ -65,13 +65,13 @@
 }
 
 // ASubscriptable.subscript.getter with _specialize
-// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] @$s15specialize_attr14ASubscriptableCyxSicig : $@convention(method) <Element> (Int, @guaranteed ASubscriptable<Element>) -> @out Element {
+// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] [ossa] @$s15specialize_attr14ASubscriptableCyxSicig : $@convention(method) <Element> (Int, @guaranteed ASubscriptable<Element>) -> @out Element {
 
 // ASubscriptable.subscript.setter with _specialize
-// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] @$s15specialize_attr14ASubscriptableCyxSicis : $@convention(method) <Element> (@in Element, Int, @guaranteed ASubscriptable<Element>) -> () {
+// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] [ossa] @$s15specialize_attr14ASubscriptableCyxSicis : $@convention(method) <Element> (@in Element, Int, @guaranteed ASubscriptable<Element>) -> () {
 
 // ASubscriptable.subscript.modify with no attribute
-// CHECK-LABEL: sil [transparent] [serialized] @$s15specialize_attr14ASubscriptableCyxSiciM : $@yield_once @convention(method) <Element> (Int, @guaranteed ASubscriptable<Element>) -> @yields @inout Element {
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s15specialize_attr14ASubscriptableCyxSiciM : $@yield_once @convention(method) <Element> (Int, @guaranteed ASubscriptable<Element>) -> @yields @inout Element {
 
 public class Addressable<Element> : TestSubscriptable {
   var storage: UnsafeMutablePointer<Element>
@@ -93,17 +93,17 @@
 }
 
 // Addressable.subscript.getter with no attribute
-// CHECK-LABEL: sil [transparent] [serialized] @$s15specialize_attr11AddressableCyxSicig : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> @out Element {
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s15specialize_attr11AddressableCyxSicig : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> @out Element {
 
 // Addressable.subscript.unsafeAddressor with _specialize
-// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] @$s15specialize_attr11AddressableCyxSicilu : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> UnsafePointer<Element> {
+// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] [ossa] @$s15specialize_attr11AddressableCyxSicilu : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> UnsafePointer<Element> {
 
 // Addressable.subscript.setter with no attribute
-// CHECK-LABEL: sil [transparent] [serialized] @$s15specialize_attr11AddressableCyxSicis : $@convention(method) <Element> (@in Element, Int, @guaranteed Addressable<Element>) -> () {
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s15specialize_attr11AddressableCyxSicis : $@convention(method) <Element> (@in Element, Int, @guaranteed Addressable<Element>) -> () {
 
 // Addressable.subscript.unsafeMutableAddressor with _specialize
-// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] @$s15specialize_attr11AddressableCyxSiciau : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> UnsafeMutablePointer<Element> {
+// CHECK-LABEL: sil [_specialize exported: false, kind: full, where Element == Int] [ossa] @$s15specialize_attr11AddressableCyxSiciau : $@convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> UnsafeMutablePointer<Element> {
 
 // Addressable.subscript.materializeForSet with no attribute
-// CHECK-LABEL: sil [transparent] [serialized] @$s15specialize_attr11AddressableCyxSiciM : $@yield_once @convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> @yields @inout Element {
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s15specialize_attr11AddressableCyxSiciM : $@yield_once @convention(method) <Element> (Int, @guaranteed Addressable<Element>) -> @yields @inout Element {
 
diff --git a/test/SILGen/statements.swift b/test/SILGen/statements.swift
index 85e8056..6c2dbce 100644
--- a/test/SILGen/statements.swift
+++ b/test/SILGen/statements.swift
@@ -33,7 +33,7 @@
   (x, y) = (1,2)
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}assignment
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}assignment
 // CHECK: integer_literal $Builtin.IntLiteral, 42
 // CHECK: assign
 // CHECK: integer_literal $Builtin.IntLiteral, 57
@@ -46,7 +46,7 @@
   bar(x);
 }
 
-// CHECK-LABEL: sil hidden @$s10statements7if_test{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements7if_test{{[_0-9a-zA-Z]*}}F
 
 func if_else(_ x: Int, y: Bool) {
   if (y) {
@@ -57,7 +57,7 @@
   bar(x);
 }
 
-// CHECK-LABEL: sil hidden @$s10statements7if_else{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements7if_else{{[_0-9a-zA-Z]*}}F
 
 func nested_if(_ x: Int, y: Bool, z: Bool) {
   if (y) {
@@ -72,7 +72,7 @@
   bar(x);
 }
 
-// CHECK-LABEL: sil hidden @$s10statements9nested_if{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements9nested_if{{[_0-9a-zA-Z]*}}F
 
 func nested_if_merge_noret(_ x: Int, y: Bool, z: Bool) {
   if (y) {
@@ -86,7 +86,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10statements21nested_if_merge_noret{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements21nested_if_merge_noret{{[_0-9a-zA-Z]*}}F
 
 func nested_if_merge_ret(_ x: Int, y: Bool, z: Bool) -> Int {
   if (y) {
@@ -102,7 +102,7 @@
   return 2
 }
 
-// CHECK-LABEL: sil hidden @$s10statements19nested_if_merge_ret{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements19nested_if_merge_ret{{[_0-9a-zA-Z]*}}F
 
 func else_break(_ x: Int, y: Bool, z: Bool) {
   while z {
@@ -113,7 +113,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10statements10else_break{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements10else_break{{[_0-9a-zA-Z]*}}F
 
 func loop_with_break(_ x: Int, _ y: Bool, _ z: Bool) -> Int {
   while (x > 2) {
@@ -124,7 +124,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10statements15loop_with_break{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements15loop_with_break{{[_0-9a-zA-Z]*}}F
 
 func loop_with_continue(_ x: Int, y: Bool, z: Bool) -> Int {
   while (x > 2) {
@@ -137,7 +137,7 @@
   bar(x);
 }
 
-// CHECK-LABEL: sil hidden @$s10statements18loop_with_continue{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements18loop_with_continue{{[_0-9a-zA-Z]*}}F
 
 func do_loop_with_continue(_ x: Int, y: Bool, z: Bool) -> Int {
   repeat {
@@ -151,10 +151,10 @@
   bar(x);
 }
 
-// CHECK-LABEL: sil hidden @$s10statements21do_loop_with_continue{{[_0-9a-zA-Z]*}}F 
+// CHECK-LABEL: sil hidden [ossa] @$s10statements21do_loop_with_continue{{[_0-9a-zA-Z]*}}F 
 
 
-// CHECK-LABEL: sil hidden @{{.*}}for_loops1
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}for_loops1
 func for_loops1(_ x: Int, c: Bool) {
   for i in 1..<100 {
     markUsed(i)
@@ -162,7 +162,7 @@
 
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}for_loops2
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}for_loops2
 func for_loops2() {
   // rdar://problem/19316670
   // CHECK: alloc_stack $Optional<MyClass>
@@ -184,7 +184,7 @@
     return
   }
 }
-// CHECK-LABEL: sil hidden @$s10statements11void_return{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements11void_return{{[_0-9a-zA-Z]*}}F
 // CHECK: cond_br {{%[0-9]+}}, [[BB1:bb[0-9]+]], [[BB2:bb[0-9]+]]
 // CHECK: [[BB1]]:
 // CHECK:   br [[EPILOG:bb[0-9]+]]
@@ -197,7 +197,7 @@
 func foo() {}
 
 // <rdar://problem/13549626>
-// CHECK-LABEL: sil hidden @$s10statements14return_from_if{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements14return_from_if{{[_0-9a-zA-Z]*}}F
 func return_from_if(_ a: Bool) -> Int {
   // CHECK: bb0(%0 : $Bool):
   // CHECK: cond_br {{.*}}, [[THEN:bb[0-9]+]], [[ELSE:bb[0-9]+]]
@@ -227,7 +227,7 @@
   _ = 0
 }
 
-// CHECK-LABEL: sil hidden @{{.*}}test_break
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test_break
 func test_break(_ i : Int) {
   switch i {
   case (let x) where x != 17: 
@@ -241,7 +241,7 @@
 
 // <rdar://problem/19150249> Allow labeled "break" from an "if" statement
 
-// CHECK-LABEL: sil hidden @$s10statements13test_if_breakyyAA1CCSgF : $@convention(thin) (@guaranteed Optional<C>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10statements13test_if_breakyyAA1CCSgF : $@convention(thin) (@guaranteed Optional<C>) -> () {
 func test_if_break(_ c : C?) {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Optional<C>):
 label1:
@@ -263,7 +263,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s10statements18test_if_else_breakyyAA1CCSgF : $@convention(thin) (@guaranteed Optional<C>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10statements18test_if_else_breakyyAA1CCSgF : $@convention(thin) (@guaranteed Optional<C>) -> () {
 func test_if_else_break(_ c : C?) {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Optional<C>):
 label2:
@@ -287,7 +287,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s10statements23test_if_else_then_breakyySb_AA1CCSgtF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements23test_if_else_then_breakyySb_AA1CCSgtF
 func test_if_else_then_break(_ a : Bool, _ c : C?) {
 label3:
   // CHECK: bb0({{.*}}, [[ARG2:%.*]] : @guaranteed $Optional<C>):
@@ -319,12 +319,11 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s10statements13test_if_breakyySbF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements13test_if_breakyySbF
 func test_if_break(_ a : Bool) {
   // CHECK: br [[LOOP:bb[0-9]+]]
   // CHECK: [[LOOP]]:
-  // CHECK: function_ref @$sSb21_getBuiltinLogicValue{{[_0-9a-zA-Z]*}}F
-  // CHECK-NEXT: apply
+  // CHECK-NEXT: struct_extract {{.*}}
   // CHECK-NEXT: cond_br {{.*}}, [[LOOPTRUE:bb[0-9]+]], [[EXIT:bb[0-9]+]]
   while a {
     if a {
@@ -335,8 +334,7 @@
   }
 
   // CHECK: [[LOOPTRUE]]:
-  // CHECK: function_ref @$sSb21_getBuiltinLogicValue{{[_0-9a-zA-Z]*}}F
-  // CHECK-NEXT: apply
+  // CHECK-NEXT: struct_extract {{.*}}
   // CHECK-NEXT: cond_br {{.*}}, [[IFTRUE:bb[0-9]+]], [[IFFALSE:bb[0-9]+]]
 
   // [[IFTRUE]]:
@@ -354,7 +352,7 @@
   // CHECK:   return
 }
 
-// CHECK-LABEL: sil hidden @$s10statements7test_doyyF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements7test_doyyF
 func test_do() {
   // CHECK: integer_literal $Builtin.IntLiteral, 0
   // CHECK: [[BAR:%.*]] = function_ref @$s10statements3baryySiF
@@ -383,7 +381,7 @@
   bar(2)
 }
 
-// CHECK-LABEL: sil hidden @$s10statements15test_do_labeledyyF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements15test_do_labeledyyF
 func test_do_labeled() {
   // CHECK: integer_literal $Builtin.IntLiteral, 0
   // CHECK: [[BAR:%.*]] = function_ref @$s10statements3baryySiF
@@ -447,7 +445,7 @@
 func callee2() {}
 func callee3() {}
 
-// CHECK-LABEL: sil hidden @$s10statements11defer_test1yyF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements11defer_test1yyF
 func defer_test1() {
   defer { callee1() }
   defer { callee2() }
@@ -460,20 +458,20 @@
   // CHECK: [[C1:%.*]] = function_ref @$s10statements11defer_test1yyF6
   // CHECK: apply [[C1]]
 }
-// CHECK: sil private @$s10statements11defer_test1yyF6
+// CHECK: sil private [ossa] @$s10statements11defer_test1yyF6
 // CHECK: function_ref @{{.*}}callee1yyF
 
-// CHECK: sil private @$s10statements11defer_test1yyF6
+// CHECK: sil private [ossa] @$s10statements11defer_test1yyF6
 // CHECK: function_ref @{{.*}}callee2yyF
 
-// CHECK-LABEL: sil hidden @$s10statements11defer_test2yySbF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements11defer_test2yySbF
 func defer_test2(_ cond : Bool) {
   // CHECK: [[C3:%.*]] = function_ref @{{.*}}callee3yyF
   // CHECK: apply [[C3]]
   callee3()
   
 // test the condition.
-// CHECK:  [[CONDTRUE:%.*]] = apply {{.*}}(%0)
+// CHECK:  [[CONDTRUE:%.*]] = struct_extract {{.*}}
 // CHECK: cond_br [[CONDTRUE]], [[BODY:bb[0-9]+]], [[EXIT:bb[0-9]+]]
   while cond {
 // CHECK: [[BODY]]:
@@ -502,7 +500,7 @@
 func generic_callee_2<T>(_: T) {}
 func generic_callee_3<T>(_: T) {}
 
-// CHECK-LABEL: sil hidden @$s10statements16defer_in_generic{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements16defer_in_generic{{[_0-9a-zA-Z]*}}F
 func defer_in_generic<T>(_ x: T) {
   // CHECK: [[C3:%.*]] = function_ref @$s10statements16generic_callee_3{{[_0-9a-zA-Z]*}}F
   // CHECK: apply [[C3]]<T>
@@ -515,16 +513,16 @@
   generic_callee_3(x)
 }
 
-// CHECK-LABEL: sil hidden @$s10statements017defer_in_closure_C8_genericyyxlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s10statements017defer_in_closure_C8_genericyyxlF : $@convention(thin) <T> (@in_guaranteed T) -> ()
 func defer_in_closure_in_generic<T>(_ x: T) {
-  // CHECK-LABEL: sil private @$s10statements017defer_in_closure_C8_genericyyxlFyycfU_ : $@convention(thin) <T> () -> ()
+  // CHECK-LABEL: sil private [ossa] @$s10statements017defer_in_closure_C8_genericyyxlFyycfU_ : $@convention(thin) <T> () -> ()
   _ = {
-    // CHECK-LABEL: sil private @$s10statements017defer_in_closure_C8_genericyyxlFyycfU_6$deferL_yylF : $@convention(thin) <T> () -> ()
+    // CHECK-LABEL: sil private [ossa] @$s10statements017defer_in_closure_C8_genericyyxlFyycfU_6$deferL_yylF : $@convention(thin) <T> () -> ()
     defer { generic_callee_1(T.self) } // expected-warning {{'defer' statement before end of scope always executes immediately}}{{5-10=do}}
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10statements13defer_mutableyySiF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements13defer_mutableyySiF
 func defer_mutable(_ x: Int) {
   var x = x
   // CHECK: [[BOX:%.*]] = alloc_box ${ var Int }
@@ -547,7 +545,7 @@
 
 
 
-// CHECK-LABEL: sil hidden @$s10statements22testRequireExprPatternyySiF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements22testRequireExprPatternyySiF
 
 func testRequireExprPattern(_ a : Int) {
   marker_1()
@@ -577,7 +575,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s10statements20testRequireOptional1yS2iSgF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements20testRequireOptional1yS2iSgF
 // CHECK: bb0([[ARG:%.*]] : $Optional<Int>):
 // CHECK-NEXT:   debug_value [[ARG]] : $Optional<Int>, let, name "a"
 // CHECK-NEXT:   switch_enum [[ARG]] : $Optional<Int>, case #Optional.some!enumelt.1: [[SOME:bb[0-9]+]], case #Optional.none!enumelt: [[NONE:bb[0-9]+]]
@@ -596,7 +594,7 @@
   return t
 }
 
-// CHECK-LABEL: sil hidden @$s10statements20testRequireOptional2yS2SSgF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements20testRequireOptional2yS2SSgF
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Optional<String>):
 // CHECK-NEXT:   debug_value [[ARG]] : $Optional<String>, let, name "a"
 // CHECK-NEXT:   [[ARG_COPY:%.*]] = copy_value [[ARG]] : $Optional<String>
@@ -621,7 +619,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s10statements19testCleanupEmission{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s10statements19testCleanupEmission{{[_0-9a-zA-Z]*}}F
 // <rdar://problem/20563234> let-else problem: cleanups for bound patterns shouldn't be run in the else block
 protocol MyProtocol {}
 func testCleanupEmission<T>(_ x: T) {
@@ -631,7 +629,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s10statements15test_is_patternyyAA9BaseClassCF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements15test_is_patternyyAA9BaseClassCF
 func test_is_pattern(_ y : BaseClass) {
   // checked_cast_br %0 : $BaseClass to $DerivedClass
   guard case is DerivedClass = y else { marker_1(); return }
@@ -639,7 +637,7 @@
   marker_2()
 }
 
-// CHECK-LABEL: sil hidden @$s10statements15test_as_patternyAA12DerivedClassCAA04BaseF0CF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements15test_as_patternyAA12DerivedClassCAA04BaseF0CF
 func test_as_pattern(_ y : BaseClass) -> DerivedClass {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $BaseClass):
   // CHECK:   [[ARG_COPY:%.*]] = copy_value [[ARG]]
@@ -657,7 +655,7 @@
   // CHECK-NEXT: return [[RESULT]] : $DerivedClass
   return result
 }
-// CHECK-LABEL: sil hidden @$s10statements22let_else_tuple_bindingyS2i_SitSgF
+// CHECK-LABEL: sil hidden [ossa] @$s10statements22let_else_tuple_bindingyS2i_SitSgF
 func let_else_tuple_binding(_ a : (Int, Int)?) -> Int {
 
   // CHECK: bb0([[ARG:%.*]] : $Optional<(Int, Int)>):
diff --git a/test/SILGen/struct_resilience.swift b/test/SILGen/struct_resilience.swift
index 456dced..2b3e0ab 100644
--- a/test/SILGen/struct_resilience.swift
+++ b/test/SILGen/struct_resilience.swift
@@ -7,7 +7,7 @@
 
 // Resilient structs are always address-only
 
-// CHECK-LABEL: sil hidden @$s17struct_resilience26functionWithResilientTypes_1f010resilient_A04SizeVAF_A2FXEtF : $@convention(thin) (@in_guaranteed Size, @noescape @callee_guaranteed (@in_guaranteed Size) -> @out Size) -> @out Size
+// CHECK-LABEL: sil hidden [ossa] @$s17struct_resilience26functionWithResilientTypes_1f010resilient_A04SizeVAF_A2FXEtF : $@convention(thin) (@in_guaranteed Size, @noescape @callee_guaranteed (@in_guaranteed Size) -> @out Size) -> @out Size
 // CHECK:       bb0(%0 : $*Size, %1 : $*Size, %2 : $@noescape @callee_guaranteed (@in_guaranteed Size) -> @out Size):
 func functionWithResilientTypes(_ s: Size, f: (Size) -> Size) -> Size {
 
@@ -41,7 +41,7 @@
 
 public func inoutFunc(_ x: inout Int) {}
 
-// CHECK-LABEL: sil hidden @$s17struct_resilience18resilientInOutTestyy0c1_A04SizeVzF : $@convention(thin) (@inout Size) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s17struct_resilience18resilientInOutTestyy0c1_A04SizeVzF : $@convention(thin) (@inout Size) -> ()
 
 func resilientInOutTest(_ s: inout Size) {
 
@@ -55,7 +55,7 @@
 
 // Fixed-layout structs may be trivial or loadable
 
-// CHECK-LABEL: sil hidden @$s17struct_resilience28functionWithFixedLayoutTypes_1f010resilient_A05PointVAF_A2FXEtF : $@convention(thin) (Point, @noescape @callee_guaranteed (Point) -> Point) -> Point
+// CHECK-LABEL: sil hidden [ossa] @$s17struct_resilience28functionWithFixedLayoutTypes_1f010resilient_A05PointVAF_A2FXEtF : $@convention(thin) (Point, @noescape @callee_guaranteed (Point) -> Point) -> Point
 // CHECK:       bb0(%0 : $Point, %1 : $@noescape @callee_guaranteed (Point) -> Point):
 func functionWithFixedLayoutTypes(_ p: Point, f: (Point) -> Point) -> Point {
 
@@ -77,7 +77,7 @@
 
 // Fixed-layout struct with resilient stored properties is still address-only
 
-// CHECK-LABEL: sil hidden @$s17struct_resilience39functionWithFixedLayoutOfResilientTypes_1f010resilient_A09RectangleVAF_A2FXEtF : $@convention(thin) (@in_guaranteed Rectangle, @noescape @callee_guaranteed (@in_guaranteed Rectangle) -> @out Rectangle) -> @out Rectangle
+// CHECK-LABEL: sil hidden [ossa] @$s17struct_resilience39functionWithFixedLayoutOfResilientTypes_1f010resilient_A09RectangleVAF_A2FXEtF : $@convention(thin) (@in_guaranteed Rectangle, @noescape @callee_guaranteed (@in_guaranteed Rectangle) -> @out Rectangle) -> @out Rectangle
 // CHECK:        bb0(%0 : $*Rectangle, %1 : $*Rectangle, %2 : $@noescape @callee_guaranteed (@in_guaranteed Rectangle) -> @out Rectangle):
 func functionWithFixedLayoutOfResilientTypes(_ r: Rectangle, f: (Rectangle) -> Rectangle) -> Rectangle {
   return f(r)
@@ -90,9 +90,9 @@
 
   // Static computed property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV10expirationSivgZ : $@convention(method) (@thin MySize.Type) -> Int
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV10expirationSivsZ : $@convention(method) (Int, @thin MySize.Type) -> ()
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV10expirationSivMZ : $@yield_once @convention(method) (@thin MySize.Type) -> @yields @inout Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV10expirationSivgZ : $@convention(method) (@thin MySize.Type) -> Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV10expirationSivsZ : $@convention(method) (Int, @thin MySize.Type) -> ()
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV10expirationSivMZ : $@yield_once @convention(method) (@thin MySize.Type) -> @yields @inout Int
   public static var expiration: Int {
     get { return copyright + 70 }
     set { copyright = newValue - 70 }
@@ -100,9 +100,9 @@
 
   // Instance computed property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1dSivg : $@convention(method) (@in_guaranteed MySize) -> Int
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1dSivs : $@convention(method) (Int, @inout MySize) -> ()
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1dSivM : $@yield_once @convention(method) (@inout MySize) -> @yields @inout Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1dSivg : $@convention(method) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1dSivs : $@convention(method) (Int, @inout MySize) -> ()
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1dSivM : $@yield_once @convention(method) (@inout MySize) -> @yields @inout Int
   public var d: Int {
     get { return 0 }
     set { }
@@ -110,30 +110,30 @@
 
   // Instance stored property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1wSivg : $@convention(method) (@in_guaranteed MySize) -> Int
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1wSivs : $@convention(method) (Int, @inout MySize) -> ()
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1wSivM : $@yield_once @convention(method) (@inout MySize) -> @yields @inout Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1wSivg : $@convention(method) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1wSivs : $@convention(method) (Int, @inout MySize) -> ()
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1wSivM : $@yield_once @convention(method) (@inout MySize) -> @yields @inout Int
   public var w: Int
 
   // Read-only instance stored property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1hSivg : $@convention(method) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1hSivg : $@convention(method) (@in_guaranteed MySize) -> Int
   public let h: Int
 
   // Weak property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV1iyXlSgvg : $@convention(method) (@in_guaranteed MySize) -> @owned Optional<AnyObject>
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV1iyXlSgvg : $@convention(method) (@in_guaranteed MySize) -> @owned Optional<AnyObject>
   public weak var i: AnyObject?
 
   // Static stored property
 
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV9copyrightSivgZ : $@convention(method) (@thin MySize.Type) -> Int
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV9copyrightSivsZ : $@convention(method) (Int, @thin MySize.Type) -> ()
-// CHECK-LABEL: sil @$s17struct_resilience6MySizeV9copyrightSivMZ : $@yield_once @convention(method) (@thin MySize.Type) -> @yields @inout Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV9copyrightSivgZ : $@convention(method) (@thin MySize.Type) -> Int
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV9copyrightSivsZ : $@convention(method) (Int, @thin MySize.Type) -> ()
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience6MySizeV9copyrightSivMZ : $@yield_once @convention(method) (@thin MySize.Type) -> @yields @inout Int
   public static var copyright: Int = 0
 }
 
-// CHECK-LABEL: sil @$s17struct_resilience28functionWithMyResilientTypes_1fAA0E4SizeVAE_A2EXEtF : $@convention(thin) (@in_guaranteed MySize, @noescape @callee_guaranteed (@in_guaranteed MySize) -> @out MySize) -> @out MySize
+// CHECK-LABEL: sil [ossa] @$s17struct_resilience28functionWithMyResilientTypes_1fAA0E4SizeVAE_A2EXEtF : $@convention(thin) (@in_guaranteed MySize, @noescape @callee_guaranteed (@in_guaranteed MySize) -> @out MySize) -> @out MySize
 public func functionWithMyResilientTypes(_ s: MySize, f: (MySize) -> MySize) -> MySize {
 
   // Stored properties of resilient structs from inside our resilience
@@ -159,7 +159,7 @@
   return f(s)
 }
 
-// CHECK-LABEL: sil [transparent] [serialized] @$s17struct_resilience25publicTransparentFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s17struct_resilience25publicTransparentFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
 @_transparent public func publicTransparentFunction(_ s: MySize) -> Int {
 
   // Since the body of a public transparent function might be inlined into
@@ -176,10 +176,10 @@
   return s.w
 }
 
-// CHECK-LABEL: sil [transparent] [serialized] @$s17struct_resilience30publicTransparentLocalFunctionySiycAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> @owned @callee_guaranteed () -> Int
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s17struct_resilience30publicTransparentLocalFunctionySiycAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> @owned @callee_guaranteed () -> Int
 @_transparent public func publicTransparentLocalFunction(_ s: MySize) -> () -> Int {
 
-// CHECK-LABEL: sil shared [serialized] @$s17struct_resilience30publicTransparentLocalFunctionySiycAA6MySizeVFSiycfU_ : $@convention(thin) (@guaranteed { var MySize }) -> Int
+// CHECK-LABEL: sil shared [serialized] [ossa] @$s17struct_resilience30publicTransparentLocalFunctionySiycAA6MySizeVFSiycfU_ : $@convention(thin) (@guaranteed { var MySize }) -> Int
 // CHECK: function_ref @$s17struct_resilience6MySizeV1wSivg : $@convention(method) (@in_guaranteed MySize) -> Int
 // CHECK: return {{.*}} : $Int
 
@@ -187,7 +187,7 @@
 
 }
 
-// CHECK-LABEL: sil hidden [transparent] @$s17struct_resilience27internalTransparentFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s17struct_resilience27internalTransparentFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
 // CHECK: bb0([[ARG:%.*]] : $*MySize):
 @_transparent func internalTransparentFunction(_ s: MySize) -> Int {
 
@@ -200,7 +200,7 @@
   return s.w
 }
 
-// CHECK-LABEL: sil [serialized] @$s17struct_resilience23publicInlinableFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
+// CHECK-LABEL: sil [serialized] [ossa] @$s17struct_resilience23publicInlinableFunctionySiAA6MySizeVF : $@convention(thin) (@in_guaranteed MySize) -> Int
 @inlinable public func publicInlinableFunction(_ s: MySize) -> Int {
 
   // Since the body of a public transparent function might be inlined into
@@ -231,7 +231,7 @@
 
   // Non-inlinable initializer, assigns to self -- treated as a root initializer
 
-  // CHECK-LABEL: sil @$s17struct_resilience24VersionedResilientStructV5otherA2C_tcfC : $@convention(method) (@in VersionedResilientStruct, @thin VersionedResilientStruct.Type) -> @out VersionedResilientStruct
+  // CHECK-LABEL: sil [ossa] @$s17struct_resilience24VersionedResilientStructV5otherA2C_tcfC : $@convention(method) (@in VersionedResilientStruct, @thin VersionedResilientStruct.Type) -> @out VersionedResilientStruct
   // CHECK:      [[SELF_BOX:%.*]] = alloc_box ${ var VersionedResilientStruct }
   // CHECK-NEXT: [[SELF_UNINIT:%.*]] = mark_uninitialized [rootself] [[SELF_BOX]]
   // CHECK:      return
@@ -241,7 +241,7 @@
 
   // Inlinable initializer, assigns to self -- treated as a delegating initializer
 
-  // CHECK-LABEL: sil [serialized] @$s17struct_resilience24VersionedResilientStructV6other2A2C_tcfC : $@convention(method) (@in VersionedResilientStruct, @thin VersionedResilientStruct.Type) -> @out VersionedResilientStruct
+  // CHECK-LABEL: sil [serialized] [ossa] @$s17struct_resilience24VersionedResilientStructV6other2A2C_tcfC : $@convention(method) (@in VersionedResilientStruct, @thin VersionedResilientStruct.Type) -> @out VersionedResilientStruct
   // CHECK:      [[SELF_BOX:%.*]] = alloc_box ${ var VersionedResilientStruct }
   // CHECK-NEXT: [[SELF_UNINIT:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]]
   // CHECK:      return
@@ -250,7 +250,7 @@
   }
 }
 
-// CHECK-LABEL: sil [transparent] [serialized] @$s17struct_resilience27useVersionedResilientStructyAA0deF0VADF : $@convention(thin) (@in_guaranteed VersionedResilientStruct) -> @out VersionedResilientStruct
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @$s17struct_resilience27useVersionedResilientStructyAA0deF0VADF : $@convention(thin) (@in_guaranteed VersionedResilientStruct) -> @out VersionedResilientStruct
 @usableFromInline
 @_transparent func useVersionedResilientStruct(_ s: VersionedResilientStruct)
     -> VersionedResilientStruct {
@@ -263,7 +263,7 @@
   // CHECK:       return
 }
 
-// CHECK-LABEL: sil [serialized] @$s17struct_resilience18inlinableInoutTestyyAA6MySizeVzF : $@convention(thin) (@inout MySize) -> ()
+// CHECK-LABEL: sil [serialized] [ossa] @$s17struct_resilience18inlinableInoutTestyyAA6MySizeVzF : $@convention(thin) (@inout MySize) -> ()
 @inlinable public func inlinableInoutTest(_ s: inout MySize) {
   // Inlinable functions can be inlined in other resiliene domains.
   //
@@ -279,7 +279,7 @@
 // Initializers for resilient structs
 extension Size {
 
-  // CHECK-LABEL: sil hidden @$s16resilient_struct4SizeV0B11_resilienceE5otherA2C_tcfC : $@convention(method) (@in Size, @thin Size.Type) -> @out Size
+  // CHECK-LABEL: sil hidden [ossa] @$s16resilient_struct4SizeV0B11_resilienceE5otherA2C_tcfC : $@convention(method) (@in Size, @thin Size.Type) -> @out Size
   // CHECK:      [[SELF_BOX:%.*]] = alloc_box ${ var Size }
   // CHECK-NEXT: [[SELF_UNINIT:%.*]] = mark_uninitialized [delegatingself] [[SELF_BOX]] : ${ var Size }
   // CHECK:      return
diff --git a/test/SILGen/struct_resilience_testable.swift b/test/SILGen/struct_resilience_testable.swift
index d885987..7b18941 100644
--- a/test/SILGen/struct_resilience_testable.swift
+++ b/test/SILGen/struct_resilience_testable.swift
@@ -5,7 +5,7 @@
 
 @testable import resilient_struct
 
-// CHECK-LABEL: sil @$s26struct_resilience_testable37takesResilientStructWithInternalFieldySi010resilient_A00eghI0VF : $@convention(thin) (@in_guaranteed ResilientWithInternalField) -> Int
+// CHECK-LABEL: sil [ossa] @$s26struct_resilience_testable37takesResilientStructWithInternalFieldySi010resilient_A00eghI0VF : $@convention(thin) (@in_guaranteed ResilientWithInternalField) -> Int
 // CHECK: [[COPY:%.*]] = alloc_stack $ResilientWithInternalField
 // CHECK: copy_addr %0 to [initialization] [[COPY]] : $*ResilientWithInternalField
 // CHECK: [[FN:%.*]] = function_ref @$s16resilient_struct26ResilientWithInternalFieldV1xSivg : $@convention(method) (@in_guaranteed ResilientWithInternalField) -> Int
diff --git a/test/SILGen/subclass_existentials.swift b/test/SILGen/subclass_existentials.swift
index 9fc6ae9..a2785a6 100644
--- a/test/SILGen/subclass_existentials.swift
+++ b/test/SILGen/subclass_existentials.swift
@@ -42,7 +42,7 @@
 
 protocol R {}
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials11conversions8baseAndP7derived0fE1R0dE5PType0F4Type0fE5RTypeyAA1P_AA4BaseCySiGXc_AA7DerivedCAA1R_ANXcAaI_ALXcXpANmAaO_ANXcXptF : $@convention(thin) (@guaranteed Base<Int> & P, @guaranteed Derived, @guaranteed Derived & R, @thick (Base<Int> & P).Type, @thick Derived.Type, @thick (Derived & R).Type) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials11conversions8baseAndP7derived0fE1R0dE5PType0F4Type0fE5RTypeyAA1P_AA4BaseCySiGXc_AA7DerivedCAA1R_ANXcAaI_ALXcXpANmAaO_ANXcXptF : $@convention(thin) (@guaranteed Base<Int> & P, @guaranteed Derived, @guaranteed Derived & R, @thick (Base<Int> & P).Type, @thick Derived.Type, @thick (Derived & R).Type) -> () {
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Base<Int> & P,
 
 func conversions(
@@ -110,7 +110,7 @@
   // CHECK: return
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials11methodCalls8baseAndP0eF5PTypeyAA1P_AA4BaseCySiGXc_AaE_AHXcXptF : $@convention(thin) (@guaranteed Base<Int> & P, @thick (Base<Int> & P).Type) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials11methodCalls8baseAndP0eF5PTypeyAA1P_AA4BaseCySiGXc_AaE_AHXcXptF : $@convention(thin) (@guaranteed Base<Int> & P, @thick (Base<Int> & P).Type) -> () {
 
 func methodCalls(
   baseAndP: Base<Int> & P,
@@ -196,7 +196,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials16propertyAccessesyyAA9PropertyP_AA0E1CCXcF : $@convention(thin) (@guaranteed PropertyC & PropertyP) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials16propertyAccessesyyAA9PropertyP_AA0E1CCXcF : $@convention(thin) (@guaranteed PropertyC & PropertyP) -> () {
 func propertyAccesses(_ x: PropertyP & PropertyC) {
   var xx = x
   xx.p.p = x
@@ -214,7 +214,7 @@
   xx[(1, 2)] += 1
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials19functionConversions15returnsBaseAndP0efG5PType0E7Derived0eI4Type0eiG1R0eiG5RTypeyAA1P_AA0F0CySiGXcyc_AaI_ALXcXpycAA0I0CycANmycAA1R_ANXcycAaO_ANXcXpyctF : $@convention(thin) (@guaranteed @callee_guaranteed () -> @owned Base<Int> & P, @guaranteed @callee_guaranteed () -> @thick (Base<Int> & P).Type, @guaranteed @callee_guaranteed () -> @owned Derived, @guaranteed @callee_guaranteed () -> @thick Derived.Type, @guaranteed @callee_guaranteed () -> @owned Derived & R, @guaranteed @callee_guaranteed () -> @thick (Derived & R).Type) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials19functionConversions15returnsBaseAndP0efG5PType0E7Derived0eI4Type0eiG1R0eiG5RTypeyAA1P_AA0F0CySiGXcyc_AaI_ALXcXpycAA0I0CycANmycAA1R_ANXcycAaO_ANXcXpyctF : $@convention(thin) (@guaranteed @callee_guaranteed () -> @owned Base<Int> & P, @guaranteed @callee_guaranteed () -> @thick (Base<Int> & P).Type, @guaranteed @callee_guaranteed () -> @owned Derived, @guaranteed @callee_guaranteed () -> @thick Derived.Type, @guaranteed @callee_guaranteed () -> @owned Derived & R, @guaranteed @callee_guaranteed () -> @thick (Derived & R).Type) -> () {
 func functionConversions(
   returnsBaseAndP: @escaping () -> (Base<Int> & P),
   returnsBaseAndPType: @escaping () -> (Base<Int> & P).Type,
@@ -245,7 +245,7 @@
   // CHECK-NEXT: }
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials9downcasts8baseAndP7derived0dE5PType0F4TypeyAA1P_AA4BaseCySiGXc_AA7DerivedCAaG_AJXcXpALmtF : $@convention(thin) (@guaranteed Base<Int> & P, @guaranteed Derived, @thick (Base<Int> & P).Type, @thick Derived.Type) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials9downcasts8baseAndP7derived0dE5PType0F4TypeyAA1P_AA4BaseCySiGXc_AA7DerivedCAaG_AJXcXpALmtF : $@convention(thin) (@guaranteed Base<Int> & P, @guaranteed Derived, @thick (Base<Int> & P).Type, @thick Derived.Type) -> () {
 func downcasts(
   baseAndP: Base<Int> & P,
   derived: Derived,
@@ -290,7 +290,7 @@
   // CHECK-NEXT: }
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials16archetypeUpcasts9baseTAndP0E7IntAndP7derivedyq__q0_q1_tAA4BaseCyxGRb_AA1PR_AGySiGRb0_AaIR0_AA7DerivedCRb1_r2_lF : $@convention(thin) <T, BaseTAndP, BaseIntAndP, DerivedT where BaseTAndP : Base<T>, BaseTAndP : P, BaseIntAndP : Base<Int>, BaseIntAndP : P, DerivedT : Derived> (@guaranteed BaseTAndP, @guaranteed BaseIntAndP, @guaranteed DerivedT) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials16archetypeUpcasts9baseTAndP0E7IntAndP7derivedyq__q0_q1_tAA4BaseCyxGRb_AA1PR_AGySiGRb0_AaIR0_AA7DerivedCRb1_r2_lF : $@convention(thin) <T, BaseTAndP, BaseIntAndP, DerivedT where BaseTAndP : Base<T>, BaseTAndP : P, BaseIntAndP : Base<Int>, BaseIntAndP : P, DerivedT : Derived> (@guaranteed BaseTAndP, @guaranteed BaseIntAndP, @guaranteed DerivedT) -> () {
 func archetypeUpcasts<T,
                       BaseTAndP : Base<T> & P,
                       BaseIntAndP : Base<Int> & P,
@@ -315,7 +315,7 @@
   // CHECK-NEXT: }
 }
 
-// CHECK-LABEL: sil hidden @$s21subclass_existentials18archetypeDowncasts1s1t2pt5baseT0F3Int0f6TAndP_C00fg5AndP_C008derived_C00ji2R_C00fH10P_concrete0fgi2P_K0yx_q_q0_q1_q2_q3_q4_q5_AA1R_AA7DerivedCXcAA1P_AA4BaseCyq_GXcAaQ_ASySiGXctAaQR0_ATRb1_AURb2_ATRb3_AaQR3_AURb4_AaQR4_APRb5_r6_lF : $@convention(thin) <S, T, PT, BaseT, BaseInt, BaseTAndP, BaseIntAndP, DerivedT where PT : P, BaseT : Base<T>, BaseInt : Base<Int>, BaseTAndP : Base<T>, BaseTAndP : P, BaseIntAndP : Base<Int>, BaseIntAndP : P, DerivedT : Derived> (@in_guaranteed S, @in_guaranteed T, @in_guaranteed PT, @guaranteed BaseT, @guaranteed BaseInt, @guaranteed BaseTAndP, @guaranteed BaseIntAndP, @guaranteed DerivedT, @guaranteed Derived & R, @guaranteed Base<T> & P, @guaranteed Base<Int> & P) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s21subclass_existentials18archetypeDowncasts1s1t2pt5baseT0F3Int0f6TAndP_C00fg5AndP_C008derived_C00ji2R_C00fH10P_concrete0fgi2P_K0yx_q_q0_q1_q2_q3_q4_q5_AA1R_AA7DerivedCXcAA1P_AA4BaseCyq_GXcAaQ_ASySiGXctAaQR0_ATRb1_AURb2_ATRb3_AaQR3_AURb4_AaQR4_APRb5_r6_lF : $@convention(thin) <S, T, PT, BaseT, BaseInt, BaseTAndP, BaseIntAndP, DerivedT where PT : P, BaseT : Base<T>, BaseInt : Base<Int>, BaseTAndP : Base<T>, BaseTAndP : P, BaseIntAndP : Base<Int>, BaseIntAndP : P, DerivedT : Derived> (@in_guaranteed S, @in_guaranteed T, @in_guaranteed PT, @guaranteed BaseT, @guaranteed BaseInt, @guaranteed BaseTAndP, @guaranteed BaseIntAndP, @guaranteed DerivedT, @guaranteed Derived & R, @guaranteed Base<T> & P, @guaranteed Base<Int> & P) -> () {
 func archetypeDowncasts<S,
                         T,
                         PT : P,
diff --git a/test/SILGen/subscripts.swift b/test/SILGen/subscripts.swift
index 643f9b4..0936e9d 100644
--- a/test/SILGen/subscripts.swift
+++ b/test/SILGen/subscripts.swift
@@ -51,6 +51,10 @@
   v[] = 0
   inoutFunc(&v[])
 
+  _ = v[1]
+  v[1] = 0
+  inoutFunc(&v[1])
+
   _ = v[0, 1, 2]
   v[0, 1, 2] = 3
   inoutFunc(&v[0, 1, 2])
@@ -77,3 +81,55 @@
   inoutFunc(&v["", 0, 1, 2])
 }
 
+struct VariadicSubscript3 {
+  subscript(indices: (Int, Int)...) -> Int {
+    get { return 0 }
+    set {}
+  }
+}
+
+do {
+  var b = VariadicSubscript3()
+  _ = b[]
+  b[] = 1
+  inoutFunc(&b[])
+
+  _ = b[(1, 2)]
+  b[(1,2)] = 1
+  inoutFunc(&b[(1,2)])
+
+  _ = b[(1, 2),(2,3)]
+  b[(1,2),(2,3)] = 1
+  inoutFunc(&b[(1,2),(2,3)])
+}
+
+// https://bugs.swift.org/browse/SR-1816
+public struct Flags: OptionSet {
+  public var rawValue: Int
+  public init(rawValue: Int) { self.rawValue = rawValue }
+
+  public static let flag = Flags(rawValue: 1 << 0)
+}
+
+class VariadicSubscript4 {
+  subscript(_ values: Int..., flags flags: Flags) -> Int {
+    get { return 0 }
+    set { }
+  }
+}
+
+do {
+  let t = VariadicSubscript4()
+
+  _ = t[flags: .flag]
+  t[flags: .flag] = 0
+  inoutFunc(&t[flags: .flag])
+
+  _ = t[1, flags: .flag]
+  t[1, flags: .flag] = 0
+  inoutFunc(&t[1, flags: .flag])
+
+  _ = t[1, 2, 3, flags: .flag]
+  t[1, 2, 3, flags: .flag] = 0
+  inoutFunc(&t[1, 2, 3, flags: .flag])
+}
diff --git a/test/SILGen/super-to-nonobjc-extension.swift b/test/SILGen/super-to-nonobjc-extension.swift
index 1b88a47..fa5de3b 100644
--- a/test/SILGen/super-to-nonobjc-extension.swift
+++ b/test/SILGen/super-to-nonobjc-extension.swift
@@ -6,7 +6,7 @@
 import Foundation
 
 class MyDictionary: NSDictionary {
-  // CHECK-LABEL: sil hidden @$s4main12MyDictionaryC31callSuperNonObjCExtensionMethodyySiF
+  // CHECK-LABEL: sil hidden [ossa] @$s4main12MyDictionaryC31callSuperNonObjCExtensionMethodyySiF
   func callSuperNonObjCExtensionMethod(_ x: Int) {
     // CHECK-NOT: super_method {{.*}} #NSDictionary.nonObjCExtensionMethod
     super.nonObjCExtensionMethod(x)
diff --git a/test/SILGen/super.swift b/test/SILGen/super.swift
index 920c4ef..e200497 100644
--- a/test/SILGen/super.swift
+++ b/test/SILGen/super.swift
@@ -40,7 +40,7 @@
 }
 
 public class Child : Parent {
-  // CHECK-LABEL: sil @$s5super5ChildC8propertySSvg : $@convention(method) (@guaranteed Child) -> @owned String {
+  // CHECK-LABEL: sil [ossa] @$s5super5ChildC8propertySSvg : $@convention(method) (@guaranteed Child) -> @owned String {
   // CHECK:       bb0([[SELF:%.*]] : @guaranteed $Child):
   // CHECK:         [[SELF_COPY:%.*]] = copy_value [[SELF]]
   // CHECK:         [[CAST_SELF_COPY:%[0-9]+]] = upcast [[SELF_COPY]] : $Child to $Parent
@@ -54,7 +54,7 @@
     return super.property
   }
 
-  // CHECK-LABEL: sil @$s5super5ChildC13otherPropertySSvg : $@convention(method) (@guaranteed Child) -> @owned String {
+  // CHECK-LABEL: sil [ossa] @$s5super5ChildC13otherPropertySSvg : $@convention(method) (@guaranteed Child) -> @owned String {
   // CHECK:       bb0([[SELF:%.*]] : @guaranteed $Child):
   // CHECK:         [[COPIED_SELF:%.*]] = copy_value [[SELF]]
   // CHECK:         [[CAST_SELF_COPY:%[0-9]+]] = upcast [[COPIED_SELF]] : $Child to $Parent
@@ -70,7 +70,7 @@
 }
 
 public class Grandchild : Child {
-  // CHECK-LABEL: sil @$s5super10GrandchildC06onlyInB0yyF
+  // CHECK-LABEL: sil [ossa] @$s5super10GrandchildC06onlyInB0yyF
   public func onlyInGrandchild() {
     // CHECK: function_ref @$s5super6ParentC012methodOnlyInB0yyF : $@convention(method) (@guaranteed Parent) -> ()
     super.methodOnlyInParent()
@@ -78,7 +78,7 @@
     super.finalMethodOnlyInParent()
   }
 
-  // CHECK-LABEL: sil @$s5super10GrandchildC6methodyyF
+  // CHECK-LABEL: sil [ossa] @$s5super10GrandchildC6methodyyF
   public override func method() {
     // CHECK: function_ref @$s5super6ParentC6methodyyF : $@convention(method) (@guaranteed Parent) -> ()
     super.method()
@@ -86,7 +86,7 @@
 }
 
 public class GreatGrandchild : Grandchild {
-  // CHECK-LABEL: sil @$s5super15GreatGrandchildC6methodyyF
+  // CHECK-LABEL: sil [ossa] @$s5super15GreatGrandchildC6methodyyF
   public override func method() {
     // CHECK: function_ref @$s5super10GrandchildC6methodyyF : $@convention(method) (@guaranteed Grandchild) -> ()
     super.method()
@@ -94,7 +94,7 @@
 }
 
 public class ChildToResilientParent : ResilientOutsideParent {
-  // CHECK-LABEL: sil @$s5super22ChildToResilientParentC6methodyyF : $@convention(method) (@guaranteed ChildToResilientParent) -> ()
+  // CHECK-LABEL: sil [ossa] @$s5super22ChildToResilientParentC6methodyyF : $@convention(method) (@guaranteed ChildToResilientParent) -> ()
   public override func method() {
     // CHECK: bb0([[SELF:%.*]] : @guaranteed $ChildToResilientParent):
     // CHECK:   [[COPY_SELF:%.*]] = copy_value [[SELF]]
@@ -108,7 +108,7 @@
   }
   // CHECK: } // end sil function '$s5super22ChildToResilientParentC6methodyyF'
 
-  // CHECK-LABEL: sil @$s5super22ChildToResilientParentC11classMethodyyFZ : $@convention(method) (@thick ChildToResilientParent.Type) -> ()
+  // CHECK-LABEL: sil [ossa] @$s5super22ChildToResilientParentC11classMethodyyFZ : $@convention(method) (@thick ChildToResilientParent.Type) -> ()
   public override class func classMethod() {
     // CHECK: bb0([[METASELF:%.*]] : $@thick ChildToResilientParent.Type):
     // CHECK:   [[UPCAST_METASELF:%.*]] = upcast [[METASELF]]
@@ -118,7 +118,7 @@
   }
   // CHECK: } // end sil function '$s5super22ChildToResilientParentC11classMethodyyFZ'
 
-  // CHECK-LABEL: sil @$s5super22ChildToResilientParentC11returnsSelfACXDyFZ : $@convention(method) (@thick ChildToResilientParent.Type) -> @owned ChildToResilientParent
+  // CHECK-LABEL: sil [ossa] @$s5super22ChildToResilientParentC11returnsSelfACXDyFZ : $@convention(method) (@thick ChildToResilientParent.Type) -> @owned ChildToResilientParent
   public class func returnsSelf() -> Self {
     // CHECK: bb0([[METASELF:%.*]] : $@thick ChildToResilientParent.Type):
     // CHECK:   [[CAST_METASELF:%.*]] = unchecked_trivial_bit_cast [[METASELF]] : $@thick ChildToResilientParent.Type to $@thick @dynamic_self ChildToResilientParent.Type
@@ -132,7 +132,7 @@
 }
 
 public class ChildToFixedParent : OutsideParent {
-  // CHECK-LABEL: sil @$s5super18ChildToFixedParentC6methodyyF : $@convention(method) (@guaranteed ChildToFixedParent) -> ()
+  // CHECK-LABEL: sil [ossa] @$s5super18ChildToFixedParentC6methodyyF : $@convention(method) (@guaranteed ChildToFixedParent) -> ()
   public override func method() {
     // CHECK: bb0([[SELF:%.*]] : @guaranteed $ChildToFixedParent):
     // CHECK:   [[COPY_SELF:%.*]] = copy_value [[SELF]]
@@ -146,7 +146,7 @@
   }
   // CHECK: } // end sil function '$s5super18ChildToFixedParentC6methodyyF'
 
-  // CHECK-LABEL: sil @$s5super18ChildToFixedParentC11classMethodyyFZ : $@convention(method) (@thick ChildToFixedParent.Type) -> ()
+  // CHECK-LABEL: sil [ossa] @$s5super18ChildToFixedParentC11classMethodyyFZ : $@convention(method) (@thick ChildToFixedParent.Type) -> ()
   public override class func classMethod() {
     // CHECK: bb0([[SELF:%.*]] : $@thick ChildToFixedParent.Type):
     // CHECK:   [[UPCAST_SELF:%.*]] = upcast [[SELF]]
@@ -156,7 +156,7 @@
   }
   // CHECK: } // end sil function '$s5super18ChildToFixedParentC11classMethodyyFZ'
 
-  // CHECK-LABEL: sil @$s5super18ChildToFixedParentC11returnsSelfACXDyFZ : $@convention(method) (@thick ChildToFixedParent.Type) -> @owned ChildToFixedParent
+  // CHECK-LABEL: sil [ossa] @$s5super18ChildToFixedParentC11returnsSelfACXDyFZ : $@convention(method) (@thick ChildToFixedParent.Type) -> @owned ChildToFixedParent
   public class func returnsSelf() -> Self {
     // CHECK: bb0([[SELF:%.*]] : $@thick ChildToFixedParent.Type):
     // CHECK:   [[FIRST_CAST:%.*]] = unchecked_trivial_bit_cast [[SELF]]
@@ -185,7 +185,7 @@
 
 public class GenericDerived<T> : GenericBase<T> {
   public override func method() {
-    // CHECK-LABEL: sil private @$s5super14GenericDerivedC6methodyyFyyXEfU_ : $@convention(thin) <T> (@guaranteed GenericDerived<T>) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s5super14GenericDerivedC6methodyyFyyXEfU_ : $@convention(thin) <T> (@guaranteed GenericDerived<T>) -> ()
     // CHECK: upcast {{.*}} : $GenericDerived<T> to $GenericBase<T>
     // CHECK: return
     {
@@ -193,7 +193,7 @@
     }()
     // CHECK: } // end sil function '$s5super14GenericDerivedC6methodyyFyyXEfU_'
 
-    // CHECK-LABEL: sil private @$s5super14GenericDerivedC6methodyyF13localFunctionL_yylF : $@convention(thin) <T> (@guaranteed GenericDerived<T>) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s5super14GenericDerivedC6methodyyF13localFunctionL_yylF : $@convention(thin) <T> (@guaranteed GenericDerived<T>) -> ()
     // CHECK: upcast {{.*}} : $GenericDerived<T> to $GenericBase<T>
     // CHECK: return
     // CHECK: } // end sil function '$s5super14GenericDerivedC6methodyyF13localFunctionL_yylF'
@@ -202,7 +202,7 @@
     }
     localFunction()
 
-    // CHECK-LABEL: sil private @$s5super14GenericDerivedC6methodyyF15genericFunctionL_yyqd__r__lF : $@convention(thin) <T><U> (@in_guaranteed U, @guaranteed GenericDerived<T>) -> ()
+    // CHECK-LABEL: sil private [ossa] @$s5super14GenericDerivedC6methodyyF15genericFunctionL_yyqd__r__lF : $@convention(thin) <T><U> (@in_guaranteed U, @guaranteed GenericDerived<T>) -> ()
     // CHECK: upcast {{.*}} : $GenericDerived<T> to $GenericBase<T>
     // CHECK: return
     func genericFunction<U>(_: U) {
diff --git a/test/SILGen/super_init_refcounting.swift b/test/SILGen/super_init_refcounting.swift
index baafdf9..3872ffe 100644
--- a/test/SILGen/super_init_refcounting.swift
+++ b/test/SILGen/super_init_refcounting.swift
@@ -7,7 +7,7 @@
 }
 
 class Bar: Foo {
-  // CHECK-LABEL: sil hidden @$s22super_init_refcounting3BarC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s22super_init_refcounting3BarC{{[_0-9a-zA-Z]*}}fc
   // CHECK: bb0([[INPUT_SELF:%.*]] : @owned $Bar):
   // CHECK:         [[SELF_BOX:%.*]] = alloc_box ${ var Bar }
   // CHECK:         [[MARKED_SELF_BOX:%.*]] =  mark_uninitialized [derivedself] [[SELF_BOX]]
@@ -27,7 +27,7 @@
 }
 
 extension Foo {
-  // CHECK-LABEL: sil hidden @$s22super_init_refcounting3FooC{{[_0-9a-zA-Z]*}}fC
+  // CHECK-LABEL: sil hidden [ossa] @$s22super_init_refcounting3FooC{{[_0-9a-zA-Z]*}}fC
   // CHECK:         [[SELF_BOX:%.*]] = alloc_box ${ var Foo }
   // CHECK:         [[MARKED_SELF_BOX:%.*]] =  mark_uninitialized [delegatingself] [[SELF_BOX]]
   // CHECK:         [[PB_SELF_BOX:%.*]] = project_box [[MARKED_SELF_BOX]]
@@ -41,7 +41,7 @@
 
 class Zim: Foo {
   var foo = Foo()
-  // CHECK-LABEL: sil hidden @$s22super_init_refcounting3ZimC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s22super_init_refcounting3ZimC{{[_0-9a-zA-Z]*}}fc
   // CHECK-NOT:     copy_value
   // CHECK-NOT:     destroy_value
   // CHECK:         function_ref @$s22super_init_refcounting3FooCACycfc : $@convention(method) (@owned Foo) -> @owned Foo
@@ -54,7 +54,7 @@
     foo = Foo()
     super.init()
   }
-  // CHECK-LABEL: sil hidden @$s22super_init_refcounting4ZangC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s22super_init_refcounting4ZangC{{[_0-9a-zA-Z]*}}fc
   // CHECK-NOT:     copy_value
   // CHECK-NOT:     destroy_value
   // CHECK:         function_ref @$s22super_init_refcounting3FooCACycfc : $@convention(method) (@owned Foo) -> @owned Foo
@@ -71,7 +71,7 @@
 class Good: Foo {
   let x: Int
 
-  // CHECK-LABEL: sil hidden @$s22super_init_refcounting4GoodC{{[_0-9a-zA-Z]*}}fc
+  // CHECK-LABEL: sil hidden [ossa] @$s22super_init_refcounting4GoodC{{[_0-9a-zA-Z]*}}fc
   // CHECK:         [[SELF_BOX:%.*]] = alloc_box ${ var Good }
   // CHECK:         [[MARKED_SELF_BOX:%.*]] = mark_uninitialized [derivedself] [[SELF_BOX]]
   // CHECK:         [[PB_SELF_BOX:%.*]] = project_box [[MARKED_SELF_BOX]]
diff --git a/test/SILGen/super_objc_class_method.swift b/test/SILGen/super_objc_class_method.swift
index f5bc5ab..5e4b40d 100644
--- a/test/SILGen/super_objc_class_method.swift
+++ b/test/SILGen/super_objc_class_method.swift
@@ -3,7 +3,7 @@
 
 import Foundation
 class MyFunkyDictionary: NSDictionary {
-  // CHECK-LABEL: sil hidden @$s23super_objc_class_method17MyFunkyDictionaryC0C6MethodyyFZ : $@convention(method) (@thick MyFunkyDictionary.Type) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @$s23super_objc_class_method17MyFunkyDictionaryC0C6MethodyyFZ : $@convention(method) (@thick MyFunkyDictionary.Type) -> ()
   // CHECK: objc_super_method %0 : $@thick MyFunkyDictionary.Type, #NSDictionary.classMethod!1.foreign : (NSDictionary.Type) -> () -> ()
   override class func classMethod() {
     super.classMethod()
diff --git a/test/SILGen/swift_newtype_result_convention.swift b/test/SILGen/swift_newtype_result_convention.swift
index 6bc248a..fc0973f 100644
--- a/test/SILGen/swift_newtype_result_convention.swift
+++ b/test/SILGen/swift_newtype_result_convention.swift
@@ -4,6 +4,6 @@
 import Foundation
 
 @objc class ThingHolder: NSObject {
-  // CHECK: sil hidden [thunk] @$s{{.*}}5thing{{.*}}To : $@convention(objc_method) (ThingHolder) -> @autoreleased NSThing
+  // CHECK: sil hidden [thunk] [ossa] @$s{{.*}}5thing{{.*}}To : $@convention(objc_method) (ThingHolder) -> @autoreleased NSThing
   @objc let thing: NSThing = NSThing("")
 }
diff --git a/test/SILGen/switch.swift b/test/SILGen/switch.swift
index 055242e..9b608c5 100644
--- a/test/SILGen/switch.swift
+++ b/test/SILGen/switch.swift
@@ -25,7 +25,7 @@
 func f() {}
 func g() {}
 
-// CHECK-LABEL: sil hidden @$s6switch5test1yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test1yyF
 func test1() {
   switch foo() {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -37,7 +37,7 @@
   b()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test2yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test2yyF
 func test2() {
   switch foo() {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -53,7 +53,7 @@
   c()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test3yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test3yyF
 func test3() {
   switch foo() {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -77,7 +77,7 @@
   c()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test4yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test4yyF
 func test4() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -90,7 +90,7 @@
   b()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test5yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test5yyF
 func test5() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -121,7 +121,7 @@
   d()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test6yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test6yyF
 func test6() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -138,7 +138,7 @@
   c()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test7yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test7yyF
 func test7() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -160,7 +160,7 @@
   // CHECK:   function_ref @$s6switch1cyyF
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test8yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test8yyF
 func test8() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -233,7 +233,7 @@
   g()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch5test9yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch5test9yyF
 func test9() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -264,7 +264,7 @@
   d()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch6test10yyF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch6test10yyF
 func test10() {
   switch (foo(), bar()) {
   // CHECK:   function_ref @$s6switch3fooSiyF
@@ -293,7 +293,7 @@
 struct Y : P { func p() {} }
 struct Z : P { func p() {} }
 
-// CHECK-LABEL: sil hidden @$s6switch10test_isa_11pyAA1P_p_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch10test_isa_11pyAA1P_p_tF
 func test_isa_1(p: P) {
   // CHECK: [[PTMPBUF:%[0-9]+]] = alloc_stack $P
   // CHECK-NEXT: copy_addr %0 to [initialization] [[PTMPBUF]] : $*P
@@ -340,7 +340,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch10test_isa_21pyAA1P_p_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch10test_isa_21pyAA1P_p_tF
 func test_isa_2(p: P) {
   switch (p, foo()) {
   // CHECK:   checked_cast_addr_br copy_on_success P in [[P:%.*]] : $*P to X in {{%.*}} : $*X, [[IS_X:bb[0-9]+]], [[IS_NOT_X:bb[0-9]+]]
@@ -410,7 +410,7 @@
 class D2 : D1 {}
 class E : C {}
 
-// CHECK-LABEL: sil hidden @$s6switch16test_isa_class_11xyAA1BC_tF : $@convention(thin) (@guaranteed B) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch16test_isa_class_11xyAA1BC_tF : $@convention(thin) (@guaranteed B) -> () {
 func test_isa_class_1(x: B) {
   // CHECK: bb0([[X:%.*]] : @guaranteed $B):
   // CHECK:   checked_cast_br [[X]] : $B to $D1, [[IS_D1:bb[0-9]+]], [[IS_NOT_D1:bb[0-9]+]]
@@ -498,7 +498,7 @@
 }
 // CHECK: } // end sil function '$s6switch16test_isa_class_11xyAA1BC_tF'
 
-// CHECK-LABEL: sil hidden @$s6switch16test_isa_class_21xyXlAA1BC_tF : $@convention(thin)
+// CHECK-LABEL: sil hidden [ossa] @$s6switch16test_isa_class_21xyXlAA1BC_tF : $@convention(thin)
 func test_isa_class_2(x: B) -> AnyObject {
   // CHECK: bb0([[X:%.*]] : @guaranteed $B):
   switch x {
@@ -611,7 +611,7 @@
   case Both(Int, String)
 }
 
-// CHECK-LABEL: sil hidden @$s6switch12test_union_11uyAA9MaybePairO_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12test_union_11uyAA9MaybePairO_tF
 func test_union_1(u: MaybePair) {
   switch u {
   // CHECK: switch_enum [[SUBJECT:%.*]] : $MaybePair,
@@ -654,7 +654,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch12test_union_31uyAA9MaybePairO_tF : $@convention(thin) (@guaranteed MaybePair) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12test_union_31uyAA9MaybePairO_tF : $@convention(thin) (@guaranteed MaybePair) -> () {
 func test_union_3(u: MaybePair) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $MaybePair):
   // CHECK:   switch_enum [[ARG]] : $MaybePair,
@@ -696,7 +696,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch12test_union_41uyAA9MaybePairO_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12test_union_41uyAA9MaybePairO_tF
 func test_union_4(u: MaybePair) {
   switch u {
   // CHECK: switch_enum {{%.*}} : $MaybePair,
@@ -735,7 +735,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s6switch12test_union_51uyAA9MaybePairO_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12test_union_51uyAA9MaybePairO_tF
 func test_union_5(u: MaybePair) {
   switch u {
   // CHECK: switch_enum {{%.*}} : $MaybePair,
@@ -781,7 +781,7 @@
   case Both(P, String)
 }
 
-// CHECK-LABEL: sil hidden @$s6switch22test_union_addr_only_11uyAA20MaybeAddressOnlyPairO_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch22test_union_addr_only_11uyAA20MaybeAddressOnlyPairO_tF
 func test_union_addr_only_1(u: MaybeAddressOnlyPair) {
   switch u {
   // CHECK: switch_enum_addr [[ENUM_ADDR:%.*]] : $*MaybeAddressOnlyPair,
@@ -844,7 +844,7 @@
 
 enum Foo { case A, B }
 
-// CHECK-LABEL: sil hidden @$s6switch05test_A11_two_unions1x1yyAA3FooO_AFtF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch05test_A11_two_unions1x1yyAA3FooO_AFtF
 func test_switch_two_unions(x: Foo, y: Foo) {
   // CHECK:   [[T0:%.*]] = tuple (%0 : $Foo, %1 : $Foo)
   // CHECK:   ([[X:%.*]], [[Y:%.*]]) = destructure_tuple [[T0]]
@@ -884,7 +884,7 @@
   case _: markUsed("other")
   }
 }
-// CHECK-LABEL: sil hidden @$s6switch12rdar14826416{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12rdar14826416{{[_0-9a-zA-Z]*}}F
 // CHECK:   checked_cast_addr_br copy_on_success T in {{%.*}} : $*T to Int in {{%.*}} : $*Int, [[IS_INT:bb[0-9]+]], [[ISNT_INT:bb[0-9]+]]
 // CHECK: [[ISNT_INT]]:
 // CHECK:   checked_cast_addr_br copy_on_success T in {{%.*}} : $*T to U in {{%.*}} : $*U, [[ISNT_INT_IS_U:bb[0-9]+]], [[ISNT_INT_ISNT_U:bb[0-9]+]]
@@ -893,7 +893,7 @@
 class Rdar14835992 {}
 class SubRdar14835992 : Rdar14835992 {}
 
-// CHECK-LABEL: sil hidden @$s6switch12rdar14835992{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s6switch12rdar14835992{{[_0-9a-zA-Z]*}}F
 func rdar14835992<T, U>(t: Rdar14835992, tt: T, uu: U) {
   switch t {
   case is SubRdar14835992: markUsed("Sub")
@@ -909,7 +909,7 @@
 // <rdar://problem/17272985>
 enum ABC { case A, B, C }
 
-// CHECK-LABEL: sil hidden @$s6switch18testTupleWildcardsyyAA3ABCO_ADtF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch18testTupleWildcardsyyAA3ABCO_ADtF
 // CHECK:         ([[X:%.*]], [[Y:%.*]]) = destructure_tuple {{%.*}} : $(ABC, ABC)
 // CHECK:         switch_enum [[X]] : $ABC, case #ABC.A!enumelt: [[X_A:bb[0-9]+]], default [[X_NOT_A:bb[0-9]+]]
 // CHECK:       [[X_A]]:
@@ -946,7 +946,7 @@
   case Payload(name: Int)
 }
 
-// CHECK-LABEL: sil hidden @$s6switch24testLabeledScalarPayloadyypAA0cdE0OF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch24testLabeledScalarPayloadyypAA0cdE0OF
 func testLabeledScalarPayload(_ lsp: LabeledScalarPayload) -> Any {
   // CHECK: switch_enum {{%.*}}, case #LabeledScalarPayload.Payload!enumelt.1: bb1
   switch lsp {
@@ -960,7 +960,7 @@
 }
 
 // There should be no unreachable generated.
-// CHECK-LABEL: sil hidden @$s6switch19testOptionalPatternyySiSgF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch19testOptionalPatternyySiSgF
 func testOptionalPattern(_ value : Int?) {
   // CHECK: switch_enum %0 : $Optional<Int>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: [[NILBB:bb[0-9]+]]
   switch value {
@@ -974,7 +974,7 @@
 
 // x? and .none should both be considered "similar" and thus handled in the same
 // switch on the enum kind.  There should be no unreachable generated.
-// CHECK-LABEL: sil hidden @$s6switch19testOptionalEnumMixyS2iSgF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch19testOptionalEnumMixyS2iSgF
 func testOptionalEnumMix(_ a : Int?) -> Int {
   // CHECK: debug_value %0 : $Optional<Int>, let, name "a"
   // CHECK-NEXT: switch_enum %0 : $Optional<Int>, case #Optional.some!enumelt.1: [[SOMEBB:bb[0-9]+]], case #Optional.none!enumelt: [[NILBB:bb[0-9]+]]
@@ -996,7 +996,7 @@
 
 // x? and nil should both be considered "similar" and thus handled in the same
 // switch on the enum kind.  There should be no unreachable generated.
-// CHECK-LABEL: sil hidden @$s6switch26testOptionalEnumMixWithNilyS2iSgF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch26testOptionalEnumMixWithNilyS2iSgF
 func testOptionalEnumMixWithNil(_ a : Int?) -> Int {
   // CHECK: debug_value %0 : $Optional<Int>, let, name "a"
   // CHECK-NEXT: switch_enum %0 : $Optional<Int>, case #Optional.some!enumelt.1: [[SOMEBB:bb[0-9]+]], case #Optional.none!enumelt: [[NILBB:bb[0-9]+]]
@@ -1017,7 +1017,7 @@
 }
 
 // SR-3518
-// CHECK-LABEL: sil hidden @$s6switch43testMultiPatternsWithOuterScopeSameNamedVar4base6filterySiSg_AEtF
+// CHECK-LABEL: sil hidden [ossa] @$s6switch43testMultiPatternsWithOuterScopeSameNamedVar4base6filterySiSg_AEtF
 func testMultiPatternsWithOuterScopeSameNamedVar(base: Int?, filter: Int?) {
   switch(base, filter) {
     
@@ -1095,7 +1095,7 @@
 case a(Klass)
 }
 
-// CHECK-LABEL: sil hidden @$s6switch33address_only_with_trivial_subtypeyyAA21TrivialSingleCaseEnumO_yptF : $@convention(thin) (TrivialSingleCaseEnum, @in_guaranteed Any) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch33address_only_with_trivial_subtypeyyAA21TrivialSingleCaseEnumO_yptF : $@convention(thin) (TrivialSingleCaseEnum, @in_guaranteed Any) -> () {
 // CHECK: [[MEM:%.*]] = alloc_stack $(TrivialSingleCaseEnum, Any)
 // CHECK: [[INIT_TUP_0:%.*]] = tuple_element_addr [[MEM]] : $*(TrivialSingleCaseEnum, Any), 0
 // CHECK: [[INIT_TUP_1:%.*]] = tuple_element_addr [[MEM]] : $*(TrivialSingleCaseEnum, Any), 1
@@ -1116,7 +1116,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s6switch36address_only_with_nontrivial_subtypeyyAA24NonTrivialSingleCaseEnumO_yptF : $@convention(thin) (@guaranteed NonTrivialSingleCaseEnum, @in_guaranteed Any) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch36address_only_with_nontrivial_subtypeyyAA24NonTrivialSingleCaseEnumO_yptF : $@convention(thin) (@guaranteed NonTrivialSingleCaseEnum, @in_guaranteed Any) -> () {
 // CHECK: [[MEM:%.*]] = alloc_stack $(NonTrivialSingleCaseEnum, Any)
 // CHECK: [[INIT_TUP_0:%.*]] = tuple_element_addr [[MEM]] : $*(NonTrivialSingleCaseEnum, Any), 0
 // CHECK: [[INIT_TUP_1:%.*]] = tuple_element_addr [[MEM]] : $*(NonTrivialSingleCaseEnum, Any), 1
diff --git a/test/SILGen/switch_abstraction.swift b/test/SILGen/switch_abstraction.swift
index ec15a25..d774db4 100644
--- a/test/SILGen/switch_abstraction.swift
+++ b/test/SILGen/switch_abstraction.swift
@@ -8,7 +8,7 @@
   case Nuttn
 }
 
-// CHECK-LABEL: sil hidden @$s18switch_abstraction18enum_reabstraction1x1ayAA10OptionableOyAA1AVAHcG_AHtF : $@convention(thin) (@guaranteed Optionable<(A) -> A>, A) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_abstraction18enum_reabstraction1x1ayAA10OptionableOyAA1AVAHcG_AHtF : $@convention(thin) (@guaranteed Optionable<(A) -> A>, A) -> ()
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Optionable<(A) -> A>,
 // CHECK: switch_enum [[ARG]] : $Optionable<(A) -> A>, case #Optionable.Summn!enumelt.1: [[DEST:bb[0-9]+]]
 //
@@ -30,7 +30,7 @@
   case Bar((B) -> A)
 }
 
-// CHECK-LABEL: sil hidden @$s18switch_abstraction45enum_addr_only_to_loadable_with_reabstraction{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@in_guaranteed Wacky<T, A>, A) -> @out T {
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_abstraction45enum_addr_only_to_loadable_with_reabstraction{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T> (@in_guaranteed Wacky<T, A>, A) -> @out T {
 // CHECK: switch_enum_addr [[ENUM:%.*]] : $*Wacky<T, A>, {{.*}} case #Wacky.Bar!enumelt.1: [[DEST:bb[0-9]+]]
 // CHECK: [[DEST]]:
 // CHECK:   [[ORIG_ADDR:%.*]] = unchecked_take_enum_data_addr [[ENUM]] : $*Wacky<T, A>, #Wacky.Bar
@@ -51,7 +51,7 @@
 func hello() {}
 func goodbye(_: Any) {}
 
-// CHECK-LABEL: sil hidden @$s18switch_abstraction34requires_address_and_reabstractionyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_abstraction34requires_address_and_reabstractionyyF : $@convention(thin) () -> () {
 // CHECK: [[FN:%.*]] = function_ref @$s18switch_abstraction5helloyyF : $@convention(thin) () -> ()
 // CHECK: [[THICK:%.*]] = thin_to_thick_function [[FN]]
 // CHECK: [[BOX:%.*]] = alloc_stack $@callee_guaranteed () -> @out ()
diff --git a/test/SILGen/switch_debuginfo.swift b/test/SILGen/switch_debuginfo.swift
index 1c07925..c461d5e 100644
--- a/test/SILGen/switch_debuginfo.swift
+++ b/test/SILGen/switch_debuginfo.swift
@@ -16,7 +16,7 @@
 
 // First, check that we don't assign fresh locations to each case statement,
 // except for any relevant debug value instructions.
-// CHECK-LABEL: sil hidden @$s16switch_debuginfo5test11iySi_tF
+// CHECK-LABEL: sil hidden [ossa] @$s16switch_debuginfo5test11iySi_tF
 func test1(i: Int) {
   switch i {
            // CHECK-NOT: [[LOC]]:[[@LINE+1]]
@@ -35,7 +35,7 @@
 }
 
 // Next, check that case statements and switch subjects have the same locations.
-// CHECK-LABEL: sil hidden @$s16switch_debuginfo5test21sySS_tF
+// CHECK-LABEL: sil hidden [ossa] @$s16switch_debuginfo5test21sySS_tF
 func test2(s: String) {
   switch s {
   case "a": // CHECK: string_literal utf8 "a", [[LOC]]:[[@LINE-1]]:10
@@ -48,7 +48,7 @@
 }
 
 // Fallthrough shouldn't affect case statement locations.
-// CHECK-LABEL: sil hidden @$s16switch_debuginfo5test31sySS_tF
+// CHECK-LABEL: sil hidden [ossa] @$s16switch_debuginfo5test31sySS_tF
 func test3(s: String) {
   switch s {
   case "a", "b":
@@ -67,7 +67,7 @@
 }
 
 // It should be possible to set breakpoints on where clauses.
-// CHECK-LABEL: sil hidden @$s16switch_debuginfo5test41byAA6BinaryO_tF
+// CHECK-LABEL: sil hidden [ossa] @$s16switch_debuginfo5test41byAA6BinaryO_tF
 func test4(b: Binary) {
   switch b {
   case let _        // CHECK-NOT: [[LOC]]:[[@LINE]]
@@ -82,7 +82,7 @@
 }
 
 // Check that we set the right locations before/after nested switches.
-// CHECK-LABEL: sil hidden @$s16switch_debuginfo5test51sySS_tF
+// CHECK-LABEL: sil hidden [ossa] @$s16switch_debuginfo5test51sySS_tF
 func test5(s: String) {
   switch s {
   case "a":         // CHECK: string_literal utf8 "a", [[LOC]]:[[@LINE-1]]:10
diff --git a/test/SILGen/switch_fallthrough.swift b/test/SILGen/switch_fallthrough.swift
index b11fae3..8a7c9bd 100644
--- a/test/SILGen/switch_fallthrough.swift
+++ b/test/SILGen/switch_fallthrough.swift
@@ -18,7 +18,7 @@
 
 func z(_ i: Int) {}
 
-// CHECK-LABEL: sil hidden @$s18switch_fallthrough5test1yyF
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_fallthrough5test1yyF
 func test1() {
   switch foo() {
   // CHECK:   cond_br {{%.*}}, [[YES_CASE1:bb[0-9]+]], {{bb[0-9]+}}
@@ -44,7 +44,7 @@
 }
 
 // Fallthrough should work even if the next case is normally unreachable
-// CHECK-LABEL: sil hidden @$s18switch_fallthrough5test2yyF
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_fallthrough5test2yyF
 func test2() {
   switch foo() {
   // CHECK:   cond_br {{%.*}}, [[YES_CASE1:bb[0-9]+]], {{bb[0-9]+}}
@@ -69,7 +69,7 @@
   d()
 }
 
-// CHECK-LABEL: sil hidden @$s18switch_fallthrough5test3yyF
+// CHECK-LABEL: sil hidden [ossa] @$s18switch_fallthrough5test3yyF
 func test3() {
   switch (foo(), bar()) {
   // CHECK:   cond_br {{%.*}}, [[YES_CASE1:bb[0-9]+]], {{bb[0-9]+}}
@@ -131,7 +131,7 @@
   // CHECK-NEXT: return
 }
 
-// Fallthrough into case block with binding // CHECK-LABEL: sil hidden @$s18switch_fallthrough5test5yyF
+// Fallthrough into case block with binding // CHECK-LABEL: sil hidden [ossa] @$s18switch_fallthrough5test5yyF
 func test5() {
   switch (foo(), bar()) {
   // CHECK:   cond_br {{%.*}}, [[YES_CASE1:bb[0-9]+]], {{bb[0-9]+}}
diff --git a/test/SILGen/switch_isa.swift b/test/SILGen/switch_isa.swift
index ea8cc61..486ab4f 100644
--- a/test/SILGen/switch_isa.swift
+++ b/test/SILGen/switch_isa.swift
@@ -12,7 +12,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_isa23testSwitchOnExistentialyyypF :
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_isa23testSwitchOnExistentialyyypF :
 // CHECK:   [[ANY:%.*]] = alloc_stack $Any
 // CHECK:   copy_addr %0 to [initialization] [[ANY]]
 // CHECK:   [[BOOL:%.*]] = alloc_stack $Bool
@@ -39,7 +39,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_isa27testSwitchEnumOnExistentialyyypF : $@convention(thin) (@in_guaranteed Any) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_isa27testSwitchEnumOnExistentialyyypF : $@convention(thin) (@in_guaranteed Any) -> ()
 // CHECK:   checked_cast_addr_br copy_on_success Any in {{%.*}} : $*Any to Foo
 // CHECK:   checked_cast_addr_br copy_on_success Any in {{%.*}} : $*Any to Bar<Int>
 // CHECK:   checked_cast_addr_br copy_on_success Any in {{%.*}} : $*Any to Bar<Foo>
@@ -50,7 +50,7 @@
 func guardFn(_ l: D, _ r: D) -> Bool { return true }
 
 // rdar://problem/21087371
-// CHECK-LABEL: sil hidden @$s10switch_isa32testSwitchTwoIsPatternsWithGuard_1ryAA1BC_AEtF
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_isa32testSwitchTwoIsPatternsWithGuard_1ryAA1BC_AEtF
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $B, [[ARG1:%.*]] : @guaranteed $B):
 // CHECK:       [[ARG0_COPY:%.*]] = copy_value [[ARG0]]
 // CHECK:       [[ARG1_COPY:%.*]] = copy_value [[ARG1]]
diff --git a/test/SILGen/switch_multiple_entry_address_only.swift b/test/SILGen/switch_multiple_entry_address_only.swift
index b9673c4..d6f472d 100644
--- a/test/SILGen/switch_multiple_entry_address_only.swift
+++ b/test/SILGen/switch_multiple_entry_address_only.swift
@@ -7,10 +7,10 @@
 case c(Any)
 }
 
-// CHECK-LABEL: sil hidden @$s34switch_multiple_entry_address_only8takesAnyyyypF : $@convention(thin) (@in_guaranteed Any) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s34switch_multiple_entry_address_only8takesAnyyyypF : $@convention(thin) (@in_guaranteed Any) -> ()
 func takesAny(_ x: Any) {}
 
-// CHECK-LABEL: sil hidden @$s34switch_multiple_entry_address_only0B9LabelsLet1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s34switch_multiple_entry_address_only0B9LabelsLet1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
 func multipleLabelsLet(e: E) {
   // CHECK:      bb0
   // CHECK:      [[X_PHI:%.*]] = alloc_stack $Any
@@ -62,7 +62,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s34switch_multiple_entry_address_only0B9LabelsVar1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s34switch_multiple_entry_address_only0B9LabelsVar1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
 func multipleLabelsVar(e: E) {
   // CHECK:      bb0
   // CHECK:      [[X_PHI:%.*]] = alloc_stack $Any
@@ -123,7 +123,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s34switch_multiple_entry_address_only20fallthroughWithValue1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s34switch_multiple_entry_address_only20fallthroughWithValue1eyAA1EO_tF : $@convention(thin) (@in_guaranteed E) -> ()
 func fallthroughWithValue(e: E) {
   // CHECK:      bb0
   // CHECK:      [[X_PHI:%.*]] = alloc_stack $Any
diff --git a/test/SILGen/switch_objc.swift b/test/SILGen/switch_objc.swift
index 46d4f63..72fe068 100644
--- a/test/SILGen/switch_objc.swift
+++ b/test/SILGen/switch_objc.swift
@@ -4,7 +4,7 @@
 
 import Foundation
 
-// CHECK-LABEL: sil hidden @$s11switch_objc13matchesEither5input1a1bSbSo4HiveC_A2GtF :
+// CHECK-LABEL: sil hidden [ossa] @$s11switch_objc13matchesEither5input1a1bSbSo4HiveC_A2GtF :
 func matchesEither(input: Hive, a: Hive, b: Hive) -> Bool {
   switch input {
   // CHECK:   function_ref @$s10ObjectiveC2teoiySbSo8NSObjectC_ADtF
diff --git a/test/SILGen/switch_ownership.swift b/test/SILGen/switch_ownership.swift
index bfd968e..5e0daf5 100644
--- a/test/SILGen/switch_ownership.swift
+++ b/test/SILGen/switch_ownership.swift
@@ -30,7 +30,7 @@
 // Tests //
 ///////////
 
-// CHECK-LABEL: sil hidden @$s6switch05test_A19_two_trivial_unions1x1yyAA3FooO_AFtF : $@convention(thin) (Foo, Foo) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch05test_A19_two_trivial_unions1x1yyAA3FooO_AFtF : $@convention(thin) (Foo, Foo) -> () {
 func test_switch_two_trivial_unions(x: Foo, y: Foo) {
   // CHECK:   [[T0:%.*]] = tuple (%0 : $Foo, %1 : $Foo)
   // CHECK:   ([[X:%.*]], [[Y:%.*]]) = destructure_tuple [[T0]]
@@ -62,7 +62,7 @@
 }
 // CHECK: } // end sil function '$s6switch05test_A19_two_trivial_unions1x1yyAA3FooO_AFtF'
 
-// CHECK-LABEL: sil hidden @$s6switch05test_A22_two_nontrivial_unions1x1yyAA13NonTrivialFooO_AFtF : $@convention(thin) (@guaranteed NonTrivialFoo, @guaranteed NonTrivialFoo) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s6switch05test_A22_two_nontrivial_unions1x1yyAA13NonTrivialFooO_AFtF : $@convention(thin) (@guaranteed NonTrivialFoo, @guaranteed NonTrivialFoo) -> () {
 func test_switch_two_nontrivial_unions(x: NonTrivialFoo, y: NonTrivialFoo) {
   // CHECK:   [[ARG0_COPY:%.*]] = copy_value %0
   // CHECK:   [[ARG1_COPY:%.*]] = copy_value %1
diff --git a/test/SILGen/switch_var.swift b/test/SILGen/switch_var.swift
index c0f093d..c75bc60 100644
--- a/test/SILGen/switch_var.swift
+++ b/test/SILGen/switch_var.swift
@@ -42,7 +42,7 @@
 func bb(x x: (Int, Int)) {}
 func cc(x x: (Int, Int)) {}
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B2_1yyF
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B2_1yyF
 func test_var_1() {
   // CHECK:   function_ref @$s10switch_var3fooSiyF
   switch foo() {
@@ -60,7 +60,7 @@
   b()
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B2_2yyF
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B2_2yyF
 func test_var_2() {
   // CHECK:   function_ref @$s10switch_var3fooSiyF
   switch foo() {
@@ -110,7 +110,7 @@
   d()
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B2_3yyF
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B2_3yyF
 func test_var_3() {
   // CHECK:   function_ref @$s10switch_var3fooSiyF
   // CHECK:   function_ref @$s10switch_var3barSiyF
@@ -189,7 +189,7 @@
 struct Y : P { func p() {} }
 struct Z : P { func p() {} }
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B2_41pyAA1P_p_tF
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B2_41pyAA1P_p_tF
 func test_var_4(p p: P) {
   // CHECK:   function_ref @$s10switch_var3fooSiyF
   switch (p, foo()) {
@@ -297,7 +297,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B2_5yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B2_5yyF : $@convention(thin) () -> () {
 func test_var_5() {
   // CHECK:   function_ref @$s10switch_var3fooSiyF
   // CHECK:   function_ref @$s10switch_var3barSiyF
@@ -338,7 +338,7 @@
   e()
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var05test_B7_returnyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var05test_B7_returnyyF : $@convention(thin) () -> () {
 func test_var_return() {
   switch (foo(), bar()) {
   case var x where runced():
@@ -385,7 +385,7 @@
 
 // When all of the bindings in a column are immutable, don't emit a mutable
 // box. <rdar://problem/15873365>
-// CHECK-LABEL: sil hidden @$s10switch_var8test_letyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var8test_letyyF : $@convention(thin) () -> () {
 func test_let() {
   // CHECK: [[FOOS:%.*]] = function_ref @$s10switch_var4foosSSyF
   // CHECK: [[VAL:%.*]] = apply [[FOOS]]()
@@ -450,7 +450,7 @@
 // CHECK: } // end sil function '$s10switch_var8test_letyyF'
 
 // If one of the bindings is a "var", allocate a box for the column.
-// CHECK-LABEL: sil hidden @$s10switch_var015test_mixed_let_B0yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var015test_mixed_let_B0yyF : $@convention(thin) () -> () {
 func test_mixed_let_var() {
   // CHECK: bb0:
   // CHECK:   [[FOOS:%.*]] = function_ref @$s10switch_var4foosSSyF
@@ -526,7 +526,7 @@
 }
 // CHECK: } // end sil function '$s10switch_var015test_mixed_let_B0yyF'
 
-// CHECK-LABEL: sil hidden @$s10switch_var23test_multiple_patterns1yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var23test_multiple_patterns1yyF : $@convention(thin) () -> () {
 func test_multiple_patterns1() {
   // CHECK:   function_ref @$s10switch_var6foobarSi_SityF
   switch foobar() {
@@ -552,7 +552,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var23test_multiple_patterns2yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var23test_multiple_patterns2yyF : $@convention(thin) () -> () {
 func test_multiple_patterns2() {
   let t1 = 2
   let t2 = 4
@@ -588,7 +588,7 @@
   case C(Int, Int, Double)
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var23test_multiple_patterns3yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var23test_multiple_patterns3yyF : $@convention(thin) () -> () {
 func test_multiple_patterns3() {
   let f = Foo.C(0, 1, 2.0)
   switch f {
@@ -618,7 +618,7 @@
   case Z(Int, Foo)
 }
 
-// CHECK-LABEL: sil hidden @$s10switch_var23test_multiple_patterns4yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var23test_multiple_patterns4yyF : $@convention(thin) () -> () {
 func test_multiple_patterns4() {
   let b = Bar.Y(.C(0, 1, 2.0), 3)
   switch b {
@@ -652,7 +652,7 @@
 
 func aaa(x x: inout Int) {}
 
-// CHECK-LABEL: sil hidden @$s10switch_var23test_multiple_patterns5yyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s10switch_var23test_multiple_patterns5yyF : $@convention(thin) () -> () {
 func test_multiple_patterns5() {
   let b = Bar.Y(.C(0, 1, 2.0), 3)
   switch b {
@@ -698,7 +698,7 @@
 class D: C {}
 func f(_: D) -> Bool { return true }
 
-// CHECK-LABEL: sil hidden @{{.*}}test_multiple_patterns_value_semantics
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}test_multiple_patterns_value_semantics
 func test_multiple_patterns_value_semantics(_ y: C) {
   switch y {
     // CHECK:   checked_cast_br {{%.*}} : $C to $D, [[AS_D:bb[0-9]+]], [[NOT_AS_D:bb[0-9]+]]
diff --git a/test/SILGen/synthesized_conformance_class.swift b/test/SILGen/synthesized_conformance_class.swift
index b29edd3..0c1922f 100644
--- a/test/SILGen/synthesized_conformance_class.swift
+++ b/test/SILGen/synthesized_conformance_class.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %s -swift-version 4 | %FileCheck %s
+// RUN: %target-swift-frontend -emit-silgen %s -swift-version 4 | %FileCheck %s
 
 final class Final<T> {
     var x: T
@@ -53,15 +53,15 @@
 
 extension Final: Encodable where T: Encodable {}
 // CHECK-LABEL: // Final<A>.encode(to:)
-// CHECK-NEXT: sil hidden @$s29synthesized_conformance_class5FinalCAASERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Encodable> (@in_guaranteed Encoder, @guaranteed Final<T>) -> @error Error {
+// CHECK-NEXT: sil hidden [ossa] @$s29synthesized_conformance_class5FinalCAASERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Encodable> (@in_guaranteed Encoder, @guaranteed Final<T>) -> @error Error {
 
 extension Final: Decodable where T: Decodable {}
 // CHECK-LABEL: // Final<A>.init(from:)
-// CHECK-NEXT: sil hidden @$s29synthesized_conformance_class5FinalCAASeRzlE4fromACyxGs7Decoder_p_tKcfC : $@convention(method) <T where T : Decodable> (@in Decoder, @thick Final<T>.Type) -> (@owned Final<T>, @error Error) {
+// CHECK-NEXT: sil hidden [ossa] @$s29synthesized_conformance_class5FinalCAASeRzlE4fromACyxGs7Decoder_p_tKcfC : $@convention(method) <T where T : Decodable> (@in Decoder, @thick Final<T>.Type) -> (@owned Final<T>, @error Error) {
 
 extension Nonfinal: Encodable where T: Encodable {}
 // CHECK-LABEL: // Nonfinal<A>.encode(to:)
-// CHECK-NEXT: sil hidden @$s29synthesized_conformance_class8NonfinalCAASERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Encodable> (@in_guaranteed Encoder, @guaranteed Nonfinal<T>) -> @error Error {
+// CHECK-NEXT: sil hidden [ossa] @$s29synthesized_conformance_class8NonfinalCAASERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Encodable> (@in_guaranteed Encoder, @guaranteed Nonfinal<T>) -> @error Error {
 
 // Witness tables for Final
 
diff --git a/test/SILGen/synthesized_conformance_enum.swift b/test/SILGen/synthesized_conformance_enum.swift
index 34e7de3..fb602ed 100644
--- a/test/SILGen/synthesized_conformance_enum.swift
+++ b/test/SILGen/synthesized_conformance_enum.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %s -swift-version 4 | %FileCheck -check-prefix CHECK -check-prefix CHECK-FRAGILE %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %s -swift-version 4 -enable-resilience | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
+// RUN: %target-swift-frontend -emit-silgen %s -swift-version 4 | %FileCheck -check-prefix CHECK -check-prefix CHECK-FRAGILE %s
+// RUN: %target-swift-frontend -emit-silgen %s -swift-version 4 -enable-resilience | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
 
 enum Enum<T> {
     case a(T), b(T)
@@ -36,20 +36,20 @@
 
 extension Enum: Equatable where T: Equatable {}
 // CHECK-FRAGILE-LABEL: // static Enum<A>.__derived_enum_equals(_:_:)
-// CHECK-FRAGILE-NEXT: sil hidden @$s28synthesized_conformance_enum4EnumOAASQRzlE010__derived_C7_equalsySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Enum<T>, @in_guaranteed Enum<T>, @thin Enum<T>.Type) -> Bool {
+// CHECK-FRAGILE-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum4EnumOAASQRzlE010__derived_C7_equalsySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Enum<T>, @in_guaranteed Enum<T>, @thin Enum<T>.Type) -> Bool {
 // CHECK-RESILIENT-LABEL: // static Enum<A>.== infix(_:_:)
-// CHECK-RESILIENT-NEXT: sil hidden @$s28synthesized_conformance_enum4EnumOAASQRzlE2eeoiySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Enum<T>, @in_guaranteed Enum<T>, @thin Enum<T>.Type) -> Bool {
+// CHECK-RESILIENT-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum4EnumOAASQRzlE2eeoiySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Enum<T>, @in_guaranteed Enum<T>, @thin Enum<T>.Type) -> Bool {
 
 extension Enum: Hashable where T: Hashable {}
 // CHECK-LABEL: // Enum<A>.hashValue.getter
-// CHECK-NEXT: sil hidden @$s28synthesized_conformance_enum4EnumOAASHRzlE9hashValueSivg : $@convention(method) <T where T : Hashable> (@in_guaranteed Enum<T>) -> Int {
+// CHECK-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum4EnumOAASHRzlE9hashValueSivg : $@convention(method) <T where T : Hashable> (@in_guaranteed Enum<T>) -> Int {
 
 // CHECK-LABEL: // Enum<A>.hash(into:)
-// CHECK-NEXT: sil hidden @$s28synthesized_conformance_enum4EnumOAASHRzlE4hash4intoys6HasherVz_tF : $@convention(method) <T where T : Hashable> (@inout Hasher, @in_guaranteed Enum<T>) -> () {
+// CHECK-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum4EnumOAASHRzlE4hash4intoys6HasherVz_tF : $@convention(method) <T where T : Hashable> (@inout Hasher, @in_guaranteed Enum<T>) -> () {
 
 extension NoValues: CaseIterable {}
 // CHECK-LABEL: // static NoValues.allCases.getter
-// CHECK-NEXT: sil hidden @$s28synthesized_conformance_enum8NoValuesO8allCasesSayACGvgZ : $@convention(method) (@thin NoValues.Type) -> @owned Array<NoValues> {
+// CHECK-NEXT: sil hidden [ossa] @$s28synthesized_conformance_enum8NoValuesO8allCasesSayACGvgZ : $@convention(method) (@thin NoValues.Type) -> @owned Array<NoValues> {
 
 
 // Witness tables for Enum
diff --git a/test/SILGen/synthesized_conformance_struct.swift b/test/SILGen/synthesized_conformance_struct.swift
index 8496a40..e38575d 100644
--- a/test/SILGen/synthesized_conformance_struct.swift
+++ b/test/SILGen/synthesized_conformance_struct.swift
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %s -swift-version 4 | %FileCheck -check-prefix CHECK -check-prefix CHECK-FRAGILE %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-silgen %s -swift-version 4 -enable-resilience | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
+// RUN: %target-swift-frontend -emit-silgen %s -swift-version 4 | %FileCheck -check-prefix CHECK -check-prefix CHECK-FRAGILE %s
+// RUN: %target-swift-frontend -emit-silgen %s -swift-version 4 -enable-resilience | %FileCheck -check-prefix CHECK -check-prefix CHECK-RESILIENT %s
 
 struct Struct<T> {
     var x: T
@@ -35,23 +35,23 @@
 
 extension Struct: Equatable where T: Equatable {}
 // CHECK-FRAGILE-LABEL: // static Struct<A>.__derived_struct_equals(_:_:)
-// CHECK-FRAGILE-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASQRzlE010__derived_C7_equalsySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Struct<T>, @in_guaranteed Struct<T>, @thin Struct<T>.Type) -> Bool {
+// CHECK-FRAGILE-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASQRzlE010__derived_C7_equalsySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Struct<T>, @in_guaranteed Struct<T>, @thin Struct<T>.Type) -> Bool {
 // CHECK-RESILIENT-LABEL: // static Struct<A>.== infix(_:_:)
-// CHECK-RESILIENT-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASQRzlE2eeoiySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Struct<T>, @in_guaranteed Struct<T>, @thin Struct<T>.Type) -> Bool {
+// CHECK-RESILIENT-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASQRzlE2eeoiySbACyxG_AEtFZ : $@convention(method) <T where T : Equatable> (@in_guaranteed Struct<T>, @in_guaranteed Struct<T>, @thin Struct<T>.Type) -> Bool {
 
 extension Struct: Hashable where T: Hashable {}
 // CHECK-LABEL: // Struct<A>.hashValue.getter
-// CHECK-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASHRzlE9hashValueSivg : $@convention(method) <T where T : Hashable> (@in_guaranteed Struct<T>) -> Int {
+// CHECK-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASHRzlE9hashValueSivg : $@convention(method) <T where T : Hashable> (@in_guaranteed Struct<T>) -> Int {
 
 // CHECK-LABEL: // Struct<A>.hash(into:)
-// CHECK-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASHRzlE4hash4intoys6HasherVz_tF : $@convention(method) <T where T : Hashable> (@inout Hasher, @in_guaranteed Struct<T>) -> () {
+// CHECK-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASHRzlE4hash4intoys6HasherVz_tF : $@convention(method) <T where T : Hashable> (@inout Hasher, @in_guaranteed Struct<T>) -> () {
 
 extension Struct: Codable where T: Codable {}
 // CHECK-LABEL: // Struct<A>.init(from:)
-// CHECK-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASeRzSERzlE4fromACyxGs7Decoder_p_tKcfC : $@convention(method) <T where T : Decodable, T : Encodable> (@in Decoder, @thin Struct<T>.Type) -> (@out Struct<T>, @error Error)
+// CHECK-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASeRzSERzlE4fromACyxGs7Decoder_p_tKcfC : $@convention(method) <T where T : Decodable, T : Encodable> (@in Decoder, @thin Struct<T>.Type) -> (@out Struct<T>, @error Error)
 
 // CHECK-LABEL: // Struct<A>.encode(to:)
-// CHECK-NEXT: sil hidden @$s30synthesized_conformance_struct6StructVAASeRzSERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Decodable, T : Encodable> (@in_guaranteed Encoder, @in_guaranteed Struct<T>) -> @error Error {
+// CHECK-NEXT: sil hidden [ossa] @$s30synthesized_conformance_struct6StructVAASeRzSERzlE6encode2toys7Encoder_p_tKF : $@convention(method) <T where T : Decodable, T : Encodable> (@in_guaranteed Encoder, @in_guaranteed Struct<T>) -> @error Error {
 
 
 // Witness tables
diff --git a/test/SILGen/testable-multifile-other.swift b/test/SILGen/testable-multifile-other.swift
index ad80788..20ae964 100644
--- a/test/SILGen/testable-multifile-other.swift
+++ b/test/SILGen/testable-multifile-other.swift
@@ -23,7 +23,7 @@
   publicFoo.foo()
 }
 
-// CHECK-LABEL: sil hidden @$s4main4test11internalFoo06publicD0yAA0D4ImplV_AA06PublicdF0VtF
+// CHECK-LABEL: sil hidden [ossa] @$s4main4test11internalFoo06publicD0yAA0D4ImplV_AA06PublicdF0VtF
 // CHECK: [[USE_1:%.+]] = function_ref @$s4main3useyyxAA7FooableRzlF
 // CHECK: = apply [[USE_1]]<FooImpl>({{%.+}}) : $@convention(thin) <τ_0_0 where τ_0_0 : Fooable> (@in_guaranteed τ_0_0) -> ()
 // CHECK: [[USE_2:%.+]] = function_ref @$s4main3useyyxAA7FooableRzlF
@@ -39,7 +39,7 @@
   publicSub.foo()
 }
 
-// CHECK-LABEL: sil hidden @$s4main4test11internalSub06publicD0yAA0D0C_AA06PublicD0CtF
+// CHECK-LABEL: sil hidden [ossa] @$s4main4test11internalSub06publicD0yAA0D0C_AA06PublicD0CtF
 // CHECK: bb0([[ARG0:%.*]] : @guaranteed $Sub, [[ARG1:%.*]] : @guaranteed $PublicSub):
 // CHECK: = class_method [[ARG0]] : $Sub, #Sub.foo!1
 // CHECK: = class_method [[ARG1]] : $PublicSub, #PublicSub.foo!1
diff --git a/test/SILGen/toplevel.swift b/test/SILGen/toplevel.swift
index 3df1c63..d8f73cb 100644
--- a/test/SILGen/toplevel.swift
+++ b/test/SILGen/toplevel.swift
@@ -7,7 +7,7 @@
 }
 
 
-// CHECK-LABEL: sil @main
+// CHECK-LABEL: sil [ossa] @main
 // CHECK: bb0({{%.*}} : $Int32, {{%.*}} : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
 
 // -- initialize x
@@ -122,11 +122,11 @@
 
 
 
-// CHECK-LABEL: sil hidden @$s8toplevel7print_xyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8toplevel7print_xyyF
 
-// CHECK-LABEL: sil hidden @$s8toplevel7print_yyyF
+// CHECK-LABEL: sil hidden [ossa] @$s8toplevel7print_yyyF
 
-// CHECK: sil hidden @$s8toplevel13testGlobalCSESiyF
+// CHECK: sil hidden [ossa] @$s8toplevel13testGlobalCSESiyF
 // CHECK-NOT: global_addr
 // CHECK: %0 = global_addr @$s8toplevel1xSivp : $*Int
 // CHECK-NOT: global_addr
diff --git a/test/SILGen/toplevel_errors.swift b/test/SILGen/toplevel_errors.swift
index 59a149a..46b56f3 100644
--- a/test/SILGen/toplevel_errors.swift
+++ b/test/SILGen/toplevel_errors.swift
@@ -6,7 +6,7 @@
 
 throw MyError.A
 
-// CHECK: sil @main
+// CHECK: sil [ossa] @main
 // CHECK: [[T0:%.*]] = enum $MyError, #MyError.A!enumelt
 // CHECK: [[ERR:%.*]] = alloc_existential_box $Error, $MyError
 // CHECK: [[ADDR:%.*]] = project_existential_box $MyError in [[ERR]] : $Error
diff --git a/test/SILGen/transparent_attribute.swift b/test/SILGen/transparent_attribute.swift
index cce1a60..0e2357b 100644
--- a/test/SILGen/transparent_attribute.swift
+++ b/test/SILGen/transparent_attribute.swift
@@ -2,9 +2,9 @@
 
 // Test that the attribute gets set on default argument generators.
 
-// CHECK-LABEL: sil hidden [transparent] @$s21transparent_attribute0A23FuncWithDefaultArgument1xS2i_tFfA_ : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s21transparent_attribute0A23FuncWithDefaultArgument1xS2i_tFfA_ : $@convention(thin) () -> Int {
 
-// CHECK-LABEL: sil hidden [transparent] @$s21transparent_attribute0A23FuncWithDefaultArgument1xS2i_tF : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil hidden [transparent] [ossa] @$s21transparent_attribute0A23FuncWithDefaultArgument1xS2i_tF : $@convention(thin) (Int) -> Int {
 
 @_transparent func transparentFuncWithDefaultArgument (x: Int = 1) -> Int {
   return x
diff --git a/test/SILGen/tsan_instrumentation.swift b/test/SILGen/tsan_instrumentation.swift
index dbdc80e..1ce041a 100644
--- a/test/SILGen/tsan_instrumentation.swift
+++ b/test/SILGen/tsan_instrumentation.swift
@@ -20,7 +20,7 @@
 var gStruct = MyStruct()
 var gClass = MyClass()
 
-// CHECK-LABEL: sil hidden @$s20tsan_instrumentation17inoutGlobalStructyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20tsan_instrumentation17inoutGlobalStructyyF : $@convention(thin) () -> () {
 // CHECK:  [[GLOBAL_ADDR:%.*]] = global_addr @$s20tsan_instrumentation7gStructAA02MyC0Vvp : $*MyStruct
 // CHECK:  [[WRITE:%.*]] = begin_access [modify] [dynamic] [[GLOBAL_ADDR]] : $*MyStruct
 // CHECK:  {{%.*}} = builtin "tsanInoutAccess"([[WRITE]] : $*MyStruct) : $()
@@ -31,7 +31,7 @@
 }
 
 
-// CHECK-LABEL: sil hidden @$s20tsan_instrumentation31inoutGlobalStructStoredPropertyyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20tsan_instrumentation31inoutGlobalStructStoredPropertyyyF : $@convention(thin) () -> () {
 // CHECK:  [[GLOBAL_ADDR:%.*]] = global_addr @$s20tsan_instrumentation7gStructAA02MyC0Vvp : $*MyStruct
 // CHECK:  [[WRITE:%.*]] = begin_access [modify] [dynamic] [[GLOBAL_ADDR]] : $*MyStruct
 // CHECK:  {{%.*}} = builtin "tsanInoutAccess"([[WRITE]] : $*MyStruct) : $()
@@ -45,7 +45,7 @@
   takesInout(&gStruct.storedProperty)
 }
 
-// CHECK-LABEL: sil hidden @$s20tsan_instrumentation30inoutGlobalClassStoredPropertyyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20tsan_instrumentation30inoutGlobalClassStoredPropertyyyF : $@convention(thin) () -> () {
 // CHECK:  [[GLOBAL_ADDR:%.*]] = global_addr @$s20tsan_instrumentation6gClassAA02MyC0Cvp : $*MyClass
 // CHECK:  [[READ:%.*]] = begin_access [read] [dynamic] [[GLOBAL_ADDR]] : $*MyClass
 // CHECK:  [[LOADED_CLASS:%.*]] = load [copy] [[READ]] : $*MyClass
diff --git a/test/SILGen/tuple_attribute_reabstraction.swift b/test/SILGen/tuple_attribute_reabstraction.swift
index 934331f..235def7 100644
--- a/test/SILGen/tuple_attribute_reabstraction.swift
+++ b/test/SILGen/tuple_attribute_reabstraction.swift
@@ -16,9 +16,9 @@
 
 // We shouldn't have @autoclosure and @escaping attributes in the lowered tuple type:
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sIg_Ieg_Iegyg_ytIgr_ytIegr_ytIegnnr_TR : $@convention(thin) (@in_guaranteed @noescape @callee_guaranteed () -> @out (), @in_guaranteed @callee_guaranteed () -> @out (), @guaranteed @callee_guaranteed (@noescape @callee_guaranteed () -> (), @guaranteed @callee_guaranteed () -> ()) -> ()) -> @out ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIg_Ieg_Iegyg_ytIgr_ytIegr_ytIegnnr_TR : $@convention(thin) (@in_guaranteed @noescape @callee_guaranteed () -> @out (), @in_guaranteed @callee_guaranteed () -> @out (), @guaranteed @callee_guaranteed (@noescape @callee_guaranteed () -> (), @guaranteed @callee_guaranteed () -> ()) -> ()) -> @out ()
 
 // The one-element vararg tuple ([Int]...) should be exploded and not treated as opaque,
 // even though its materializable:
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sSaySiGIegg_AAytIegnr_TR : $@convention(thin) (@in_guaranteed Array<Int>, @guaranteed @callee_guaranteed (@guaranteed Array<Int>) -> ()) -> @out ()
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sSaySiGIegg_AAytIegnr_TR : $@convention(thin) (@in_guaranteed Array<Int>, @guaranteed @callee_guaranteed (@guaranteed Array<Int>) -> ()) -> @out ()
diff --git a/test/SILGen/tuples.swift b/test/SILGen/tuples.swift
index 5eeeffa..1f5caa5 100644
--- a/test/SILGen/tuples.swift
+++ b/test/SILGen/tuples.swift
@@ -7,7 +7,7 @@
 }
 
 // <rdar://problem/16020428>
-// CHECK-LABEL: sil hidden @$s6tuples8matchFoo1xyAA0C0O_tF
+// CHECK-LABEL: sil hidden [ossa] @$s6tuples8matchFoo1xyAA0C0O_tF
 func matchFoo(x x: Foo) {
   switch x {
   case .X(let x):
@@ -22,7 +22,7 @@
 func make_p() -> P { return A() }
 func make_xy() -> (x: Int, y: P) { return (make_int(), make_p()) }
 
-// CHECK-LABEL: sil hidden @$s6tuples17testShuffleOpaqueyyF
+// CHECK-LABEL: sil hidden [ossa] @$s6tuples17testShuffleOpaqueyyF
 func testShuffleOpaque() {
   // CHECK: [[X:%.*]] = alloc_box ${ var P }
   // CHECK-NEXT: [[PBX:%.*]] = project_box [[X]]
@@ -131,7 +131,7 @@
 // Make sure that we use a load_borrow instead of a load [take] when RValues are
 // formed with isGuaranteed set.
 extension P {
-  // CHECK-LABEL: sil hidden @$s6tuples1PPAAE12immutableUse5tupleyAA1CC5index_x5valuet_tFZ
+  // CHECK-LABEL: sil hidden [ossa] @$s6tuples1PPAAE12immutableUse5tupleyAA1CC5index_x5valuet_tFZ
   // CHECK: bb0([[TUP0:%.*]] : @guaranteed $C, [[TUP1:%.*]] : $*Self
   // Allocate space for the RValue.
   // CHECK:   [[RVALUE:%.*]] = alloc_stack $(index: C, value: Self), let, name "tuple"
@@ -157,7 +157,7 @@
   }
 }
 
-// CHECK-LABEL: sil @$s6tuples15testTupleAssign1xySaySiGz_tF : $@convention(thin) (@inout Array<Int>) -> () {
+// CHECK-LABEL: sil [ossa] @$s6tuples15testTupleAssign1xySaySiGz_tF : $@convention(thin) (@inout Array<Int>) -> () {
 // CHECK: [[ACCESS:%.*]] = begin_access [modify] [unknown] %0 : $*Array<Int>
 // function_ref Array.subscript.modify
 // CHECK: [[ACCESSOR:%.*]] = function_ref @$sSayxSiciM : $@yield_once @convention(method) <τ_0_0> (Int, @inout Array<τ_0_0>) -> @yields @inout τ_0_0
diff --git a/test/SILGen/types.swift b/test/SILGen/types.swift
index fa52693..dbc2ba0 100644
--- a/test/SILGen/types.swift
+++ b/test/SILGen/types.swift
@@ -5,7 +5,7 @@
   var member: Int = 0
 
   // Methods have method calling convention.
-  // CHECK-LABEL: sil hidden @$s5types1CC3foo1xySi_tF : $@convention(method) (Int, @guaranteed C) -> () {
+  // CHECK-LABEL: sil hidden [ossa] @$s5types1CC3foo1xySi_tF : $@convention(method) (Int, @guaranteed C) -> () {
   func foo(x x: Int) {
     // CHECK: bb0([[X:%[0-9]+]] : $Int, [[THIS:%[0-9]+]] : @guaranteed $C):
     member = x
@@ -21,7 +21,7 @@
 struct S {
   var member: Int
 
-  // CHECK-LABEL: sil hidden @{{.*}}1SV3foo{{.*}} : $@convention(method) (Int, @inout S) -> ()
+  // CHECK-LABEL: sil hidden [ossa] @{{.*}}1SV3foo{{.*}} : $@convention(method) (Int, @inout S) -> ()
   mutating
   func foo(x x: Int) {
     var x = x
@@ -37,7 +37,7 @@
   }
 
   class SC {
-    // CHECK-LABEL: sil hidden @$s5types1SV2SCC3bar{{.*}}
+    // CHECK-LABEL: sil hidden [ossa] @$s5types1SV2SCC3bar{{.*}}
     func bar() {}
   }
 }
@@ -70,7 +70,7 @@
   case g((ReferencedFromFunctionStruct) -> ())
 }
 
-// CHECK-LABEL: sil hidden @$s5types34referencedFromFunctionStructFieldsyyAA010ReferencedcdE0Vc_yAA0gcD4EnumOctADF{{.*}} : $@convention(thin) (@guaranteed ReferencedFromFunctionStruct) -> (@owned @callee_guaranteed (@guaranteed ReferencedFromFunctionStruct) -> (), @owned @callee_guaranteed (@guaranteed ReferencedFromFunctionEnum) -> ()) {
+// CHECK-LABEL: sil hidden [ossa] @$s5types34referencedFromFunctionStructFieldsyyAA010ReferencedcdE0Vc_yAA0gcD4EnumOctADF{{.*}} : $@convention(thin) (@guaranteed ReferencedFromFunctionStruct) -> (@owned @callee_guaranteed (@guaranteed ReferencedFromFunctionStruct) -> (), @owned @callee_guaranteed (@guaranteed ReferencedFromFunctionEnum) -> ()) {
 // CHECK: bb0([[X:%.*]] : @guaranteed $ReferencedFromFunctionStruct):
 // CHECK:   [[F:%.*]] = struct_extract [[X]] : $ReferencedFromFunctionStruct, #ReferencedFromFunctionStruct.f
 // CHECK:   [[COPIED_F:%.*]] = copy_value [[F]] : $@callee_guaranteed (@guaranteed ReferencedFromFunctionStruct) -> ()
@@ -84,7 +84,7 @@
   return (x.f, x.g)
 }
 
-// CHECK-LABEL: sil hidden @$s5types32referencedFromFunctionEnumFieldsyyAA010ReferencedcdE0OcSg_yAA0gcD6StructVcSgtADF
+// CHECK-LABEL: sil hidden [ossa] @$s5types32referencedFromFunctionEnumFieldsyyAA010ReferencedcdE0OcSg_yAA0gcD6StructVcSgtADF
 // CHECK:       bb{{[0-9]+}}([[F:%.*]] : @guaranteed $@callee_guaranteed (@guaranteed ReferencedFromFunctionEnum) -> ()):
 // CHECK:       bb{{[0-9]+}}([[G:%.*]] : @guaranteed $@callee_guaranteed (@guaranteed ReferencedFromFunctionStruct) -> ()):
 func referencedFromFunctionEnumFields(_ x: ReferencedFromFunctionEnum)
@@ -100,6 +100,6 @@
   }
 }
 
-// CHECK-LABEL: sil private @$s5types1fyyF2FCL_C3zimyyF
-// CHECK-LABEL: sil private @$s5types1g1bySb_tF2FCL_C3zimyyF
-// CHECK-LABEL: sil private @$s5types1g1bySb_tF2FCL0_C3zimyyF
+// CHECK-LABEL: sil private [ossa] @$s5types1fyyF2FCL_C3zimyyF
+// CHECK-LABEL: sil private [ossa] @$s5types1g1bySb_tF2FCL_C3zimyyF
+// CHECK-LABEL: sil private [ossa] @$s5types1g1bySb_tF2FCL0_C3zimyyF
diff --git a/test/SILGen/unmanaged_ownership.swift b/test/SILGen/unmanaged_ownership.swift
index f5e8aa7..381dee4 100644
--- a/test/SILGen/unmanaged_ownership.swift
+++ b/test/SILGen/unmanaged_ownership.swift
@@ -18,7 +18,7 @@
 }
 
 _ = Holder(value: C())
-// CHECK-LABEL:sil hidden @$ss6HolderV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned C, @thin Holder.Type) -> Holder
+// CHECK-LABEL:sil hidden [ossa] @$ss6HolderV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (@owned C, @thin Holder.Type) -> Holder
 // CHECK: bb0([[T0:%.*]] : @owned $C,
 // CHECK-NEXT:   [[T1:%.*]] = ref_to_unmanaged [[T0]] : $C to $@sil_unmanaged C
 // CHECK-NEXT:   destroy_value [[T0]] : $C
@@ -29,7 +29,7 @@
   holder.value = C()
 }
 
-// CHECK-LABEL: sil hidden @$ss3set6holderys6HolderVz_tF : $@convention(thin) (@inout Holder) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$ss3set6holderys6HolderVz_tF : $@convention(thin) (@inout Holder) -> () {
 // CHECK: bb0([[ADDR:%.*]] : $*Holder):
 // CHECK:        [[T0:%.*]] = function_ref @$ss1CC{{[_0-9a-zA-Z]*}}fC
 // CHECK:        [[C:%.*]] = apply [[T0]](
@@ -44,7 +44,7 @@
 func get(holder holder: inout Holder) -> C {
   return holder.value
 }
-// CHECK-LABEL: sil hidden @$ss3get6holders1CCs6HolderVz_tF : $@convention(thin) (@inout Holder) -> @owned C {
+// CHECK-LABEL: sil hidden [ossa] @$ss3get6holders1CCs6HolderVz_tF : $@convention(thin) (@inout Holder) -> @owned C {
 // CHECK: bb0([[ADDR:%.*]] : $*Holder):
 // CHECK-NEXT:   debug_value_addr %0 : $*Holder, var, name "holder", argno 1 
 // CHECK-NEXT:   [[READ:%.*]] = begin_access [read] [unknown] [[ADDR]] : $*Holder
@@ -58,7 +58,7 @@
 func project(fn fn: () -> Holder) -> C {
   return fn().value
 }
-// CHECK-LABEL: sil hidden @$ss7project2fns1CCs6HolderVyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Holder) -> @owned C {
+// CHECK-LABEL: sil hidden [ossa] @$ss7project2fns1CCs6HolderVyXE_tF : $@convention(thin) (@noescape @callee_guaranteed () -> Holder) -> @owned C {
 // CHECK: bb0([[FN:%.*]] : $@noescape @callee_guaranteed () -> Holder):
 // CHECK-NEXT: debug_value
 // CHECK-NEXT: [[T0:%.*]] = apply [[FN]]()
diff --git a/test/SILGen/unowned.swift b/test/SILGen/unowned.swift
index c9903b2..1e73f43 100644
--- a/test/SILGen/unowned.swift
+++ b/test/SILGen/unowned.swift
@@ -11,7 +11,7 @@
   unowned var x: C
 }
 _ = A(x: C())
-// CHECK-LABEL: sil hidden @$s7unowned1AV{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil hidden [ossa] @$s7unowned1AV{{[_0-9a-zA-Z]*}}fC
 // CHECK: bb0([[X:%.*]] : @owned $C, %1 : $@thin A.Type):
 // CHECK:   [[X_UNOWNED:%.*]] = ref_to_unowned [[X]] : $C to $@sil_unowned C
 // CHECK:   [[X_UNOWNED_COPY:%.*]] = copy_value [[X_UNOWNED]]
@@ -28,7 +28,7 @@
   var p: P
 }
 _ = AddressOnly(x: C(), p: X())
-// CHECK-LABEL: sil hidden @$s7unowned11AddressOnlyV{{[_0-9a-zA-Z]*}}fC
+// CHECK-LABEL: sil hidden [ossa] @$s7unowned11AddressOnlyV{{[_0-9a-zA-Z]*}}fC
 // CHECK: bb0([[RET:%.*]] : $*AddressOnly, [[X:%.*]] : @owned $C, {{.*}}):
 // CHECK:   [[X_ADDR:%.*]] = struct_element_addr [[RET]] : $*AddressOnly, #AddressOnly.x
 // CHECK:   [[X_UNOWNED:%.*]] = ref_to_unowned [[X]] : $C to $@sil_unowned C
@@ -37,7 +37,7 @@
 // CHECK:   destroy_value [[X]]
 // CHECK: }
 
-// CHECK-LABEL:    sil hidden @$s7unowned5test01cyAA1CC_tF : $@convention(thin) (@guaranteed C) -> () {
+// CHECK-LABEL:    sil hidden [ossa] @$s7unowned5test01cyAA1CC_tF : $@convention(thin) (@guaranteed C) -> () {
 func test0(c c: C) {
   // CHECK: bb0([[ARG:%.*]] : @guaranteed $C):
 
@@ -80,7 +80,7 @@
 }
 // CHECK: } // end sil function '$s7unowned5test01cyAA1CC_tF'
 
-// CHECK-LABEL: sil hidden @{{.*}}testunowned_local
+// CHECK-LABEL: sil hidden [ossa] @{{.*}}testunowned_local
 func testunowned_local() -> C {
   // CHECK: [[C:%.*]] = apply
   let c = C()
@@ -112,7 +112,7 @@
   takeClosure { bC.f() }
 }
 
-// CHECK-LABEL: sil private @$s7unowned05test_A12_let_captureyyAA1CCFSiyXEfU_ : $@convention(thin) (@guaranteed @sil_unowned C) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s7unowned05test_A12_let_captureyyAA1CCFSiyXEfU_ : $@convention(thin) (@guaranteed @sil_unowned C) -> Int {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $@sil_unowned C):
 // CHECK-NEXT:   debug_value %0 : $@sil_unowned C, let, name "bC", argno 1
 // CHECK-NEXT:   [[UNOWNED_ARG:%.*]] = copy_unowned_value [[ARG]] : $@sil_unowned C
@@ -131,7 +131,7 @@
   }
 }
 
-// CHECK-LABEL: sil hidden @$s7unowned17TestUnownedMemberC5invalAcA1CC_tcfc :
+// CHECK-LABEL: sil hidden [ossa] @$s7unowned17TestUnownedMemberC5invalAcA1CC_tcfc :
 // CHECK: bb0([[ARG1:%.*]] : @owned $C, [[SELF_PARAM:%.*]] : @owned $TestUnownedMember):
 // CHECK:   [[SELF:%.*]] = mark_uninitialized [rootself] [[SELF_PARAM]] : $TestUnownedMember
 // CHECK:   [[BORROWED_SELF:%.*]] = begin_borrow [[SELF]]
@@ -156,7 +156,7 @@
   unowned var object: T
 }
 func takesUnownedStruct(_ z: Unowned<C>) {}
-// CHECK-LABEL: sil hidden @$s7unowned18takesUnownedStructyyAA0C0VyAA1CCGF : $@convention(thin) (@guaranteed Unowned<C>) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s7unowned18takesUnownedStructyyAA0C0VyAA1CCGF : $@convention(thin) (@guaranteed Unowned<C>) -> ()
 
 // Make sure we don't crash here
 struct UnownedGenericCapture<T : AnyObject> {
diff --git a/test/SILGen/value_ownership.swift b/test/SILGen/value_ownership.swift
index 0d059d1..b127a78 100644
--- a/test/SILGen/value_ownership.swift
+++ b/test/SILGen/value_ownership.swift
@@ -22,10 +22,10 @@
 
 // Check the conventions of the witnesses
 
-// CHECK-LABEL: sil hidden @$s15value_ownership7WitnessV6elidedyySS_S2StF : $@convention(method) (@guaranteed String, @guaranteed String, @guaranteed String, @guaranteed Witness) -> () {
-// CHECK-LABEL: sil hidden @$s15value_ownership7WitnessV8explicityySS_SShSSntF : $@convention(method) (@guaranteed String, @guaranteed String, @owned String, @owned Witness) -> () {
-// CHECK-LABEL: sil hidden @$s15value_ownership7WitnessV17elidedPropertyGetSSvg : $@convention(method) (@guaranteed Witness) -> @owned String
-// CHECK-LABEL: sil hidden @$s15value_ownership7WitnessV19explicitPropertyGetSSvg : $@convention(method) (@owned Witness) -> @owned String
+// CHECK-LABEL: sil hidden [ossa] @$s15value_ownership7WitnessV6elidedyySS_S2StF : $@convention(method) (@guaranteed String, @guaranteed String, @guaranteed String, @guaranteed Witness) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s15value_ownership7WitnessV8explicityySS_SShSSntF : $@convention(method) (@guaranteed String, @guaranteed String, @owned String, @owned Witness) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s15value_ownership7WitnessV17elidedPropertyGetSSvg : $@convention(method) (@guaranteed Witness) -> @owned String
+// CHECK-LABEL: sil hidden [ossa] @$s15value_ownership7WitnessV19explicitPropertyGetSSvg : $@convention(method) (@owned Witness) -> @owned String
 
 // Check the elided witness' thunk has the right conventions and borrows where necessary
 
@@ -55,5 +55,5 @@
 // If a protocol asks for a __consuming get it should get a +1-in +1-out
 // accessor entry point in its witness table.
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15value_ownership7WitnessVAA14OwnershipProtoA2aDP17elidedPropertyGetSSvgTW : $@convention(witness_method: OwnershipProto) (@in Witness) -> @owned String
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15value_ownership7WitnessVAA14OwnershipProtoA2aDP19explicitPropertyGetSSvgTW : $@convention(witness_method: OwnershipProto) (@in Witness) -> @owned String
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15value_ownership7WitnessVAA14OwnershipProtoA2aDP17elidedPropertyGetSSvgTW : $@convention(witness_method: OwnershipProto) (@in Witness) -> @owned String
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15value_ownership7WitnessVAA14OwnershipProtoA2aDP19explicitPropertyGetSSvgTW : $@convention(witness_method: OwnershipProto) (@in Witness) -> @owned String
diff --git a/test/SILGen/variadic-subscript-single-arg.swift b/test/SILGen/variadic-subscript-single-arg.swift
deleted file mode 100644
index 012814f..0000000
--- a/test/SILGen/variadic-subscript-single-arg.swift
+++ /dev/null
@@ -1,55 +0,0 @@
-// RUN: %target-swift-emit-silgen -verify %s
-
-struct Butt {
-  subscript(butts: Int...) -> Int {
-    return 0
-  }
-}
-
-_ = Butt()[1]
-
-struct A {
-	subscript(indices: Int...) -> Int {
-		get { return 0 }
-		set {}
-	}
-}
-
-func testSetVariadicSubscriptNone() {
-	var a = A()
-	a[] = 1
-}
-
-
-func testSetVariadicSubscriptSingle() {
-	var a = A()
-	a[1] = 1
-}
-
-func testSetVariadicSubscriptMultiple() {
-	var a = A()
-	a[1,2,3] = 1
-}
-
-struct B {
-	subscript(indices: (Int, Int)...) -> Int {
-		get { return 0 }
-		set {}
-	}
-}
-
-func testSetVariadicTupleSubscriptNone() {
-	var b = B()
-	b[] = 1
-}
-
-
-func testSetVariadicTupleSubscriptSingle() {
-	var b = B()
-	b[(1,2)] = 1
-}
-
-func testSetVariadicTupleSubscriptMultiple() {
-	var b = B()
-	b[(1,2),(2,3)] = 1
-}
diff --git a/test/SILGen/versioned_attribute.swift b/test/SILGen/versioned_attribute.swift
index 763aa8a..361877d 100644
--- a/test/SILGen/versioned_attribute.swift
+++ b/test/SILGen/versioned_attribute.swift
@@ -1,10 +1,10 @@
 // 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) () -> () {
+// CHECK-LABEL: sil [ossa] @$s19versioned_attribute25referencedFromTransparentyyF : $@convention(thin) () -> () {
 @usableFromInline func referencedFromTransparent() {}
 
-// CHECK-LABEL: sil [serialized] @$s19versioned_attribute23referencesVersionedFuncyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
+// CHECK-LABEL: sil [serialized] [ossa] @$s19versioned_attribute23referencesVersionedFuncyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
 @inlinable public func referencesVersionedFunc() -> () -> () {
   return referencedFromTransparent
 }
@@ -19,8 +19,8 @@
   deinit {}
 }
 
-// CHECK-LABEL: sil @$s19versioned_attribute5HorseCfd : $@convention(method) (@guaranteed Horse) -> @owned Builtin.NativeObject
-// CHECK-LABEL: sil @$s19versioned_attribute5HorseCfD : $@convention(method) (@owned Horse) -> ()
+// CHECK-LABEL: sil [ossa] @$s19versioned_attribute5HorseCfd : $@convention(method) (@guaranteed Horse) -> @owned Builtin.NativeObject
+// CHECK-LABEL: sil [ossa] @$s19versioned_attribute5HorseCfD : $@convention(method) (@owned Horse) -> ()
 
-// CHEKC-LABEL: sil @$s19versioned_attribute9GiftHorseCfd : $@convention(method) (@guaranteed GiftHorse) -> @owned Builtin.NativeObject
-// CHECK-LABEL: sil @$s19versioned_attribute9GiftHorseCfD : $@convention(method) (@owned GiftHorse) -> ()
+// CHEKC-LABEL: sil [ossa] @$s19versioned_attribute9GiftHorseCfd : $@convention(method) (@guaranteed GiftHorse) -> @owned Builtin.NativeObject
+// CHECK-LABEL: sil [ossa] @$s19versioned_attribute9GiftHorseCfD : $@convention(method) (@owned GiftHorse) -> ()
diff --git a/test/SILGen/vtable_thunks.swift b/test/SILGen/vtable_thunks.swift
index 7a892e0..f19228f 100644
--- a/test/SILGen/vtable_thunks.swift
+++ b/test/SILGen/vtable_thunks.swift
@@ -132,7 +132,7 @@
 // This test is incorrect in semantic SIL today. But it will be fixed in
 // forthcoming commits.
 //
-// CHECK-LABEL: sil private @$s13vtable_thunks1DC3iuo{{[_0-9a-zA-Z]*}}FTV
+// CHECK-LABEL: sil private [ossa] @$s13vtable_thunks1DC3iuo{{[_0-9a-zA-Z]*}}FTV
 // CHECK: bb0([[X:%.*]] : @guaranteed $B, [[Y:%.*]] : @guaranteed $Optional<B>, [[Z:%.*]] : @guaranteed $B, [[W:%.*]] : @guaranteed $D):
 // CHECK:   [[WRAP_X:%.*]] = enum $Optional<B>, #Optional.some!enumelt.1, [[X]] : $B
 // CHECK:   [[Y_COPY:%.*]] = copy_value [[Y]]
@@ -150,7 +150,7 @@
 // CHECK:   [[WRAP_RES:%.*]] = enum $Optional<B>, {{.*}} [[RES]]
 // CHECK:   return [[WRAP_RES]]
 
-// CHECK-LABEL: sil private @$s13vtable_thunks1DC1g{{[_0-9a-zA-Z]*}}FTV
+// CHECK-LABEL: sil private [ossa] @$s13vtable_thunks1DC1g{{[_0-9a-zA-Z]*}}FTV
 // TODO: extra copies here
 // CHECK:         [[WRAPPED_X_ADDR:%.*]] = init_enum_data_addr [[WRAP_X_ADDR:%.*]] :
 // CHECK:         copy_addr [take] {{%.*}} to [initialization] [[WRAPPED_X_ADDR]]
@@ -218,30 +218,30 @@
   override func map() -> (S?) -> () -> Noot {}
 }
 
-// CHECK-LABEL: sil private @$s13vtable_thunks3BarC3foo{{[_0-9a-zA-Z]*}}FTV : $@convention(method) (@guaranteed @callee_guaranteed (Int) -> Int, @guaranteed Bar) -> @owned Optional<@callee_guaranteed (Int) -> Int>
+// CHECK-LABEL: sil private [ossa] @$s13vtable_thunks3BarC3foo{{[_0-9a-zA-Z]*}}FTV : $@convention(method) (@guaranteed @callee_guaranteed (Int) -> Int, @guaranteed Bar) -> @owned Optional<@callee_guaranteed (Int) -> Int>
 // CHECK:         [[IMPL:%.*]] = function_ref @$s13vtable_thunks3BarC3foo{{[_0-9a-zA-Z]*}}F
 // CHECK:         apply [[IMPL]]
 
-// CHECK-LABEL: sil private @$s13vtable_thunks4NootC4flip{{[_0-9a-zA-Z]*}}FTV
+// CHECK-LABEL: sil private [ossa] @$s13vtable_thunks4NootC4flip{{[_0-9a-zA-Z]*}}FTV
 // CHECK:         [[IMPL:%.*]] = function_ref @$s13vtable_thunks4NootC4flip{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[INNER:%.*]] = apply %1(%0)
 // CHECK:         [[THUNK:%.*]] = function_ref @$s13vtable_thunks1SVIegd_ACSgIegd_TR
 // CHECK:         [[OUTER:%.*]] = partial_apply [callee_guaranteed] [[THUNK]]([[INNER]])
 // CHECK:         return [[OUTER]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s13vtable_thunks1SVIegd_ACSgIegd_TR
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s13vtable_thunks1SVIegd_ACSgIegd_TR
 // CHECK:         [[INNER:%.*]] = apply %0()
 // CHECK:         [[OUTER:%.*]] = enum $Optional<S>, #Optional.some!enumelt.1, [[INNER]] : $S
 // CHECK:         return [[OUTER]] : $Optional<S>
 
-// CHECK-LABEL: sil private @$s13vtable_thunks4NootC3map{{[_0-9a-zA-Z]*}}FTV
+// CHECK-LABEL: sil private [ossa] @$s13vtable_thunks4NootC3map{{[_0-9a-zA-Z]*}}FTV
 // CHECK:         [[IMPL:%.*]] = function_ref @$s13vtable_thunks4NootC3map{{[_0-9a-zA-Z]*}}F
 // CHECK:         [[INNER:%.*]] = apply %1(%0)
 // CHECK:         [[THUNK:%.*]] = function_ref @$s13vtable_thunks1SVSgAA4NootCIego_Iegyo_AcA3AapCSgIego_Iegyo_TR
 // CHECK:         [[OUTER:%.*]] = partial_apply [callee_guaranteed] [[THUNK]]([[INNER]])
 // CHECK:         return [[OUTER]]
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$s13vtable_thunks1SVSgAA4NootCIego_Iegyo_AcA3AapCSgIego_Iegyo_TR
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$s13vtable_thunks1SVSgAA4NootCIego_Iegyo_AcA3AapCSgIego_Iegyo_TR
 // CHECK:         [[ARG:%.*]] = enum $Optional<S>, #Optional.some!enumelt.1, %0
 // CHECK:         [[INNER:%.*]] = apply %1([[ARG]])
 // CHECK:         [[OUTER:%.*]] = convert_function [[INNER]] : $@callee_guaranteed () -> @owned Noot to $@callee_guaranteed () -> @owned Optional<Aap>
diff --git a/test/SILGen/vtable_thunks_reabstraction_final.swift b/test/SILGen/vtable_thunks_reabstraction_final.swift
index 20ef9d7..83711dd 100644
--- a/test/SILGen/vtable_thunks_reabstraction_final.swift
+++ b/test/SILGen/vtable_thunks_reabstraction_final.swift
@@ -22,7 +22,7 @@
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s33vtable_thunks_reabstraction_final13NongenericSubCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s33vtable_thunks_reabstraction_final13NongenericSubCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         class_method {{%.*}} : $NongenericSub, #NongenericSub.foo!1 {{.*}}, $@convention(method) (@in_guaranteed Int, @guaranteed NongenericSub) -> @out Optional<Int>
 
 class GenericSub<U: AnyObject>: GenericSuper<U>, Barrable {
@@ -31,12 +31,12 @@
   }
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s33vtable_thunks_reabstraction_final10GenericSubCyxGAA8BarrableA2aEP3fooy3BarQzSgAIFTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s33vtable_thunks_reabstraction_final10GenericSubCyxGAA8BarrableA2aEP3fooy3BarQzSgAIFTW
 // CHECK:         class_method {{%.*}} : $GenericSub<τ_0_0>, #GenericSub.foo!1 {{.*}}, $@convention(method) <τ_0_0 where τ_0_0 : AnyObject> (@in_guaranteed τ_0_0, @guaranteed GenericSub<τ_0_0>) -> @out Optional<τ_0_0>
 
 class C {}
 
-// CHECK-LABEL: sil hidden @$s33vtable_thunks_reabstraction_final4testyyF
+// CHECK-LABEL: sil hidden [ossa] @$s33vtable_thunks_reabstraction_final4testyyF
 func test() {
   // CHECK: class_method {{%.*}} : $NongenericSub, #NongenericSub.foo!1 {{.*}}, $@convention(method) (@in_guaranteed Int, @guaranteed NongenericSub) -> @out Optional<Int>
   NongenericSub().foo(0)
diff --git a/test/SILGen/vtables_objc.swift b/test/SILGen/vtables_objc.swift
index ea78874..1425599 100644
--- a/test/SILGen/vtables_objc.swift
+++ b/test/SILGen/vtables_objc.swift
@@ -21,7 +21,7 @@
   func incorrige() {}
 }
 
-// CHECK-LABEL: sil hidden @$s12vtables_objc10callHoozityyAA0D0CF : $@convention(thin) (@guaranteed Hoozit) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12vtables_objc10callHoozityyAA0D0CF : $@convention(thin) (@guaranteed Hoozit) -> ()
 func callHoozit(_ h: Hoozit) {
   // CHECK: objc_method {{.*}} : $Hoozit, #Hoozit.frob!1.foreign
   h.frob()
@@ -43,7 +43,7 @@
   final override func frob() {}
 }
 
-// CHECK-LABEL: sil hidden @$s12vtables_objc10callWotsityyAA0D0CF : $@convention(thin) (@guaranteed Wotsit) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s12vtables_objc10callWotsityyAA0D0CF : $@convention(thin) (@guaranteed Wotsit) -> ()
 func callWotsit(_ w: Wotsit) {
   // CHECK: objc_method {{.*}} : $Wotsit, #Wotsit.funge!1.foreign
   w.funge()
diff --git a/test/SILGen/weak.swift b/test/SILGen/weak.swift
index e3ddf51..0402bff 100644
--- a/test/SILGen/weak.swift
+++ b/test/SILGen/weak.swift
@@ -11,7 +11,7 @@
   weak var x: C?
 }
 
-// CHECK:    sil hidden @$s4weak5test01cyAA1CC_tF : $@convention(thin) (@guaranteed C) -> () {
+// CHECK:    sil hidden [ossa] @$s4weak5test01cyAA1CC_tF : $@convention(thin) (@guaranteed C) -> () {
 func test0(c c: C) {
   var c = c
 // CHECK:    bb0(%0 : @guaranteed $C):
@@ -52,7 +52,7 @@
 
 // <rdar://problem/16871284> silgen crashes on weak capture
 // CHECK: closure #1 () -> Swift.Int in weak.testClosureOverWeak() -> ()
-// CHECK-LABEL: sil private @$s4weak19testClosureOverWeakyyFSiycfU_ : $@convention(thin) (@guaranteed { var @sil_weak Optional<C> }) -> Int {
+// CHECK-LABEL: sil private [ossa] @$s4weak19testClosureOverWeakyyFSiycfU_ : $@convention(thin) (@guaranteed { var @sil_weak Optional<C> }) -> Int {
 // CHECK: bb0(%0 : @guaranteed ${ var @sil_weak Optional<C> }):
 // CHECK-NEXT:  %1 = project_box %0
 // CHECK-NEXT:  debug_value_addr %1 : $*@sil_weak Optional<C>, var, name "bC", argno 1
@@ -67,7 +67,7 @@
 class CC {
   weak var x: CC?
 
-  // CHECK-LABEL: sil hidden @$s4weak2CCC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned CC) -> @owned CC {
+  // CHECK-LABEL: sil hidden [ossa] @$s4weak2CCC{{[_0-9a-zA-Z]*}}fc : $@convention(method) (@owned CC) -> @owned CC {
   // CHECK:  bb0([[SELF:%.*]] : @owned $CC):
   // CHECK:    [[UNINIT_SELF:%.*]] = mark_uninitialized [rootself] [[SELF]] : $CC
   // CHECK:    [[FOO:%.*]] = alloc_box ${ var Optional<CC> }, var, name "foo"
diff --git a/test/SILGen/weak_multiple_modules.swift b/test/SILGen/weak_multiple_modules.swift
index 4610e4d..ae9557f 100644
--- a/test/SILGen/weak_multiple_modules.swift
+++ b/test/SILGen/weak_multiple_modules.swift
@@ -5,7 +5,7 @@
 
 import weak_other
 
-// CHECK-LABEL: sil hidden @$s21weak_multiple_modules11doSomething2uiSb0A6_other2UIC_tF : $@convention(thin) (@guaranteed UI) -> Bool
+// CHECK-LABEL: sil hidden [ossa] @$s21weak_multiple_modules11doSomething2uiSb0A6_other2UIC_tF : $@convention(thin) (@guaranteed UI) -> Bool
 func doSomething(ui: UI) -> Bool {
   // CHECK: ref_element_addr
   // CHECK-objc: load_unowned
diff --git a/test/SILGen/without_actually_escaping.swift b/test/SILGen/without_actually_escaping.swift
index 16848b1..91d7310 100644
--- a/test/SILGen/without_actually_escaping.swift
+++ b/test/SILGen/without_actually_escaping.swift
@@ -3,7 +3,7 @@
 
 var escapeHatch: Any = 0
 
-// CHECK-LABEL: sil hidden @$s25without_actually_escaping9letEscape1fyycyyXE_tF
+// CHECK-LABEL: sil hidden [ossa] @$s25without_actually_escaping9letEscape1fyycyyXE_tF
 func letEscape(f: () -> ()) -> () -> () {
   // CHECK: bb0([[ARG:%.*]] : $@noescape @callee_guaranteed () -> ()):
   // CHECK: [[THUNK:%.*]] = function_ref @$sIg_Ieg_TR : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
@@ -20,9 +20,9 @@
 
 // thunk for @callee_guaranteed () -> ()
 // The thunk must be [without_actually_escaping].
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @$sIg_Ieg_TR : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @$sIg_Ieg_TR : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> () {
 
-// CHECK-LABEL: sil hidden @$s25without_actually_escaping14letEscapeThrow1fyycyycyKXE_tKF
+// CHECK-LABEL: sil hidden [ossa] @$s25without_actually_escaping14letEscapeThrow1fyycyycyKXE_tKF
 // CHECK: bb0([[ARG:%.*]] : $@noescape @callee_guaranteed () -> (@owned @callee_guaranteed () -> (), @error Error)):
 // CHECK: [[CVT:%.*]] = function_ref @$sIeg_s5Error_pIgozo_Ieg_sAA_pIegozo_TR
 // CHECK: [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[CVT]]([[ARG]])
@@ -50,7 +50,7 @@
 
 // thunk for @callee_guaranteed () -> (@owned @escaping @callee_guaranteed () -> (), @error @owned Error)
 // The thunk must be [without_actually_escaping].
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @$sIeg_s5Error_pIgozo_Ieg_sAA_pIegozo_TR : $@convention(thin) (@noescape @callee_guaranteed () -> (@owned @callee_guaranteed () -> (), @error Error)) -> (@owned @callee_guaranteed () -> (), @error Error) {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @$sIeg_s5Error_pIgozo_Ieg_sAA_pIegozo_TR : $@convention(thin) (@noescape @callee_guaranteed () -> (@owned @callee_guaranteed () -> (), @error Error)) -> (@owned @callee_guaranteed () -> (), @error Error) {
 
 // We used to crash on this example because we would use the wrong substitution
 // map.
diff --git a/test/SILGen/witness-init-requirement-with-base-class-init.swift b/test/SILGen/witness-init-requirement-with-base-class-init.swift
index 0e3990b..19e98a3 100644
--- a/test/SILGen/witness-init-requirement-with-base-class-init.swift
+++ b/test/SILGen/witness-init-requirement-with-base-class-init.swift
@@ -14,10 +14,10 @@
 }
 
 class Dog: Animal, BestFriend {}
-// CHECK-LABEL: sil private [transparent] [thunk] @$s4main3DogCAA10BestFriendA2aDPxycfCTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s4main3DogCAA10BestFriendA2aDPxycfCTW
 // CHECK:         [[SELF:%.*]] = apply
 // CHECK:         unchecked_ref_cast [[SELF]] : $Animal to $Dog
-// CHECK-LABEL: sil private [transparent] [thunk] @$s4main3DogCAA10BestFriendA2aDP6createxyFZTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s4main3DogCAA10BestFriendA2aDP6createxyFZTW
 // CHECK:         [[SELF:%.*]] = apply
 // CHECK:         unchecked_ref_cast [[SELF]] : $Animal to $Dog
 
@@ -35,14 +35,14 @@
 
 final class Derived : Base, Initable {}
 
-// CHECK-LABEL: sil hidden @$s4main4BaseC1xACSi_tcfC : $@convention(method) (Int, @thick Base.Type) -> @owned Base
+// CHECK-LABEL: sil hidden [ossa] @$s4main4BaseC1xACSi_tcfC : $@convention(method) (Int, @thick Base.Type) -> @owned Base
 // CHECK:         [[METHOD:%.*]] = class_method [[SELF_META:%.*]] : $@thick Base.Type, #Base.init!allocator.1
 // CHECK-NEXT:    [[RESULT:%.*]] = apply [[METHOD]]([[SELF_META]])
 // CHECK-NEXT:    assign [[RESULT]] to [[BOX:%.*]] :
 // CHECK-NEXT:    [[FINAL:%.*]] = load [copy] [[BOX]]
 // CHECK:         return [[FINAL]]
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s4main7DerivedCAA8InitableA2aDP1xxSi_tcfCTW : $@convention(witness_method: Initable) (Int, @thick Derived.Type) -> @out Derived
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s4main7DerivedCAA8InitableA2aDP1xxSi_tcfCTW : $@convention(witness_method: Initable) (Int, @thick Derived.Type) -> @out Derived
 // CHECK:         [[SELF:%.*]] = upcast %2 : $@thick Derived.Type to $@thick Base.Type
 // CHECK:         [[METHOD:%.*]] = function_ref @$s4main4BaseC1xACSi_tcfC
 // CHECK-NEXT:    [[RESULT:%.*]] = apply [[METHOD]](%1, [[SELF]])
diff --git a/test/SILGen/witness_accessibility.swift b/test/SILGen/witness_accessibility.swift
index fc9d1c7..adb5629 100644
--- a/test/SILGen/witness_accessibility.swift
+++ b/test/SILGen/witness_accessibility.swift
@@ -20,12 +20,12 @@
 
 public struct S : R {}
 
-// CHECK-LABEL: sil private @$s21witness_accessibility1R{{.*}}E17publicRequirementyyF
-// CHECK-LABEL: sil private @$s21witness_accessibility1R{{.*}}E19internalRequirementyyF
-// CHECK-LABEL: sil private @$s21witness_accessibility1R{{.*}}AE18privateRequirementyyF
+// CHECK-LABEL: sil private [ossa] @$s21witness_accessibility1R{{.*}}E17publicRequirementyyF
+// CHECK-LABEL: sil private [ossa] @$s21witness_accessibility1R{{.*}}E19internalRequirementyyF
+// CHECK-LABEL: sil private [ossa] @$s21witness_accessibility1R{{.*}}AE18privateRequirementyyF
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s21witness_accessibility1SVAA1R{{.*}}dELLP18privateRequirementyyFTW
-// CHECK-LABEL: sil private [transparent] [thunk] @$s21witness_accessibility1SVAA1QA2aDP19internalRequirementyyFTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21witness_accessibility1SVAA1R{{.*}}dELLP18privateRequirementyyFTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21witness_accessibility1SVAA1QA2aDP19internalRequirementyyFTW
 
 // FIXME: This is public because of an explicit workaround for
 // the default implementation of publicRequirement() having the
@@ -39,4 +39,4 @@
 // the use of the 'public' keyword inside an extension of 'R'
 // should generate a warning, since it has no effect.
 
-// CHECK-LABEL: sil [transparent] [thunk] @$s21witness_accessibility1SVAA1PA2aDP17publicRequirementyyFTW
+// CHECK-LABEL: sil [transparent] [thunk] [ossa] @$s21witness_accessibility1SVAA1PA2aDP17publicRequirementyyFTW
diff --git a/test/SILGen/witness_accessibility_multi.swift b/test/SILGen/witness_accessibility_multi.swift
index fdc2cf9..8f0c8be 100644
--- a/test/SILGen/witness_accessibility_multi.swift
+++ b/test/SILGen/witness_accessibility_multi.swift
@@ -12,7 +12,7 @@
 // So make sure the witness is invoked via virtual dispatch even with
 // a concrete base type.
 
-// CHECK-LABEL: sil @$s27witness_accessibility_multi22callsPublicRequirement1sy0a1_B6_other1SV_tF : $@convention(thin) (S) -> ()
+// CHECK-LABEL: sil [ossa] @$s27witness_accessibility_multi22callsPublicRequirement1sy0a1_B6_other1SV_tF : $@convention(thin) (S) -> ()
 public func callsPublicRequirement(s: S) {
 
   // CHECK: witness_method $S, #P.publicRequirement!1 : <Self where Self : P> (Self) -> () -> () : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> ()
diff --git a/test/SILGen/witness_same_type.swift b/test/SILGen/witness_same_type.swift
index 333577a..7f6dae5 100644
--- a/test/SILGen/witness_same_type.swift
+++ b/test/SILGen/witness_same_type.swift
@@ -12,7 +12,7 @@
 
 // Ensure that the protocol witness for requirements with same-type constraints
 // is set correctly. <rdar://problem/16369105>
-// CHECK-LABEL: sil private [transparent] [thunk] @$s17witness_same_type3FooVAA7FooableA2aDP3foo1x3BarQzqd___tAaDRd__AHQyd__AIRSlFTW : $@convention(witness_method: Fooable) <τ_0_0 where τ_0_0 : Fooable, τ_0_0.Bar == X> (@in_guaranteed τ_0_0, @in_guaranteed Foo) -> @out X
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s17witness_same_type3FooVAA7FooableA2aDP3foo1x3BarQzqd___tAaDRd__AHQyd__AIRSlFTW : $@convention(witness_method: Fooable) <τ_0_0 where τ_0_0 : Fooable, τ_0_0.Bar == X> (@in_guaranteed τ_0_0, @in_guaranteed Foo) -> @out X
 struct Foo: Fooable {
   typealias Bar = X
 
@@ -20,7 +20,7 @@
 }
 
 // rdar://problem/19049566
-// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] @$s17witness_same_type14LazySequenceOfVyxq_GSTAAST12makeIterator0H0QzyFTW : $@convention(witness_method: Sequence) <τ_0_0, τ_0_1 where τ_0_0 : Sequence, τ_0_1 == τ_0_0.Element> (@in LazySequenceOf<τ_0_0, τ_0_1>) -> @out AnyIterator<τ_0_1>
+// CHECK-LABEL: sil shared [transparent] [serialized] [thunk] [ossa] @$s17witness_same_type14LazySequenceOfVyxq_GSTAAST12makeIterator0H0QzyFTW : $@convention(witness_method: Sequence) <τ_0_0, τ_0_1 where τ_0_0 : Sequence, τ_0_1 == τ_0_0.Element> (@in LazySequenceOf<τ_0_0, τ_0_1>) -> @out AnyIterator<τ_0_1>
 public struct LazySequenceOf<SS : Sequence, A> : Sequence where SS.Iterator.Element == A {
   public func makeIterator() -> AnyIterator<A> { 
     var opt: AnyIterator<A>?
diff --git a/test/SILGen/witness_single_tuple.swift b/test/SILGen/witness_single_tuple.swift
index 2d59c02..7d9caf3 100644
--- a/test/SILGen/witness_single_tuple.swift
+++ b/test/SILGen/witness_single_tuple.swift
@@ -4,7 +4,7 @@
   func runce(x: Int)
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s20witness_single_tuple3FooVAA8RuncibleA2aDP5runce{{[_0-9a-zA-Z]*}}FTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s20witness_single_tuple3FooVAA8RuncibleA2aDP5runce{{[_0-9a-zA-Z]*}}FTW
 struct Foo: Runcible {
   func runce(x: Int = 0) {}
 }
diff --git a/test/SILGen/witness_table_overrides.swift b/test/SILGen/witness_table_overrides.swift
index a082ddc..54f4ab4 100644
--- a/test/SILGen/witness_table_overrides.swift
+++ b/test/SILGen/witness_table_overrides.swift
@@ -18,7 +18,7 @@
   override func foo()
 }
 
-// CHECK-LABEL: sil hidden @$s23witness_table_overrides7callFoo1tyx_tAA2P3RzlF
+// CHECK-LABEL: sil hidden [ossa] @$s23witness_table_overrides7callFoo1tyx_tAA2P3RzlF
 func callFoo<T: P3>(t: T) {
   // CHECK: witness_method $T, #P0.foo!1 : <Self where Self : P0> (Self) -> () -> ()
   t.foo()
diff --git a/test/SILGen/witness_tables.swift b/test/SILGen/witness_tables.swift
index fdee231..cf84a5d 100644
--- a/test/SILGen/witness_tables.swift
+++ b/test/SILGen/witness_tables.swift
@@ -65,8 +65,8 @@
 // TABLE-TESTABLE-LABEL: sil_witness_table [serialized] ConformingAssoc: AssocReqt module witness_tables {
 // TABLE-ALL-NEXT:    method #AssocReqt.requiredMethod!1: {{.*}} : @$s14witness_tables15ConformingAssocVAA0D4ReqtA2aDP14requiredMethod{{[_0-9a-zA-Z]*}}FTW
 // TABLE-ALL-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingAssocVAA0D4ReqtA2aDP14requiredMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AssocReqt) (@in_guaranteed ConformingAssoc) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables15ConformingAssocVAA0D4ReqtA2aDP14requiredMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AssocReqt) (@in_guaranteed ConformingAssoc) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingAssocVAA0D4ReqtA2aDP14requiredMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AssocReqt) (@in_guaranteed ConformingAssoc) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables15ConformingAssocVAA0D4ReqtA2aDP14requiredMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AssocReqt) (@in_guaranteed ConformingAssoc) -> ()
 
 struct ConformingStruct : AnyProtocol {
   typealias AssocType = SomeAssoc
@@ -90,16 +90,16 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW {{.*}}: ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingStruct) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
-// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW {{.*}}: ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingStruct) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
+// SYMBOL-TESTABLE:      sil shared [transparent] [serialized] [thunk] [ossa] @$s14witness_tables16ConformingStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> ()
 
 protocol AddressOnly {}
 
@@ -127,11 +127,11 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingAddressOnlyStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingAddressOnlyStruct, @thick ConformingAddressOnlyStruct.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct, @thick ConformingAddressOnlyStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingAddressOnlyStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingAddressOnlyStruct, @thick ConformingAddressOnlyStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables27ConformingAddressOnlyStructVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingAddressOnlyStruct, @in_guaranteed ConformingAddressOnlyStruct, @thick ConformingAddressOnlyStruct.Type) -> ()
 
 class ConformingClass : AnyProtocol {
   typealias AssocType = SomeAssoc
@@ -155,11 +155,11 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingClass, @in_guaranteed ConformingClass) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingClass, @in_guaranteed ConformingClass) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingClass) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingClass, @thick ConformingClass.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingClass, @in_guaranteed ConformingClass, @thick ConformingClass.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformingClass, @in_guaranteed ConformingClass) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformingClass, @in_guaranteed ConformingClass) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformingClass) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingClass, @thick ConformingClass.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables15ConformingClassCAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformingClass, @in_guaranteed ConformingClass, @thick ConformingClass.Type) -> ()
 
 struct ConformsByExtension {}
 extension ConformsByExtension : AnyProtocol {
@@ -184,11 +184,11 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformsByExtension) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsByExtension, @thick ConformsByExtension.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension, @thick ConformsByExtension.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformsByExtension) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsByExtension, @thick ConformsByExtension.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables19ConformsByExtensionVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsByExtension, @in_guaranteed ConformsByExtension, @thick ConformsByExtension.Type) -> ()
 
 extension OtherModuleStruct : AnyProtocol {
   typealias AssocType = SomeAssoc
@@ -212,11 +212,11 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed OtherModuleStruct) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed OtherModuleStruct, @thick OtherModuleStruct.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct, @thick OtherModuleStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed OtherModuleStruct) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed OtherModuleStruct, @thick OtherModuleStruct.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s16witness_tables_b17OtherModuleStructV0a1_B011AnyProtocolA2dEP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed OtherModuleStruct, @in_guaranteed OtherModuleStruct, @thick OtherModuleStruct.Type) -> ()
 
 protocol OtherProtocol {}
 
@@ -242,11 +242,11 @@
 // TABLE-NEXT:    method #AnyProtocol.staticMethod!1: {{.*}} : @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #AnyProtocol."<~>"!1: {{.*}} : @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsWithMoreGenericWitnesses, @thick ConformsWithMoreGenericWitnesses.Type) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses, @thick ConformsWithMoreGenericWitnesses.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @in_guaranteed ConformsWithMoreGenericWitnesses) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsWithMoreGenericWitnesses, @thick ConformsWithMoreGenericWitnesses.Type) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables32ConformsWithMoreGenericWitnessesVAA11AnyProtocolA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: AnyProtocol) (@in_guaranteed ConformsWithMoreGenericWitnesses, @in_guaranteed ConformsWithMoreGenericWitnesses, @thick ConformsWithMoreGenericWitnesses.Type) -> ()
 
 class ConformingClassToClassProtocol : ClassProtocol {
   typealias AssocType = SomeAssoc
@@ -271,11 +271,11 @@
 // TABLE-NEXT:    method #ClassProtocol.staticMethod!1: {{.*}} : @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:    method #ClassProtocol."<~>"!1: {{.*}} : @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW
 // TABLE-NEXT:  }
-// SYMBOL:  sil private [transparent] [thunk] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) (Arg, @guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol) -> ()
-// SYMBOL:  sil private [transparent] [thunk] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol) -> ()
-// SYMBOL:  sil private [transparent] [thunk] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @guaranteed ConformingClassToClassProtocol) -> ()
-// SYMBOL:  sil private [transparent] [thunk] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: ClassProtocol) (@guaranteed ConformingClassToClassProtocol, @thick ConformingClassToClassProtocol.Type) -> ()
-// SYMBOL:  sil private [transparent] [thunk] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: ClassProtocol) (@guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol, @thick ConformingClassToClassProtocol.Type) -> ()
+// SYMBOL:  sil private [transparent] [thunk] [ossa] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) (Arg, @guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol) -> ()
+// SYMBOL:  sil private [transparent] [thunk] [ossa] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) <τ_0_0 where τ_0_0 : ArchetypeReqt> (@in_guaranteed τ_0_0, @guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol) -> ()
+// SYMBOL:  sil private [transparent] [thunk] [ossa] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP16assocTypesMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassProtocol) (@in_guaranteed SomeAssoc, @in_guaranteed ConformingAssoc, @guaranteed ConformingClassToClassProtocol) -> ()
+// SYMBOL:  sil private [transparent] [thunk] [ossa] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP12staticMethod{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: ClassProtocol) (@guaranteed ConformingClassToClassProtocol, @thick ConformingClassToClassProtocol.Type) -> ()
+// SYMBOL:  sil private [transparent] [thunk] [ossa] @$s14witness_tables017ConformingClassToD8ProtocolCAA0dF0A2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: ClassProtocol) (@guaranteed ConformingClassToClassProtocol, @guaranteed ConformingClassToClassProtocol, @thick ConformingClassToClassProtocol.Type) -> ()
 
 class ConformingClassToObjCProtocol : ObjCProtocol {
   @objc func method(x: ObjCClass) {}
@@ -468,8 +468,8 @@
 //    AnyProtocol has no class bound, so its witnesses treat Self as opaque.
 //    InheritedClassProtocol has a class bound, so its witnesses treat Self as
 //    a reference value.
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables25ClassInheritedConformanceCAA0dC8ProtocolA2aDP15inheritedMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: InheritedClassProtocol) (@guaranteed ClassInheritedConformance) -> ()
-// SYMBOL:      sil private [transparent] [thunk] @$s14witness_tables25ClassInheritedConformanceCAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ClassInheritedConformance, @in_guaranteed ClassInheritedConformance) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables25ClassInheritedConformanceCAA0dC8ProtocolA2aDP15inheritedMethod{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: InheritedClassProtocol) (@guaranteed ClassInheritedConformance) -> ()
+// SYMBOL:      sil private [transparent] [thunk] [ossa] @$s14witness_tables25ClassInheritedConformanceCAA11AnyProtocolA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: AnyProtocol) (Arg, @in_guaranteed ClassInheritedConformance, @in_guaranteed ClassInheritedConformance) -> ()
 
 struct GenericAssocType<T> : AssocReqt {
   func requiredMethod() {}
@@ -526,7 +526,7 @@
 // TABLE-LABEL: sil_witness_table hidden HasInitializerStruct: Initializer module witness_tables {
 // TABLE-NEXT:  method #Initializer.init!allocator.1: {{.*}} : @$s14witness_tables20HasInitializerStructVAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW
 // TABLE-NEXT: }
-// SYMBOL: sil private [transparent] [thunk] @$s14witness_tables20HasInitializerStructVAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerStruct.Type) -> @out HasInitializerStruct
+// SYMBOL: sil private [transparent] [thunk] [ossa] @$s14witness_tables20HasInitializerStructVAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerStruct.Type) -> @out HasInitializerStruct
 struct HasInitializerStruct : Initializer { 
   init(arg: Arg) { }
 }
@@ -534,7 +534,7 @@
 // TABLE-LABEL: sil_witness_table hidden HasInitializerClass: Initializer module witness_tables {
 // TABLE-NEXT:  method #Initializer.init!allocator.1: {{.*}} : @$s14witness_tables19HasInitializerClassCAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW
 // TABLE-NEXT: }
-// SYMBOL: sil private [transparent] [thunk] @$s14witness_tables19HasInitializerClassCAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerClass.Type) -> @out HasInitializerClass
+// SYMBOL: sil private [transparent] [thunk] [ossa] @$s14witness_tables19HasInitializerClassCAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerClass.Type) -> @out HasInitializerClass
 class HasInitializerClass : Initializer {
   required init(arg: Arg) { }
 }
@@ -542,7 +542,7 @@
 // TABLE-LABEL: sil_witness_table hidden HasInitializerEnum: Initializer module witness_tables {
 // TABLE-NEXT:  method #Initializer.init!allocator.1: {{.*}} : @$s14witness_tables18HasInitializerEnumOAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW
 // TABLE-NEXT: }
-// SYMBOL: sil private [transparent] [thunk] @$s14witness_tables18HasInitializerEnumOAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerEnum.Type) -> @out HasInitializerEnum
+// SYMBOL: sil private [transparent] [thunk] [ossa] @$s14witness_tables18HasInitializerEnumOAA0D0A2aDP{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: Initializer) (Arg, @thick HasInitializerEnum.Type) -> @out HasInitializerEnum
 enum HasInitializerEnum : Initializer {
   case A
 
diff --git a/test/SILGen/witness_tables_serialized.swift b/test/SILGen/witness_tables_serialized.swift
index d4d4a40..4fd419b 100644
--- a/test/SILGen/witness_tables_serialized.swift
+++ b/test/SILGen/witness_tables_serialized.swift
@@ -16,15 +16,17 @@
 @usableFromInline
 internal struct InternalStruct : PublicProtocol, InternalProtocol {}
 
-// CHECK: sil_witness_table [serialized] PublicStruct: PublicProtocol
-// CHECK: sil_witness_table [serialized] PublicStruct: InternalProtocol
+// CHECK-DAG: sil_witness_table [serialized] PublicStruct: PublicProtocol
+// CHECK-DAG: sil_witness_table [serialized] PublicStruct: InternalProtocol
 
-// CHECK-NONRESILIENT: sil_witness_table [serialized] PublicResilientStruct: PublicProtocol
-// CHECK-NONRESILIENT: sil_witness_table [serialized] PublicResilientStruct: InternalProtocol
-// CHECK-RESILIENT: sil_witness_table PublicResilientStruct: PublicProtocol
-// CHECK-RESILIENT: sil_witness_table PublicResilientStruct: InternalProtocol
+// CHECK-RESILIENT-DAG: sil_witness_table InternalStruct: InternalProtocol
+// CHECK-RESILIENT-DAG: sil_witness_table InternalStruct: PublicProtocol
 
-// CHECK-NONRESILIENT: sil_witness_table [serialized] InternalStruct: PublicProtocol
-// CHECK-NONRESILIENT: sil_witness_table [serialized] InternalStruct: InternalProtocol
-// CHECK-RESILIENT: sil_witness_table InternalStruct: PublicProtocol
-// CHECK-RESILIENT: sil_witness_table InternalStruct: InternalProtocol
+// CHECK-RESILIENT-DAG: sil_witness_table PublicResilientStruct: PublicProtocol
+// CHECK-RESILIENT-DAG: sil_witness_table PublicResilientStruct: InternalProtocol
+
+// CHECK-NONRESILIENT-DAG: sil_witness_table [serialized] InternalStruct: InternalProtocol
+// CHECK-NONRESILIENT-DAG: sil_witness_table [serialized] InternalStruct: PublicProtocol
+
+// CHECK-NONRESILIENT-DAG: sil_witness_table [serialized] PublicResilientStruct: PublicProtocol
+// CHECK-NONRESILIENT-DAG: sil_witness_table [serialized] PublicResilientStruct: InternalProtocol
diff --git a/test/SILGen/witnesses.swift b/test/SILGen/witnesses.swift
index f15a5ab..621a8f2 100644
--- a/test/SILGen/witnesses.swift
+++ b/test/SILGen/witnesses.swift
@@ -8,7 +8,7 @@
   var y = y
   return x.selfTypes(x: y)
 }
-// CHECK-LABEL: sil hidden @$s9witnesses16archetype_method{{[_0-9a-zA-Z]*}}F{{.*}} : $@convention(thin) <T where T : X> (@in_guaranteed T, @in_guaranteed T) -> @out T {
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses16archetype_method{{[_0-9a-zA-Z]*}}F{{.*}} : $@convention(thin) <T where T : X> (@in_guaranteed T, @in_guaranteed T) -> @out T {
 // CHECK:         [[METHOD:%.*]] = witness_method $T, #X.selfTypes!1 : {{.*}} : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : X> (@in_guaranteed τ_0_0, @inout τ_0_0) -> @out τ_0_0
 // CHECK:         apply [[METHOD]]<T>({{%.*}}, {{%.*}}, {{%.*}}) : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : X> (@in_guaranteed τ_0_0, @inout τ_0_0) -> @out τ_0_0
 // CHECK:       }
@@ -17,12 +17,12 @@
   var x = x
   return x.generic(x: y)
 }
-// CHECK-LABEL: sil hidden @$s9witnesses24archetype_generic_method{{[_0-9a-zA-Z]*}}F{{.*}} : $@convention(thin) <T where T : X> (@in_guaranteed T, Loadable) -> Loadable {
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses24archetype_generic_method{{[_0-9a-zA-Z]*}}F{{.*}} : $@convention(thin) <T where T : X> (@in_guaranteed T, Loadable) -> Loadable {
 // CHECK:         [[METHOD:%.*]] = witness_method $T, #X.generic!1 : {{.*}} : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : X><τ_1_0> (@in_guaranteed τ_1_0, @inout τ_0_0) -> @out τ_1_0
 // CHECK:         apply [[METHOD]]<T, Loadable>({{%.*}}, {{%.*}}, {{%.*}}) : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : X><τ_1_0> (@in_guaranteed τ_1_0, @inout τ_0_0) -> @out τ_1_0
 // CHECK:       }
 
-// CHECK-LABEL: sil hidden @$s9witnesses32archetype_associated_type_method{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : WithAssoc> (@in_guaranteed T, @in_guaranteed T.AssocType) -> @out T
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses32archetype_associated_type_method{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : WithAssoc> (@in_guaranteed T, @in_guaranteed T.AssocType) -> @out T
 // CHECK:         apply %{{[0-9]+}}<T>
 func archetype_associated_type_method<T: WithAssoc>(x: T, y: T.AssocType) -> T {
   return x.useAssocType(x: y)
@@ -30,7 +30,7 @@
 
 protocol StaticMethod { static func staticMethod() }
 
-// CHECK-LABEL: sil hidden @$s9witnesses23archetype_static_method{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : StaticMethod> (@in_guaranteed T) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses23archetype_static_method{{[_0-9a-zA-Z]*}}F : $@convention(thin) <T where T : StaticMethod> (@in_guaranteed T) -> ()
 func archetype_static_method<T: StaticMethod>(x: T) {
   // CHECK: [[METHOD:%.*]] = witness_method $T, #StaticMethod.staticMethod!1 : {{.*}} : $@convention(witness_method: StaticMethod) <τ_0_0 where τ_0_0 : StaticMethod> (@thick τ_0_0.Type) -> ()
   // CHECK: apply [[METHOD]]<T>
@@ -45,7 +45,7 @@
 func protocol_method(x: Existentiable) -> Loadable {
   return x.foo()
 }
-// CHECK-LABEL: sil hidden @$s9witnesses15protocol_method1xAA8LoadableVAA13Existentiable_p_tF : $@convention(thin) (@in_guaranteed Existentiable) -> Loadable {
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses15protocol_method1xAA8LoadableVAA13Existentiable_p_tF : $@convention(thin) (@in_guaranteed Existentiable) -> Loadable {
 // CHECK:         [[METHOD:%.*]] = witness_method $[[OPENED:@opened(.*) Existentiable]], #Existentiable.foo!1
 // CHECK:         apply [[METHOD]]<[[OPENED]]>({{%.*}})
 // CHECK:       }
@@ -53,7 +53,7 @@
 func protocol_generic_method(x: Existentiable) -> Loadable {
   return x.generic()
 }
-// CHECK-LABEL: sil hidden @$s9witnesses23protocol_generic_method1xAA8LoadableVAA13Existentiable_p_tF : $@convention(thin) (@in_guaranteed Existentiable) -> Loadable {
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses23protocol_generic_method1xAA8LoadableVAA13Existentiable_p_tF : $@convention(thin) (@in_guaranteed Existentiable) -> Loadable {
 // CHECK:         [[METHOD:%.*]] = witness_method $[[OPENED:@opened(.*) Existentiable]], #Existentiable.generic!1
 // CHECK:         apply [[METHOD]]<[[OPENED]], Loadable>({{%.*}}, {{%.*}})
 // CHECK:       }
@@ -62,7 +62,7 @@
   func foo()
 }
 
-// CHECK-LABEL: sil hidden @$s9witnesses20protocol_objc_method1xyAA8ObjCAble_p_tF : $@convention(thin) (@guaranteed ObjCAble) -> ()
+// CHECK-LABEL: sil hidden [ossa] @$s9witnesses20protocol_objc_method1xyAA8ObjCAble_p_tF : $@convention(thin) (@guaranteed ObjCAble) -> ()
 // CHECK:         objc_method {{%.*}} : $@opened({{.*}}) ObjCAble, #ObjCAble.foo!1.foreign
 func protocol_objc_method(x: ObjCAble) {
   x.foo()
@@ -99,7 +99,7 @@
 struct ConformingStruct : X {
   mutating
   func selfTypes(x: ConformingStruct) -> ConformingStruct { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingStruct, @inout ConformingStruct) -> @out ConformingStruct {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingStruct, @inout ConformingStruct) -> @out ConformingStruct {
   // CHECK:       bb0(%0 : $*ConformingStruct, %1 : $*ConformingStruct, %2 : $*ConformingStruct):
   // CHECK-NEXT:    %3 = load [trivial] %1 : $*ConformingStruct
   // CHECK-NEXT:    // function_ref
@@ -112,7 +112,7 @@
   
   mutating
   func loadable(x: Loadable) -> Loadable { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP8loadable{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (Loadable, @inout ConformingStruct) -> Loadable {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP8loadable{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (Loadable, @inout ConformingStruct) -> Loadable {
   // CHECK:       bb0(%0 : $Loadable, %1 : $*ConformingStruct):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %2 = function_ref @$s9witnesses16ConformingStructV8loadable{{[_0-9a-zA-Z]*}}F : $@convention(method) (Loadable, @inout ConformingStruct) -> Loadable
@@ -122,7 +122,7 @@
   
   mutating
   func addrOnly(x: AddrOnly) -> AddrOnly { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP8addrOnly{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed AddrOnly, @inout ConformingStruct) -> @out AddrOnly {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP8addrOnly{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed AddrOnly, @inout ConformingStruct) -> @out AddrOnly {
   // CHECK:       bb0(%0 : $*AddrOnly, %1 : $*AddrOnly, %2 : $*ConformingStruct):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %3 = function_ref @$s9witnesses16ConformingStructV8addrOnly{{[_0-9a-zA-Z]*}}F : $@convention(method) (@in_guaranteed AddrOnly, @inout ConformingStruct) -> @out AddrOnly
@@ -133,7 +133,7 @@
   
   mutating
   func generic<C>(x: C) -> C { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformingStruct) -> @out τ_0_0 {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformingStruct) -> @out τ_0_0 {
   // CHECK:       bb0(%0 : $*τ_0_0, %1 : $*τ_0_0, %2 : $*ConformingStruct):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %3 = function_ref @$s9witnesses16ConformingStructV7generic{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformingStruct) -> @out τ_0_0
@@ -143,7 +143,7 @@
   // CHECK-NEXT:  }
   mutating
   func classes<C2: Classes>(x: C2) -> C2 { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP7classes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : Classes> (@guaranteed τ_0_0, @inout ConformingStruct) -> @owned τ_0_0 {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP7classes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : Classes> (@guaranteed τ_0_0, @inout ConformingStruct) -> @owned τ_0_0 {
   // CHECK:       bb0(%0 : @guaranteed $τ_0_0, %1 : $*ConformingStruct):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %2 = function_ref @$s9witnesses16ConformingStructV7classes{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0 where τ_0_0 : Classes> (@guaranteed τ_0_0, @inout ConformingStruct) -> @owned τ_0_0
@@ -152,7 +152,7 @@
   // CHECK-NEXT:  }
 }
 func <~>(_ x: ConformingStruct, y: ConformingStruct) -> ConformingStruct { return x }
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16ConformingStructVAA1XA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: X) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> @out ConformingStruct {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16ConformingStructVAA1XA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: X) (@in_guaranteed ConformingStruct, @in_guaranteed ConformingStruct, @thick ConformingStruct.Type) -> @out ConformingStruct {
 // CHECK:       bb0([[ARG1:%.*]] : $*ConformingStruct, [[ARG2:%.*]] : $*ConformingStruct, [[ARG3:%.*]] : $*ConformingStruct, [[ARG4:%.*]] : $@thick ConformingStruct.Type):
 // CHECK-NEXT:    [[LOADED_ARG2:%.*]] = load [trivial] [[ARG2]] : $*ConformingStruct
 // CHECK-NEXT:    [[LOADED_ARG3:%.*]] = load [trivial] [[ARG3]] : $*ConformingStruct
@@ -166,7 +166,7 @@
 
 final class ConformingClass : X {
   func selfTypes(x: ConformingClass) -> ConformingClass { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses15ConformingClassCAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingClass, @inout ConformingClass) -> @out ConformingClass {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses15ConformingClassCAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingClass, @inout ConformingClass) -> @out ConformingClass {
   // CHECK:  bb0([[ARG1:%.*]] : $*ConformingClass, [[ARG2:%.*]] : $*ConformingClass, [[ARG3:%.*]] : $*ConformingClass):
   // -- load and copy_value 'self' from inout witness 'self' parameter
   // CHECK:    [[ARG2_LOADED:%.*]] = load_borrow [[ARG2]] : $*ConformingClass
@@ -184,7 +184,7 @@
 func <~>(_ x: ConformingClass, y: ConformingClass) -> ConformingClass { return x }
 
 extension ConformingClass : ClassBounded { }
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses15ConformingClassCAA0C7BoundedA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassBounded) (@guaranteed ConformingClass, @guaranteed ConformingClass) -> @owned ConformingClass {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses15ConformingClassCAA0C7BoundedA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: ClassBounded) (@guaranteed ConformingClass, @guaranteed ConformingClass) -> @owned ConformingClass {
 // CHECK:  bb0([[C0:%.*]] : @guaranteed $ConformingClass, [[C1:%.*]] : @guaranteed $ConformingClass):
 // CHECK-NEXT:    function_ref
 // CHECK-NEXT:    [[FUN:%.*]] = function_ref @$s9witnesses15ConformingClassC9selfTypes{{[_0-9a-zA-Z]*}}F
@@ -197,7 +197,7 @@
 
   mutating
   func selfTypes(x: ConformingAOStruct) -> ConformingAOStruct { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses18ConformingAOStructVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingAOStruct, @inout ConformingAOStruct) -> @out ConformingAOStruct {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses18ConformingAOStructVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformingAOStruct, @inout ConformingAOStruct) -> @out ConformingAOStruct {
   // CHECK:       bb0(%0 : $*ConformingAOStruct, %1 : $*ConformingAOStruct, %2 : $*ConformingAOStruct):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %3 = function_ref @$s9witnesses18ConformingAOStructV9selfTypes{{[_0-9a-zA-Z]*}}F : $@convention(method) (@in_guaranteed ConformingAOStruct, @inout ConformingAOStruct) -> @out ConformingAOStruct
@@ -215,7 +215,7 @@
 struct ConformsWithMoreGeneric : X, Y {
   mutating
   func selfTypes<E>(x: E) -> E { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformsWithMoreGeneric, @inout ConformsWithMoreGeneric) -> @out ConformsWithMoreGeneric {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP9selfTypes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed ConformsWithMoreGeneric, @inout ConformsWithMoreGeneric) -> @out ConformsWithMoreGeneric {
   // CHECK:       bb0(%0 : $*ConformsWithMoreGeneric, %1 : $*ConformsWithMoreGeneric, %2 : $*ConformsWithMoreGeneric):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    [[WITNESS_FN:%.*]] = function_ref @$s9witnesses23ConformsWithMoreGenericV9selfTypes{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @out τ_0_0
@@ -226,7 +226,7 @@
   func loadable<F>(x: F) -> F { return x }
   mutating
   func addrOnly<G>(x: G) -> G { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP8addrOnly{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed AddrOnly, @inout ConformsWithMoreGeneric) -> @out AddrOnly {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP8addrOnly{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) (@in_guaranteed AddrOnly, @inout ConformsWithMoreGeneric) -> @out AddrOnly {
   // CHECK:       bb0(%0 : $*AddrOnly, %1 : $*AddrOnly, %2 : $*ConformsWithMoreGeneric):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %3 = function_ref @$s9witnesses23ConformsWithMoreGenericV8addrOnly{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @out τ_0_0
@@ -237,7 +237,7 @@
 
   mutating
   func generic<H>(x: H) -> H { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @out τ_0_0 {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP7generic{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @out τ_0_0 {
   // CHECK:       bb0(%0 : $*τ_0_0, %1 : $*τ_0_0, %2 : $*ConformsWithMoreGeneric):
   // CHECK-NEXT:    // function_ref
   // CHECK-NEXT:    %3 = function_ref @$s9witnesses23ConformsWithMoreGenericV7generic{{[_0-9a-zA-Z]*}}F : $@convention(method) <τ_0_0> (@in_guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @out τ_0_0
@@ -248,7 +248,7 @@
 
   mutating
   func classes<I>(x: I) -> I { return x }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP7classes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : Classes> (@guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @owned τ_0_0 {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP7classes{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: X) <τ_0_0 where τ_0_0 : Classes> (@guaranteed τ_0_0, @inout ConformsWithMoreGeneric) -> @owned τ_0_0 {
   // CHECK:       bb0([[ARG0:%.*]] : @guaranteed $τ_0_0, [[ARG1:%.*]] : $*ConformsWithMoreGeneric):
   // CHECK-NEXT:    [[SELF_BOX:%.*]] = alloc_stack $τ_0_0
   // CHECK-NEXT:    [[ARG0_COPY:%.*]] = copy_value [[ARG0]]
@@ -265,7 +265,7 @@
   // CHECK-NEXT:  }
 }
 func <~> <J: Y, K: Y>(_ x: J, y: K) -> K { return y }
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: X) (@in_guaranteed ConformsWithMoreGeneric, @in_guaranteed ConformsWithMoreGeneric, @thick ConformsWithMoreGeneric.Type) -> @out ConformsWithMoreGeneric {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses23ConformsWithMoreGenericVAA1XA2aDP3ltgoi{{[_0-9a-zA-Z]*}}FZTW : $@convention(witness_method: X) (@in_guaranteed ConformsWithMoreGeneric, @in_guaranteed ConformsWithMoreGeneric, @thick ConformsWithMoreGeneric.Type) -> @out ConformsWithMoreGeneric {
 // CHECK:       bb0(%0 : $*ConformsWithMoreGeneric, %1 : $*ConformsWithMoreGeneric, %2 : $*ConformsWithMoreGeneric, %3 : $@thick ConformsWithMoreGeneric.Type):
 // CHECK-NEXT:    // function_ref
 // CHECK-NEXT:    [[WITNESS_FN:%.*]] = function_ref @$s9witnesses3ltgoi{{[_0-9a-zA-Z]*}}F : $@convention(thin) <τ_0_0, τ_0_1 where τ_0_0 : Y, τ_0_1 : Y> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_1) -> @out τ_0_1
@@ -279,7 +279,7 @@
 }
 
 struct UnlabeledWitness : LabeledRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16UnlabeledWitnessVAA18LabeledRequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: LabeledRequirement) (Loadable, @in_guaranteed UnlabeledWitness) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16UnlabeledWitnessVAA18LabeledRequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: LabeledRequirement) (Loadable, @in_guaranteed UnlabeledWitness) -> ()
   func method(x _: Loadable) {}
 }
 
@@ -288,7 +288,7 @@
 }
 
 struct UnlabeledSelfWitness : LabeledSelfRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses20UnlabeledSelfWitnessVAA07LabeledC11RequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: LabeledSelfRequirement) (@in_guaranteed UnlabeledSelfWitness, @in_guaranteed UnlabeledSelfWitness) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses20UnlabeledSelfWitnessVAA07LabeledC11RequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: LabeledSelfRequirement) (@in_guaranteed UnlabeledSelfWitness, @in_guaranteed UnlabeledSelfWitness) -> ()
   func method(x _: UnlabeledSelfWitness) {}
 }
 
@@ -297,7 +297,7 @@
 }
 
 struct LabeledWitness : UnlabeledRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses14LabeledWitnessVAA20UnlabeledRequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: UnlabeledRequirement) (Loadable, @in_guaranteed LabeledWitness) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses14LabeledWitnessVAA20UnlabeledRequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: UnlabeledRequirement) (Loadable, @in_guaranteed LabeledWitness) -> ()
   func method(x: Loadable) {}
 }
 
@@ -306,7 +306,7 @@
 }
 
 struct LabeledSelfWitness : UnlabeledSelfRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses18LabeledSelfWitnessVAA09UnlabeledC11RequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: UnlabeledSelfRequirement) (@in_guaranteed LabeledSelfWitness, @in_guaranteed LabeledSelfWitness) -> ()
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses18LabeledSelfWitnessVAA09UnlabeledC11RequirementA2aDP6method{{[_0-9a-zA-Z]*}}FTW : $@convention(witness_method: UnlabeledSelfRequirement) (@in_guaranteed LabeledSelfWitness, @in_guaranteed LabeledSelfWitness) -> ()
   func method(_ x: LabeledSelfWitness) {}
 }
 
@@ -316,9 +316,9 @@
 }
 
 struct ImmutableModel: ReadOnlyRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses14ImmutableModelVAA19ReadOnlyRequirementA2aDP4propSSvgTW : $@convention(witness_method: ReadOnlyRequirement) (@in_guaranteed ImmutableModel) -> @owned String
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses14ImmutableModelVAA19ReadOnlyRequirementA2aDP4propSSvgTW : $@convention(witness_method: ReadOnlyRequirement) (@in_guaranteed ImmutableModel) -> @owned String
   let prop: String = "a"
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses14ImmutableModelVAA19ReadOnlyRequirementA2aDP4propSSvgZTW : $@convention(witness_method: ReadOnlyRequirement) (@thick ImmutableModel.Type) -> @owned String
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses14ImmutableModelVAA19ReadOnlyRequirementA2aDP4propSSvgZTW : $@convention(witness_method: ReadOnlyRequirement) (@thick ImmutableModel.Type) -> @owned String
   static let prop: String = "b"
 }
 
@@ -335,16 +335,16 @@
 }
 
 struct NonFailableModel: FailableRequirement, NonFailableRefinement, IUOFailableRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16NonFailableModelVAA0C11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: FailableRequirement) (Int, @thick NonFailableModel.Type) -> @out Optional<NonFailableModel>
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16NonFailableModelVAA0bC10Refinement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: NonFailableRefinement) (Int, @thick NonFailableModel.Type) -> @out NonFailableModel
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16NonFailableModelVAA22IUOFailableRequirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: IUOFailableRequirement) (Int, @thick NonFailableModel.Type) -> @out Optional<NonFailableModel>
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16NonFailableModelVAA0C11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: FailableRequirement) (Int, @thick NonFailableModel.Type) -> @out Optional<NonFailableModel>
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16NonFailableModelVAA0bC10Refinement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: NonFailableRefinement) (Int, @thick NonFailableModel.Type) -> @out NonFailableModel
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16NonFailableModelVAA22IUOFailableRequirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: IUOFailableRequirement) (Int, @thick NonFailableModel.Type) -> @out Optional<NonFailableModel>
   init(foo: Int) {}
 }
 
 struct FailableModel: FailableRequirement, IUOFailableRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses13FailableModelVAA0B11Requirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses13FailableModelVAA0B11Requirement{{[_0-9a-zA-Z]*}}fCTW
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses13FailableModelVAA22IUOFailableRequirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses13FailableModelVAA22IUOFailableRequirement{{[_0-9a-zA-Z]*}}fCTW
   // CHECK: bb0([[SELF:%[0-9]+]] : $*Optional<FailableModel>, [[FOO:%[0-9]+]] : $Int, [[META:%[0-9]+]] : $@thick FailableModel.Type):
   // CHECK: [[FN:%.*]] = function_ref @$s9witnesses13FailableModelV{{[_0-9a-zA-Z]*}}fC
   // CHECK: [[INNER:%.*]] = apply [[FN]](
@@ -354,7 +354,7 @@
 }
 
 struct IUOFailableModel : NonFailableRefinement, IUOFailableRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16IUOFailableModelVAA21NonFailableRefinement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16IUOFailableModelVAA21NonFailableRefinement{{[_0-9a-zA-Z]*}}fCTW
   // CHECK: bb0([[SELF:%[0-9]+]] : $*IUOFailableModel, [[FOO:%[0-9]+]] : $Int, [[META:%[0-9]+]] : $@thick IUOFailableModel.Type):
   // CHECK:   [[META:%[0-9]+]] = metatype $@thin IUOFailableModel.Type
   // CHECK:   [[INIT:%[0-9]+]] = function_ref @$s9witnesses16IUOFailableModelV{{[_0-9a-zA-Z]*}}fC : $@convention(method) (Int, @thin IUOFailableModel.Type) -> Optional<IUOFailableModel>
@@ -378,16 +378,16 @@
 }
 
 final class NonFailableClassModel: FailableClassRequirement, NonFailableClassRefinement, IUOFailableClassRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21NonFailableClassModelCAA0cD11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: FailableClassRequirement) (Int, @thick NonFailableClassModel.Type) -> @owned Optional<NonFailableClassModel>
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21NonFailableClassModelCAA0bcD10Refinement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: NonFailableClassRefinement) (Int, @thick NonFailableClassModel.Type) -> @owned NonFailableClassModel
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21NonFailableClassModelCAA011IUOFailableD11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: IUOFailableClassRequirement) (Int, @thick NonFailableClassModel.Type) -> @owned Optional<NonFailableClassModel>
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21NonFailableClassModelCAA0cD11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: FailableClassRequirement) (Int, @thick NonFailableClassModel.Type) -> @owned Optional<NonFailableClassModel>
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21NonFailableClassModelCAA0bcD10Refinement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: NonFailableClassRefinement) (Int, @thick NonFailableClassModel.Type) -> @owned NonFailableClassModel
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21NonFailableClassModelCAA011IUOFailableD11Requirement{{[_0-9a-zA-Z]*}}fCTW : $@convention(witness_method: IUOFailableClassRequirement) (Int, @thick NonFailableClassModel.Type) -> @owned Optional<NonFailableClassModel>
   init(foo: Int) {}
 }
 
 final class FailableClassModel: FailableClassRequirement, IUOFailableClassRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses18FailableClassModelCAA0bC11Requirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses18FailableClassModelCAA0bC11Requirement{{[_0-9a-zA-Z]*}}fCTW
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses18FailableClassModelCAA011IUOFailableC11Requirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses18FailableClassModelCAA011IUOFailableC11Requirement{{[_0-9a-zA-Z]*}}fCTW
   // CHECK: [[FUNC:%.*]] = function_ref @$s9witnesses18FailableClassModelC{{[_0-9a-zA-Z]*}}fC
   // CHECK: [[INNER:%.*]] = apply [[FUNC]](%0, %1)
   // CHECK: return [[INNER]] : $Optional<FailableClassModel>
@@ -395,7 +395,7 @@
 }
 
 final class IUOFailableClassModel: NonFailableClassRefinement, IUOFailableClassRequirement {
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21IUOFailableClassModelCAA011NonFailableC10Refinement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21IUOFailableClassModelCAA011NonFailableC10Refinement{{[_0-9a-zA-Z]*}}fCTW
   // CHECK: bb0({{.*}}):
   // CHECK:   [[FUNC:%.*]] = function_ref @$s9witnesses21IUOFailableClassModelC3fooACSgSi_tcfC : $@convention(method) (Int, @thick IUOFailableClassModel.Type) -> @owned Optional<IUOFailableClassModel>
   // CHECK:   [[VALUE:%.*]] = apply [[FUNC]]({{.*}})
@@ -408,10 +408,10 @@
   // CHECK: return [[RESULT]] : $IUOFailableClassModel
   // CHECK: } // end sil function '$s9witnesses21IUOFailableClassModelCAA011NonFailableC10Refinement{{[_0-9a-zA-Z]*}}fCTW'
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21IUOFailableClassModelCAA0bC11Requirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21IUOFailableClassModelCAA0bC11Requirement{{[_0-9a-zA-Z]*}}fCTW
   init!(foo: Int) {}
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses21IUOFailableClassModelCAA08FailableC11Requirement{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses21IUOFailableClassModelCAA08FailableC11Requirement{{[_0-9a-zA-Z]*}}fCTW
   // CHECK: [[FUNC:%.*]] = function_ref @$s9witnesses21IUOFailableClassModelC{{[_0-9a-zA-Z]*}}fC
   // CHECK: [[INNER:%.*]] = apply [[FUNC]](%0, %1)
   // CHECK: return [[INNER]] : $Optional<IUOFailableClassModel>
@@ -430,12 +430,12 @@
 struct GenericParameterNameCollision<T: HasAssoc> :
     GenericParameterNameCollisionProtocol {
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses29GenericParameterNameCollisionVyxGAA0bcdE8ProtocolA2aEP3fooyyqd__lFTW : $@convention(witness_method: GenericParameterNameCollisionProtocol) <τ_0_0 where τ_0_0 : HasAssoc><τ_1_0> (@in_guaranteed τ_1_0, @in_guaranteed GenericParameterNameCollision<τ_0_0>) -> () {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses29GenericParameterNameCollisionVyxGAA0bcdE8ProtocolA2aEP3fooyyqd__lFTW : $@convention(witness_method: GenericParameterNameCollisionProtocol) <τ_0_0 where τ_0_0 : HasAssoc><τ_1_0> (@in_guaranteed τ_1_0, @in_guaranteed GenericParameterNameCollision<τ_0_0>) -> () {
   // CHECK:       bb0(%0 : $*τ_1_0, %1 : $*GenericParameterNameCollision<τ_0_0>):
   // CHECK:         apply {{%.*}}<τ_0_0, τ_1_0>
   func foo<U>(_ x: U) {}
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses29GenericParameterNameCollisionVyxGAA0bcdE8ProtocolA2aEP3baryy6Assoc2Qzqd__XElFTW : $@convention(witness_method: GenericParameterNameCollisionProtocol) <τ_0_0 where τ_0_0 : HasAssoc><τ_1_0> (@noescape @callee_guaranteed (@in_guaranteed τ_1_0) -> @out τ_0_0.Assoc, @in_guaranteed GenericParameterNameCollision<τ_0_0>) -> () {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses29GenericParameterNameCollisionVyxGAA0bcdE8ProtocolA2aEP3baryy6Assoc2Qzqd__XElFTW : $@convention(witness_method: GenericParameterNameCollisionProtocol) <τ_0_0 where τ_0_0 : HasAssoc><τ_1_0> (@noescape @callee_guaranteed (@in_guaranteed τ_1_0) -> @out τ_0_0.Assoc, @in_guaranteed GenericParameterNameCollision<τ_0_0>) -> () {
   // CHECK:       bb0(%0 : $@noescape @callee_guaranteed (@in_guaranteed τ_1_0) -> @out τ_0_0.Assoc, %1 : $*GenericParameterNameCollision<τ_0_0>):
   // CHECK:         apply {{%.*}}<τ_0_0, τ_1_0>
   func bar<V>(_ x: (V) -> T.Assoc) {}
@@ -459,7 +459,7 @@
 
   // If the witness is in a base class of the conforming class, make sure we have a bit_cast in there:
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP5widthSivMTW : {{.*}} {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP5widthSivMTW : {{.*}} {
   // CHECK: bb0([[ARG2:%.*]] : $*PropertyRequirementWitnessFromBase):
   // CHECK-NEXT: [[ARG2_LOADED:%[0-9][0-9]*]] = load_borrow [[ARG2]]
   // CHECK-NEXT: [[CAST_ARG2_LOADED:%[0-9][0-9]*]] = upcast [[ARG2_LOADED]] : $PropertyRequirementWitnessFromBase to $PropertyRequirementBase
@@ -471,7 +471,7 @@
   // CHECK-NEXT: end_borrow [[ARG2_LOADED]]
   // CHECK-NEXT: return [[TUPLE]]
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP6heightSivMZTW : {{.*}} {
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP6heightSivMZTW : {{.*}} {
   // CHECK: [[OBJ:%.*]] = upcast %0 : $@thick PropertyRequirementWitnessFromBase.Type to $@thick PropertyRequirementBase.Type
   // CHECK: [[METH:%.*]] = function_ref @$s9witnesses23PropertyRequirementBaseC6heightSivMZ
   // CHECK-NEXT: ([[RES:%.*]], [[TOKEN:%.*]]) = begin_apply [[METH]]
@@ -480,7 +480,7 @@
   // CHECK-NEXT: [[TUPLE:%.*]] = tuple ()
   // CHECK-NEXT: return [[TUPLE]]
 
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP5depthSivMTW
+ // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses34PropertyRequirementWitnessFromBaseCAA0bC0A2aDP5depthSivMTW
   // CHECK: bb0([[ARG2:%.*]] : $*PropertyRequirementWitnessFromBase):
   // CHECK: [[ARG2_LOADED:%[0-9][0-9]*]] = load_borrow [[ARG2]]
   // CHECK: [[METH:%.*]] = class_method [[ARG2_LOADED]] : $PropertyRequirementWitnessFromBase, #PropertyRequirementWitnessFromBase.depth!modify.1
@@ -500,7 +500,7 @@
   func crash() {}
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses16GenericCrashableCyxGAA0C0A2aEP5crashyyFTW : $@convention(witness_method: Crashable) <τ_0_0> (@in_guaranteed GenericCrashable<τ_0_0>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses16GenericCrashableCyxGAA0C0A2aEP5crashyyFTW : $@convention(witness_method: Crashable) <τ_0_0> (@in_guaranteed GenericCrashable<τ_0_0>) -> ()
 // CHECK:       bb0(%0 : $*GenericCrashable<τ_0_0>):
 // CHECK-NEXT: [[SELF:%.*]] = load_borrow %0 : $*GenericCrashable<τ_0_0>
 // CHECK-NEXT: [[BASE:%.*]] = upcast [[SELF]] : $GenericCrashable<τ_0_0> to $CrashableBase
@@ -518,7 +518,7 @@
   func f(_: @escaping (Int) -> Int)
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses18EscapingCovarianceVAA0B3ReqA2aDP1fyyS2icFTW : $@convention(witness_method: EscapingReq) (@guaranteed @callee_guaranteed (Int) -> Int, @in_guaranteed EscapingCovariance) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses18EscapingCovarianceVAA0B3ReqA2aDP1fyyS2icFTW : $@convention(witness_method: EscapingReq) (@guaranteed @callee_guaranteed (Int) -> Int, @in_guaranteed EscapingCovariance) -> ()
 // CHECK-NOT: return
 // CHECK: convert_escape_to_noescape [not_guaranteed] %0
 // CHECK: return
@@ -531,7 +531,7 @@
   func updateFunction(x: inout () -> T)
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s9witnesses13InoutFunctionVAA0bC3ReqA2aDP06updateC01xy1TQzycz_tFTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s9witnesses13InoutFunctionVAA0bC3ReqA2aDP06updateC01xy1TQzycz_tFTW
 // CHECK:      bb0(%0 : $*@callee_guaranteed () -> @out (), %1 : $*InoutFunction):
 // CHECK-NEXT:   [[TEMP:%.*]] = alloc_stack $@callee_guaranteed () -> ()
 //   Reabstract the contents of the inout argument into the temporary.
@@ -575,6 +575,6 @@
 }
 
 // protocol witness for witnesses.Sub.bar() -> () in conformance witnesses.MyImpl : witnesses.Sub in witnesses
-// CHECK: sil private [transparent] [thunk] @$s9witnesses6MyImplVAA3SubA2aDP3baryyFTW : $@convention(witness_method: Sub) (@in_guaranteed MyImpl) -> ()
+// CHECK: sil private [transparent] [thunk] [ossa] @$s9witnesses6MyImplVAA3SubA2aDP3baryyFTW : $@convention(witness_method: Sub) (@in_guaranteed MyImpl) -> ()
 // protocol witness for witnesses.Base.foo() -> () in conformance witnesses.MyImpl : witnesses.Base in witnesses
-// CHECK: sil private [transparent] [thunk] @$s9witnesses6MyImplVAA4BaseA2aDP3fooyyFTW : $@convention(witness_method: Base) (@in_guaranteed MyImpl) -> ()
+// CHECK: sil private [transparent] [thunk] [ossa] @$s9witnesses6MyImplVAA4BaseA2aDP3fooyyFTW : $@convention(witness_method: Base) (@in_guaranteed MyImpl) -> ()
diff --git a/test/SILGen/witnesses_class.swift b/test/SILGen/witnesses_class.swift
index 897ceb1..f09d9e8 100644
--- a/test/SILGen/witnesses_class.swift
+++ b/test/SILGen/witnesses_class.swift
@@ -10,22 +10,22 @@
 class Foo: Fooable {
   
   func foo() { }
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class3FooCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class3FooCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
   // CHECK-NOT:     function_ref
   // CHECK:         class_method
 
   class func bar() {}
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class3FooCAA7FooableA2aDP3bar{{[_0-9a-zA-Z]*}}FZTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class3FooCAA7FooableA2aDP3bar{{[_0-9a-zA-Z]*}}FZTW
   // CHECK-NOT:     function_ref
   // CHECK:         class_method
 
   required init() {}
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class3FooCAA7FooableA2aDP{{[_0-9a-zA-Z]*}}fCTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class3FooCAA7FooableA2aDP{{[_0-9a-zA-Z]*}}fCTW
   // CHECK-NOT:     function_ref
   // CHECK:         class_method
 }
 
-// CHECK-LABEL: sil hidden @$s15witnesses_class3genyyxAA7FooableRzlF
+// CHECK-LABEL: sil hidden [ossa] @$s15witnesses_class3genyyxAA7FooableRzlF
 // CHECK:         bb0([[SELF:%.*]] : @guaranteed $T)
 // CHECK-NOT:     copy_value [[SELF]]
 // CHECK:         [[METHOD:%.*]] = witness_method $T
@@ -36,7 +36,7 @@
   foo.foo()
 }
 
-// CHECK-LABEL: sil hidden @$s15witnesses_class2exyyAA7Fooable_pF
+// CHECK-LABEL: sil hidden [ossa] @$s15witnesses_class2exyyAA7Fooable_pF
 // CHECK: bb0([[SELF:%[0-0]+]] : @guaranteed $Fooable):
 // CHECK:         [[SELF_PROJ:%.*]] = open_existential_ref [[SELF]]
 // CHECK:         [[METHOD:%.*]] = witness_method $[[OPENED:@opened(.*) Fooable]],
@@ -77,28 +77,28 @@
 
 // Covariant Self:
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class12UsesDefaultsCyqd__GAA03HasD0A2aEP10hasDefaultyyFTW : $@convention(witness_method: HasDefaults) <τ_0_0><τ_1_0 where τ_0_0 : UsesDefaults<τ_1_0>, τ_1_0 : Barable> (@in_guaranteed τ_0_0) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class12UsesDefaultsCyqd__GAA03HasD0A2aEP10hasDefaultyyFTW : $@convention(witness_method: HasDefaults) <τ_0_0><τ_1_0 where τ_0_0 : UsesDefaults<τ_1_0>, τ_1_0 : Barable> (@in_guaranteed τ_0_0) -> () {
 // CHECK: [[FN:%.*]] = function_ref @$s15witnesses_class11HasDefaultsPAAE10hasDefaultyyF : $@convention(method) <τ_0_0 where τ_0_0 : HasDefaults> (@in_guaranteed τ_0_0) -> ()
 // CHECK: apply [[FN]]<τ_0_0>(
 // CHECK: return
 
 // Invariant Self, since type signature contains an associated type:
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class12UsesDefaultsCyxGAA03HasD0A2aEP16hasDefaultTakesTyy1TQzFTW : $@convention(witness_method: HasDefaults) <τ_0_0 where τ_0_0 : Barable> (@in_guaranteed UsesDefaults<τ_0_0>, @in_guaranteed UsesDefaults<τ_0_0>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class12UsesDefaultsCyxGAA03HasD0A2aEP16hasDefaultTakesTyy1TQzFTW : $@convention(witness_method: HasDefaults) <τ_0_0 where τ_0_0 : Barable> (@in_guaranteed UsesDefaults<τ_0_0>, @in_guaranteed UsesDefaults<τ_0_0>) -> ()
 // CHECK: [[FN:%.*]] = function_ref @$s15witnesses_class11HasDefaultsPAAE16hasDefaultTakesTyy1TQzF : $@convention(method) <τ_0_0 where τ_0_0 : HasDefaults> (@in_guaranteed τ_0_0.T, @in_guaranteed τ_0_0) -> ()
 // CHECK: apply [[FN]]<UsesDefaults<τ_0_0>>(
 // CHECK: return
 
 // Covariant Self:
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class12UsesDefaultsCyqd__GAA03HasD0A2aEP17hasDefaultGenericyyqd__AA7FooableRd__lFTW : $@convention(witness_method: HasDefaults) <τ_0_0><τ_1_0 where τ_0_0 : UsesDefaults<τ_1_0>, τ_1_0 : Barable><τ_2_0 where τ_2_0 : Fooable> (@guaranteed τ_2_0, @in_guaranteed τ_0_0) -> () {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class12UsesDefaultsCyqd__GAA03HasD0A2aEP17hasDefaultGenericyyqd__AA7FooableRd__lFTW : $@convention(witness_method: HasDefaults) <τ_0_0><τ_1_0 where τ_0_0 : UsesDefaults<τ_1_0>, τ_1_0 : Barable><τ_2_0 where τ_2_0 : Fooable> (@guaranteed τ_2_0, @in_guaranteed τ_0_0) -> () {
 // CHECK: [[FN:%.*]] = function_ref @$s15witnesses_class11HasDefaultsPAAE17hasDefaultGenericyyqd__AA7FooableRd__lF : $@convention(method) <τ_0_0 where τ_0_0 : HasDefaults><τ_1_0 where τ_1_0 : Fooable> (@guaranteed τ_1_0, @in_guaranteed τ_0_0) -> ()
 // CHECK: apply [[FN]]<τ_0_0, τ_2_0>(
 // CHECK: return
 
 // Invariant Self, since type signature contains an associated type:
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class12UsesDefaultsCyxGAA03HasD0A2aEP23hasDefaultGenericTakesTyy1TQz_qd__tAA7FooableRd__lFTW : $@convention(witness_method: HasDefaults) <τ_0_0 where τ_0_0 : Barable><τ_1_0 where τ_1_0 : Fooable> (@in_guaranteed UsesDefaults<τ_0_0>, @guaranteed τ_1_0, @in_guaranteed UsesDefaults<τ_0_0>) -> ()
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class12UsesDefaultsCyxGAA03HasD0A2aEP23hasDefaultGenericTakesTyy1TQz_qd__tAA7FooableRd__lFTW : $@convention(witness_method: HasDefaults) <τ_0_0 where τ_0_0 : Barable><τ_1_0 where τ_1_0 : Fooable> (@in_guaranteed UsesDefaults<τ_0_0>, @guaranteed τ_1_0, @in_guaranteed UsesDefaults<τ_0_0>) -> ()
 // CHECK: [[FN:%.*]] = function_ref @$s15witnesses_class11HasDefaultsPAAE23hasDefaultGenericTakesTyy1TQz_qd__tAA7FooableRd__lF : $@convention(method) <τ_0_0 where τ_0_0 : HasDefaults><τ_1_0 where τ_1_0 : Fooable> (@in_guaranteed τ_0_0.T, @guaranteed τ_1_0, @in_guaranteed τ_0_0) -> ()
 // CHECK: apply [[FN]]<UsesDefaults<τ_0_0>, τ_1_0>(
 // CHECK: return
@@ -114,5 +114,5 @@
   func returnsCovariantSelf() {}
 }
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s15witnesses_class17NonMatchingMemberCAA20ReturnsCovariantSelfA2aDP07returnsgH0xyFTW : $@convention(witness_method: ReturnsCovariantSelf) <τ_0_0 where τ_0_0 : NonMatchingMember> (@in_guaranteed τ_0_0) -> @out τ_0_0 {
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s15witnesses_class17NonMatchingMemberCAA20ReturnsCovariantSelfA2aDP07returnsgH0xyFTW : $@convention(witness_method: ReturnsCovariantSelf) <τ_0_0 where τ_0_0 : NonMatchingMember> (@in_guaranteed τ_0_0) -> @out τ_0_0 {
 
diff --git a/test/SILGen/witnesses_inheritance.swift b/test/SILGen/witnesses_inheritance.swift
index 7cc610d..91608b2 100644
--- a/test/SILGen/witnesses_inheritance.swift
+++ b/test/SILGen/witnesses_inheritance.swift
@@ -18,9 +18,9 @@
 // -- Derived class conforms to a refined protocol
 class Y : X, Barrable {
   func bar() {}
-  // CHECK-NOT: sil private [transparent] [thunk] @$s21witnesses_inheritance1YCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
+  // CHECK-NOT: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1YCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
   class func class_bar() {}
-  // CHECK-LABEL: sil private [transparent] [thunk] @$s21witnesses_inheritance1YCAA8BarrableA2aDP9class_bar{{[_0-9a-zA-Z]*}}FZTW
+  // CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1YCAA8BarrableA2aDP9class_bar{{[_0-9a-zA-Z]*}}FZTW
 }
 
 class A : Fooable {
@@ -32,16 +32,16 @@
 
 // -- Derived class conforms to a refined protocol using its base's methods
 class B : A, Barrable {}
-// CHECK-NOT: sil private [transparent] [thunk] @$s21witnesses_inheritance1BCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
-// CHECK-NOT: sil private [transparent] [thunk] @$s21witnesses_inheritance1BCAA7FooableA2aDP9class_foo{{[_0-9a-zA-Z]*}}FZTW
-// CHECK-LABEL: sil private [transparent] [thunk] @$s21witnesses_inheritance1BCAA8BarrableA2aDP3bar{{[_0-9a-zA-Z]*}}FTW
+// CHECK-NOT: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1BCAA7FooableA2aDP3foo{{[_0-9a-zA-Z]*}}FTW
+// CHECK-NOT: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1BCAA7FooableA2aDP9class_foo{{[_0-9a-zA-Z]*}}FZTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1BCAA8BarrableA2aDP3bar{{[_0-9a-zA-Z]*}}FTW
 // CHECK:         [[B:%.*]] = load_borrow {{%.*}} : $*B
 // CHECK-NEXT:    [[A:%.*]] = upcast [[B]] : $B to $A
 // CHECK-NEXT:    [[METH:%.*]] = class_method [[A]] : $A, #A.bar!1
 // CHECK-NEXT:    apply [[METH]]([[A]]) : $@convention(method) (@guaranteed A) -> ()
 // CHECK:         end_borrow [[B]]
 
-// CHECK-LABEL: sil private [transparent] [thunk] @$s21witnesses_inheritance1BCAA8BarrableA2aDP9class_bar{{[_0-9a-zA-Z]*}}FZTW
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s21witnesses_inheritance1BCAA8BarrableA2aDP9class_bar{{[_0-9a-zA-Z]*}}FZTW
 // CHECK:         upcast {{%.*}} : $@thick B.Type to $@thick A.Type
 
 // Add tests to make sure that we handle address only case correctly.
diff --git a/test/SILGen/writeback.swift b/test/SILGen/writeback.swift
index 80cf2e5..c2fd587 100644
--- a/test/SILGen/writeback.swift
+++ b/test/SILGen/writeback.swift
@@ -129,7 +129,7 @@
   var anse: Anse { get set }
 }
 
-// CHECK-LABEL: sil hidden @$s9writeback12test_generic{{[_0-9a-zA-Z]*}}F 
+// CHECK-LABEL: sil hidden [ossa] @$s9writeback12test_generic{{[_0-9a-zA-Z]*}}F 
 // CHECK:         witness_method $Runce, #Runcible.frob!modify.1
 // CHECK:         witness_method $Runce.Frob, #Frobable.anse!setter.1
 func test_generic<Runce: Runcible>(runce runce: inout Runce, anse: Runce.Frob.Anse) {
@@ -138,14 +138,14 @@
 
 // We should *not* write back when referencing decls or members as rvalues.
 // <rdar://problem/16530235>
-// CHECK-LABEL: sil hidden @$s9writeback15loadAddressOnlyAA8Fungible_pyF : $@convention(thin) () -> @out Fungible {
+// CHECK-LABEL: sil hidden [ossa] @$s9writeback15loadAddressOnlyAA8Fungible_pyF : $@convention(thin) () -> @out Fungible {
 func loadAddressOnly() -> Fungible {
   // CHECK:       function_ref writeback.addressOnly.getter
   // CHECK-NOT:   function_ref writeback.addressOnly.setter
   return addressOnly
 }
 
-// CHECK-LABEL: sil hidden @$s9writeback10loadMember{{[_0-9a-zA-Z]*}}F
+// CHECK-LABEL: sil hidden [ossa] @$s9writeback10loadMember{{[_0-9a-zA-Z]*}}F
 // CHECK:         witness_method $Runce, #Runcible.frob!getter.1
 // CHECK:         witness_method $Runce.Frob, #Frobable.anse!getter.1
 // CHECK-NOT:     witness_method $Runce.Frob, #Frobable.anse!setter.1
diff --git a/test/SILOptimizer/abcopts.sil b/test/SILOptimizer/abcopts.sil
index 244b60f..d9c5fe9 100644
--- a/test/SILOptimizer/abcopts.sil
+++ b/test/SILOptimizer/abcopts.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -loop-rotate -dce -jumpthread-simplify-cfg -abcopts -enable-abcopts=1 %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -loop-rotate -dce -jumpthread-simplify-cfg -abcopts -dce -enable-abcopts -enable-abc-hoisting %s | %FileCheck %s --check-prefix=HOIST
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all  -abcopts  %s | %FileCheck %s --check-prefix=RANGECHECK
+// RUN: %target-sil-opt -enable-sil-verify-all -loop-rotate -dce -jumpthread-simplify-cfg -abcopts -enable-abcopts=1 %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -loop-rotate -dce -jumpthread-simplify-cfg -abcopts -dce -enable-abcopts -enable-abc-hoisting %s | %FileCheck %s --check-prefix=HOIST
+// RUN: %target-sil-opt -enable-sil-verify-all  -abcopts  %s | %FileCheck %s --check-prefix=RANGECHECK
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/access_dom.sil b/test/SILOptimizer/access_dom.sil
index 78d2e26..4abfb9b 100644
--- a/test/SILOptimizer/access_dom.sil
+++ b/test/SILOptimizer/access_dom.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -access-enforcement-dom -assume-parsing-unqualified-ownership-sil %s -enable-sil-verify-all | %FileCheck %s
+// RUN: %target-sil-opt -access-enforcement-dom %s -enable-sil-verify-all | %FileCheck %s
 //
 // Test the AccessEnforcementDom pass in isolation. This ensures that
 // no upstream passes have removed SIL-level access markers that are
diff --git a/test/SILOptimizer/access_enforcement_opts.sil b/test/SILOptimizer/access_enforcement_opts.sil
index b8f2fc0..12a8e52 100644
--- a/test/SILOptimizer/access_enforcement_opts.sil
+++ b/test/SILOptimizer/access_enforcement_opts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -access-enforcement-opts -I %S/Inputs/abi -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -access-enforcement-opts -I %S/Inputs/abi %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/access_enforcement_selection.sil b/test/SILOptimizer/access_enforcement_selection.sil
index 5302140..a6f5288 100644
--- a/test/SILOptimizer/access_enforcement_selection.sil
+++ b/test/SILOptimizer/access_enforcement_selection.sil
@@ -6,7 +6,7 @@
 sil_stage raw
 
 // Test undef begin_access operands.
-// CHECK-LABEL: sil hidden @undefStack : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
+// CHECK-LABEL: sil hidden [ossa] @undefStack : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
 // CHECK: bb0(%0 : $Builtin.Int64):
 // CHECK: bb1:
 // CHECK: [[WRITE:%.*]] = begin_access [modify] [static] undef : $*Builtin.Int64
@@ -18,7 +18,7 @@
 // CHECK: %{{.*}} = load [trivial] [[READ]] : $*Builtin.Int64
 // CHECK: end_access [[READ]] : $*Builtin.Int64
 // CHECK-LABEL: } // end sil function 'undefStack'
-sil hidden @undefStack : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
+sil hidden [ossa] @undefStack : $@convention(thin) (Builtin.Int64) -> Builtin.Int64 {
 bb0(%0 : $Builtin.Int64):
   br bb1
 
@@ -39,7 +39,7 @@
 // Test static enforcement selection in the presence of mark_function_escape.
 // This really isn't really a special case, but depends on pass pipeline.
 //
-// CHECK-LABEL: sil hidden @markFuncEscape : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @markFuncEscape : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:  [[BOX:%.*]] = alloc_box ${ var Builtin.Int64 }, var, name "x"
 // CHECK:  [[ADR:%.*]] = project_box [[BOX]] : ${ var Builtin.Int64 }, 0
@@ -50,7 +50,7 @@
 // CHECK:  destroy_value [[BOX]] : ${ var Builtin.Int64 }
 // CHECK:  return %{{.*}} : $()
 // CHECK-LABEL:} // end sil function 'markFuncEscape'
-sil hidden @markFuncEscape : $@convention(thin) () -> () {
+sil hidden [ossa] @markFuncEscape : $@convention(thin) () -> () {
   %2 = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %3 = project_box %2 : ${ var Builtin.Int64 }, 0
   mark_function_escape %3 : $*Builtin.Int64
@@ -63,13 +63,13 @@
 }
 
 
-sil @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @guaranteed @callee_guaranteed () -> ()) -> ()
-sil @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
+sil [ossa] @takesInoutAndClosure : $@convention(thin) (@inout Builtin.Int64, @guaranteed @callee_guaranteed () -> ()) -> ()
+sil [ossa] @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
 
 // Test static enforcement of box addresses that escape via closure
 // partial_applys.
 // application.
-// CHECK-LABEL: sil hidden @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:  [[BOX:%.*]] = alloc_box ${ var Builtin.Int64 }, var, name "x"
 // CHECK:  [[ADR:%.*]] = project_box [[BOX]] : ${ var Builtin.Int64 }, 0
@@ -83,7 +83,7 @@
 // CHECK:  destroy_value [[BOX]] : ${ var Builtin.Int64 }
 // CHECK:  return %{{.*}} : $()
 // CHECK-LABEL:} // end sil function 'escapeAsArgumentToPartialApply'
-sil hidden @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
+sil hidden [ossa] @escapeAsArgumentToPartialApply : $@convention(thin) () -> () {
 bb0:
   %2 = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %3 = project_box %2 : ${ var Builtin.Int64 }, 0
@@ -103,7 +103,7 @@
 // Test static enforcement of copied boxes.
 // FIXME: Oops... We make this dynamic.
 //
-// CHECK-LABEL: sil hidden @copyBox : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @copyBox : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:  [[BOX:%.*]] = alloc_box ${ var Builtin.Int64 }, var, name "x"
 // CHECK:  [[ADR1:%.*]] = project_box [[BOX]] : ${ var Builtin.Int64 }, 0
@@ -119,7 +119,7 @@
 // CHECK:  destroy_value [[BOX]] : ${ var Builtin.Int64 }
 // CHECK:  return %{{.*}} : $()
 // CHECK-LABEL: } // end sil function 'copyBox'
-sil hidden @copyBox : $@convention(thin) () -> () {
+sil hidden [ossa] @copyBox : $@convention(thin) () -> () {
   %2 = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %3 = project_box %2 : ${ var Builtin.Int64 }, 0
   %16 = copy_value %2 : ${ var Builtin.Int64 }
@@ -136,7 +136,7 @@
   return %98 : $()
 }
 
-sil @closure : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
+sil [ossa] @closure : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
 bb0(%0 : @owned ${ var Builtin.Int64 }):
   destroy_value %0 : ${ var Builtin.Int64 }
   %empty = tuple ()
@@ -145,7 +145,7 @@
 
 // An access that escapes on an unreachable path must be dynamic.
 //
-// CHECK-LABEL: sil @partialUnreachable : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @partialUnreachable : $@convention(thin) () -> () {
 // CHECK: %[[ACCESS:.*]] = begin_access [modify] [dynamic] %{{.*}} : $*Builtin.Int64
 // CHECK: bb1:
 // CHECK: end_access %[[ACCESS]] : $*Builtin.Int64
@@ -153,7 +153,7 @@
 // CHECK: bb2:
 // CHECK: partial_apply
 // CHECK: unreachable
-sil @partialUnreachable : $@convention(thin) () -> () {
+sil [ossa] @partialUnreachable : $@convention(thin) () -> () {
 bb0:
   %box = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %addr = project_box %box : ${ var Builtin.Int64 }, 0
@@ -174,8 +174,8 @@
 
 // An access that refers to mark_uninitialized.
 //
-// CHECK-LABEL: sil @markUninitSource : $@convention(thin) () -> () {
-sil @markUninitSource : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @markUninitSource : $@convention(thin) () -> () {
+sil [ossa] @markUninitSource : $@convention(thin) () -> () {
 bb0:
   %stk = alloc_stack $Builtin.Int64, let, name "x"
   %var = mark_uninitialized [var] %stk : $*Builtin.Int64
@@ -186,10 +186,10 @@
 
 // Borrowed closure can be statically checked.
 //
-// CHECK-LABEL: sil @borrowedClosure : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
+// CHECK-LABEL: sil [ossa] @borrowedClosure : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
 // CHECK: begin_access [read] [static]
 // CHECK-LABEL: } // end sil function 'borrowedClosure'
-sil @borrowedClosure : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
+sil [ossa] @borrowedClosure : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
 bb0(%0 : $*Builtin.Int64):
   %access = begin_access [read] [unknown] %0 : $*Builtin.Int64
   %val = load [trivial] %access : $*Builtin.Int64
@@ -199,7 +199,7 @@
 }
 
 // Borrow an escaping closure. The closure body will be dynamically checked.
-sil @borrowClosure : $@convention(thin) () -> () {
+sil [ossa] @borrowClosure : $@convention(thin) () -> () {
   %box = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %addr = project_box %box : ${ var Builtin.Int64 }, 0
   // box escapes.
@@ -221,7 +221,7 @@
   return %empty : $()
 }
 
-sil @dontAssert : $@convention(thin) (Builtin.Int64) -> (@out Builtin.Int64) {
+sil [ossa] @dontAssert : $@convention(thin) (Builtin.Int64) -> (@out Builtin.Int64) {
 bb0(%0 : $*Builtin.Int64, %1 : $Builtin.Int64):
   store %1 to [trivial] %0 : $*Builtin.Int64
   %f = function_ref @closureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> ()
@@ -229,7 +229,7 @@
   unreachable
 }
 
-sil [canonical] @serializedClosureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
+sil [canonical] [ossa] @serializedClosureCapturingByStorageAddress : $@convention(thin) (@inout_aliasable Builtin.Int64) -> () {
 bb0(%0 : $*Builtin.Int64):
   %2 = begin_access [read] [unknown] %0 : $*Builtin.Int64
   %3 = load [trivial] %2 : $*Builtin.Int64
@@ -242,7 +242,7 @@
 // begin_access prior to mandatory inlining. Nonetheless, this does
 // occur in deserialzied SIL. This SIL is only well-formed because the
 // function is marked [canonical].
-sil [canonical] @accessAroundClosure : $@convention(thin) () -> () {
+sil [canonical] [ossa] @accessAroundClosure : $@convention(thin) () -> () {
 bb0:
   %1 = alloc_box ${ var Builtin.Int64 }, var, name "x"
   %2 = copy_value %1 : ${ var Builtin.Int64 }
@@ -276,9 +276,9 @@
 
 sil [noinline] @takeInoutAndPerform : $@convention(thin) (@inout Builtin.Int64, @guaranteed @callee_guaranteed () -> ()) -> ()
 
-// CHECK-LABEL: sil @testDirectApplyNoescapeDynamic : $@convention(thin) (Builtin.Int64) -> () {
+// CHECK-LABEL: sil [ossa] @testDirectApplyNoescapeDynamic : $@convention(thin) (Builtin.Int64) -> () {
 // CHECK-LABEL:  // end sil function 'testDirectApplyNoescapeDynamic'
-sil @testDirectApplyNoescapeDynamic : $@convention(thin) (Builtin.Int64) -> () {
+sil [ossa] @testDirectApplyNoescapeDynamic : $@convention(thin) (Builtin.Int64) -> () {
 bb0(%0 : $Builtin.Int64):
   %box = alloc_box ${ var Builtin.Int64 }, var, name "localVal"
   %boxproj = project_box %box : ${ var Builtin.Int64 }, 0
@@ -297,11 +297,11 @@
   return %v : $()
 }
 
-// CHECK-LABEL: sil private @directApplyNoescapeDynamicClosure : $@convention(thin) (@guaranteed { var Builtin.Int64 }) -> () {
+// CHECK-LABEL: sil private [ossa] @directApplyNoescapeDynamicClosure : $@convention(thin) (@guaranteed { var Builtin.Int64 }) -> () {
 // CHECK: [[BOX:%.*]] = project_box %0 : ${ var Builtin.Int64 }, 0
 // CHECK: begin_access [modify] [dynamic] [[BOX]] : $*Builtin.Int64
 // CHECK-LABEL:  // end sil function 'directApplyNoescapeDynamicClosure'
-sil private @directApplyNoescapeDynamicClosure : $@convention(thin) (@guaranteed { var Builtin.Int64 }) -> () {
+sil private [ossa] @directApplyNoescapeDynamicClosure : $@convention(thin) (@guaranteed { var Builtin.Int64 }) -> () {
 bb0(%0 : @guaranteed ${ var Builtin.Int64 }):
   %1 = project_box %0 : ${ var Builtin.Int64 }, 0
   %4 = integer_literal $Builtin.Int64, 3
@@ -313,10 +313,10 @@
   return %10 : $()
 }
 
-// CHECK-LABEL: sil private @directApplyNoescapeDynamicAppliedClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Builtin.Int64) -> () {
+// CHECK-LABEL: sil private [ossa] @directApplyNoescapeDynamicAppliedClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Builtin.Int64) -> () {
 // CHECK: begin_access [modify] [dynamic] %1 : $*Builtin.Int64
 // CHECK-LABEL: end sil function 'directApplyNoescapeDynamicAppliedClosure'
-sil private @directApplyNoescapeDynamicAppliedClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Builtin.Int64) -> () {
+sil private [ossa] @directApplyNoescapeDynamicAppliedClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> (), @inout_aliasable Builtin.Int64) -> () {
 bb0(%0 : @guaranteed $@callee_guaranteed () -> (), %1 : $*Builtin.Int64):
   %4 = begin_access [modify] [unknown] %1 : $*Builtin.Int64
 
diff --git a/test/SILOptimizer/access_marker_elim.sil b/test/SILOptimizer/access_marker_elim.sil
index fcaf45b..bb4c81f 100644
--- a/test/SILOptimizer/access_marker_elim.sil
+++ b/test/SILOptimizer/access_marker_elim.sil
@@ -15,7 +15,7 @@
 // [unknown] markers are treated like [dynamic] markers by AccessMarkerElimination.
 // We don't remove them for -enforce-exclusivity=checked
 
-// UNCHECKED-LABEL: sil hidden [noinline] @f010_initS : $@convention(thin) () -> @owned S {
+// UNCHECKED-LABEL: sil hidden [noinline] [ossa] @f010_initS : $@convention(thin) () -> @owned S {
 // UNCHECKED: bb0:
 // UNCHECKED:  [[BOX:%.*]] = alloc_box ${ var S }, var, name "s"
 // UNCHECKED:  [[ADDRS:%.*]] = project_box [[BOX]] : ${ var S }, 0
@@ -31,7 +31,7 @@
 // UNCHECKED:  return [[VALS]] : $S
 // UNCHECKED-LABEL: } // end sil function 'f010_initS'
 //
-// CHECKED-LABEL: sil hidden [noinline] @f010_initS : $@convention(thin) () -> @owned S {
+// CHECKED-LABEL: sil hidden [noinline] [ossa] @f010_initS : $@convention(thin) () -> @owned S {
 // CHECKED: bb0:
 // CHECKED:  [[BOX:%.*]] = alloc_box ${ var S }, var, name "s"
 // CHECKED:  [[ADDRS:%.*]] = project_box [[BOX]] : ${ var S }, 0
@@ -46,7 +46,7 @@
 // CHECKED:  destroy_value [[BOX]] : ${ var S }
 // CHECKED:  return [[VALS]] : $S
 // CHECKED-LABEL: } // end sil function 'f010_initS'
-sil hidden [noinline] @f010_initS : $@convention(thin) () -> @owned S {
+sil hidden [noinline] [ossa] @f010_initS : $@convention(thin) () -> @owned S {
 bb0:
   %0 = alloc_box ${ var S }, var, name "s"
   %1 = project_box %0 : ${ var S }, 0
@@ -66,7 +66,7 @@
 // And since inactive elimination currently eliminates all dynamic markers,
 // they are gone from the output.
 //
-// UNCHECKED-LABEL: sil hidden @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
+// UNCHECKED-LABEL: sil hidden [ossa] @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
 // UNCHECKED: bb0(%0 : @owned ${ var Builtin.Int64 }):
 // UNCHECKED:  [[ADR:%.*]] = project_box %0 : ${ var Builtin.Int64 }, 0
 // UNCHECKED:  [[VAL:%.*]] = integer_literal $Builtin.Int64, 42
@@ -77,7 +77,7 @@
 // UNCHECKED:  return %{{.*}} : $()
 // UNCHECKED-LABEL: } // end sil function 'f020_boxArg'
 //
-// CHECKED-LABEL: sil hidden @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
+// CHECKED-LABEL: sil hidden [ossa] @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
 // CHECKED: bb0(%0 : @owned ${ var Builtin.Int64 }):
 // CHECKED:  [[ADR:%.*]] = project_box %0 : ${ var Builtin.Int64 }, 0
 // CHECKED:  [[VAL:%.*]] = integer_literal $Builtin.Int64, 42
@@ -87,7 +87,7 @@
 // CHECKED:  destroy_value %0 : ${ var Builtin.Int64 }
 // CHECKED:  return %{{.*}} : $()
 // CHECKED-LABEL: } // end sil function 'f020_boxArg'
-sil hidden @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
+sil hidden [ossa] @f020_boxArg : $@convention(thin) (@owned { var Builtin.Int64 }) -> () {
 bb0(%0 : @owned ${ var Builtin.Int64 }):
   %1 = project_box %0 : ${ var Builtin.Int64 }, 0
   %3 = integer_literal $Builtin.Int64, 42
diff --git a/test/SILOptimizer/access_marker_verify.swift b/test/SILOptimizer/access_marker_verify.swift
index 99992ee..a53bfa1 100644
--- a/test/SILOptimizer/access_marker_verify.swift
+++ b/test/SILOptimizer/access_marker_verify.swift
@@ -50,7 +50,7 @@
   }
 }
 // The verifier ignores the load of the self box.
-// CHECK-LABEL: sil hidden @$s20access_marker_verify11StructOfIntVACycfC : $@convention(method) (@thin StructOfInt.Type) -> StructOfInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify11StructOfIntVACycfC : $@convention(method) (@thin StructOfInt.Type) -> StructOfInt {
 // CHECK: bb0(%0 : $@thin StructOfInt.Type):
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var StructOfInt }, var, name "self"
 // CHECK:   [[UNINIT:%.*]] = mark_uninitialized [rootself] [[BOX]] : ${ var StructOfInt }
@@ -87,7 +87,7 @@
     super.init()
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify11SuperHasIntCACycfc : $@convention(method) (@owned SuperHasInt) -> @owned SuperHasInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify11SuperHasIntCACycfc : $@convention(method) (@owned SuperHasInt) -> @owned SuperHasInt {
 // CHECK:   bb0(%0 : @owned $SuperHasInt):
 // CHECK:   [[UNINIT:%.*]] = mark_uninitialized [rootself] %0 : $SuperHasInt
 // CHECK:   [[BORROW:%.*]] = begin_borrow [[UNINIT]] : $SuperHasInt
@@ -102,7 +102,7 @@
 // CHECK:   return [[VAL]] : $SuperHasInt
 // CHECK-LABEL: } // end sil function '$s20access_marker_verify11SuperHasIntCACycfc'
 
-// CHECK-LABEL: sil hidden @$s20access_marker_verify9SubHasIntCACycfc : $@convention(method) (@owned SubHasInt) -> @owned SubHasInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify9SubHasIntCACycfc : $@convention(method) (@owned SubHasInt) -> @owned SubHasInt {
 // CHECK: bb0(%0 : @owned $SubHasInt):
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var SubHasInt }, let, name "self"
 // CHECK:   [[UNINIT:%.*]] = mark_uninitialized [derivedself] [[BOX]] : ${ var SubHasInt }
@@ -129,7 +129,7 @@
 // CHECK:   return [[VAL]] : $SubHasInt
 // CHECK-LABEL: } // end sil function '$s20access_marker_verify9SubHasIntCACycfc'
 
-// CHECK-LABEL: sil hidden @$s20access_marker_verify9SubHasIntC1xACSi_tcfc : $@convention(method) (Int, @owned SubHasInt) -> @owned SubHasInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify9SubHasIntC1xACSi_tcfc : $@convention(method) (Int, @owned SubHasInt) -> @owned SubHasInt {
 // CHECK: bb0(%0 : $Int, %1 : @owned $SubHasInt):
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var SubHasInt }, let, name "self"
 // CHECK:   [[UNINIT:%.*]] = mark_uninitialized [derivedself] [[BOX]] : ${ var SubHasInt }
@@ -163,7 +163,7 @@
 
 // FIXME: should be a [unknown] access.
 //
-// CHECK-LABEL: sil hidden @$s20access_marker_verify10testGetLet1cSiAA0F5ClassC_tF : $@convention(thin) (@guaranteed LetClass) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify10testGetLet1cSiAA0F5ClassC_tF : $@convention(thin) (@guaranteed LetClass) -> Int {
 // CHECK: bb0(%0 : @guaranteed $LetClass):
 // CHECK:   ref_element_addr
 // CHECK:   load [trivial]
@@ -186,7 +186,7 @@
     super.init()
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify10SubWrapperCyAcA03IntE0Vcfc : $@convention(method) (IntWrapper, @owned SubWrapper) -> @owned SubWrapper {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify10SubWrapperCyAcA03IntE0Vcfc : $@convention(method) (IntWrapper, @owned SubWrapper) -> @owned SubWrapper {
 // CHECK: bb0(%0 : $IntWrapper, %1 : @owned $SubWrapper):
 // CHECK:   alloc_box ${ var SubWrapper }, let, name "self"
 // CHECK:   mark_uninitialized [derivedself]
@@ -214,7 +214,7 @@
   _ = x
   return f
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify16testCaptureLocalyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify16testCaptureLocalyycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> () {
 // CHECK: bb0:
 // CHECK:   alloc_box ${ var Int }, var, name "x"
 // CHECK:   [[PROJ:%.*]] = project_box
@@ -237,7 +237,7 @@
   lhs.changeMe()
   return lhs
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify11testModifySyAA11StructOfIntVADF : $@convention(thin) (StructOfInt) -> StructOfInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify11testModifySyAA11StructOfIntVADF : $@convention(thin) (StructOfInt) -> StructOfInt {
 // CHECK: bb0(%0 : $StructOfInt):
 // CHECK:   alloc_box ${ var StructOfInt }, var, name "lhs"
 // CHECK:   mark_uninitialized [var]
@@ -262,7 +262,7 @@
   var x = p.x
   return x
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify14testInitLValue1pSiAA12HasIntGetter_p_tF : $@convention(thin) (@in_guaranteed HasIntGetter) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify14testInitLValue1pSiAA12HasIntGetter_p_tF : $@convention(thin) (@in_guaranteed HasIntGetter) -> Int {
 // CHECK: bb0(%0 : $*HasIntGetter):
 // CHECK:   alloc_box ${ var Int }, var, name "x"
 // CHECK:   [[PROJ:%.*]] = project_box
@@ -288,7 +288,7 @@
   lhs = arg
   return lhs
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify9testCopySyAA11StructOfIntVADF : $@convention(thin) (StructOfInt) -> StructOfInt {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify9testCopySyAA11StructOfIntVADF : $@convention(thin) (StructOfInt) -> StructOfInt {
 // CHECK: bb0(%0 : $StructOfInt):
 // CHECK:   alloc_stack $StructOfInt, let, name "lhs"
 // CHECK:   [[UNINIT:%.*]] = mark_uninitialized [var]
@@ -303,7 +303,7 @@
   var lhs = arg
   return lhs.i
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify16testLocalVarInitySiAA11StructOfIntVF : $@convention(thin) (StructOfInt) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify16testLocalVarInitySiAA11StructOfIntVF : $@convention(thin) (StructOfInt) -> Int {
 // CHECK: bb0(%0 : $StructOfInt):
 // CHECK:   alloc_box ${ var StructOfInt }, var, name "lhs"
 // CHECK:   [[BOX:%.*]] = project_box
@@ -324,7 +324,7 @@
 func testInitGenericEnum<T>(t: T) -> GenericEnum<T>? {
   return GenericEnum(t: t)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify11GenericEnumO1tACyxGSgx_tcfC : $@convention(method) <T> (@in T, @thin GenericEnum<T>.Type) -> @out Optional<GenericEnum<T>> {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify11GenericEnumO1tACyxGSgx_tcfC : $@convention(method) <T> (@in T, @thin GenericEnum<T>.Type) -> @out Optional<GenericEnum<T>> {
 // CHECK: bb0(%0 : $*Optional<GenericEnum<T>>, %1 : $*T, %2 : $@thin GenericEnum<T>.Type):
 // CHECK:   alloc_box $<τ_0_0> { var GenericEnum<τ_0_0> } <T>, var, name "self"
 // CHECK:   mark_uninitialized [delegatingself] %3 : $<τ_0_0> { var GenericEnum<τ_0_0> } <T>
@@ -351,7 +351,7 @@
 func testIndirectEnum() -> IndirectEnum {
   return IndirectEnum.V(3)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify16testIndirectEnumAA0eF0OyF : $@convention(thin) () -> @owned IndirectEnum {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify16testIndirectEnumAA0eF0OyF : $@convention(thin) () -> @owned IndirectEnum {
 // CHECK: bb0:
 // CHECK:   alloc_box ${ var Int }
 // CHECK:   [[PROJ:%.*]] = project_box
@@ -373,7 +373,7 @@
     }
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify7IntEnumO8getValueSivg : $@convention(method) (@guaranteed IntEnum) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify7IntEnumO8getValueSivg : $@convention(method) (@guaranteed IntEnum) -> Int {
 // CHECK: bb0(%0 : @guaranteed $IntEnum):
 // CHECK:   switch_enum %{{.*}} : $IntEnum, case #IntEnum.int!enumelt.1: bb1
 // CHECK: bb1(%{{.*}} : @guaranteed ${ var Int }):
@@ -392,7 +392,7 @@
     }
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify7RefEnumO8getValueAA9BaseClassCvg : $@convention(method) (@guaranteed RefEnum) -> @owned BaseClass {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify7RefEnumO8getValueAA9BaseClassCvg : $@convention(method) (@guaranteed RefEnum) -> @owned BaseClass {
 // CHECK: bb0(%0 : @guaranteed $RefEnum):
 // CHECK:   switch_enum %{{.*}} : $RefEnum, case #RefEnum.ref!enumelt.1: bb1
 // CHECK: bb1(%{{.*}} : @guaranteed ${ var BaseClass }):
@@ -409,7 +409,7 @@
   _ = kind
   return true
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify15testEnumPattern2ieSbAA08IndirectE0O_tF : $@convention(thin) (@guaranteed IndirectEnum) -> Bool {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify15testEnumPattern2ieSbAA08IndirectE0O_tF : $@convention(thin) (@guaranteed IndirectEnum) -> Bool {
 // CHECK: bb0(%0 : @guaranteed $IndirectEnum):
 // CHECK:   switch_enum %{{.*}} : $IndirectEnum, case #IndirectEnum.V!enumelt.1: [[BBV:bb.*]], default bb
 // CHECK: [[BBV]](%{{.*}} : @owned ${ var Int }):
@@ -425,7 +425,7 @@
 }
 func enumLValueHelper(_: inout E, _: inout E) {}
 
-// CHECK-LABEL: sil hidden @$s20access_marker_verify14testEnumLValue1syAA08StructOfE0Vz_tF : $@convention(thin) (@inout StructOfEnum) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify14testEnumLValue1syAA08StructOfE0Vz_tF : $@convention(thin) (@inout StructOfEnum) -> () {
 // CHECK: bb0(%0 : $*StructOfEnum):
 // CHECK:   begin_access [modify] [unknown] %0 : $*StructOfEnum
 // CHECK:   struct_element_addr %2 : $*StructOfEnum, #StructOfEnum.e
@@ -455,7 +455,7 @@
   var dict = dict
   dict[1]?.append(2)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify0A13OptionalArrayyyAA6MyDictVySiSaySiGGF : $@convention(thin) (@guaranteed MyDict<Int, Array<Int>>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify0A13OptionalArrayyyAA6MyDictVySiSaySiGGF : $@convention(thin) (@guaranteed MyDict<Int, Array<Int>>) -> () {
 // CHECK: bb0(%0 : @guaranteed $MyDict<Int, Array<Int>>):
 // CHECK:   alloc_box ${ var MyDict<Int, Array<Int>> }, var, name "dict"
 // CHECK:   [[PROJ:%.*]] = project_box
@@ -531,7 +531,7 @@
     }
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify15OptionalWithMapO3mapyqd__Sgqd__xKXEKlF : $@convention(method) <Wrapped><U> (@noescape @callee_guaranteed (@in_guaranteed Wrapped) -> (@out U, @error Error), @in_guaranteed OptionalWithMap<Wrapped>) -> (@out Optional<U>, @error Error) {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify15OptionalWithMapO3mapyqd__Sgqd__xKXEKlF : $@convention(method) <Wrapped><U> (@noescape @callee_guaranteed (@in_guaranteed Wrapped) -> (@out U, @error Error), @in_guaranteed OptionalWithMap<Wrapped>) -> (@out Optional<U>, @error Error) {
 // CHECK: bb0(%0 : $*Optional<U>, %1 : $@noescape @callee_guaranteed (@in_guaranteed Wrapped) -> (@out U, @error Error), %2 : $*OptionalWithMap<Wrapped>):
 // CHECK: [[STK:%.]] = alloc_stack $OptionalWithMap<Wrapped>
 // CHECK-NOT: begin_access
@@ -558,7 +558,7 @@
     self.init(i: 4)
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify14DelegatingInitV1iACSi_tcfC : $@convention(method) (Int, @thin DelegatingInit.Type) -> DelegatingInit {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify14DelegatingInitV1iACSi_tcfC : $@convention(method) (Int, @thin DelegatingInit.Type) -> DelegatingInit {
 // CHECK: bb0(%0 : $Int, %1 : $@thin DelegatingInit.Type):
 // CHECK:   alloc_box ${ var DelegatingInit }, var, name "self"
 // CHECK:   mark_uninitialized [rootself] %2 : ${ var DelegatingInit }
@@ -577,7 +577,7 @@
 func testAddressor(p: UnsafePointer<Int>) -> Int {
   return p.pointee
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify13testAddressor1pSiSPySiG_tF : $@convention(thin) (UnsafePointer<Int>) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify13testAddressor1pSiSPySiG_tF : $@convention(thin) (UnsafePointer<Int>) -> Int {
 // CHECK: bb0(%0 : $UnsafePointer<Int>):
 // CHECK:   apply
 // CHECK:   struct_extract
@@ -591,7 +591,7 @@
 func testShims() -> UInt32 {
   return _SwiftKeyPathBufferHeader_SizeMask
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify9testShimss6UInt32VyF : $@convention(thin) () -> UInt32 {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify9testShimss6UInt32VyF : $@convention(thin) () -> UInt32 {
 // CHECK: bb0:
 // CHECK:   [[GA:%.*]] = global_addr @_SwiftKeyPathBufferHeader_SizeMask : $*UInt32
 // CHECK-NOT: begin_access
@@ -601,7 +601,7 @@
 
 // --- global variable initialization.
 var globalString1 = "⓪" // start non-empty
-// CHECK-LABEL: sil private @globalinit_33_{{.*}}_func0 : $@convention(c) () -> () {
+// CHECK-LABEL: sil private [ossa] @globalinit_33_{{.*}}_func0 : $@convention(c) () -> () {
 // CHECK: alloc_global @$s20access_marker_verify13globalString1SSvp
 // CHECK: [[GA:%.*]] = global_addr @$s20access_marker_verify13globalString1SSvp : $*String
 // CHECK: apply
@@ -611,7 +611,7 @@
 // CHECK-LABEL: } // end sil function 'globalinit_33_180BF7B9126DB0C8C6C26F15ACD01908_func0'
 
 var globalString2 = globalString1
-// CHECK-LABEL: sil private @globalinit_33_180BF7B9126DB0C8C6C26F15ACD01908_func1 : $@convention(c) () -> () {
+// CHECK-LABEL: sil private [ossa] @globalinit_33_180BF7B9126DB0C8C6C26F15ACD01908_func1 : $@convention(c) () -> () {
 // CHECK: alloc_global @$s20access_marker_verify13globalString2SSvp
 // CHECK: [[GA:%.*]] = global_addr @$s20access_marker_verify13globalString2SSvp : $*String
 // CHECK: apply
@@ -639,7 +639,7 @@
     get { return Value(val) }
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify23GenericStructWithGetterV5valueAC5ValueVyx_Gvg : $@convention(method) <T> (@in_guaranteed GenericStructWithGetter<T>) -> GenericStructWithGetter<T>.Value {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify23GenericStructWithGetterV5valueAC5ValueVyx_Gvg : $@convention(method) <T> (@in_guaranteed GenericStructWithGetter<T>) -> GenericStructWithGetter<T>.Value {
 // CHECK: bb0(%0 : $*GenericStructWithGetter<T>):
 // CHECK:   [[ADR:%.*]] = struct_element_addr %0 : $*GenericStructWithGetter<T>, #GenericStructWithGetter.val
 // CHECK-NOT: begin_access
@@ -664,7 +664,7 @@
     val += incVal
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify16StructWithSetterV3inc0G3ValySi_tF : $@convention(method) (Int, @inout StructWithSetter) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify16StructWithSetterV3inc0G3ValySi_tF : $@convention(method) (Int, @inout StructWithSetter) -> () {
 // CHECK: bb0(%0 : $Int, %1 : $*StructWithSetter):
 // CHECK: [[FORMALACCESS:%.*]] = begin_access [modify] [unknown] %1
 // CHECK: alloc_stack $Int
@@ -694,7 +694,7 @@
 func inoutWriteOfLazyFinalClassProperty(l: inout LazyFinalClassProperty) {
   increment(&l.cat)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify34inoutWriteOfLazyFinalClassProperty1lyAA0ghiJ0Cz_tF : $@convention(thin) (@inout LazyFinalClassProperty) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify34inoutWriteOfLazyFinalClassProperty1lyAA0ghiJ0Cz_tF : $@convention(thin) (@inout LazyFinalClassProperty) -> () {
 // CHECK: bb0(%0 : $*LazyFinalClassProperty):
 // CHECK:   [[FORMALACCESS:%.*]] = begin_access [read] [unknown] %0 : $*LazyFinalClassProperty
 // CHECK:   load [copy] [[FORMALACCESS]] : $*LazyFinalClassProperty
@@ -720,7 +720,7 @@
 ) -> Int {
   return l.cat
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify35inoutAccessOfLazyFinalClassProperty1lSiAA0ghiJ0Cz_tF : $@convention(thin) (@inout LazyFinalClassProperty) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify35inoutAccessOfLazyFinalClassProperty1lSiAA0ghiJ0Cz_tF : $@convention(thin) (@inout LazyFinalClassProperty) -> Int {
 // CHECK: bb0(%0 : $*LazyFinalClassProperty):
 // CHECK:   begin_access [read] [unknown] %0
 // CHECK:   load [copy]
@@ -738,7 +738,7 @@
 class C : Abstractable {
   var storedFunction: () -> Int = { 0 }
 }
-// CHECK-LABEL: sil private [transparent] [thunk] @$s20access_marker_verify1CCAA12AbstractableA2aDP14storedFunction6ResultQzycvMTW : $@yield_once @convention(witness_method: Abstractable) (@inout C) -> @yields @inout @callee_guaranteed () -> @out Int
+// CHECK-LABEL: sil private [transparent] [thunk] [ossa] @$s20access_marker_verify1CCAA12AbstractableA2aDP14storedFunction6ResultQzycvMTW : $@yield_once @convention(witness_method: Abstractable) (@inout C) -> @yields @inout @callee_guaranteed () -> @out Int
 // CHECK:      bb0(%0 : $*C):
 // CHECK-NEXT:   [[SELF:%.*]] = load_borrow %0 : $*C
 // CHECK-NEXT:   [[MODIFY:%.*]] = class_method [[SELF]] : $C, #C.storedFunction!modify.1
@@ -787,7 +787,7 @@
 func testWriteback() {
   takesInoutP(x: &addressOnly)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify13testWritebackyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify13testWritebackyyF : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK:   %0 = alloc_stack $P
 // CHECK: [[GETTER:%.*]] = apply
@@ -815,7 +815,7 @@
     self.storage.push()
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify9ContainerC17testWritebackTempyyF : $@convention(method) (@guaranteed Container) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify9ContainerC17testWritebackTempyyF : $@convention(method) (@guaranteed Container) -> () {
 // CHECK: bb0(%0 : @guaranteed $Container):
 // call storage.materializeForSet
 // CHECK: [[MODIFY:%.*]] = class_method %0 : $Container, #Container.storage!modify.1
@@ -832,7 +832,7 @@
 func testMixedTuple(p: HasClassGetter) -> (BaseClass, Any) {
   return (p.c, p.c)
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify14testMixedTuple1pAA9BaseClassC_yptAA03HasH6Getter_p_tF : $@convention(thin) (@in_guaranteed HasClassGetter) -> (@owned BaseClass, @out Any) {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify14testMixedTuple1pAA9BaseClassC_yptAA03HasH6Getter_p_tF : $@convention(thin) (@in_guaranteed HasClassGetter) -> (@owned BaseClass, @out Any) {
 // CHECK: bb0(%0 : $*Any, %1 : $*HasClassGetter):
 // CHECK: [[P1:%.*]] = open_existential_addr immutable_access %1 : $*HasClassGetter to $*@opened
 // CHECK: [[TEMP1:%.*]] = alloc_stack $@opened
@@ -863,7 +863,7 @@
     return (self as CanCast as? CanCastStruct<T>)?.base
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify13CanCastStructV5unboxqd__SgySHRd__lF : $@convention(method) <Base where Base : Hashable><T where T : Hashable> (@in_guaranteed CanCastStruct<Base>) -> @out Optional<T> {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify13CanCastStructV5unboxqd__SgySHRd__lF : $@convention(method) <Base where Base : Hashable><T where T : Hashable> (@in_guaranteed CanCastStruct<Base>) -> @out Optional<T> {
 // CHECK: bb0(%0 : $*Optional<T>, %1 : $*CanCastStruct<Base>):
 // CHECK: [[OUT_ENUM:%.*3]] = init_enum_data_addr %0 : $*Optional<T>, #Optional.some!enumelt.1
 // CHECK: [[TEMP_SUB:%.*]] = alloc_stack $Optional<CanCastStruct<T>>
@@ -895,7 +895,7 @@
     q.bar()
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify19testOpenExistential1pyAA4PBar_p_tF : $@convention(thin) (@in_guaranteed PBar) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify19testOpenExistential1pyAA4PBar_p_tF : $@convention(thin) (@in_guaranteed PBar) -> () {
 // CHECK: bb0(%0 : $*PBar):
 // CHECK: [[Q0:%.*]] = alloc_stack $Optional<Q>, let, name "q0"
 // CHECK: [[PBAR:%.*]] = alloc_stack $PBar
@@ -936,7 +936,7 @@
   takesClosure { p = getP() }
   _ = p
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify20testLocalExistentialyyF : $@convention(thin) () -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify20testLocalExistentialyyF : $@convention(thin) () -> () {
 // CHECK: alloc_box ${ var P }, var, name "p"
 // CHECK: [[PROJ:%.*]] = project_box %{{.*}} : ${ var P }, 0
 // CHECK-NOT: begin_access
@@ -963,7 +963,7 @@
     a.bar(b)
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify8UsesSelfPAAE04testE01a1byx_xtFZ : $@convention(method) <Self where Self : UsesSelf> (@in_guaranteed Self, @in_guaranteed Self, @thick Self.Type) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify8UsesSelfPAAE04testE01a1byx_xtFZ : $@convention(method) <Self where Self : UsesSelf> (@in_guaranteed Self, @in_guaranteed Self, @thick Self.Type) -> () {
 // CHECK: bb0(%0 : $*Self, %1 : $*Self, %2 : $@thick Self.Type):
 // CHECK: apply %{{.*}}<Self>(%1, %0) : $@convention(witness_method: UsesSelf) <τ_0_0 where τ_0_0 : UsesSelf> (@in_guaranteed τ_0_0, @in_guaranteed τ_0_0) -> ()
 // CHECK-LABEL: } // end sil function '$s20access_marker_verify8UsesSelfPAAE04testE01a1byx_xtFZ'
@@ -974,7 +974,7 @@
     assert(MemoryLayout.size(ofValue: self) >= 0)
   }
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify16StructWithLayoutVACycfC : $@convention(method) (@thin StructWithLayout.Type) -> StructWithLayout {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify16StructWithLayoutVACycfC : $@convention(method) (@thin StructWithLayout.Type) -> StructWithLayout {
 // CHECK: bb0(%0 : $@thin StructWithLayout.Type):
 // CHECK: alloc_box ${ var StructWithLayout }, var, name "self"
 // CHECK: mark_uninitialized [rootself] %{{.*}} : ${ var StructWithLayout }
@@ -996,7 +996,7 @@
 func testPointerInit(x: Int, y: UnsafeMutablePointer<Int>) {
   y.pointee = x
 }
-// CHECK-LABEL: sil hidden @$s20access_marker_verify15testPointerInit1x1yySi_SpySiGtF : $@convention(thin) (Int, UnsafeMutablePointer<Int>) -> () {
+// CHECK-LABEL: sil hidden [ossa] @$s20access_marker_verify15testPointerInit1x1yySi_SpySiGtF : $@convention(thin) (Int, UnsafeMutablePointer<Int>) -> () {
 // CHECK: bb0(%0 : $Int, %1 : $UnsafeMutablePointer<Int>):
 // call addressor
 // CHECK: [[POINTEE:%.*]] = apply %{{.*}}<Int>(%1) : $@convention(method) <τ_0_0> (UnsafeMutablePointer<τ_0_0>) -> UnsafeMutablePointer<τ_0_0>
@@ -1010,7 +1010,7 @@
 class testInitExistentialGlobal {
   static var testProperty: P = StructP()
 }
-// CHECK-LABEL: sil private @globalinit{{.*}} : $@convention(c) () -> () {
+// CHECK-LABEL: sil private [ossa] @globalinit{{.*}} : $@convention(c) () -> () {
 // CHECK:   alloc_global @$s20access_marker_verify25testInitExistentialGlobalC0D8PropertyAA1P_pvpZ
 // CHECK:   [[GADR:%.*]] = global_addr @$s20access_marker_verify25testInitExistentialGlobalC0D8PropertyAA1P_pvpZ : $*P
 // CHECK:   %{{.*}} = apply %{{.*}}({{.*}}) : $@convention(method) (@thin StructP.Type) -> StructP
@@ -1026,7 +1026,7 @@
 public func testInitBox() throws {
     throw SomeError.error
 }
-// CHECK-LABEL: sil @$s20access_marker_verify11testInitBoxyyKF : $@convention(thin) () -> @error Error {
+// CHECK-LABEL: sil [ossa] @$s20access_marker_verify11testInitBoxyyKF : $@convention(thin) () -> @error Error {
 // CHECK: [[BOXALLOC:%.*]] = alloc_existential_box $Error, $SomeError
 // CHECK: [[PROJ:%.*]] = project_existential_box $SomeError in [[BOXALLOC]] : $Error
 // CHECK: store [[BOXALLOC]] to [init] [[BOXBUF:%.*]] :
@@ -1046,7 +1046,7 @@
   return .empty
 }
 
-// CHECK-LABEL: sil @$s20access_marker_verify13getStaticPropAA03HaseF0CyF : $@convention(thin) () -> @owned HasStaticProp {
+// CHECK-LABEL: sil [ossa] @$s20access_marker_verify13getStaticPropAA03HaseF0CyF : $@convention(thin) () -> @owned HasStaticProp {
 // function_ref HasStaticProp.empty.unsafeMutableAddressor
 // CHECK: [[F:%.*]] = function_ref @$s20access_marker_verify13HasStaticPropC5emptyACvau : $@convention(thin) () -> Builtin.RawPointer
 // CHECK: [[RP:%.*]] = apply [[F]]() : $@convention(thin) () -> Builtin.RawPointer
diff --git a/test/SILOptimizer/access_marker_verify_objc.swift b/test/SILOptimizer/access_marker_verify_objc.swift
index a8f855a..9aa2414 100644
--- a/test/SILOptimizer/access_marker_verify_objc.swift
+++ b/test/SILOptimizer/access_marker_verify_objc.swift
@@ -34,7 +34,7 @@
 class HasBlockImpl: HasBlock {
   @objc func block(_: (Int) -> Int) {}
 }
-// CHECK-LABEL: sil hidden [thunk] @$s25access_marker_verify_objc12HasBlockImplC5blockyyS2iXEFTo : $@convention(objc_method) (@convention(block) @noescape (Int) -> Int, HasBlockImpl) -> () {
+// CHECK-LABEL: sil hidden [thunk] [ossa] @$s25access_marker_verify_objc12HasBlockImplC5blockyyS2iXEFTo : $@convention(objc_method) (@convention(block) @noescape (Int) -> Int, HasBlockImpl) -> () {
 // CHECK: bb0(%0 : @unowned $@convention(block) @noescape (Int) -> Int, %1 : @unowned $HasBlockImpl):
 // CHECK:   [[CP:%.*]] = copy_block %0 : $@convention(block) @noescape (Int) -> Int
             // function_ref thunk for @callee_unowned @convention(block) (@unowned Int) -> (@unowned Int)
@@ -47,7 +47,7 @@
 // CHECK-LABEL: } // end sil function '$s25access_marker_verify_objc12HasBlockImplC5blockyyS2iXEFTo'
 
 // thunk for @callee_unowned @convention(block) (@unowned Int) -> (@unowned Int)
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] @$sS2iIyByd_S2iIegyd_TR : $@convention(thin) (Int, @guaranteed @convention(block) @noescape (Int) -> Int) -> Int {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sS2iIyByd_S2iIegyd_TR : $@convention(thin) (Int, @guaranteed @convention(block) @noescape (Int) -> Int) -> Int {
 // CHECK: bb0(%0 : $Int, %1 : @guaranteed $@convention(block) @noescape (Int) -> Int):
 // CHECK:   %{{.*}} = apply %1(%0) : $@convention(block) @noescape (Int) -> Int
 // CHECK:  return %{{.*}} : $Int                               
@@ -55,7 +55,7 @@
 
 // --- C global.
 // The verifier should ignore this access.
-// CHECK-LABEL: sil hidden @$s25access_marker_verify_objc14GlobalPropertyC14globalCFStringSo0H3RefavgZ : $@convention(method) (@thick GlobalProperty.Type) -> @owned CFString {
+// CHECK-LABEL: sil hidden [ossa] @$s25access_marker_verify_objc14GlobalPropertyC14globalCFStringSo0H3RefavgZ : $@convention(method) (@thick GlobalProperty.Type) -> @owned CFString {
 // CHECK: bb0(%0 : $@thick GlobalProperty.Type):
 // CHECK:   [[GA:%.*]] = global_addr @constCGlobal : $*Optional<CFString>
 // CHECK:   [[STR:%.*]] = load [copy] [[GA]] : $*Optional<CFString>            
diff --git a/test/SILOptimizer/access_sink.sil b/test/SILOptimizer/access_sink.sil
index 0730610..eeac330 100644
--- a/test/SILOptimizer/access_sink.sil
+++ b/test/SILOptimizer/access_sink.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -access-enforcement-release -assume-parsing-unqualified-ownership-sil %s -enable-sil-verify-all | %FileCheck %s
+// RUN: %target-sil-opt -access-enforcement-release %s -enable-sil-verify-all | %FileCheck %s
 //
 // Test the AccessEnforcementReleaseSinking pass in isolation.
 // This ensures that no upstream passes have removed SIL-level access markers
diff --git a/test/SILOptimizer/access_summary_analysis.sil b/test/SILOptimizer/access_summary_analysis.sil
index f057fb0..8357a47 100644
--- a/test/SILOptimizer/access_summary_analysis.sil
+++ b/test/SILOptimizer/access_summary_analysis.sil
@@ -18,7 +18,7 @@
 
 // CHECK-LABEL: @assignsToCapture
 // CHECK-NEXT: ([modify], [])
-sil private @assignsToCapture : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @assignsToCapture : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1: $Int):
   %2 = begin_access [modify] [unknown] %0 : $*Int
   assign %1 to %2 : $*Int
@@ -29,7 +29,7 @@
 
 // CHECK-LABEL: @readsAndModifiesSameCapture
 // CHECK-NEXT: ([modify])
-sil private @readsAndModifiesSameCapture : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @readsAndModifiesSameCapture : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = begin_access [read] [unknown] %0 : $*Int
   end_access %1 : $*Int
@@ -41,7 +41,7 @@
 
 // CHECK-LABEL: @readsAndModifiesSeparateCaptures
 // CHECK-NEXT: ([read], [modify])
-sil private @readsAndModifiesSeparateCaptures : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int) -> () {
+sil private [ossa] @readsAndModifiesSeparateCaptures : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int):
   %2 = begin_access [read] [unknown] %0 : $*Int
   end_access %2 : $*Int
@@ -53,7 +53,7 @@
 
 // CHECK-LABEL: @modifyInModifySubAccess
 // CHECK-NEXT: ([modify])
-sil private @modifyInModifySubAccess : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @modifyInModifySubAccess : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = begin_access [modify] [unknown] %0 : $*Int
   %2 = begin_access [modify] [unknown] %1 : $*Int
@@ -65,7 +65,7 @@
 
 // CHECK-LABEL: @readInModifySubAccess
 // CHECK-NEXT: ([modify])
-sil private @readInModifySubAccess : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @readInModifySubAccess : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = begin_access [modify] [unknown] %0 : $*Int
   %2 = begin_access [read] [unknown] %1 : $*Int
@@ -77,7 +77,7 @@
 
 // CHECK-LABEL: @accessSeparateStoredPropertiesOfSameCapture
 // CHECK-NEXT: ([.f modify, .g read])
-sil private @accessSeparateStoredPropertiesOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessSeparateStoredPropertiesOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStoredProperties
   %2 = struct_element_addr %1 : $*StructWithStoredProperties, #StructWithStoredProperties.f
@@ -91,7 +91,7 @@
 
 // CHECK-LABEL: @accessSeparateElementsOfSameCapture
 // CHECK-NEXT: ([.0 modify, .1 read])
-sil private @accessSeparateElementsOfSameCapture : $@convention(thin) (@inout_aliasable (Int, Int)) -> () {
+sil private [ossa] @accessSeparateElementsOfSameCapture : $@convention(thin) (@inout_aliasable (Int, Int)) -> () {
 bb0(%0 : $*(Int, Int)):
   %1 = begin_access [modify] [unknown] %0: $*(Int, Int)
   %2 = tuple_element_addr %1 : $*(Int, Int), 0
@@ -105,7 +105,7 @@
 
 // CHECK-LABEL: @accessSeparateNestedStoredPropertiesOfSameCapture
 // CHECK-NEXT: ([.a.f modify, .b.g modify])
-sil private @accessSeparateNestedStoredPropertiesOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStructWithStoredProperties) -> () {
+sil private [ossa] @accessSeparateNestedStoredPropertiesOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStructWithStoredProperties
   %2 = struct_element_addr %1 : $*StructWithStructWithStoredProperties, #StructWithStructWithStoredProperties.a
@@ -122,7 +122,7 @@
 
 // CHECK-LABEL: @accessSeparateStoredPropertiesOfSameCaptureOppositeOfDeclarationOrder
 // CHECK-NEXT: ([.f read, .g modify])
-sil private @accessSeparateStoredPropertiesOfSameCaptureOppositeOfDeclarationOrder : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessSeparateStoredPropertiesOfSameCaptureOppositeOfDeclarationOrder : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStoredProperties
   %2 = struct_element_addr %1 : $*StructWithStoredProperties, #StructWithStoredProperties.g
@@ -136,7 +136,7 @@
 
 // CHECK-LABEL: @accessAggregateDoesNotSubsumeAccessStoredProp
 // CHECK-NEXT: ([modify, .g modify])
-sil private @accessAggregateDoesNotSubsumeAccessStoredProp : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessAggregateDoesNotSubsumeAccessStoredProp : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStoredProperties
   end_access %1 : $*StructWithStoredProperties
@@ -149,7 +149,7 @@
 
 // CHECK-LABEL: @accessAggregateDoesNotSubsumeAccessStoredPropWithAggregateSecond
 // CHECK-NEXT: ([modify, .f modify])
-sil private @accessAggregateDoesNotSubsumeAccessStoredPropWithAggregateSecond : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessAggregateDoesNotSubsumeAccessStoredPropWithAggregateSecond : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStoredProperties
   %2 = struct_element_addr %1 : $*StructWithStoredProperties, #StructWithStoredProperties.f
@@ -162,7 +162,7 @@
 
 // CHECK-LABEL: @accessSameStoredPropertyOfSameCapture
 // CHECK-NEXT: ([.f modify])
-sil private @accessSameStoredPropertyOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessSameStoredPropertyOfSameCapture : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [read] [unknown] %0: $*StructWithStoredProperties
   %2 = struct_element_addr %1 : $*StructWithStoredProperties, #StructWithStoredProperties.f
@@ -176,7 +176,7 @@
 
 // CHECK-LABEL: @accessSeparateStoredPropertiesOfSameCaptureWithTSanInstrumentation
 // CHECK-NEXT: ([.f modify, .g read])
-sil private @accessSeparateStoredPropertiesOfSameCaptureWithTSanInstrumentation : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
+sil private [ossa] @accessSeparateStoredPropertiesOfSameCaptureWithTSanInstrumentation : $@convention(thin) (@inout_aliasable StructWithStoredProperties) -> () {
 bb0(%0 : $*StructWithStoredProperties):
   %1 = begin_access [modify] [unknown] %0: $*StructWithStoredProperties
   %2 = builtin "tsanInoutAccess"(%1 : $*StructWithStoredProperties) : $()
@@ -196,7 +196,7 @@
 // CHECK-NEXT: ([])
 // This mirrors the code pattern for materializeForSet on a struct stored
 // property
-sil private @addressToPointerOfStructElementAddr : $@convention(method) (@inout StructWithStoredProperties) -> (Builtin.RawPointer) {
+sil private [ossa] @addressToPointerOfStructElementAddr : $@convention(method) (@inout StructWithStoredProperties) -> (Builtin.RawPointer) {
 bb0(%1 : $*StructWithStoredProperties):
   %2 = struct_element_addr %1 : $*StructWithStoredProperties, #StructWithStoredProperties.f
   %3 = address_to_pointer %2 : $*Int to $Builtin.RawPointer
@@ -205,7 +205,7 @@
 
 // CHECK-LABEL: @endUnpairedAccess
 // CHECK-NEXT: ([])
-sil private @endUnpairedAccess : $@convention(method) (@inout Builtin.UnsafeValueBuffer) -> () {
+sil private [ossa] @endUnpairedAccess : $@convention(method) (@inout Builtin.UnsafeValueBuffer) -> () {
 bb0(%0 : $*Builtin.UnsafeValueBuffer):
   end_unpaired_access [dynamic] %0 : $*Builtin.UnsafeValueBuffer
   %1 = tuple ()
@@ -214,7 +214,7 @@
 
 // CHECK-LABEL: @tupleElementAddr
 // CHECK-NEXT: ([modify])
-sil private @tupleElementAddr : $@convention(thin) (@inout_aliasable (Int, Int)) -> () {
+sil private [ossa] @tupleElementAddr : $@convention(thin) (@inout_aliasable (Int, Int)) -> () {
 bb0(%0 : $*(Int, Int)):
   %1 = tuple_element_addr %0 : $*(Int, Int), 1
   %2 = begin_access [modify] [unknown] %1 : $*Int
@@ -227,7 +227,7 @@
 
 // CHECK-LABEL: @callClosureWithMissingBody
 // CHECK-NEXT: ([], [])
-sil private @callClosureWithMissingBody : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @callClosureWithMissingBody : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @closureWithMissingBody : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> () // no-crash
@@ -237,7 +237,7 @@
 
 // CHECK-LABEL: @callClosureThatModifiesCapture
 // CHECK-NEXT: ([modify], [])
-sil private @callClosureThatModifiesCapture : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @callClosureThatModifiesCapture : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @assignsToCapture : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -247,7 +247,7 @@
 
 // CHECK-LABEL: @throwingClosureThatModifesCapture
 // CHECK-NEXT: ([modify])
-sil private @throwingClosureThatModifesCapture : $@convention(thin) (@inout_aliasable Int) -> @error Error {
+sil private [ossa] @throwingClosureThatModifesCapture : $@convention(thin) (@inout_aliasable Int) -> @error Error {
 bb0(%0 : $*Int):
   %1 = begin_access [modify] [unknown] %0 : $*Int
   end_access %1 : $*Int
@@ -256,7 +256,7 @@
 }
 // CHECK-LABEL: @callThrowingClosureThatModifiesCapture
 // CHECK-NEXT: ([modify])
-sil private @callThrowingClosureThatModifiesCapture : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @callThrowingClosureThatModifiesCapture : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = function_ref @throwingClosureThatModifesCapture : $@convention(thin) (@inout_aliasable Int) -> @error Error
   try_apply %1(%0) : $@convention(thin) (@inout_aliasable Int) -> @error Error, normal bb1, error bb2
@@ -272,7 +272,7 @@
 
 // CHECK-LABEL: @partialApplyPassedOffToFunction
 // CHECK-NEXT: ([modify], [])
-sil private @partialApplyPassedOffToFunction : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @partialApplyPassedOffToFunction : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1: $Int):
   %2 = function_ref @assignsToCapture : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = partial_apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -287,7 +287,7 @@
 sil @takesGuaranteedNoEscapeClosureTakingArgumentThrowing : $@convention(thin) (@guaranteed @callee_owned (Int) -> @error Error) -> ()
 // CHECK-LABEL: @hasThreeCapturesAndTakesArgument
 // CHECK-NEXT: ([], [modify], [], [read])
-sil private @hasThreeCapturesAndTakesArgument : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
+sil private [ossa] @hasThreeCapturesAndTakesArgument : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
 bb0(%0 : $Int, %1: $*Int, %2: $*Int, %3: $*Int):
   %4 = begin_access [modify] [unknown] %1 : $*Int
   end_access %4 : $*Int
@@ -299,7 +299,7 @@
 
 // CHECK-LABEL: @partialApplyOfClosureTakingArgumentPassedOffToFunction
 // CHECK-NEXT: ([modify], [], [read])
-sil private @partialApplyOfClosureTakingArgumentPassedOffToFunction : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
+sil private [ossa] @partialApplyOfClosureTakingArgumentPassedOffToFunction : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int, %2 : $*Int):
   %3 = function_ref @hasThreeCapturesAndTakesArgument : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
   %4 = partial_apply %3(%0, %1, %2) : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
@@ -311,7 +311,7 @@
 
 // CHECK-LABEL: @partialApplyFollowedByConvertFunction
 // CHECK-NEXT: ([modify], [], [read])
-sil private @partialApplyFollowedByConvertFunction : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
+sil private [ossa] @partialApplyFollowedByConvertFunction : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int, %2 : $*Int):
   %3 = function_ref @hasThreeCapturesAndTakesArgument : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
   %4 = partial_apply %3(%0, %1, %2) : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
@@ -328,7 +328,7 @@
 
 // CHECK-LABEL: @readsAndThrows
 // CHECK-NEXT: ([read])
-sil private  @readsAndThrows : $@convention(thin) (@inout_aliasable Int) -> (Int, @error Error) {
+sil private [ossa] @readsAndThrows : $@convention(thin) (@inout_aliasable Int) -> (Int, @error Error) {
 bb0(%0 : $*Int):
   %3 = begin_access [read] [unknown] %0 : $*Int
   %4 = load [trivial] %3 : $*Int
@@ -338,7 +338,7 @@
 
 // CHECK-LABEL: @passPartialApplyAsArgumentToPartialApply
 // CHECK-NEXT: ([read])
-sil hidden @passPartialApplyAsArgumentToPartialApply : $@convention(thin) (@inout_aliasable Int) -> () {
+sil hidden [ossa] @passPartialApplyAsArgumentToPartialApply : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %2 = function_ref @takesAutoClosureReturningGeneric : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@owned @callee_owned () -> (@out τ_0_0, @error Error)) -> ()
   %3 = function_ref @readsAndThrows : $@convention(thin) (@inout_aliasable Int) -> (Int, @error Error)
@@ -352,7 +352,7 @@
 
 // CHECK-LABEL: @reads
 // CHECK-NEXT: ([read])
-sil private  @reads : $@convention(thin) (@inout_aliasable Int) -> Int {
+sil private [ossa] @reads : $@convention(thin) (@inout_aliasable Int) -> Int {
 bb0(%0 : $*Int):
   %3 = begin_access [read] [unknown] %0 : $*Int
   %4 = load [trivial] %3 : $*Int
@@ -362,7 +362,7 @@
 
 // CHECK-LABEL: @convertPartialApplyAndPassToPartialApply
 // CHECK-NEXT: ([read])
-sil hidden @convertPartialApplyAndPassToPartialApply : $@convention(thin) (@inout_aliasable Int) -> () {
+sil hidden [ossa] @convertPartialApplyAndPassToPartialApply : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %2 = function_ref @takesAutoClosureReturningGeneric : $@convention(thin) <τ_0_0 where τ_0_0 : Equatable> (@owned @callee_owned () -> (@out τ_0_0, @error Error)) -> ()
   %3 = function_ref @reads : $@convention(thin) (@inout_aliasable Int) -> Int
@@ -377,7 +377,7 @@
 
 // CHECK-LABEL: @selfRecursion
 // CHECK-NEXT: ([modify], [])
-sil private @selfRecursion : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @selfRecursion : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @selfRecursion : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -389,7 +389,7 @@
 
 // CHECK-LABEL: @callsMutuallyRecursive
 // CHECK-NEXT: ([modify], [])
-sil private @callsMutuallyRecursive : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @callsMutuallyRecursive : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @mutualRecursion1 : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -399,7 +399,7 @@
 
 // CHECK-LABEL: @mutualRecursion1
 // CHECK-NEXT: ([modify], [])
-sil private @mutualRecursion1 : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @mutualRecursion1 : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @mutualRecursion2 : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -411,7 +411,7 @@
 
 // CHECK-LABEL: @mutualRecursion2
 // CHECK-NEXT: ([modify], [])
-sil private @mutualRecursion2 : $@convention(thin) (@inout_aliasable Int, Int) -> () {
+sil private [ossa] @mutualRecursion2 : $@convention(thin) (@inout_aliasable Int, Int) -> () {
 bb0(%0 : $*Int, %1 : $Int):
   %2 = function_ref @mutualRecursion1 : $@convention(thin) (@inout_aliasable Int, Int) -> ()
   %3 = apply %2(%0, %1) : $@convention(thin) (@inout_aliasable Int, Int) -> ()
@@ -435,7 +435,7 @@
 //
 // CHECK-LABEL: @multipleCycleA
 // CHECK-NEXT: ([modify])
-sil private @multipleCycleA : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @multipleCycleA : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = function_ref @multipleCycleB : $@convention(thin) (@inout_aliasable Int) -> ()
   %2 = apply %1(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
@@ -447,7 +447,7 @@
 
 // CHECK-LABEL: @multipleCycleB
 // CHECK-NEXT: ([modify])
-sil private @multipleCycleB : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @multipleCycleB : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = function_ref @multipleCycleA : $@convention(thin) (@inout_aliasable Int) -> ()
   %2 = apply %1(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
@@ -459,7 +459,7 @@
 
 // CHECK-LABEL: @multipleCycleC
 // CHECK-NEXT: ([modify])
-sil private @multipleCycleC : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @multipleCycleC : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = function_ref @multipleCycleB : $@convention(thin) (@inout_aliasable Int) -> ()
   %2 = apply %1(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
@@ -471,7 +471,7 @@
 // borrow.
 // CHECK-LABEL: @partialApplyFollowedByConvertFunctionWithBorrow
 // CHECK-NEXT: ([modify], [], [read])
-sil private @partialApplyFollowedByConvertFunctionWithBorrow : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
+sil private [ossa] @partialApplyFollowedByConvertFunctionWithBorrow : $@convention(thin) (@inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int, %2 : $*Int):
   %3 = function_ref @hasThreeCapturesAndTakesArgument : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
   %4 = partial_apply %3(%0, %1, %2) : $@convention(thin) (Int, @inout_aliasable Int, @inout_aliasable Int, @inout_aliasable Int) -> ()
@@ -489,7 +489,7 @@
 sil @subject : $@convention(thin) (Builtin.Int64) -> ()
 
 // CHECK-LABEL: @partial_apply_convert
-sil @partial_apply_convert : $@convention(thin) () -> () {
+sil [ossa] @partial_apply_convert : $@convention(thin) () -> () {
 entry:
   %f = function_ref @subject : $@convention(thin) (Builtin.Int64) -> ()
   %z = integer_literal $Builtin.Int64, 0
diff --git a/test/SILOptimizer/access_wmo.sil b/test/SILOptimizer/access_wmo.sil
index 9995135..5863504 100644
--- a/test/SILOptimizer/access_wmo.sil
+++ b/test/SILOptimizer/access_wmo.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -wmo -access-enforcement-wmo -assume-parsing-unqualified-ownership-sil %s -enable-sil-verify-all | %FileCheck %s
+// RUN: %target-sil-opt -wmo -access-enforcement-wmo %s -enable-sil-verify-all | %FileCheck %s
 //
 // Test the AccessEnforcementWMO pass in isolation. This ensures that
 // no upstream passes have removed SIL-level access markers that are
diff --git a/test/SILOptimizer/accessed_storage_analysis.sil b/test/SILOptimizer/accessed_storage_analysis.sil
index 124749d..f003b13 100644
--- a/test/SILOptimizer/accessed_storage_analysis.sil
+++ b/test/SILOptimizer/accessed_storage_analysis.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt %s -accessed-storage-dump -enable-sil-verify-all -o /dev/null -assume-parsing-unqualified-ownership-sil | %FileCheck %s
+// RUN: %target-sil-opt %s -accessed-storage-dump -enable-sil-verify-all -o /dev/null | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/address_lowering.sil b/test/SILOptimizer/address_lowering.sil
index 984ae47..a455c2b 100644
--- a/test/SILOptimizer/address_lowering.sil
+++ b/test/SILOptimizer/address_lowering.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -address-lowering -enable-sil-opaque-values -emit-sorted-sil -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -address-lowering -enable-sil-opaque-values -emit-sorted-sil %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/address_projection.sil b/test/SILOptimizer/address_projection.sil
index 334de1f..97b97d7 100644
--- a/test/SILOptimizer/address_projection.sil
+++ b/test/SILOptimizer/address_projection.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -address-lowering -enable-sil-opaque-values -optimize-opaque-address-lowering -emit-sorted-sil -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -address-lowering -enable-sil-opaque-values -optimize-opaque-address-lowering -emit-sorted-sil %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/alias-crash.sil b/test/SILOptimizer/alias-crash.sil
index f489caa..d45aa0f 100644
--- a/test/SILOptimizer/alias-crash.sil
+++ b/test/SILOptimizer/alias-crash.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -redundant-load-elim | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -redundant-load-elim | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/allocbox_to_stack.sil b/test/SILOptimizer/allocbox_to_stack.sil
index 5db8a10..5ae9786 100644
--- a/test/SILOptimizer/allocbox_to_stack.sil
+++ b/test/SILOptimizer/allocbox_to_stack.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all %s -allocbox-to-stack | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -allocbox-to-stack | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/allocbox_to_stack_ownership.sil b/test/SILOptimizer/allocbox_to_stack_ownership.sil
index 267316f..7ea5afe 100644
--- a/test/SILOptimizer/allocbox_to_stack_ownership.sil
+++ b/test/SILOptimizer/allocbox_to_stack_ownership.sil
@@ -12,8 +12,8 @@
 
 protocol Error {}
 
-// CHECK-LABEL: sil @simple_promotion
-sil @simple_promotion : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil [ossa] @simple_promotion
+sil [ossa] @simple_promotion : $@convention(thin) (Int) -> Int {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %1a = project_box %1 : ${ var Int }, 0
@@ -28,8 +28,8 @@
 // CHECK: return
 }
 
-// CHECK-LABEL: sil @double_project_box
-sil @double_project_box : $@convention(thin) (Int) -> (Int, Int) {
+// CHECK-LABEL: sil [ossa] @double_project_box
+sil [ossa] @double_project_box : $@convention(thin) (Int) -> (Int, Int) {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %1a = project_box %1 : ${ var Int }, 0
@@ -48,8 +48,8 @@
 // CHECK-NOT: destroy_value
 // CHECK: return
 }
-// CHECK-LABEL: sil @init_var
-sil @init_var : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil [ossa] @init_var
+sil [ossa] @init_var : $@convention(thin) () -> Int {
 bb0:
   %1 = alloc_box ${ var Int }
   %1a = project_box %1 : ${ var Int }, 0
@@ -65,8 +65,8 @@
 // CHECK: return
 }
 
-// CHECK-LABEL: sil @multi_destroy_value
-sil @multi_destroy_value : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil [ossa] @multi_destroy_value
+sil [ossa] @multi_destroy_value : $@convention(thin) () -> Int {
 bb0:
   %1 = alloc_box ${ var Int }
   %1a = mark_uninitialized [rootself] %1 : ${ var Int }
@@ -90,8 +90,8 @@
   var Elt : Int
 }
 
-// CHECK-LABEL: sil @struct_tuple_element_addr
-sil @struct_tuple_element_addr : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil [ossa] @struct_tuple_element_addr
+sil [ossa] @struct_tuple_element_addr : $@convention(thin) (Int) -> Int {
 bb1(%0 : $Int):
 // CHECK-DAG: [[STRUCT:%.*]] = alloc_stack $TestStruct
 // CHECK-DAG: [[TUPLE:%.*]] = alloc_stack $(Int, Int)
@@ -118,10 +118,10 @@
 // CHECK: return
 }
 
-sil @callee : $@convention(thin) (@inout Int) -> ()
+sil [ossa] @callee : $@convention(thin) (@inout Int) -> ()
 
-// CHECK-LABEL: sil @inout_nocapture
-sil @inout_nocapture : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil [ossa] @inout_nocapture
+sil [ossa] @inout_nocapture : $@convention(thin) () -> Int {
 bb0:
   // CHECK: alloc_stack
   %1 = alloc_box ${ var Int }
@@ -140,10 +140,10 @@
 protocol P {
 }
 
-sil @returns_protocol : $@convention(thin) () -> @out P
+sil [ossa] @returns_protocol : $@convention(thin) () -> @out P
 
-// CHECK-LABEL: sil @test_indirect_return
-sil @test_indirect_return : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @test_indirect_return
+sil [ossa] @test_indirect_return : $@convention(thin) () -> () {
 bb0:
   // CHECK: alloc_stack
   %1 = function_ref @returns_protocol : $@convention(thin) () -> @out P
@@ -158,8 +158,8 @@
 
 class SomeClass {}
 
-// CHECK-LABEL: sil @class_promotion
-sil @class_promotion : $@convention(thin) (@owned SomeClass) -> @owned SomeClass {
+// CHECK-LABEL: sil [ossa] @class_promotion
+sil [ossa] @class_promotion : $@convention(thin) (@owned SomeClass) -> @owned SomeClass {
 bb0(%0 : @owned $SomeClass):
   %1 = alloc_box ${ var SomeClass }
   %1a = project_box %1 : ${ var SomeClass }, 0
@@ -180,7 +180,7 @@
 }
 
 // CHECK-LABEL: @protocols
-sil @protocols : $@convention(thin) (@in LogicValue, @thin Bool.Type) -> Bool {
+sil [ossa] @protocols : $@convention(thin) (@in LogicValue, @thin Bool.Type) -> Bool {
 bb0(%0 : $*LogicValue, %1 : $@thin Bool.Type):
   %2 = alloc_box ${ var LogicValue }
   %2a = project_box %2 : ${ var LogicValue }, 0
@@ -200,8 +200,8 @@
 // Generics test, which is address-only.
 class Generic<T> {}
 
-// CHECK-LABEL: sil @dealloc_box_test
-sil @dealloc_box_test : $@convention(thin) <T> () -> () {
+// CHECK-LABEL: sil [ossa] @dealloc_box_test
+sil [ossa] @dealloc_box_test : $@convention(thin) <T> () -> () {
 bb0:  // CHECK-NEXT: bb0:
       // CHECK-NEXT: alloc_stack
   %1 = alloc_box $<τ_0_0> { var Generic<τ_0_0> } <T>
@@ -220,11 +220,11 @@
 
 
 
-sil @$s1t9SomeUnionO1yfMS0_FCS_9SomeClassS0_ : $@convention(thin) (@owned SomeClass, @thin SomeUnion.Type) -> @owned SomeUnion
-sil @$s1t9SomeClassCCfMS0_FT_S0_ : $@convention(thin) (@thick SomeClass.Type) -> @owned SomeClass
+sil [ossa] @$s1t9SomeUnionO1yfMS0_FCS_9SomeClassS0_ : $@convention(thin) (@owned SomeClass, @thin SomeUnion.Type) -> @owned SomeUnion
+sil [ossa] @$s1t9SomeClassCCfMS0_FT_S0_ : $@convention(thin) (@thick SomeClass.Type) -> @owned SomeClass
 
-// CHECK-LABEL: sil @union_test
-sil @union_test : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @union_test
+sil [ossa] @union_test : $@convention(thin) () -> () {
 bb0:
 // CHECK: [[UNION:%.*]] = alloc_stack
   %1 = alloc_box ${ var SomeUnion }
@@ -244,8 +244,8 @@
 // CHECK-NEXT:  return [[T0]] : $()
 }
 
-// CHECK-LABEL: sil @multiple_destroy_test
-sil @multiple_destroy_test : $@convention(thin) (Bool) -> Bool {
+// CHECK-LABEL: sil [ossa] @multiple_destroy_test
+sil [ossa] @multiple_destroy_test : $@convention(thin) (Bool) -> Bool {
 bb0(%0 : $Bool):
   %1 = alloc_box ${ var Bool }
   %1a = project_box %1 : ${ var Bool }, 0
@@ -270,8 +270,8 @@
 // Make sure that we can promote this box and dealloc_stack
 // on each path.
 //
-// CHECK-LABEL: sil @box_reachable_from_destroy_test
-sil @box_reachable_from_destroy_test : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @box_reachable_from_destroy_test
+sil [ossa] @box_reachable_from_destroy_test : $@convention(thin) () -> () {
 bb0:
   br bb1
 
@@ -298,7 +298,7 @@
 
 
 
-sil @useSomeClass : $@convention(thin) (@owned SomeClass) -> ()
+sil [ossa] @useSomeClass : $@convention(thin) (@owned SomeClass) -> ()
 
 
 // <rdar://problem/16382973> DI misses destroy_addr because allocbox_to_stack isn't preserving mark_uninitialized invariants
@@ -310,8 +310,8 @@
 
 extension Int : My_Incrementable { }
 
-// CHECK-LABEL: sil @test_mui
-sil @test_mui : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @test_mui
+sil [ossa] @test_mui : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   %2 = alloc_box ${ var SomeClass }
   %2a = mark_uninitialized [var] %2 : ${ var SomeClass }
@@ -348,9 +348,9 @@
   br bb2
 }
 
-// CHECK-LABEL: sil @$s6struct5apply1fS2iyc_tF
+// CHECK-LABEL: sil [ossa] @$s6struct5apply1fS2iyc_tF
 // struct.apply (f : () -> Swift.Int) -> Swift.Int
-sil @$s6struct5apply1fS2iyc_tF : $@convention(thin) (@owned @callee_owned () -> Int) -> Int {
+sil [ossa] @$s6struct5apply1fS2iyc_tF : $@convention(thin) (@owned @callee_owned () -> Int) -> Int {
 bb0(%0 : @owned $@callee_owned () -> Int):
   debug_value %0 : $@callee_owned () -> Int, let, name "f" // id: %1
   %1 = copy_value %0 : $@callee_owned () -> Int     // id: %2
@@ -359,17 +359,17 @@
   return %3 : $Int                                // id: %5
 }
 
-// CHECK-LABEL: sil @$s6struct6escape1fSiycSiyc_tF
+// CHECK-LABEL: sil [ossa] @$s6struct6escape1fSiycSiyc_tF
 // struct.escape (f : () -> Swift.Int) -> () -> Swift.Int
-sil @$s6struct6escape1fSiycSiyc_tF : $@convention(thin) (@owned @callee_owned () -> Int) -> @owned @callee_owned () -> Int {
+sil [ossa] @$s6struct6escape1fSiycSiyc_tF : $@convention(thin) (@owned @callee_owned () -> Int) -> @owned @callee_owned () -> Int {
 bb0(%0 : @owned $@callee_owned () -> Int):
   debug_value %0 : $@callee_owned () -> Int, let, name "f" // id: %1
   return %0 : $@callee_owned () -> Int            // id: %2
 }
 
-// CHECK-LABEL: sil @$s6struct8useStack1tySi_tF
+// CHECK-LABEL: sil [ossa] @$s6struct8useStack1tySi_tF
 // struct.useStack (t : Swift.Int) -> ()
-sil @$s6struct8useStack1tySi_tF : $@convention(thin) (Int) -> () {
+sil [ossa] @$s6struct8useStack1tySi_tF : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   debug_value %0 : $Int, let, name "t" // id: %1
   // CHECK: alloc_stack
@@ -390,10 +390,10 @@
   return %10 : $()                                // id: %11
 }
 
-// CHECK-LABEL: sil shared @$s6struct8useStack1tySi_tFSiycfU_Tf0s_n
-// CHECK-LABEL: sil private @$s6struct8useStack1tySi_tFSiycfU_
+// CHECK-LABEL: sil shared [ossa] @$s6struct8useStack1tySi_tFSiycfU_Tf0s_n
+// CHECK-LABEL: sil private [ossa] @$s6struct8useStack1tySi_tFSiycfU_
 // struct.(useStack (t : Swift.Int) -> ()).(closure #1)
-sil private @$s6struct8useStack1tySi_tFSiycfU_ : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
+sil private [ossa] @$s6struct8useStack1tySi_tFSiycfU_ : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Int>, 0
   // function_ref Swift.++ @postfix <A : Swift._Incrementable>(x : @inout A) -> A
@@ -409,9 +409,9 @@
 // Swift.++ @postfix <A : Swift._Incrementable>(x : @inout A) -> A
 sil [transparent] @_TFsoP2ppUs14_Incrementable__FT1xRQ__Q_ : $@convention(thin) <τ_0_0 where τ_0_0 : My_Incrementable> (@inout τ_0_0) -> @out τ_0_0
 
-// CHECK-LABEL: sil @$s6struct6useBox1tySi_tF
+// CHECK-LABEL: sil [ossa] @$s6struct6useBox1tySi_tF
 // struct.useBox (t : Swift.Int) -> ()
-sil @$s6struct6useBox1tySi_tF : $@convention(thin) (Int) -> () {
+sil [ossa] @$s6struct6useBox1tySi_tF : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   debug_value %0 : $Int, let, name "t" // id: %1
   // CHECK: alloc_box
@@ -431,9 +431,9 @@
   return %11 : $()                                // id: %12
 }
 
-// CHECK-LABEL: sil private @$s6struct6useBox1tySi_tFSiycfU_
+// CHECK-LABEL: sil private [ossa] @$s6struct6useBox1tySi_tFSiycfU_
 // struct.(useBox (t : Swift.Int) -> ()).(closure #1)
-sil private @$s6struct6useBox1tySi_tFSiycfU_ : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
+sil private [ossa] @$s6struct6useBox1tySi_tFSiycfU_ : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Int>, 0
   // function_ref Swift.++ @postfix <A : Swift._Incrementable>(x : @inout A) -> A
@@ -449,8 +449,8 @@
 // CHECK-LABEL: sil @closure
 sil @closure : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> ()
 
-// CHECK-LABEL: sil @no_final_destroy
-sil @no_final_destroy : $@convention(thin) (Int) -> Bool {
+// CHECK-LABEL: sil [ossa] @no_final_destroy
+sil [ossa] @no_final_destroy : $@convention(thin) (Int) -> Bool {
 bb0(%0 : $Int):
   // This is not destroyed, but the unreachable makes the verifier not trip.
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
@@ -466,8 +466,8 @@
   unreachable
 }
 
-// CHECK-LABEL: sil [transparent] [serialized] @mightApply : $@convention(thin) <U where U : P> (@owned @callee_owned () -> @out U) -> ()
-sil [transparent] [serialized] @mightApply : $@convention(thin) <U where U : P> (@owned @callee_owned () -> @out U) -> () {
+// CHECK-LABEL: sil [transparent] [serialized] [ossa] @mightApply : $@convention(thin) <U where U : P> (@owned @callee_owned () -> @out U) -> ()
+sil [transparent] [serialized] [ossa] @mightApply : $@convention(thin) <U where U : P> (@owned @callee_owned () -> @out U) -> () {
 // CHECK: bb0
 bb0(%0 : @owned $@callee_owned () -> @out U):
   debug_value %0 : $@callee_owned () -> @out U
@@ -482,8 +482,8 @@
   return %8 : $()
 }
 
-// CHECK-LABEL: sil @callWithAutoclosure
-sil @callWithAutoclosure : $@convention(thin) <T where T : P> (@in T) -> () {
+// CHECK-LABEL: sil [ossa] @callWithAutoclosure
+sil [ossa] @callWithAutoclosure : $@convention(thin) <T where T : P> (@in T) -> () {
 // CHECK: bb0
 bb0(%0 : $*T):
   // CHECK: debug_value_addr
@@ -509,8 +509,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil shared @$s21closure_to_specializeTf0ns_n : $@convention(thin) <T where T : P> (@inout_aliasable T) -> @out T
-sil shared @closure_to_specialize : $@convention(thin) <T where T : P> (@owned <τ_0_0> { var τ_0_0 } <T>) -> @out T {
+// CHECK-LABEL: sil shared [ossa] @$s21closure_to_specializeTf0ns_n : $@convention(thin) <T where T : P> (@inout_aliasable T) -> @out T
+sil shared [ossa] @closure_to_specialize : $@convention(thin) <T where T : P> (@owned <τ_0_0> { var τ_0_0 } <T>) -> @out T {
 // CHECK: bb0
 bb0(%0 : $*T, %1 : @owned $<τ_0_0> { var τ_0_0 } <T>):
   %2 = project_box %1 : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -539,8 +539,8 @@
   init(t: T)
 }
 
-// CHECK-LABEL: sil [noinline] @inner
-sil [noinline] @inner : $@convention(thin) (@owned @callee_owned () -> Bool) -> Bool {
+// CHECK-LABEL: sil [noinline] [ossa] @inner
+sil [noinline] [ossa] @inner : $@convention(thin) (@owned @callee_owned () -> Bool) -> Bool {
 // CHECK: bb0
 bb0(%0 : @owned $@callee_owned () -> Bool):
   debug_value %0 : $@callee_owned () -> Bool
@@ -551,8 +551,8 @@
   return %3 : $Bool
 }
 
-// CHECK-LABEL: sil [noinline] @outer
-sil [noinline] @outer : $@convention(thin) (@owned @callee_owned () -> Bool) -> Bool {
+// CHECK-LABEL: sil [noinline] [ossa] @outer
+sil [noinline] [ossa] @outer : $@convention(thin) (@owned @callee_owned () -> Bool) -> Bool {
 // CHECK: bb0
 bb0(%0 : @owned $@callee_owned () -> Bool):
   debug_value %0 : $@callee_owned () -> Bool
@@ -566,8 +566,8 @@
 // CHECK-LABEL: sil @get
 sil @get : $@convention(method) <T where T : Count> (@in S<T>) -> Int
 
-// CHECK-LABEL: sil shared @specialized
-sil shared @specialized : $@convention(method) (Int, @in S<Q>) -> Bool {
+// CHECK-LABEL: sil shared [ossa] @specialized
+sil shared [ossa] @specialized : $@convention(method) (Int, @in S<Q>) -> Bool {
 // CHECK: bb0
 bb0(%0 : $Int, %1 : $*S<Q>):
   debug_value %0 : $Int
@@ -584,8 +584,8 @@
   return %9 : $Bool
 }
 
-// CHECK-LABEL: sil @unspecialized
-sil @unspecialized : $@convention(method) <T where T : Count> (Int, @in S<T>) -> Bool {
+// CHECK-LABEL: sil [ossa] @unspecialized
+sil [ossa] @unspecialized : $@convention(method) <T where T : Count> (Int, @in S<T>) -> Bool {
 // CHECK: bb0
 bb0(%0 : $Int, %1 : $*S<T>):
   debug_value %0 : $Int
@@ -602,8 +602,8 @@
   return %9 : $Bool
 }
 
-// CHECK-LABEL: sil shared @closure1
-sil shared @closure1 : $@convention(thin) <T where T : Count> (Int, @owned <τ_0_0 : Count> { var S<τ_0_0> } <T>) -> Bool {
+// CHECK-LABEL: sil shared [ossa] @closure1
+sil shared [ossa] @closure1 : $@convention(thin) <T where T : Count> (Int, @owned <τ_0_0 : Count> { var S<τ_0_0> } <T>) -> Bool {
 // CHECK: bb0
 bb0(%0 : $Int, %1 : @owned $<τ_0_0 where τ_0_0 : Count> { var S<τ_0_0> } <T>):
   %2 = project_box %1 : $<τ_0_0 where τ_0_0 : Count> { var S<τ_0_0> } <T>, 0
@@ -619,13 +619,13 @@
   return %8 : $Bool
 }
 
-// CHECK-LABEL: sil shared @$s8closure2Tf0ns_n
+// CHECK-LABEL: sil shared [ossa] @$s8closure2Tf0ns_n
 // CHECK: bb0
 // CHECK: return
 // CHECK-NOT: bb1
 
-// CHECK-LABEL: sil shared @closure2
-sil shared @closure2 : $@convention(thin) <T where T : Count> (Int, @owned <τ_0_0 : Count> { var S<τ_0_0> } <T>) -> Bool {
+// CHECK-LABEL: sil shared [ossa] @closure2
+sil shared [ossa] @closure2 : $@convention(thin) <T where T : Count> (Int, @owned <τ_0_0 : Count> { var S<τ_0_0> } <T>) -> Bool {
 // CHECK: bb0
 bb0(%0 : $Int, %1 : @owned $<τ_0_0 where τ_0_0 : Count> { var S<τ_0_0> } <T>):
   %2 = project_box %1 : $<τ_0_0 where τ_0_0 : Count> { var S<τ_0_0> } <T>, 0
@@ -644,8 +644,8 @@
 // CHECK-LABEL: sil [transparent] [serialized] @binary
 sil [transparent] [serialized] @binary : $@convention(thin) (Int, Int) -> Bool
 
-// CHECK-LABEL: sil @destroy_stack_value_after_closure
-sil @destroy_stack_value_after_closure : $@convention(thin) <T> (@in T) -> @out T {
+// CHECK-LABEL: sil [ossa] @destroy_stack_value_after_closure
+sil [ossa] @destroy_stack_value_after_closure : $@convention(thin) <T> (@in T) -> @out T {
 // CHECK: bb0
 bb0(%0 : $*T, %1 : $*T):
   // CHECK: [[STACK:%.*]] = alloc_stack
@@ -673,7 +673,7 @@
   return %13 : $()
 }
 
-sil @applied : $@convention(thin) <T> (@owned <τ_0_0> { var τ_0_0 } <T>) -> () {
+sil [ossa] @applied : $@convention(thin) <T> (@owned <τ_0_0> { var τ_0_0 } <T>) -> () {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <T>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <T>, 0
   %2 = function_ref @consume : $@convention(thin) <τ_0_0> (@in τ_0_0) -> ()
@@ -703,10 +703,10 @@
   //final init(failBeforeFullInitialization: Int) throws
 }
 
-sil @throwing_unwrap : $@convention(thin) (Int) -> (Int, @error Error)
-sil @fake_throwing_init : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error)
+sil [ossa] @throwing_unwrap : $@convention(thin) (Int) -> (Int, @error Error)
+sil [ossa] @fake_throwing_init : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error)
 
-sil hidden @try_apply_during_chaining_init : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
+sil hidden [ossa] @try_apply_during_chaining_init : $@convention(method) (Int, @owned ThrowDerivedClass) -> (@owned ThrowDerivedClass, @error Error) {
 // %0                                             // users: %11, %5
 // %1                                             // user: %7
 bb0(%0 : $Int, %1 : @owned $ThrowDerivedClass):
@@ -745,7 +745,7 @@
   throw %25 : $Error
 }
 
-// CHECK-LABEL: sil @deal_with_wrong_nesting
+// CHECK-LABEL: sil [ossa] @deal_with_wrong_nesting
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[STACK1:%[0-9]+]] = alloc_stack $Bool
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
@@ -761,7 +761,7 @@
 // CHECK:      bb3:
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @deal_with_wrong_nesting : $@convention(thin) (Int) -> () {
+sil [ossa] @deal_with_wrong_nesting : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %as1 = alloc_stack $Bool
   %1 = alloc_box ${ var Int }
@@ -787,7 +787,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @wrong_nesting_with_alloc_ref
+// CHECK-LABEL: sil [ossa] @wrong_nesting_with_alloc_ref
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[REF:%[0-9]+]] = alloc_ref [stack] $SomeClass
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
@@ -796,7 +796,7 @@
 // CHECK-NEXT:   dealloc_ref [stack] [[REF]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @wrong_nesting_with_alloc_ref : $@convention(thin) (Int) -> () {
+sil [ossa] @wrong_nesting_with_alloc_ref : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %as1 = alloc_ref [stack] $SomeClass
   %1 = alloc_box ${ var Int }
@@ -809,7 +809,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable1
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable1
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[STACK1:%[0-9]+]] = alloc_stack $Bool
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
@@ -823,7 +823,7 @@
 // CHECK-NEXT:   dealloc_stack [[STACK1]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @nesting_and_unreachable1 : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable1 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %as1 = alloc_stack $Bool
   %1 = alloc_box ${ var Int }
@@ -844,7 +844,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable2
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable2
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[STACK1:%[0-9]+]] = alloc_stack $Bool
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
@@ -860,7 +860,7 @@
 // CHECK-NEXT:   dealloc_stack [[STACK1]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @nesting_and_unreachable2 : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable2 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %as1 = alloc_stack $Bool
   %1 = alloc_box ${ var Int }
@@ -882,7 +882,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable3
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable3
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
 // CHECK-NEXT:   [[STACK:%[0-9]+]] = alloc_stack $Bool
@@ -896,7 +896,7 @@
 // CHECK-NEXT:   dealloc_stack [[BOX]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @nesting_and_unreachable3 : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable3 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %as1 = alloc_stack $Bool
@@ -916,7 +916,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable4
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable4
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
 // CHECK:      bb1:
@@ -926,7 +926,7 @@
 // CHECK:        dealloc_stack [[BOX]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @nesting_and_unreachable4 : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable4 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %1a = project_box %1 : ${ var Int }, 0
@@ -943,7 +943,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable5
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable5
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
 // CHECK:      bb1:
@@ -955,7 +955,7 @@
 // CHECK:        dealloc_stack [[BOX]]
 // CHECK-NEXT:   tuple
 // CHECK-NEXT:   return
-sil @nesting_and_unreachable5 : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable5 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %1a = project_box %1 : ${ var Int }, 0
@@ -974,7 +974,7 @@
   return %r : $()
 }
 
-// CHECK-LABEL: sil @nesting_and_unreachable_critical_edge
+// CHECK-LABEL: sil [ossa] @nesting_and_unreachable_critical_edge
 // CHECK:      bb0(%0 : $Int):
 // CHECK-NEXT:   [[BOX:%[0-9]+]] = alloc_stack $Int
 // CHECK-NEXT:   [[STACK1:%[0-9]+]] = alloc_stack $Bool
@@ -999,7 +999,7 @@
 // CHECK:      bb5:
 // CHECK-NEXT:   dealloc_stack [[BOX]]
 // CHECK-NEXT:   unreachable
-sil @nesting_and_unreachable_critical_edge : $@convention(thin) (Int) -> () {
+sil [ossa] @nesting_and_unreachable_critical_edge : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %as1 = alloc_stack $Bool
@@ -1029,7 +1029,7 @@
 // is folded into
 //  begin_access [deinit], copy_addr [take], end_access
 //
-// CHECK-LABEL: sil @deinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
+// CHECK-LABEL: sil [ossa] @deinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
 // CHECK: bb0(%0 : $*T, %1 : $*T, %2 : $*T):
 // CHECK: [[STK:%.*]] = alloc_stack $T, var, name "x"
 // CHECK: copy_addr %2 to [initialization] [[STK]] : $*T
@@ -1044,7 +1044,7 @@
 // CHECK: destroy_addr %2 : $*T
 // CHECK: return %{{.*}} : $()
 // CHECK-LABEL: } // end sil function 'deinit_access'
-sil @deinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
+sil [ossa] @deinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
 bb0(%0 : @owned $*T, %1 : @owned $*T, %2 : @owned $*T):
   %4 = alloc_box $<τ_0_0> { var τ_0_0 } <T>, var, name "x"
   %5 = project_box %4 : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -1066,7 +1066,7 @@
 // is *not* folded into
 //  begin_access [deinit], copy_addr [take], end_access
 //
-// CHECK-LABEL: sil @nodeinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
+// CHECK-LABEL: sil [ossa] @nodeinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
 // CHECK: bb0(%0 : $*T, %1 : $*T, %2 : $*T):
 // CHECK: [[STK:%.*]] = alloc_stack $T, var, name "x"
 // CHECK: copy_addr %2 to [initialization] [[STK]] : $*T
@@ -1083,7 +1083,7 @@
 // CHECK: destroy_addr %2 : $*T
 // CHECK: return %{{.*}} : $()
 // CHECK-LABEL: } // end sil function 'nodeinit_access'
-sil @nodeinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
+sil [ossa] @nodeinit_access : $@convention(thin) <T> (@in T) -> (@out T, @out T) {
 bb0(%0 : @owned $*T, %1 : @owned $*T, %2 : @owned $*T):
   %4 = alloc_box $<τ_0_0> { var τ_0_0 } <T>, var, name "x"
   %5 = project_box %4 : $<τ_0_0> { var τ_0_0 } <T>, 0
diff --git a/test/SILOptimizer/allocstack_hoisting.sil b/test/SILOptimizer/allocstack_hoisting.sil
index feccd32..e9b5cb2 100644
--- a/test/SILOptimizer/allocstack_hoisting.sil
+++ b/test/SILOptimizer/allocstack_hoisting.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -alloc-stack-hoisting | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -alloc-stack-hoisting -sil-merge-stack-slots=false | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -alloc-stack-hoisting | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -alloc-stack-hoisting -sil-merge-stack-slots=false | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/always_inline.sil b/test/SILOptimizer/always_inline.sil
index 11b3bb1..9dcb688 100644
--- a/test/SILOptimizer/always_inline.sil
+++ b/test/SILOptimizer/always_inline.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -dce -sil-inline-threshold=1 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -dce -sil-inline-threshold=1 | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/arcsequenceopts.sil b/test/SILOptimizer/arcsequenceopts.sil
index a7ad1aa..1cc4807 100644
--- a/test/SILOptimizer/arcsequenceopts.sil
+++ b/test/SILOptimizer/arcsequenceopts.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-LOOP %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -arc-loop-opts  %s | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-LOOP %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-LOOP %s
+// RUN: %target-sil-opt -enable-sil-verify-all -arc-loop-opts  %s | %FileCheck -check-prefix=CHECK -check-prefix=CHECK-LOOP %s
 
 sil_stage canonical
 
@@ -2212,4 +2212,4 @@
   strong_release %1 : $@callee_guaranteed () -> ()
   %9999 = tuple()
   return %9999 : $()
-}
\ No newline at end of file
+}
diff --git a/test/SILOptimizer/arcsequenceopts_casts.sil b/test/SILOptimizer/arcsequenceopts_casts.sil
index 9b89a9b..d182cd3 100644
--- a/test/SILOptimizer/arcsequenceopts_casts.sil
+++ b/test/SILOptimizer/arcsequenceopts_casts.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all -arc-sequence-opts -enable-loop-arc=0 %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all -arc-sequence-opts -enable-loop-arc=1 %s | %FileCheck %s
+// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all -arc-sequence-opts -enable-loop-arc=0 %s | %FileCheck %s
+// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all -arc-sequence-opts -enable-loop-arc=1 %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/arcsequenceopts_loops.sil b/test/SILOptimizer/arcsequenceopts_loops.sil
index be731da..457f9aa 100644
--- a/test/SILOptimizer/arcsequenceopts_loops.sil
+++ b/test/SILOptimizer/arcsequenceopts_loops.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts  %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts  %s | %FileCheck %s
 
 //////////////////
 // Declarations //
diff --git a/test/SILOptimizer/arcsequenceopts_loops.sil.gyb b/test/SILOptimizer/arcsequenceopts_loops.sil.gyb
index afe69fb..8e0af80 100644
--- a/test/SILOptimizer/arcsequenceopts_loops.sil.gyb
+++ b/test/SILOptimizer/arcsequenceopts_loops.sil.gyb
@@ -1,7 +1,7 @@
 %# -*- mode: sil -*-
 // RUN: %empty-directory(%t)
 // RUN: %gyb %s > %t/arc-sequence-opts-loops.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -arc-sequence-opts %t/arc-sequence-opts-loops.sil -enable-loop-arc=0 | %FileCheck %t/arc-sequence-opts-loops.sil
+// RUN: %target-sil-opt -enable-sil-verify-all -arc-sequence-opts %t/arc-sequence-opts-loops.sil -enable-loop-arc=0 | %FileCheck %t/arc-sequence-opts-loops.sil
 
 %# Ignore the following admonition; it applies to the resulting .sil
 %# test file only.
diff --git a/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil b/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
index 558bbf6..7fe097b 100644
--- a/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
+++ b/test/SILOptimizer/arcsequenceopts_rcidentityanalysis.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s -module-name Swift | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s -module-name Swift | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s -module-name Swift | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s -module-name Swift | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/arcsequenceopts_uniquecheck.sil b/test/SILOptimizer/arcsequenceopts_uniquecheck.sil
index e320873..2c3370f 100644
--- a/test/SILOptimizer/arcsequenceopts_uniquecheck.sil
+++ b/test/SILOptimizer/arcsequenceopts_uniquecheck.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=0 -arc-sequence-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-loop-arc=1 -arc-sequence-opts %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/array_count_propagation.sil b/test/SILOptimizer/array_count_propagation.sil
index ac2f87c..4cae662 100644
--- a/test/SILOptimizer/array_count_propagation.sil
+++ b/test/SILOptimizer/array_count_propagation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -array-count-propagation %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -array-count-propagation %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/array_element_propagation.sil b/test/SILOptimizer/array_element_propagation.sil
index e807ad9..adf7ac7 100644
--- a/test/SILOptimizer/array_element_propagation.sil
+++ b/test/SILOptimizer/array_element_propagation.sil
@@ -1,5 +1,5 @@
 
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -array-element-propagation %s | %FileCheck %s
+// RUN: %target-sil-opt -array-element-propagation %s | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/array_specialize.sil b/test/SILOptimizer/array_specialize.sil
index fdab0ed..75dafe0 100644
--- a/test/SILOptimizer/array_specialize.sil
+++ b/test/SILOptimizer/array_specialize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -array-specialize
+// RUN: %target-sil-opt -enable-sil-verify-all %s -array-specialize
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/assert_configuration.sil b/test/SILOptimizer/assert_configuration.sil
index 3939301..6aaa449 100644
--- a/test/SILOptimizer/assert_configuration.sil
+++ b/test/SILOptimizer/assert_configuration.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnostic-constant-propagation -assert-conf-id 1 | %FileCheck %s --check-prefix=ONE
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnostic-constant-propagation -assert-conf-id 4294967295 | %FileCheck %s --check-prefix=DISABLED
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -performance-constant-propagation -assert-conf-id 1 | %FileCheck %s --check-prefix=PERFONE
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation -assert-conf-id 1 | %FileCheck %s --check-prefix=ONE
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation -assert-conf-id 4294967295 | %FileCheck %s --check-prefix=DISABLED
+// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation -assert-conf-id 1 | %FileCheck %s --check-prefix=PERFONE
 
 import Builtin
 
diff --git a/test/SILOptimizer/assume_single_threaded.sil b/test/SILOptimizer/assume_single_threaded.sil
index 096e55c..8b83d38 100644
--- a/test/SILOptimizer/assume_single_threaded.sil
+++ b/test/SILOptimizer/assume_single_threaded.sil
@@ -1,5 +1,5 @@
-// RUN: %target-swift-frontend -emit-sil -assume-parsing-unqualified-ownership-sil %s -assume-single-threaded | %FileCheck %s
-// RUN: %target-swift-frontend -emit-sil -assume-parsing-unqualified-ownership-sil %s -O -assume-single-threaded | %FileCheck %s
+// RUN: %target-swift-frontend -emit-sil %s -assume-single-threaded | %FileCheck %s
+// RUN: %target-swift-frontend -emit-sil %s -O -assume-single-threaded | %FileCheck %s
 
 // Check that all reference counting instructions are converted to [nonatomic]
 // if -assume-single-threaded is used.
diff --git a/test/SILOptimizer/basic-aa.sil b/test/SILOptimizer/basic-aa.sil
index aa3d7bb..e213d44 100644
--- a/test/SILOptimizer/basic-aa.sil
+++ b/test/SILOptimizer/basic-aa.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -module-name Swift %s -aa-kind=basic-aa -aa-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -module-name Swift %s -aa-kind=basic-aa -aa-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/basic-callee-printer.sil b/test/SILOptimizer/basic-callee-printer.sil
index fa69df7..f110ff1 100644
--- a/test/SILOptimizer/basic-callee-printer.sil
+++ b/test/SILOptimizer/basic-callee-printer.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all %s -basic-callee-printer -o /dev/null | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOWMO %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all %s -wmo -basic-callee-printer -o /dev/null | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-WMO %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -basic-callee-printer -o /dev/null | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-NOWMO %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -wmo -basic-callee-printer -o /dev/null | %FileCheck --check-prefix=CHECK --check-prefix=CHECK-WMO %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/basic-instruction-properties.sil b/test/SILOptimizer/basic-instruction-properties.sil
index 35b04e6..6d9f90f 100644
--- a/test/SILOptimizer/basic-instruction-properties.sil
+++ b/test/SILOptimizer/basic-instruction-properties.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -basic-instruction-property-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -basic-instruction-property-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/bridged_casts_crash.sil b/test/SILOptimizer/bridged_casts_crash.sil
index cffcaa5..6fd6daf 100644
--- a/test/SILOptimizer/bridged_casts_crash.sil
+++ b/test/SILOptimizer/bridged_casts_crash.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -performance-constant-propagation %s | %FileCheck %s
+// RUN: %target-sil-opt -performance-constant-propagation %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/bridged_casts_folding.sil b/test/SILOptimizer/bridged_casts_folding.sil
index 23e287b..809ac42 100644
--- a/test/SILOptimizer/bridged_casts_folding.sil
+++ b/test/SILOptimizer/bridged_casts_folding.sil
@@ -14,7 +14,7 @@
 // CHECK:         [[BRIDGED:%.*]] = apply {{.*}}(%0)
 // CHECK-NEXT:    destroy_addr %0
 // CHECK-NEXT:    [[CAST:%.*]] = unconditional_checked_cast [[BRIDGED]] : $NSObject to $NSObjectSubclass
-sil @anyhashable_cast_unconditional : $@convention(thin) (@in AnyHashable) -> @owned NSObjectSubclass {
+sil [ossa] @anyhashable_cast_unconditional : $@convention(thin) (@in AnyHashable) -> @owned NSObjectSubclass {
 entry(%0 : $*AnyHashable):
   %1 = alloc_stack $NSObjectSubclass
   unconditional_checked_cast_addr AnyHashable in %0 : $*AnyHashable
@@ -28,7 +28,7 @@
 // CHECK:         [[BRIDGED:%.*]] = apply {{.*}}(%0)
 // CHECK-NEXT:    destroy_addr %0
 // CHECK-NEXT:    checked_cast_br [[BRIDGED]] : $NSObject to $NSObjectSubclass, [[YES:bb[0-9]+]], [[NO:bb[0-9]+]]
-sil @anyhashable_cast_take_always : $@convention(thin) (@in AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
+sil [ossa] @anyhashable_cast_take_always : $@convention(thin) (@in AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
 entry(%0 : $*AnyHashable, %1 : @owned $NSObjectSubclass):
   %2 = alloc_stack $NSObjectSubclass
   checked_cast_addr_br take_always AnyHashable in %0 : $*AnyHashable
@@ -52,7 +52,7 @@
 // CHECK-NEXT:    checked_cast_br [[BRIDGED]] : $NSObject to $NSObjectSubclass, [[YES:bb[0-9]+]], [[NO:bb[0-9]+]]
 // CHECK:       [[YES]]{{.*}}:
 // CHECK-NEXT:    destroy_addr %0
-sil @anyhashable_cast_take_on_success : $@convention(thin) (@in AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
+sil [ossa] @anyhashable_cast_take_on_success : $@convention(thin) (@in AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
 entry(%0 : $*AnyHashable, %1 : @owned $NSObjectSubclass):
   %2 = alloc_stack $NSObjectSubclass
   checked_cast_addr_br take_on_success AnyHashable in %0 : $*AnyHashable
@@ -81,7 +81,7 @@
 // CHECK-NOT:    dealloc_stack
 // CHECK:       [[NO]]{{.*}}:
 // CHECK-NOT:    dealloc_stack
-sil @anyhashable_cast_copy_on_success : $@convention(thin) (@in_guaranteed AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
+sil [ossa] @anyhashable_cast_copy_on_success : $@convention(thin) (@in_guaranteed AnyHashable, @owned NSObjectSubclass) -> @owned NSObjectSubclass {
 entry(%0 : $*AnyHashable, %1 : @owned $NSObjectSubclass):
   %2 = alloc_stack $NSObjectSubclass
   checked_cast_addr_br copy_on_success AnyHashable in %0 : $*AnyHashable
diff --git a/test/SILOptimizer/bridging_checked_cast.sil b/test/SILOptimizer/bridging_checked_cast.sil
index db84c71..59434fa 100644
--- a/test/SILOptimizer/bridging_checked_cast.sil
+++ b/test/SILOptimizer/bridging_checked_cast.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -inline %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Swift
diff --git a/test/SILOptimizer/caller_analysis.sil b/test/SILOptimizer/caller_analysis.sil
index a5d89f5..6d72503 100644
--- a/test/SILOptimizer/caller_analysis.sil
+++ b/test/SILOptimizer/caller_analysis.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -caller-analysis-printer -o /dev/null | %FileCheck --check-prefix=CHECK %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -caller-analysis-printer -o /dev/null | %FileCheck --check-prefix=CHECK %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/canonicalize_switch_enum.sil b/test/SILOptimizer/canonicalize_switch_enum.sil
index 4ac63d1..89cf615 100644
--- a/test/SILOptimizer/canonicalize_switch_enum.sil
+++ b/test/SILOptimizer/canonicalize_switch_enum.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/capture_promotion.sil b/test/SILOptimizer/capture_promotion.sil
index a32e222..8dd3d86 100644
--- a/test/SILOptimizer/capture_promotion.sil
+++ b/test/SILOptimizer/capture_promotion.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -capture-promotion | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-promotion | %FileCheck %s
 
 // Check to make sure that the process of promoting closure captures results in
 // a correctly cloned and modified closure function body. This test
diff --git a/test/SILOptimizer/capture_promotion_generic_context.sil b/test/SILOptimizer/capture_promotion_generic_context.sil
index d92ccad..1eedc2a 100644
--- a/test/SILOptimizer/capture_promotion_generic_context.sil
+++ b/test/SILOptimizer/capture_promotion_generic_context.sil
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-sil -O -Xllvm -sil-fso-enable-generics=false %s | %FileCheck %s
+// RUN: %target-swift-frontend -emit-sil -O -Xllvm -sil-fso-enable-generics=false %s | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SILOptimizer/capture_promotion_generic_context_ownership.sil b/test/SILOptimizer/capture_promotion_generic_context_ownership.sil
index 9743bf7..0b4cb01 100644
--- a/test/SILOptimizer/capture_promotion_generic_context_ownership.sil
+++ b/test/SILOptimizer/capture_promotion_generic_context_ownership.sil
@@ -13,7 +13,7 @@
 // invariants.
 
 // CHECK-LABEL: sil @$s14promotable_boxTf2i_n : $@convention(thin) (Builtin.Int32) -> Builtin.Int32
-sil @promotable_box : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
+sil [ossa] @promotable_box : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
 entry(%b : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %a = project_box %b : $<τ_0_0> { var τ_0_0 } <Int>, 0
   %v = load [trivial] %a : $*Int
@@ -25,7 +25,7 @@
 // CHECK:         [[F:%.*]] = function_ref @$s14promotable_boxTf2i_n
 // CHECK:         partial_apply [callee_guaranteed] [[F]](
 
-sil @call_promotable_box_from_generic : $@convention(thin) <T> (@in T, Int) -> @owned @callee_guaranteed () -> Int {
+sil [ossa] @call_promotable_box_from_generic : $@convention(thin) <T> (@in T, Int) -> @owned @callee_guaranteed () -> Int {
 entry(%0 : $*T, %1 : $Int):
   destroy_addr %0 : $*T
   %f = function_ref @promotable_box : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> Int
@@ -42,7 +42,7 @@
 // CHECK:       bb0([[ARG0:%.*]] : $*T, [[ARG1:%.*]] : $Builtin.Int32):
 // CHECK-NEXT:    return [[ARG1]] : $Builtin.Int32
 
-sil @generic_promotable_box : $@convention(thin) <T> (@in T, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
+sil [ossa] @generic_promotable_box : $@convention(thin) <T> (@in T, @owned <τ_0_0> { var τ_0_0 } <Int>) -> Int {
 entry(%0 : $*T, %b : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %a = project_box %b : $<τ_0_0> { var τ_0_0 } <Int>, 0
   %v = load [trivial] %a : $*Int
@@ -58,7 +58,7 @@
 // CHECK-NEXT:    [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[F]]<U>([[ARG2]])
 // CHECK-NEXT:    return [[CLOSURE]]
 
-sil @call_generic_promotable_box_from_different_generic : $@convention(thin) <T, U: P> (@in T, @in U, Int) -> @owned @callee_guaranteed (@in U) -> Int {
+sil [ossa] @call_generic_promotable_box_from_different_generic : $@convention(thin) <T, U: P> (@in T, @in U, Int) -> @owned @callee_guaranteed (@in U) -> Int {
 entry(%0 : $*T, %1 : $*U, %2 : $Int):
   destroy_addr %0 : $*T
   destroy_addr %1 : $*U
@@ -87,7 +87,7 @@
 // CHECK:         switch_enum [[ARG2]] : $E<(R<T>) -> Builtin.Int32>
 // CHECK-NOT:     project_box
 // CHECK:       } // end sil function '$s23generic_promotable_box2Tf2nni_n'
-sil @generic_promotable_box2 : $@convention(thin) <T> (@in R<T>, @in Int, @owned <τ_0_0> { var E<(R<τ_0_0>) -> Int> } <T>) -> () {
+sil [ossa] @generic_promotable_box2 : $@convention(thin) <T> (@in R<T>, @in Int, @owned <τ_0_0> { var E<(R<τ_0_0>) -> Int> } <T>) -> () {
 entry(%0 : $*R<T>, %1 : $*Int, %b : @owned $<τ_0_0> { var E<(R<τ_0_0>)->Int> } <T>):
   %a = project_box %b : $<τ_0_0> { var E<(R<τ_0_0>)->Int> } <T>, 0
   %e = load [copy] %a : $*E<(R<T>)->Int>
@@ -119,7 +119,7 @@
 // CHECK-NEXT:    [[CLOSURE:%.*]] = partial_apply [callee_guaranteed] [[F]]<U>(%2, %3)
 // CHECK-NEXT:    return [[CLOSURE]]
 
-sil @call_generic_promotable_box_from_different_generic2 : $@convention(thin) <T, U: P> (@in R<T>, @in E<(R<U>)->Int>, @in Int) -> @owned @callee_guaranteed (@in R<U>) -> () {
+sil [ossa] @call_generic_promotable_box_from_different_generic2 : $@convention(thin) <T, U: P> (@in R<T>, @in E<(R<U>)->Int>, @in Int) -> @owned @callee_guaranteed (@in R<U>) -> () {
 entry(%0 : $*R<T>, %1 : $*E<(R<U>)->Int>, %2 : $*Int):
   destroy_addr %0 : $*R<T>
   %f = function_ref @generic_promotable_box2 : $@convention(thin) <V> (@in R<V>, @in Int, @owned <τ_0_0> { var E<(R<τ_0_0>)->Int> } <V>) -> ()
diff --git a/test/SILOptimizer/capture_promotion_ownership.sil b/test/SILOptimizer/capture_promotion_ownership.sil
index 7bb9c8e..9db8f35 100644
--- a/test/SILOptimizer/capture_promotion_ownership.sil
+++ b/test/SILOptimizer/capture_promotion_ownership.sil
@@ -31,8 +31,8 @@
 sil @dummy_func : $@convention(thin) (Int, Int, Int) -> Int
 sil @destructured_baz_user : $@convention(thin) (@owned Bar, @guaranteed Bar, Int) -> ()
 
-// CHECK-LABEL: sil @test_capture_promotion
-sil @test_capture_promotion : $@convention(thin) () -> @owned @callee_owned () -> (Int, Builtin.Int64) {
+// CHECK-LABEL: sil [ossa] @test_capture_promotion
+sil [ossa] @test_capture_promotion : $@convention(thin) () -> @owned @callee_owned () -> (Int, Builtin.Int64) {
 bb0:
   // CHECK: [[BOX1:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <Foo>
   // CHECK: [[MARKED_BOX1:%.*]] = mark_uninitialized [var] [[BOX1]]
@@ -102,8 +102,8 @@
   return %21 : $@callee_owned () -> (Int, Builtin.Int64)
 }
 
-// CHECK-LABEL: sil @test_capture_promotion_indirect
-sil @test_capture_promotion_indirect : $@convention(thin) () -> @owned @callee_owned () -> @out Int {
+// CHECK-LABEL: sil [ossa] @test_capture_promotion_indirect
+sil [ossa] @test_capture_promotion_indirect : $@convention(thin) () -> @owned @callee_owned () -> @out Int {
 bb0:
   // CHECK: [[BOX1:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <Foo>
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Foo>
@@ -164,7 +164,7 @@
   return %21 : $@callee_owned () -> @out Int
 }
 
-// CHECK-LABEL: sil private @$s8closure0Tf2iii_n : $@convention(thin) (@owned Foo, @owned Baz, Int) -> (Int, Builtin.Int64) {
+// CHECK-LABEL: sil private [ossa] @$s8closure0Tf2iii_n : $@convention(thin) (@owned Foo, @owned Baz, Int) -> (Int, Builtin.Int64) {
 // CHECK: bb0([[ORIGINAL_ARG0:%.*]] : @owned $Foo, [[ORIGINAL_ARG1:%.*]] : @owned $Baz, [[ARG2:%.*]] : $Int):
 // CHECK:   [[ARG0:%.*]] = begin_borrow [[ORIGINAL_ARG0]]
 // CHECK:   [[ARG1:%.*]] = begin_borrow [[ORIGINAL_ARG1]]
@@ -196,7 +196,7 @@
 // CHECK: return [[RESULT]] : $(Int, Builtin.Int64)
 // CHECK: } // end sil function '$s8closure0Tf2iii_n'
 
-sil private @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> (Int, Builtin.Int64) {
+sil private [ossa] @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> (Int, Builtin.Int64) {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Foo>, %2 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %4 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Foo>, 0
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <Baz>, 0
@@ -225,8 +225,8 @@
 
 // The closure in this function is not promotable because it mutates its argument
 
-// CHECK-LABEL: sil @test_unpromotable
-sil @test_unpromotable : $@convention(thin) () -> @owned @callee_owned () -> Int {
+// CHECK-LABEL: sil [ossa] @test_unpromotable
+sil [ossa] @test_unpromotable : $@convention(thin) () -> @owned @callee_owned () -> Int {
 bb0:
   %0 = tuple ()
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Foo>
@@ -243,9 +243,9 @@
   return %21 : $@callee_owned () -> Int
 }
 
-sil @mutate_foo : $@convention(thin) (@inout Foo) -> ()
+sil [ossa] @mutate_foo : $@convention(thin) (@inout Foo) -> ()
 
-sil private @closure1 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>) -> Int {
+sil private [ossa] @closure1 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>) -> Int {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Foo>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Foo>, 0
   %6 = tuple ()
@@ -263,10 +263,10 @@
   return %11 : $Int
 }
 
-sil @apply : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
+sil [ossa] @apply : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
 
-// CHECK-LABEL: sil @captureWithinGeneric
-sil @captureWithinGeneric : $@convention(thin) <T> (@inout Int, @inout Int) -> () {
+// CHECK-LABEL: sil [ossa] @captureWithinGeneric
+sil [ossa] @captureWithinGeneric : $@convention(thin) <T> (@inout Int, @inout Int) -> () {
 // CHECK: bb0
 bb0(%0 : $*Int, %1 : $*Int):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
@@ -291,8 +291,8 @@
   return %16 : $()
 }
 
-// CHECK: sil @$s27closureWithGenericSignatureTf2ni_n : $@convention(thin) <{{[^>]+}}> (@owned <τ_0_0> { var τ_0_0 } <Int>, Int) -> ()
-sil @closureWithGenericSignature : $@convention(thin) <T> (@owned <τ_0_0> { var τ_0_0 } <Int>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> () {
+// CHECK: sil [ossa] @$s27closureWithGenericSignatureTf2ni_n : $@convention(thin) <{{[^>]+}}> (@owned <τ_0_0> { var τ_0_0 } <Int>, Int) -> ()
+sil [ossa] @closureWithGenericSignature : $@convention(thin) <T> (@owned <τ_0_0> { var τ_0_0 } <Int>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> () {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Int>, %2 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %1 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Int>, 0
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -309,7 +309,7 @@
 
 sil [transparent] [serialized] @$ss1poiyS2i_SitF : $@convention(thin) (Int, Int) -> Int
 
-sil private @closure_indirect_result : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> @out Int {
+sil private [ossa] @closure_indirect_result : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Foo>, @owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Int>) -> @out Int {
 bb0(%0: $*Int, %1 : @owned $<τ_0_0> { var τ_0_0 } <Foo>, %2 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %4 : @owned $<τ_0_0> { var τ_0_0 } <Int>):
   %17 = project_box %1 : $<τ_0_0> { var τ_0_0 } <Foo>, 0
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <Baz>, 0
@@ -338,13 +338,13 @@
 // struct_element_addr that always have load users with the load occurring before
 // and after the element in the use list.
 
-sil @mutate_int : $@convention(thin) (@inout Int) -> ()
+sil [ossa] @mutate_int : $@convention(thin) (@inout Int) -> ()
 
-// CHECK-LABEL: sil @test_closure_multiple_uses_of_struct_element_addr : $@convention(thin) () -> @owned @callee_owned () -> () {
+// CHECK-LABEL: sil [ossa] @test_closure_multiple_uses_of_struct_element_addr : $@convention(thin) () -> @owned @callee_owned () -> () {
 // CHECK: [[FUNC:%.*]] = function_ref @closure_multiple_uses_of_struct_element_addr : $@convention(thin)
 // CHECK: partial_apply [[FUNC]](
 // CHECK: } // end sil function 'test_closure_multiple_uses_of_struct_element_addr'
-sil @test_closure_multiple_uses_of_struct_element_addr : $@convention(thin) () -> @owned @callee_owned () -> () {
+sil [ossa] @test_closure_multiple_uses_of_struct_element_addr : $@convention(thin) () -> @owned @callee_owned () -> () {
 bb0:
   %0 = function_ref @baz_init : $@convention(thin) (@thin Baz.Type) -> @owned Baz
   %1 = metatype $@thin Baz.Type
@@ -365,7 +365,7 @@
   return %9 : $@callee_owned () -> ()
 }
 
-sil @closure_multiple_uses_of_struct_element_addr : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Baz>) -> () {
+sil [ossa] @closure_multiple_uses_of_struct_element_addr : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Baz>) -> () {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %1 : @owned $<τ_0_0> { var τ_0_0 } <Baz>):
   %2 = project_box %0 : $<τ_0_0> { var τ_0_0 } <Baz>, 0
   %3 = struct_element_addr %2 : $*Baz, #Baz.x
@@ -384,8 +384,8 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_capture_projection_test : $@convention(thin) () -> @owned @callee_owned () -> () {
-sil @test_capture_projection_test : $@convention(thin) () -> @owned @callee_owned () -> () {
+// CHECK-LABEL: sil [ossa] @test_capture_projection_test : $@convention(thin) () -> @owned @callee_owned () -> () {
+sil [ossa] @test_capture_projection_test : $@convention(thin) () -> @owned @callee_owned () -> () {
 bb0:
   %0 = function_ref @baz_init : $@convention(thin) (@thin Baz.Type) -> @owned Baz
   %1 = metatype $@thin Baz.Type
@@ -425,7 +425,7 @@
   return %21 : $@callee_owned () -> ()
 }
 
-// CHECK-LABEL: sil @$s23closure_projection_testTf2ni_n : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned Baz) -> () {
+// CHECK-LABEL: sil [ossa] @$s23closure_projection_testTf2ni_n : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned Baz) -> () {
 // CHECK: bb0([[UNPROMOTED_BAZ:%.*]] : @owned $<τ_0_0> { var τ_0_0 } <Baz>, [[BAZ:%.*]] : @owned $Baz):
 // CHECK:   [[BORROWED_BAZ:%.*]] = begin_borrow [[BAZ]] : $Baz
 // CHECK:   [[X:%.*]] = struct_extract [[BORROWED_BAZ]] : $Baz, #Baz.x
@@ -440,7 +440,7 @@
 // CHECK:   end_borrow [[BORROWED_BAZ]]
 // CHECK:   destroy_value [[BAZ]]
 // CHECK: } // end sil function '$s23closure_projection_testTf2ni_n'
-sil @closure_projection_test : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Baz>) -> () {
+sil [ossa] @closure_projection_test : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Baz>, @owned <τ_0_0> { var τ_0_0 } <Baz>) -> () {
 bb0(%0 : @owned $<τ_0_0> { var τ_0_0 } <Baz>, %1 : @owned $<τ_0_0> { var τ_0_0 } <Baz>):
   %0a = project_box %0 : $<τ_0_0> { var τ_0_0 } <Baz>, 0
   %2 = struct_element_addr %0a : $*Baz, #Baz.x
diff --git a/test/SILOptimizer/capture_promotion_reachability.sil b/test/SILOptimizer/capture_promotion_reachability.sil
index 30cdcec..73f6e7b 100644
--- a/test/SILOptimizer/capture_promotion_reachability.sil
+++ b/test/SILOptimizer/capture_promotion_reachability.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -capture-promotion | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-promotion | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SILOptimizer/capture_propagation.sil b/test/SILOptimizer/capture_propagation.sil
index de09d46..311c078 100644
--- a/test/SILOptimizer/capture_propagation.sil
+++ b/test/SILOptimizer/capture_propagation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -capture-prop | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -capture-prop | %FileCheck %s
 
 // Check the CapturePropagation specialized the reabstraction thunk.
 
diff --git a/test/SILOptimizer/capturepromotion-wrong-lexicalscope.swift b/test/SILOptimizer/capturepromotion-wrong-lexicalscope.swift
index 0deb31c..6b82184 100644
--- a/test/SILOptimizer/capturepromotion-wrong-lexicalscope.swift
+++ b/test/SILOptimizer/capturepromotion-wrong-lexicalscope.swift
@@ -2,7 +2,7 @@
 // RUN: %target-swift-frontend -primary-file %s -Onone -emit-sil -Xllvm -sil-print-after=capture-promotion -Xllvm \
 // RUN:   -sil-print-debuginfo -o /dev/null 2>&1 | %FileCheck %s
 
-// CHECK: sil hidden @$s4null19captureStackPromoteSiycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> Int {
+// CHECK: sil hidden [ossa] @$s4null19captureStackPromoteSiycyF : $@convention(thin) () -> @owned @callee_guaranteed () -> Int {
 // CHECK: bb0:
 // CHECK:   %0 = alloc_box ${ var Int }, var, name "x", loc {{.*}}:32:7, scope 3
 // CHECK:   %1 = project_box %0 : ${ var Int }, 0, loc {{.*}}:32:7, scope 3
diff --git a/test/SILOptimizer/cast_folding_no_bridging.sil b/test/SILOptimizer/cast_folding_no_bridging.sil
index 282e569..4a97002 100644
--- a/test/SILOptimizer/cast_folding_no_bridging.sil
+++ b/test/SILOptimizer/cast_folding_no_bridging.sil
@@ -1,5 +1,5 @@
 
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -emit-sil %s | %FileCheck %s
+// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
 // REQUIRES: objc_interop
 
 // We want to check that casts between two types which are both Swift types or
diff --git a/test/SILOptimizer/cast_foldings.sil b/test/SILOptimizer/cast_foldings.sil
index 103e50c..c83c40a 100644
--- a/test/SILOptimizer/cast_foldings.sil
+++ b/test/SILOptimizer/cast_foldings.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sil-combine %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all -sil-combine %s | %FileCheck %s
 
 import Swift
 
diff --git a/test/SILOptimizer/cast_optimizer_conditional_conformance.sil b/test/SILOptimizer/cast_optimizer_conditional_conformance.sil
index ddd377d..0c81b86 100644
--- a/test/SILOptimizer/cast_optimizer_conditional_conformance.sil
+++ b/test/SILOptimizer/cast_optimizer_conditional_conformance.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-verify-all -assume-parsing-unqualified-ownership-sil -wmo -performance-constant-propagation -simplify-cfg -sil-combine -jumpthread-simplify-cfg -sil-combine -devirtualizer -generic-specializer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -wmo -performance-constant-propagation -simplify-cfg -sil-combine -jumpthread-simplify-cfg -sil-combine -devirtualizer -generic-specializer %s | %FileCheck %s
 //
 // <rdar://problem/46322928> Failure to devirtualize a protocol method applied to an opened existential blocks implemention of
 // DataProtocol.
diff --git a/test/SILOptimizer/character_literals.swift b/test/SILOptimizer/character_literals.swift
index 311db70..20c5cae 100644
--- a/test/SILOptimizer/character_literals.swift
+++ b/test/SILOptimizer/character_literals.swift
@@ -39,11 +39,11 @@
 }
 
 // NOTE: -9223372036854775808 = 0x80 = immortal large discrim
-// NOTE: 25 = length in UTF-8 code units
+// NOTE: 1152921504606847001 = 25 (code unit length) | `isTailAllocated` perf flag
 //
 // CHECK-LABEL: define {{.*}}singleNonSmolChar
 // CHECK-NEXT: entry:
-// CHECK:   ret { i64, %swift.bridge* } { i64 25, %swift.bridge* {{.*}}@0{{.*}}i64 -9223372036854775808
+// CHECK:   ret { i64, %swift.bridge* } { i64 1152921504606847001, %swift.bridge* {{.*}}@0{{.*}}i64 -9223372036854775808
 public func singleNonSmolChar() -> Character {
   return "👩‍👩‍👦‍👦"
 }
diff --git a/test/SILOptimizer/closure_specialize.sil b/test/SILOptimizer/closure_specialize.sil
index e50ec5f..5bc8e7d 100644
--- a/test/SILOptimizer/closure_specialize.sil
+++ b/test/SILOptimizer/closure_specialize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/closure_specialize_and_cfg.sil b/test/SILOptimizer/closure_specialize_and_cfg.sil
index c59f441..dc32342 100644
--- a/test/SILOptimizer/closure_specialize_and_cfg.sil
+++ b/test/SILOptimizer/closure_specialize_and_cfg.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-verify-without-invalidation -enable-sil-verify-all -simplify-cfg -closure-specialize %s
+// RUN: %target-sil-opt -sil-verify-without-invalidation -enable-sil-verify-all -simplify-cfg -closure-specialize %s
 
 // Test if the ClosureSpecializer correctly invalidates the dominator tree
 // even if there are no functions specialized.
diff --git a/test/SILOptimizer/closure_specialize_consolidated.sil b/test/SILOptimizer/closure_specialize_consolidated.sil
index 96b1c81..44603e1 100644
--- a/test/SILOptimizer/closure_specialize_consolidated.sil
+++ b/test/SILOptimizer/closure_specialize_consolidated.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -closure-specialize %s | %FileCheck %s -check-prefix=REMOVECLOSURES
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -closure-specialize-eliminate-dead-closures=0 -closure-specialize %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -closure-specialize %s | %FileCheck %s -check-prefix=REMOVECLOSURES
+// RUN: %target-sil-opt -enable-sil-verify-all -closure-specialize-eliminate-dead-closures=0 -closure-specialize %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/closure_specialize_fragile.sil b/test/SILOptimizer/closure_specialize_fragile.sil
index 46f1d4a..9cd6e3d 100644
--- a/test/SILOptimizer/closure_specialize_fragile.sil
+++ b/test/SILOptimizer/closure_specialize_fragile.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt  %s -verify -closure-specialize -assume-parsing-unqualified-ownership-sil -o -  | %FileCheck %s
+// RUN: %target-sil-opt  %s -verify -closure-specialize -o -  | %FileCheck %s
 
 // Make sure we do not specialize resilientCallee.
 
diff --git a/test/SILOptimizer/closure_specialize_opaque.sil b/test/SILOptimizer/closure_specialize_opaque.sil
index 2e44f69..107dbb5 100644
--- a/test/SILOptimizer/closure_specialize_opaque.sil
+++ b/test/SILOptimizer/closure_specialize_opaque.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
 
 struct TestView {}
 struct TestRange {}
diff --git a/test/SILOptimizer/closure_specialize_simple.sil b/test/SILOptimizer/closure_specialize_simple.sil
index 3ebac13..70b4f1a 100644
--- a/test/SILOptimizer/closure_specialize_simple.sil
+++ b/test/SILOptimizer/closure_specialize_simple.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -closure-specialize %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/concat_string_literals.64.swift b/test/SILOptimizer/concat_string_literals.64.swift
index bcdb70f..ff6a039 100644
--- a/test/SILOptimizer/concat_string_literals.64.swift
+++ b/test/SILOptimizer/concat_string_literals.64.swift
@@ -1,5 +1,6 @@
 // RUN: %target-swift-frontend -O -emit-ir  %s | %FileCheck %s
 // RUN: %target-swift-frontend -Osize -emit-ir  %s | %FileCheck %s
+// REQUIRES: swift_stdlib_no_asserts,optimized_stdlib
 
 // We have a separate test for 32-bit architectures.
 // REQUIRES: PTRSIZE=64
@@ -33,9 +34,9 @@
   return "aé" + "def"
 }
 
-// NOTE: 43 = code-unit length
+// NOTE: 1152921504606847019 = 43 (code-unit length) | `isTailAllocated` perf flag
 // CHECK-LABEL: test_scalar_strng
-// CHECK:  ret { i64, %swift.bridge* } { i64 43, %swift.bridge* inttoptr {{.*}}i64 -{{[0-9]+}}{{.*}} to %swift.bridge*) }
+// CHECK:  ret { i64, %swift.bridge* } { i64 1152921504606847019, %swift.bridge* inttoptr {{.*}}i64 -{{[0-9]+}}{{.*}} to %swift.bridge*) }
 public func test_scalar_strng() -> String {
   return "a" + "👨🏿‍💼+🧙🏿‍♂️=🕴🏿"
 }
@@ -47,9 +48,9 @@
   return "a" + "bc" + "dèf" + "ghī"
 }
 
-// NOTE: 23 = code-unit length
+// NOTE: 1152921504606846999 = 23 (code-unit length) | `isTailAllocated` perf flag
 // CHECK-LABEL test_strng_concat_large
-// CHECK:  ret { i64, %swift.bridge* } { i64 23, %swift.bridge* inttoptr {{.*}}i64 -{{[0-9]+}}{{.*}} to %swift.bridge*) }
+// CHECK:  ret { i64, %swift.bridge* } { i64 1152921504606846999, %swift.bridge* inttoptr {{.*}}i64 -{{[0-9]+}}{{.*}} to %swift.bridge*) }
 public func test_strng_concat_large() -> String {
   return "a" + "bc" + "dèf" + "ghī" + "jklmn" + "o" + "𝛒qr"
 }
diff --git a/test/SILOptimizer/conditionforwarding.sil b/test/SILOptimizer/conditionforwarding.sil
index f5dc46a..7998c76 100644
--- a/test/SILOptimizer/conditionforwarding.sil
+++ b/test/SILOptimizer/conditionforwarding.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all %s -condition-forwarding | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all %s -condition-forwarding | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/const_fold_objc_bridge.sil b/test/SILOptimizer/const_fold_objc_bridge.sil
index 9546281..147432c 100644
--- a/test/SILOptimizer/const_fold_objc_bridge.sil
+++ b/test/SILOptimizer/const_fold_objc_bridge.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/constant_propagation.sil b/test/SILOptimizer/constant_propagation.sil
index 031fe62..c1897b2 100644
--- a/test/SILOptimizer/constant_propagation.sil
+++ b/test/SILOptimizer/constant_propagation.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
 
 import Swift
 import Builtin
diff --git a/test/SILOptimizer/constant_propagation_castopt_analysis_invalidation.sil b/test/SILOptimizer/constant_propagation_castopt_analysis_invalidation.sil
index 076811a..0e5489e 100644
--- a/test/SILOptimizer/constant_propagation_castopt_analysis_invalidation.sil
+++ b/test/SILOptimizer/constant_propagation_castopt_analysis_invalidation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline -performance-constant-propagation -sil-verify-without-invalidation
+// RUN: %target-sil-opt -enable-sil-verify-all -inline -performance-constant-propagation -sil-verify-without-invalidation
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/constant_propagation_floats.sil b/test/SILOptimizer/constant_propagation_floats.sil
index b45c823..d31a6f1 100644
--- a/test/SILOptimizer/constant_propagation_floats.sil
+++ b/test/SILOptimizer/constant_propagation_floats.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
 //
 // Tests that check constant-folding of conversions of floating point values
 // to integer types.
diff --git a/test/SILOptimizer/constant_propagation_floats_x86.sil b/test/SILOptimizer/constant_propagation_floats_x86.sil
index 26725dd..6059864 100644
--- a/test/SILOptimizer/constant_propagation_floats_x86.sil
+++ b/test/SILOptimizer/constant_propagation_floats_x86.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnostic-constant-propagation | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -performance-constant-propagation | %FileCheck %s
 //
 // REQUIRES: CPU=i386 || CPU=x86_64
 //
diff --git a/test/SILOptimizer/copy_propagation.sil b/test/SILOptimizer/copy_propagation.sil
index aff3a62..107c14a 100644
--- a/test/SILOptimizer/copy_propagation.sil
+++ b/test/SILOptimizer/copy_propagation.sil
@@ -13,14 +13,14 @@
 // }
 // CopyPropagation should leave behind a single copy and no destroys.
 //
-// CHECK-LABEL: sil @testVarAssign : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+// CHECK-LABEL: sil [ossa] @testVarAssign : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 // CHECK: bb0(%0 : @guaranteed $T):
 // CHECK-NOT: destroy
 // CHECK:   [[CPY:%.*]] = copy_value %0 : $T
 // CHECK-NOT: destroy
 // CHECK:   return [[CPY]] : $T
 // CHECK-LABEL: } // end sil function 'testVarAssign'
-sil @testVarAssign : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+sil [ossa] @testVarAssign : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 bb0(%0 : @guaranteed $T):
   %1 = copy_value %0 : $T
   %2 = copy_value %1 : $T
@@ -28,7 +28,7 @@
   return %2 : $T
 }
 
-// CHECK: sil @multiReturnValue : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @out T) {
+// CHECK: sil [ossa] @multiReturnValue : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @out T) {
 // CHECK: bb0(%0 : @guaranteed $T):
 // CHECK-NOT: destroy
 // CHECK:   [[CPY1:%.*]] = copy_value %0 : $T
@@ -39,7 +39,7 @@
 // CHECK-NOT: destroy
 // CHECK:   return [[R]] : $(T, T)
 // CHECK-LABEL: } // end sil function 'multiReturnValue'
-sil @multiReturnValue : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @out T) {
+sil [ossa] @multiReturnValue : $@convention(thin) <T> (@in_guaranteed T) -> (@out T, @out T) {
 bb0(%0 : @guaranteed $T):
   %1 = copy_value %0 : $T
   %2 = copy_value %1 : $T
@@ -49,7 +49,7 @@
   return %4 : $(T, T)
 }
 
-// CHECK-LABEL: sil @multiCallResult : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+// CHECK-LABEL: sil [ossa] @multiCallResult : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 // CHECK: bb0(%0 : @guaranteed $T):
 // CHECK-NEXT: // function_ref multiReturnValue
 // CHECK-NEXT: [[F:%.*]] = function_ref @multiReturnValue : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> (@out τ_0_0, @out τ_0_0)
@@ -58,7 +58,7 @@
 // CHECK-NEXT: destroy_value [[D2]] : $T
 // CHECK-NEXT: return [[D1]] : $T
 // CHECK-LABEL: } // end sil function 'multiCallResult'
-sil @multiCallResult : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
+sil [ossa] @multiCallResult : $@convention(thin) <T> (@in_guaranteed T) -> @out T {
 bb0(%0 : @guaranteed $T):
   %1 = copy_value %0 : $T
   %2 = function_ref @multiReturnValue : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0) -> (@out τ_0_0, @out τ_0_0)
@@ -73,7 +73,7 @@
   return %6 : $T
 }
 
-// CHECK-LABEL: sil @testPhi : $@convention(thin) <T> (@in_guaranteed T, @in_guaranteed T, Bool) -> @out T {
+// CHECK-LABEL: sil [ossa] @testPhi : $@convention(thin) <T> (@in_guaranteed T, @in_guaranteed T, Bool) -> @out T {
 // CHECK: bb0(%0 : @guaranteed $T, %1 : @guaranteed $T, %2 : $Bool):
 // CHECK-NEXT: %3 = struct_extract %2 : $Bool, #Bool._value
 // CHECK-NEXT: cond_br %3, bb1, bb2
@@ -89,7 +89,7 @@
 // CHECK: bb3(%9 : @owned $T):
 // CHECK-NEXT: return %9 : $T
 // CHECK-LABEL: } // end sil function 'testPhi'
-sil @testPhi : $@convention(thin) <T> (@in_guaranteed T, @in_guaranteed T, Bool) -> @out T {
+sil [ossa] @testPhi : $@convention(thin) <T> (@in_guaranteed T, @in_guaranteed T, Bool) -> @out T {
 bb0(%0 : @guaranteed $T, %1 : @guaranteed $T, %2 : $Bool):
   %3 = copy_value %0 : $T
   %4 = copy_value %1 : $T
@@ -110,7 +110,7 @@
   return %11 : $T
 }
 
-// CHECK-LABEL: sil @testConsume : $@convention(thin) <T> (@in T, @inout T) -> () {
+// CHECK-LABEL: sil [ossa] @testConsume : $@convention(thin) <T> (@in T, @inout T) -> () {
 // CHECK: bb0(%0 : @owned $T, %1 : $*T):
 //
 // The original copy_value is deleted.
@@ -131,7 +131,7 @@
 // CHECK-NEXT:   %8 = tuple ()
 // CHECK-NEXT:   return %8 : $()
 // CHECK-LABEL: // end sil function 'testConsume'
-sil @testConsume : $@convention(thin) <T> (@in T, @inout T) -> () {
+sil [ossa] @testConsume : $@convention(thin) <T> (@in T, @inout T) -> () {
 bb0(%arg : @owned $T, %addr : $*T):
   %copy = copy_value %arg : $T
   debug_value %copy : $T
@@ -143,7 +143,7 @@
   return %v : $()
 }
 
-// CHECK-LABEL: sil @testDestroyEdge : $@convention(thin) <T> (@in T, @inout T, Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @testDestroyEdge : $@convention(thin) <T> (@in T, @inout T, Builtin.Int1) -> () {
 // CHECK: bb0(%0 : @owned $T, %1 : $*T, %2 : $Builtin.Int1):
 // CHECK-NEXT:   cond_br %2, bb2, bb1
 //
@@ -164,7 +164,7 @@
 // CHECK-NEXT:   %9 = tuple ()
 // CHECK-NEXT:   return %9 : $()
 // CHECK-LABEL: } // end sil function 'testDestroyEdge'
-sil @testDestroyEdge : $@convention(thin) <T> (@in T, @inout T, Builtin.Int1) -> () {
+sil [ossa] @testDestroyEdge : $@convention(thin) <T> (@in T, @inout T, Builtin.Int1) -> () {
 bb0(%arg : @owned $T, %addr : $*T, %z : $Builtin.Int1):
   cond_br %z, bb1, bb2
 
@@ -180,12 +180,12 @@
   return %10 : $()
 }
 
-sil @takeGuaranteedAndOwnedArg : $@convention(thin) <T> (@in_guaranteed T, @in T) -> ()
+sil [ossa] @takeGuaranteedAndOwnedArg : $@convention(thin) <T> (@in_guaranteed T, @in T) -> ()
 
 // Test the same user instruction with both @guaranteed and @owned operands taking the same copied value.
 // We need to keep the value alive to the end of the instruction.
 //
-// CHECK-LABEL: sil @testGuaranteedAndOwnedArg : $@convention(thin) <T> (@in T) -> () {
+// CHECK-LABEL: sil [ossa] @testGuaranteedAndOwnedArg : $@convention(thin) <T> (@in T) -> () {
 // CHECK: bb0(%0 : @owned $T):
 // CHECK-NEXT: // function_ref takeGuaranteedAndOwnedArg
 // CHECK-NEXT: function_ref @takeGuaranteedAndOwnedArg : $@convention(thin) <τ_0_0> (@in_guaranteed τ_0_0, @in τ_0_0) -> ()
@@ -194,7 +194,7 @@
 // CHECK-NEXT: destroy_value %0 : $T
 // CHECK-NEXT: return %{{.*}} : $()
 // CHECK-LABEL: } // end sil function 'testGuaranteedAndOwnedArg'
-sil @testGuaranteedAndOwnedArg : $@convention(thin) <T> (@in T) -> () {
+sil [ossa] @testGuaranteedAndOwnedArg : $@convention(thin) <T> (@in T) -> () {
 bb(%0 : @owned $T):
   %copy = copy_value %0 : $T
   %f = function_ref @takeGuaranteedAndOwnedArg : $@convention(thin) <T> (@in_guaranteed T, @in T) -> ()
diff --git a/test/SILOptimizer/copyforward.sil b/test/SILOptimizer/copyforward.sil
index 50588ad..95015ee 100644
--- a/test/SILOptimizer/copyforward.sil
+++ b/test/SILOptimizer/copyforward.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -copy-forwarding -enable-copyforwarding -enable-destroyhoisting | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -copy-forwarding -enable-copyforwarding -enable-destroyhoisting | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/cowarray_opt.sil b/test/SILOptimizer/cowarray_opt.sil
index 57b9fd1..1aa4901 100644
--- a/test/SILOptimizer/cowarray_opt.sil
+++ b/test/SILOptimizer/cowarray_opt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all -cowarray-opt %s | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all -cowarray-opt %s | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/cropoverflow.sil b/test/SILOptimizer/cropoverflow.sil
index 76470ec..da56ee1 100644
--- a/test/SILOptimizer/cropoverflow.sil
+++ b/test/SILOptimizer/cropoverflow.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -remove-redundant-overflow-checks | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -remove-redundant-overflow-checks | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/cse.sil b/test/SILOptimizer/cse.sil
index ab5d141..ecd5699 100644
--- a/test/SILOptimizer/cse.sil
+++ b/test/SILOptimizer/cse.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -cse | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/cse_apply.sil b/test/SILOptimizer/cse_apply.sil
index 21622cf..477774a 100644
--- a/test/SILOptimizer/cse_apply.sil
+++ b/test/SILOptimizer/cse_apply.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -cse | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/cse_objc.sil b/test/SILOptimizer/cse_objc.sil
index ef2fadb..2854088 100644
--- a/test/SILOptimizer/cse_objc.sil
+++ b/test/SILOptimizer/cse_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -cse | %FileCheck %s
 // REQUIRES: objc_interop
 
 import Builtin
diff --git a/test/SILOptimizer/cyclic_entry.sil b/test/SILOptimizer/cyclic_entry.sil
index a0b939c..aba5985 100644
--- a/test/SILOptimizer/cyclic_entry.sil
+++ b/test/SILOptimizer/cyclic_entry.sil
@@ -1,5 +1,5 @@
 // RUN: %empty-directory(%t)
-// RUN: not --crash %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s 2> %t/err.txt
+// RUN: not --crash %target-sil-opt -enable-sil-verify-all %s 2> %t/err.txt
 // RUN: %FileCheck %s < %t/err.txt
 
 // REQUIRES: asserts
diff --git a/test/SILOptimizer/dead_alloc_elim.sil b/test/SILOptimizer/dead_alloc_elim.sil
index 288b73d..0975968 100644
--- a/test/SILOptimizer/dead_alloc_elim.sil
+++ b/test/SILOptimizer/dead_alloc_elim.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -deadobject-elim %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -deadobject-elim %s | %FileCheck %s
 
 import Swift
 import Builtin
diff --git a/test/SILOptimizer/dead_array_elim.sil b/test/SILOptimizer/dead_array_elim.sil
index c32261b..e6939a9 100644
--- a/test/SILOptimizer/dead_array_elim.sil
+++ b/test/SILOptimizer/dead_array_elim.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all -deadobject-elim %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all -deadobject-elim %s | %FileCheck %s
 
 // Linux doesn't have the same symbol name for _ArrayBuffer.
 // XFAIL: linux
diff --git a/test/SILOptimizer/dead_code_elimination.sil b/test/SILOptimizer/dead_code_elimination.sil
index a8773e9..07db0a8 100644
--- a/test/SILOptimizer/dead_code_elimination.sil
+++ b/test/SILOptimizer/dead_code_elimination.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -dce %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -dce %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/dead_func_init_method.sil b/test/SILOptimizer/dead_func_init_method.sil
index 7d1691a..1bd8d63 100644
--- a/test/SILOptimizer/dead_func_init_method.sil
+++ b/test/SILOptimizer/dead_func_init_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-deadfuncelim %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-deadfuncelim %s | %FileCheck %s
 
 // Check that we don't crash on this.
 
diff --git a/test/SILOptimizer/dead_store_elim.sil b/test/SILOptimizer/dead_store_elim.sil
index c7d2719..d271aba 100644
--- a/test/SILOptimizer/dead_store_elim.sil
+++ b/test/SILOptimizer/dead_store_elim.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -dead-store-elim -max-partial-store-count=2 -enable-sil-verify-all | %FileCheck %s
+// RUN: %target-sil-opt %s -dead-store-elim -max-partial-store-count=2 -enable-sil-verify-all | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/dead_witness_module.swift b/test/SILOptimizer/dead_witness_module.swift
index 577811f..743fb20 100644
--- a/test/SILOptimizer/dead_witness_module.swift
+++ b/test/SILOptimizer/dead_witness_module.swift
@@ -5,9 +5,11 @@
 // DeadFunctionElimination may not remove a method from a witness table which
 // is imported from another module.
 
+// FIXME: Ever since @usableFromInline began to be enforced, this test did not
+// test anything useful, and now the witness table is never deserialized at all.
+
 import TestModule
 
 testit(MyStruct())
 
-// CHECK: sil_witness_table public_external MyStruct: Proto module TestModule
-// CHECK-NEXT: method #Proto.confx!1: {{.*}} : @$s{{.*}}confx{{.*}}FTW
+// CHECK-NOT: sil_witness_table MyStruct: Proto module TestModule
diff --git a/test/SILOptimizer/deadargsignatureopt.sil b/test/SILOptimizer/deadargsignatureopt.sil
index 49ed473..9efb607 100644
--- a/test/SILOptimizer/deadargsignatureopt.sil
+++ b/test/SILOptimizer/deadargsignatureopt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -dead-arg-signature-opt %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -dead-arg-signature-opt %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/definite_init_crashes.sil b/test/SILOptimizer/definite_init_crashes.sil
index 7528058..79a9b3f 100644
--- a/test/SILOptimizer/definite_init_crashes.sil
+++ b/test/SILOptimizer/definite_init_crashes.sil
@@ -14,8 +14,8 @@
   var a, b, c : Int
 }
 
-// CHECK-LABEL: sil @TripleTest
-sil @TripleTest : $@convention(method) (Int, @inout Triple) -> Triple {
+// CHECK-LABEL: sil [ossa] @TripleTest
+sil [ossa] @TripleTest : $@convention(method) (Int, @inout Triple) -> Triple {
 bb0(%0 : $Int, %1 : $*Triple):
   %4 = alloc_box $<τ_0_0> { var τ_0_0 } <Triple>
   %4a = project_box %4 : $<τ_0_0> { var τ_0_0 } <Triple>, 0
@@ -33,8 +33,8 @@
   var a : Int
 }
 
-// CHECK-LABEL: sil @SingleTest
-sil @SingleTest : $@convention(method) (@inout Single, Int) -> Single {
+// CHECK-LABEL: sil [ossa] @SingleTest
+sil [ossa] @SingleTest : $@convention(method) (@inout Single, Int) -> Single {
 bb0(%0 : $*Single, %1 : $Int):
   %4 = alloc_box $<τ_0_0> { var τ_0_0 } <Single>
   %4a = project_box %4 : $<τ_0_0> { var τ_0_0 } <Single>, 0
@@ -56,12 +56,12 @@
   case y(SomeClass)
 }
 
-sil @getSomeClass : $@convention(thin) (@thick SomeClass.Type) -> @owned SomeClass
-sil @getSomeUnion : $@convention(thin) (@owned SomeClass, @thin SomeUnion.Type) -> @owned SomeUnion
+sil [ossa] @getSomeClass : $@convention(thin) (@thick SomeClass.Type) -> @owned SomeClass
+sil [ossa] @getSomeUnion : $@convention(thin) (@owned SomeClass, @thin SomeUnion.Type) -> @owned SomeUnion
 
 
-// CHECK-LABEL: sil @test_union_release
-sil @test_union_release : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @test_union_release
+sil [ossa] @test_union_release : $@convention(thin) () -> () {
 bb0:
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <SomeUnion>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <SomeUnion>, 0
@@ -96,8 +96,8 @@
 
 sil @mayThrow : $@convention(thin) () -> (@owned NonTrivial, @error Error)
 
-// CHECK-LABEL: sil @assign_of_non_primitive_object_element_type
-sil @assign_of_non_primitive_object_element_type : $@convention(thin) (@thick Proto.Type) -> (@owned AStruct, @error Error) {
+// CHECK-LABEL: sil [ossa] @assign_of_non_primitive_object_element_type
+sil [ossa] @assign_of_non_primitive_object_element_type : $@convention(thin) (@thick Proto.Type) -> (@owned AStruct, @error Error) {
 bb0(%0 : $@thick Proto.Type):
   %3 = alloc_stack $AStruct
   %4 = mark_uninitialized [rootself] %3 : $*AStruct
diff --git a/test/SILOptimizer/definite_init_markuninitialized_delegatingself.sil b/test/SILOptimizer/definite_init_markuninitialized_delegatingself.sil
index 1ffe3f1..763a6f5 100644
--- a/test/SILOptimizer/definite_init_markuninitialized_delegatingself.sil
+++ b/test/SILOptimizer/definite_init_markuninitialized_delegatingself.sil
@@ -36,7 +36,7 @@
 // CHECK-NEXT: store
 // CHECK-NEXT: load
 // CHECK:  return
-sil @self_init_assert_instruction : $@convention(thin) (Int, @thin MyStruct.Type) -> MyStruct {
+sil [ossa] @self_init_assert_instruction : $@convention(thin) (Int, @thin MyStruct.Type) -> MyStruct {
   bb0(%0 : $Int, %1 : $@thin MyStruct.Type):
   %2 = alloc_stack $MyStruct, var, name "sf"
   %3 = mark_uninitialized [delegatingself] %2 : $*MyStruct
@@ -49,11 +49,11 @@
   return %9 : $MyStruct
 }
 
-sil @selfinit_delegate : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2
+sil [ossa] @selfinit_delegate : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2
 
 // <rdar://problem/18089574> Protocol member in struct + delegating init miscompilation
 // CHECK-LABEL: @self_init_copyaddr
-sil @self_init_copyaddr : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2 {
+sil [ossa] @self_init_copyaddr : $@convention(thin) (@thin MyStruct2.Type) -> @out MyStruct2 {
 bb0(%0 : $*MyStruct2, %1 : $@thin MyStruct2.Type):
   // CHECK: [[SELF:%[0-9]+]] = alloc_stack $MyStruct2
   %2 = alloc_stack $MyStruct2, var, name "sf"
@@ -83,8 +83,8 @@
 }
 sil @selfinit_mystruct3 : $@convention(thin) () -> @owned MyStruct3
 
-// CHECK-LABEL: sil hidden @test_conditional_destroy_delegating_init
-sil hidden @test_conditional_destroy_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil hidden [ossa] @test_conditional_destroy_delegating_init
+sil hidden [ossa] @test_conditional_destroy_delegating_init : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
 // CHECK:  [[CONTROL:%[0-9]+]] = alloc_stack $Builtin.Int1
 // CHECK-NEXT: [[SELF_BOX:%[0-9]+]] = alloc_stack $MyStruct3
diff --git a/test/SILOptimizer/definite_init_markuninitialized_derivedself.sil b/test/SILOptimizer/definite_init_markuninitialized_derivedself.sil
index 08f70ff..783aeb9 100644
--- a/test/SILOptimizer/definite_init_markuninitialized_derivedself.sil
+++ b/test/SILOptimizer/definite_init_markuninitialized_derivedself.sil
@@ -60,7 +60,7 @@
 //   }
 // }
 //
-sil @derived_test1 :  $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
+sil [ossa] @derived_test1 :  $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
 bb0(%0 : @owned $DerivedClassWithIVars):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>, 0
@@ -109,7 +109,7 @@
 //   override init() {
 //   }
 // }
-sil @derived_test2 :  $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
+sil [ossa] @derived_test2 :  $@convention(method) (@owned DerivedClassWithIVars) -> @owned DerivedClassWithIVars {
 bb0(%0 : @owned $DerivedClassWithIVars):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>, 0
@@ -152,7 +152,7 @@
 // come from when mandatory inlining ran very early. That being said, we should
 // still dot he right thing.
 //
-// CHECK-LABEL: sil @test_derived_release
+// CHECK-LABEL: sil [ossa] @test_derived_release
 // CHECK: bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
 // CHECK-NEXT: [[SELFBOX:%[0-9]+]] = alloc_stack
 // CHECK-NEXT: store
@@ -160,7 +160,7 @@
 // CHECK-NEXT: [[METATYPE:%[0-9]+]] = metatype $@thick DerivedClassWithNontrivialStoredProperties.Type
 // CHECK-NEXT: dealloc_partial_ref [[SELF]] : $DerivedClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick DerivedClassWithNontrivialStoredProperties.Type
 // CHECK-NEXT: dealloc_stack [[SELFBOX]]
-sil @test_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_derived_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
   %1 = alloc_stack $DerivedClassWithNontrivialStoredProperties
   %4 = mark_uninitialized [derivedself] %1 : $*DerivedClassWithNontrivialStoredProperties
@@ -178,7 +178,7 @@
 // come from when mandatory inlining ran very early. That being said, we should
 // still dot he right thing.
 //
-// CHECK-LABEL: sil @test_derived_partial_release
+// CHECK-LABEL: sil [ossa] @test_derived_partial_release
 // CHECK: bb0([[ARG:%.*]] : @owned $DerivedClassWithNontrivialStoredProperties):
 //
 // Initialize the self box.
@@ -204,7 +204,7 @@
 // CHECK: dealloc_partial_ref [[SELF]] : $DerivedClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick DerivedClassWithNontrivialStoredProperties.Type
 // CHECK: dealloc_stack [[SELFBOX]]
 // CHECK: } // end sil function 'test_derived_partial_release'
-sil @test_derived_partial_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_derived_partial_release : $@convention(method) (@owned DerivedClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $DerivedClassWithNontrivialStoredProperties):
   %1 = alloc_stack $DerivedClassWithNontrivialStoredProperties
   %4 = mark_uninitialized [derivedself] %1 : $*DerivedClassWithNontrivialStoredProperties
@@ -243,7 +243,7 @@
 //   }
 // }
 //
-sil @super_init_out_of_order :  $@convention(method) (@owned DerivedClassWithIVars, Int) -> @owned DerivedClassWithIVars {
+sil [ossa] @super_init_out_of_order :  $@convention(method) (@owned DerivedClassWithIVars, Int) -> @owned DerivedClassWithIVars {
 bb0(%0 : @owned $DerivedClassWithIVars, %i : $Int):
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <DerivedClassWithIVars>, 0
diff --git a/test/SILOptimizer/definite_init_markuninitialized_rootself.sil b/test/SILOptimizer/definite_init_markuninitialized_rootself.sil
index 5217483..b6be920 100644
--- a/test/SILOptimizer/definite_init_markuninitialized_rootself.sil
+++ b/test/SILOptimizer/definite_init_markuninitialized_rootself.sil
@@ -24,8 +24,8 @@
 sil @getSomeClass : $@convention(thin) () -> @owned SomeClass
 sil @getSomeOptionalClass : $@convention(thin) () -> Optional<SomeClass>
 
-// CHECK-LABEL: sil @rootclass_test1
-sil @rootclass_test1 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
+// CHECK-LABEL: sil [ossa] @rootclass_test1
+sil [ossa] @rootclass_test1 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
 bb0(%0 : @owned $RootClassWithIVars, %1 : $Int):
   %3 = mark_uninitialized [rootself] %0 : $RootClassWithIVars
 
@@ -50,8 +50,8 @@
   return %3 : $RootClassWithIVars
 }
 
-// CHECK-LABEL: sil @rootclass_test2
-sil @rootclass_test2 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
+// CHECK-LABEL: sil [ossa] @rootclass_test2
+sil [ossa] @rootclass_test2 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
 bb0(%0 : @owned $RootClassWithIVars, %1 : $Int):
   %3 = mark_uninitialized [rootself] %0 : $RootClassWithIVars
 
@@ -74,8 +74,8 @@
   return %3 : $RootClassWithIVars  // expected-error {{return from initializer without initializing all stored properties}}
 }
 
-// CHECK-LABEL: sil @rootclass_test3
-sil @rootclass_test3 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
+// CHECK-LABEL: sil [ossa] @rootclass_test3
+sil [ossa] @rootclass_test3 : $@convention(method) (@owned RootClassWithIVars, Int) -> @owned RootClassWithIVars {
 bb0(%0 : @owned $RootClassWithIVars, %1 : $Int):
   %3 = mark_uninitialized [rootself] %0 : $RootClassWithIVars
 
@@ -87,11 +87,11 @@
   return %3 : $RootClassWithIVars    // expected-error {{return from initializer without initializing all stored properties}}
 }
 
-// CHECK-LABEL: sil @test_root_release
+// CHECK-LABEL: sil [ossa] @test_root_release
 // CHECK: bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
 // CHECK-NEXT: [[METATYPE:%[0-9]+]] = metatype $@thick RootClassWithNontrivialStoredProperties.Type
 // CHECK-NEXT: dealloc_partial_ref %0 : $RootClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick RootClassWithNontrivialStoredProperties.Type
-sil @test_root_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_root_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %4 = mark_uninitialized [rootself] %0 : $RootClassWithNontrivialStoredProperties
   destroy_value %4 : $RootClassWithNontrivialStoredProperties
@@ -100,7 +100,7 @@
   return %13 : $()
 }
 
-// CHECK-LABEL: sil @test_root_partial_release
+// CHECK-LABEL: sil [ossa] @test_root_partial_release
 // CHECK: bb0([[SELF:%.*]] : @owned $RootClassWithNontrivialStoredProperties):
 // CHECK: [[FIELD_VALUE:%.*]] = alloc_ref
 // CHECK: [[BORROWED_SELF:%.*]] = begin_borrow [[SELF]]
@@ -114,7 +114,7 @@
 // CHECK: [[METATYPE:%[0-9]+]] = metatype $@thick RootClassWithNontrivialStoredProperties.Type
 // CHECK: dealloc_partial_ref [[SELF]] : $RootClassWithNontrivialStoredProperties, [[METATYPE]] : $@thick RootClassWithNontrivialStoredProperties.Type
 // CHECK: } // end sil function 'test_root_partial_release'
-sil @test_root_partial_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
+sil [ossa] @test_root_partial_release : $@convention(method) (@owned RootClassWithNontrivialStoredProperties) -> () {
 bb0(%0 : @owned $RootClassWithNontrivialStoredProperties):
   %4 = mark_uninitialized [rootself] %0 : $RootClassWithNontrivialStoredProperties
 
diff --git a/test/SILOptimizer/definite_init_markuninitialized_var.sil b/test/SILOptimizer/definite_init_markuninitialized_var.sil
index 0747e4c..728a161 100644
--- a/test/SILOptimizer/definite_init_markuninitialized_var.sil
+++ b/test/SILOptimizer/definite_init_markuninitialized_var.sil
@@ -11,8 +11,8 @@
 sil @takes_Int_inout : $@convention(thin) (@inout Int) -> ()
 sil @makesInt : $@convention(thin) () -> Int
 
-// CHECK-LABEL: sil @use_before_init
-sil @use_before_init : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil [ossa] @use_before_init
+sil [ossa] @use_before_init : $@convention(thin) () -> Int {
 bb0:
   %0 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %0a = project_box %0 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -23,7 +23,7 @@
 }
 
 // CHECK-LABEL: @inout_uninit
-sil @inout_uninit : $@convention(thin) () -> () {
+sil [ossa] @inout_uninit : $@convention(thin) () -> () {
 bb0:
   %0 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %0a = project_box %0 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -44,8 +44,8 @@
 //  takes_Int_inout(&a)
 //  return (t, a)
 //}
-// CHECK-LABEL: sil @used_by_inout
-sil @used_by_inout : $@convention(thin) (Int) -> (Int, Int) {
+// CHECK-LABEL: sil [ossa] @used_by_inout
+sil [ossa] @used_by_inout : $@convention(thin) (Int) -> (Int, Int) {
 bb0(%0 : $Int):
   %91 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %91a = project_box %91 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -67,11 +67,11 @@
 }
 
 /// returns_generic_struct - This returns a struct by reference.
-sil @returns_generic_struct : $@convention(thin) () -> @out AddressOnlyStruct
+sil [ossa] @returns_generic_struct : $@convention(thin) () -> @out AddressOnlyStruct
 
 // There should be no error in this function.
-// CHECK-LABEL: sil @call_struct_return_function
-sil @call_struct_return_function : $@convention(thin) () -> Int {
+// CHECK-LABEL: sil [ossa] @call_struct_return_function
+sil [ossa] @call_struct_return_function : $@convention(thin) () -> Int {
 bb0:
   %0 = alloc_box $<τ_0_0> { var τ_0_0 } <AddressOnlyStruct>
   %0a = project_box %0 : $<τ_0_0> { var τ_0_0 } <AddressOnlyStruct>, 0
@@ -85,8 +85,8 @@
   return %5 : $Int
 }
 
-// CHECK-LABEL: sil @tuple_elements1
-sil @tuple_elements1 : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil [ossa] @tuple_elements1
+sil [ossa] @tuple_elements1 : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(Int, Int)>
   %2a = project_box %2 : $<τ_0_0> { var τ_0_0 } <(Int, Int)>, 0
@@ -102,8 +102,8 @@
   return %99 : $()
 }
 
-// CHECK-LABEL: sil @tuple_elements2
-sil @tuple_elements2 : $@convention(thin) (Int) -> (Int, Int) {
+// CHECK-LABEL: sil [ossa] @tuple_elements2
+sil [ossa] @tuple_elements2 : $@convention(thin) (Int) -> (Int, Int) {
 bb0(%0 : $Int):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(Int, Int)>
   %2a = project_box %2 : $<τ_0_0> { var τ_0_0 } <(Int, Int)>, 0
@@ -118,8 +118,8 @@
   return %23 : $(Int, Int)
 }
 
-// CHECK-LABEL: sil @copy_addr1
-sil @copy_addr1 : $@convention(thin) <T> (@in T) -> @out T {
+// CHECK-LABEL: sil [ossa] @copy_addr1
+sil [ossa] @copy_addr1 : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $*T, %1 : $*T):
   %3 = alloc_box $<τ_0_0> { var τ_0_0 } <T>
   %3a = project_box %3 : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -131,8 +131,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil @copy_addr2
-sil @copy_addr2 : $@convention(thin) <T> (@in T) -> @out T {
+// CHECK-LABEL: sil [ossa] @copy_addr2
+sil [ossa] @copy_addr2 : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $*T, %1 : $*T):
   %3 = alloc_box $<τ_0_0> { var τ_0_0 } <T>
   %3a = project_box %3 : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -143,11 +143,11 @@
   return %9 : $()
 }
 
-sil @takes_closure : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
-sil @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> ()
+sil [ossa] @takes_closure : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
+sil [ossa] @closure0 : $@convention(thin) (@owned <τ_0_0> { var τ_0_0 } <Int>) -> ()
 
-// CHECK-LABEL: sil @closure_test
-sil @closure_test : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @closure_test
+sil [ossa] @closure_test : $@convention(thin) () -> () {
 bb0:
   %1 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %1a = project_box %1 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -168,12 +168,12 @@
 
 class SomeClass {}
 
-sil @getSomeClass : $@convention(thin) () -> @owned SomeClass
-sil @getSomeOptionalClass : $@convention(thin) () -> @owned Optional<SomeClass>
+sil [ossa] @getSomeClass : $@convention(thin) () -> @owned SomeClass
+sil [ossa] @getSomeOptionalClass : $@convention(thin) () -> @owned Optional<SomeClass>
 
 
-// CHECK-LABEL: sil @assign_test_trivial
-sil @assign_test_trivial : $@convention(thin) (Int) -> Int {
+// CHECK-LABEL: sil [ossa] @assign_test_trivial
+sil [ossa] @assign_test_trivial : $@convention(thin) (Int) -> Int {
 bb0(%0 : $Int):
   %7 = alloc_box $<τ_0_0> { var τ_0_0 } <Int>
   %7a = project_box %7 : $<τ_0_0> { var τ_0_0 } <Int>, 0
@@ -191,8 +191,8 @@
   return %2 : $Int
 }
 
-// CHECK-LABEL: sil @assign_test_nontrivial
-sil @assign_test_nontrivial : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @assign_test_nontrivial
+sil [ossa] @assign_test_nontrivial : $@convention(thin) () -> () {
 bb0:
   // Assignments of nontrivial types.  The first becomes an initialize (i.e.,
   // lone store), the second becomes an assignment (retain/release dance).
@@ -225,8 +225,8 @@
   return %11 : $()
 }
 
-// CHECK-LABEL: sil @assign_test_addressonly
-sil @assign_test_addressonly : $@convention(thin) <T> (@in T) -> @out T {
+// CHECK-LABEL: sil [ossa] @assign_test_addressonly
+sil [ossa] @assign_test_addressonly : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $*T, %1 : $*T):
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <T>
   %ba = project_box %b : $<τ_0_0> { var τ_0_0 } <T>, 0
@@ -252,8 +252,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil @assign_test_weak
-sil @assign_test_weak : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @assign_test_weak
+sil [ossa] @assign_test_weak : $@convention(thin) () -> () {
 bb0:
   // Assignments of weak pointer.  The first becomes an initialize, and the
   // second becomes an assignment.
@@ -289,8 +289,8 @@
   return %11 : $()
 }
 
-// CHECK-LABEL: sil @assign_test_unowned
-sil @assign_test_unowned : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @assign_test_unowned
+sil [ossa] @assign_test_unowned : $@convention(thin) () -> () {
 bb0:
   // Assignments of unowned pointer.  The first becomes an initialize, and the
   // second becomes an assignment.
@@ -343,7 +343,7 @@
   var y : Builtin.NativeObject
 }
 
-sil @test_struct : $@convention(thin) (@inout ContainsNativeObject) -> () {
+sil [ossa] @test_struct : $@convention(thin) (@inout ContainsNativeObject) -> () {
 bb0(%0 : $*ContainsNativeObject):
   %b = alloc_box $<τ_0_0> { var τ_0_0 } <ContainsNativeObject>
   %ba = project_box %b : $<τ_0_0> { var τ_0_0 } <ContainsNativeObject>, 0
@@ -356,22 +356,22 @@
   return %x : $()
 }
 
-// CHECK-LABEL: sil @non_box_assign_trivial
+// CHECK-LABEL: sil [ossa] @non_box_assign_trivial
 // CHECK-NOT: load
 // CHECK: assign
 // CHECK: return
-sil @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
+sil [ossa] @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
 bb0(%0 : $*Bool, %1 : $Bool):
   assign %1 to %0 : $*Bool
   %9 = tuple ()
   return %9 : $()
 }
 
-// CHECK-LABEL: sil @non_box_assign
+// CHECK-LABEL: sil [ossa] @non_box_assign
 // CHECK-NOT: load
 // CHECK: assign
 // CHECK: return
-sil @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
+sil [ossa] @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
 bb0(%0 : $*SomeClass, %1 : @owned $SomeClass):
   assign %1 to %0 : $*SomeClass
   %9 = tuple ()
@@ -380,10 +380,10 @@
 
 sil_global @int_global : $Int
 
-// CHECK-LABEL: sil @test_tlc
+// CHECK-LABEL: sil [ossa] @test_tlc
 // CHECK-NOT: mark_uninitialized
 // CHECK: return
-sil @test_tlc : $() -> () {
+sil [ossa] @test_tlc : $() -> () {
   %0 = global_addr @int_global : $*Int
   %1 = mark_uninitialized [var] %0 : $*Int
   %9 = tuple ()
@@ -391,14 +391,14 @@
 }
 
 struct XYStruct { var x, y : Int }
-sil @init_xy_struct : $@convention(thin) () -> XYStruct
+sil [ossa] @init_xy_struct : $@convention(thin) () -> XYStruct
 
 protocol P {}
 class C : P {}
-sil @use : $@convention(thin) (@in P) -> ()
+sil [ossa] @use : $@convention(thin) (@in P) -> ()
 
-// CHECK-LABEL: sil @release_not_constructed
-sil @release_not_constructed : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @release_not_constructed
+sil [ossa] @release_not_constructed : $@convention(thin) () -> () {
 bb0:  // CHECK: bb0:
   %3 = alloc_stack $SomeClass
   // CHECK-NEXT: alloc_stack
@@ -416,8 +416,8 @@
   return %15 : $()
 }
 
-// CHECK-LABEL: sil @release_some_constructed
-sil @release_some_constructed : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @release_some_constructed
+sil [ossa] @release_some_constructed : $@convention(thin) () -> () {
 bb0:
   %0 = tuple ()
   %b = alloc_stack $(SomeClass, SomeClass)
@@ -442,8 +442,8 @@
 }
 
 // rdar://15379013
-// CHECK-LABEL: sil @init_existential_with_class
-sil @init_existential_with_class : $@convention(thin) (@inout C) -> () {
+// CHECK-LABEL: sil [ossa] @init_existential_with_class
+sil [ossa] @init_existential_with_class : $@convention(thin) (@inout C) -> () {
 entry(%a : $*C):
   %p = alloc_stack $P
   %b = mark_uninitialized [var] %p : $*P
@@ -459,12 +459,12 @@
   return %z : $()
 }
 
-// CHECK-LABEL: sil @conditional_init
+// CHECK-LABEL: sil [ossa] @conditional_init
 // This test checks conditional destruction logic.  Because the value is only
 // initialized on some paths, we need to either hoist up the destroy_addr or
 // emit a boolean control value to make sure the value is only destroyed if
 //  actually initialized.
-sil @conditional_init : $@convention(thin) (Bool) -> () {
+sil [ossa] @conditional_init : $@convention(thin) (Bool) -> () {
 bb0(%0 : $Bool):
   %2 = alloc_stack $SomeClass
   %3 = mark_uninitialized [var] %2 : $*SomeClass
@@ -492,8 +492,8 @@
   return %14 : $()
 }
 
-// CHECK-LABEL: sil @conditionalInitOrAssign
-sil @conditionalInitOrAssign : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @conditionalInitOrAssign
+sil [ossa] @conditionalInitOrAssign : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   // CHECK: [[CONTROL:%[0-9]+]] = alloc_stack $Builtin.Int1
   // CHECK: [[CLASSVAL:%[0-9]+]] = alloc_stack $SomeClass
@@ -542,7 +542,7 @@
 
 // Make sure that we use a dealloc_box on the path where we do not assign.
 //
-// CHECK-LABEL: sil @conditionalInitOrAssignAllocBox : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @conditionalInitOrAssignAllocBox : $@convention(thin) () -> () {
 // CHECK: bb0:
 // CHECK: [[BOX:%.*]] = alloc_box
 //
@@ -558,7 +558,7 @@
 // CHECK-NEXT: tuple
 // CHECK-NEXT: return
 // CHECK: } // end sil function 'conditionalInitOrAssignAllocBox'
-sil @conditionalInitOrAssignAllocBox : $@convention(thin) () -> () {
+sil [ossa] @conditionalInitOrAssignAllocBox : $@convention(thin) () -> () {
 bb0:
   %box = alloc_box $<τ_0_0> { var τ_0_0 } <SomeClass>
   %5 = project_box %box : $<τ_0_0> { var τ_0_0 } <SomeClass>, 0
@@ -585,10 +585,10 @@
 // LLDB uses mark_uninitialized [var] in an unsupported way via an address to
 // pointer. LLDB shouldn't do this, but until it is removed and validated we
 // need a test for this.
-// CHECK-LABEL: sil @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
+// CHECK-LABEL: sil [ossa] @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
 // CHECK-NOT: mark_uninitialized [var]
 // CHECK: } // end sil function 'lldb_unsupported_markuninitialized_testcase'
-sil @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
+sil [ossa] @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
 bb0(%0 : $UnsafeMutablePointer<Any>):
   %2 = struct_extract %0 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue
   %3 = integer_literal $Builtin.Int64, 8
diff --git a/test/SILOptimizer/definite_init_scalarization_test.sil b/test/SILOptimizer/definite_init_scalarization_test.sil
index 5591365..d25a88f 100644
--- a/test/SILOptimizer/definite_init_scalarization_test.sil
+++ b/test/SILOptimizer/definite_init_scalarization_test.sil
@@ -23,7 +23,7 @@
   var a : Builtin.NativeObject
 }
 
-// CHECK-LABEL: sil @test_store_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+// CHECK-LABEL: sil [ossa] @test_store_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 // CHECK: bb0([[ARG0:%.*]] : $TripleInt, [[ARG1:%.*]] : $TripleInt, [[ARG2:%.*]] : $TripleInt):
 // CHECK:   [[BOX:%.*]] = alloc_box
 // CHECK:   [[PB_BOX:%.*]] = project_box [[BOX]]
@@ -40,7 +40,7 @@
 // CHECK:   store [[DESTRUCTURE_TUP_RHS_RHS]] to [trivial] [[ELT11]]
 // CHECK:   destroy_value [[BOX]]
 // CHECK: } // end sil function 'test_store_trivial'
-sil @test_store_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+sil [ossa] @test_store_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 bb0(%0 : $TripleInt, %1 : $TripleInt, %1a : $TripleInt):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>, 0
@@ -53,7 +53,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_store_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @test_store_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG0:%.*]] : @owned $Builtin.NativeObject, [[ARG1:%.*]] : @owned $Builtin.NativeObject, [[ARG2:%.*]] : @owned $Builtin.NativeObject):
 // CHECK:   [[BOX:%.*]] = alloc_box
 // CHECK:   [[PB_BOX:%.*]] = project_box [[BOX]]
@@ -70,7 +70,7 @@
 // CHECK:   store [[DESTRUCTURE_TUP_RHS_RHS]] to [init] [[ELT11]]
 // CHECK:   destroy_value [[BOX]]
 // CHECK: } // end sil function 'test_store_owned'
-sil @test_store_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+sil [ossa] @test_store_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject, %1a : @owned $Builtin.NativeObject):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>, 0
@@ -83,7 +83,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_assign_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+// CHECK-LABEL: sil [ossa] @test_assign_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 // CHECK: bb0([[ARG0:%.*]] : $TripleInt, [[ARG1:%.*]] : $TripleInt, [[ARG2:%.*]] : $TripleInt):
 // CHECK:   [[BOX:%.*]] = alloc_box
 // CHECK:   [[PB_BOX:%.*]] = project_box [[BOX]]
@@ -100,7 +100,7 @@
 // CHECK:   store [[DESTRUCTURE_TUP_RHS_RHS]] to [trivial] [[ELT11]]
 // CHECK:   destroy_value [[BOX]]
 // CHECK: } // end sil function 'test_assign_trivial'
-sil @test_assign_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+sil [ossa] @test_assign_trivial : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 bb0(%0 : $TripleInt, %1 : $TripleInt, %1a : $TripleInt):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>, 0
@@ -113,7 +113,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_assign_trivial_2 : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+// CHECK-LABEL: sil [ossa] @test_assign_trivial_2 : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 // CHECK: bb0([[ARG0:%.*]] : $TripleInt, [[ARG1:%.*]] : $TripleInt, [[ARG2:%.*]] : $TripleInt):
 // CHECK:   [[BOX:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>
 // CHECK:   [[PROJ_BOX:%.*]] = project_box [[BOX]] : $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>, 0
@@ -136,7 +136,7 @@
 // CHECK:   store [[TUP1_2nd_11]] to [trivial] [[PROJ_BOX_11]] : $*TripleInt
 // CHECK:   destroy_value [[BOX]] : $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>
 // CHECK: } // end sil function 'test_assign_trivial_2'
-sil @test_assign_trivial_2 : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
+sil [ossa] @test_assign_trivial_2 : $@convention(thin) (TripleInt, TripleInt, TripleInt) -> () {
 bb0(%0 : $TripleInt, %1 : $TripleInt, %1a : $TripleInt):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(TripleInt, (TripleInt, TripleInt))>, 0
@@ -151,7 +151,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_assign_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @test_assign_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG0:%.*]] : @owned $Builtin.NativeObject, [[ARG1:%.*]] : @owned $Builtin.NativeObject, [[ARG2:%.*]] : @owned $Builtin.NativeObject):
 // CHECK:   [[BOX:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
 // CHECK:   [[PROJ_BOX:%.*]] = project_box [[BOX]] : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>, 0
@@ -168,7 +168,7 @@
 // CHECK:   store [[TUP_D_11]] to [init] [[PROJ_BOX_11]] : $*Builtin.NativeObject
 // CHECK:   destroy_value [[BOX]] : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
 // CHECK: } // end sil function 'test_assign_owned'
-sil @test_assign_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+sil [ossa] @test_assign_owned : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject, %1a : @owned $Builtin.NativeObject):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>, 0
@@ -181,7 +181,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @test_assigned_owned_2 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @test_assigned_owned_2 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG0:%.*]] : @owned $Builtin.NativeObject, [[ARG1:%.*]] : @owned $Builtin.NativeObject, [[ARG2:%.*]] : @owned $Builtin.NativeObject):
 // CHECK:   [[BOX:%.*]] = alloc_box $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
 // CHECK:   [[PROJ_BOX:%.*]] = project_box [[BOX]] : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>, 0
@@ -212,7 +212,7 @@
 
 // CHECK:   destroy_value [[BOX]] : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
 // CHECK: } // end sil function 'test_assigned_owned_2'
-sil @test_assigned_owned_2 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
+sil [ossa] @test_assigned_owned_2 : $@convention(thin) (@owned Builtin.NativeObject, @owned Builtin.NativeObject, @owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $Builtin.NativeObject, %1a : @owned $Builtin.NativeObject):
   %2 = alloc_box $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>
   %3 = project_box %2 : $<τ_0_0> { var τ_0_0 } <(Builtin.NativeObject, (Builtin.NativeObject, Builtin.NativeObject))>, 0
diff --git a/test/SILOptimizer/destructor_analysis.sil b/test/SILOptimizer/destructor_analysis.sil
index 52da6d4..fc454e1 100644
--- a/test/SILOptimizer/destructor_analysis.sil
+++ b/test/SILOptimizer/destructor_analysis.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -abcopts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -abcopts %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_access.sil b/test/SILOptimizer/devirt_access.sil
index 2778e8d..8c7ad86 100644
--- a/test/SILOptimizer/devirt_access.sil
+++ b/test/SILOptimizer/devirt_access.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_access_serialized.sil b/test/SILOptimizer/devirt_access_serialized.sil
index 0dbb549..ddf7e2d 100644
--- a/test/SILOptimizer/devirt_access_serialized.sil
+++ b/test/SILOptimizer/devirt_access_serialized.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_alloc_ref_dynamic.sil b/test/SILOptimizer/devirt_alloc_ref_dynamic.sil
index 8afb819..7fa84b6 100644
--- a/test/SILOptimizer/devirt_alloc_ref_dynamic.sil
+++ b/test/SILOptimizer/devirt_alloc_ref_dynamic.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -devirtualizer -dce | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_class_witness_method.sil b/test/SILOptimizer/devirt_class_witness_method.sil
index b8008df..e1c7f51 100644
--- a/test/SILOptimizer/devirt_class_witness_method.sil
+++ b/test/SILOptimizer/devirt_class_witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -sil-combine -enable-resilience -save-optimization-record-path=%t.opt.yaml | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -sil-combine -enable-resilience -save-optimization-record-path=%t.opt.yaml | %FileCheck %s
 sil_stage canonical
 // RUN: %FileCheck -check-prefix=YAML -input-file=%t.opt.yaml %s
 
diff --git a/test/SILOptimizer/devirt_ctors.sil b/test/SILOptimizer/devirt_ctors.sil
index a3b79e1..02fb71e 100644
--- a/test/SILOptimizer/devirt_ctors.sil
+++ b/test/SILOptimizer/devirt_ctors.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_default_witness_method.sil b/test/SILOptimizer/devirt_default_witness_method.sil
index f92824e..82e68b3 100644
--- a/test/SILOptimizer/devirt_default_witness_method.sil
+++ b/test/SILOptimizer/devirt_default_witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -sil-combine -enable-resilience | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -sil-combine -enable-resilience | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/devirt_generic_witness_method.sil b/test/SILOptimizer/devirt_generic_witness_method.sil
index 5f4beae..f1fd3d8 100644
--- a/test/SILOptimizer/devirt_generic_witness_method.sil
+++ b/test/SILOptimizer/devirt_generic_witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_jump_thread.sil b/test/SILOptimizer/devirt_jump_thread.sil
index 401dd79..e5eaf9a 100644
--- a/test/SILOptimizer/devirt_jump_thread.sil
+++ b/test/SILOptimizer/devirt_jump_thread.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -jumpthread-simplify-cfg -cse | %FileCheck %s
 
 // Check that jump-threading works for sequences of checked_cast_br instructions produced by the devirtualizer.
 // This allows for simplifications of code like e.g. f.foo() + f.foo()
@@ -437,9 +437,6 @@
 }
 
 
-sil [transparent] [serialized] @_TFSb21_getBuiltinLogicValuefSbFT_Bi1_ : $@convention(method) (Bool) -> Builtin.Int1
-
-
 sil [serialized] @_TZFsoi3eeeFTGSqPs9AnyObject__GSqPS____Sb : $@convention(thin) (@owned Optional<AnyObject>, @owned Optional<AnyObject>) -> Bool
 
 
diff --git a/test/SILOptimizer/devirt_jump_thread_crasher.sil b/test/SILOptimizer/devirt_jump_thread_crasher.sil
index a97daf0..ce0feea 100644
--- a/test/SILOptimizer/devirt_jump_thread_crasher.sil
+++ b/test/SILOptimizer/devirt_jump_thread_crasher.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 // REQUIRES: objc_interop
 // FIXME: this test relies on standard library implementation details that are
diff --git a/test/SILOptimizer/devirt_override.sil b/test/SILOptimizer/devirt_override.sil
index e432b4d..4e4223d 100644
--- a/test/SILOptimizer/devirt_override.sil
+++ b/test/SILOptimizer/devirt_override.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_release.sil b/test/SILOptimizer/devirt_release.sil
index 47ed439..b8bf686 100644
--- a/test/SILOptimizer/devirt_release.sil
+++ b/test/SILOptimizer/devirt_release.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -release-devirtualizer -module-name=test | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -release-devirtualizer -module-name=test | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_speculative.sil b/test/SILOptimizer/devirt_speculative.sil
index 89b0100..b1b454e 100644
--- a/test/SILOptimizer/devirt_speculative.sil
+++ b/test/SILOptimizer/devirt_speculative.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -module-name devirt_speculative -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt  | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -module-name devirt_speculative -enable-sil-verify-all %s -specdevirt  | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirt_static_witness_method.sil b/test/SILOptimizer/devirt_static_witness_method.sil
index a48c002..68a3b52 100644
--- a/test/SILOptimizer/devirt_static_witness_method.sil
+++ b/test/SILOptimizer/devirt_static_witness_method.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -sil-combine | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/devirt_try_apply.sil b/test/SILOptimizer/devirt_try_apply.sil
index ca59e86..c38a91c 100644
--- a/test/SILOptimizer/devirt_try_apply.sil
+++ b/test/SILOptimizer/devirt_try_apply.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -inline  | %FileCheck %s --check-prefix=CHECK-DEVIRT
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt  | %FileCheck %s --check-prefix=CHECK-SPECDEVIRT
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mandatory-inlining  | %FileCheck %s --check-prefix=CHECK-MANDATORY-INLINING
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -inline  | %FileCheck %s --check-prefix=CHECK-DEVIRT
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt  | %FileCheck %s --check-prefix=CHECK-SPECDEVIRT
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining  | %FileCheck %s --check-prefix=CHECK-MANDATORY-INLINING
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/devirtualize.sil b/test/SILOptimizer/devirtualize.sil
index 2d7fc06..f2af7a6 100644
--- a/test/SILOptimizer/devirtualize.sil
+++ b/test/SILOptimizer/devirtualize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -dce -save-optimization-record-path=%t.yaml | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -dce -save-optimization-record-path=%t.yaml | %FileCheck %s
 // RUN: %FileCheck -check-prefix=YAML -input-file=%t.yaml %s
 
 sil_stage canonical
diff --git a/test/SILOptimizer/devirtualize2.sil b/test/SILOptimizer/devirtualize2.sil
index b692f77..1744ca1 100644
--- a/test/SILOptimizer/devirtualize2.sil
+++ b/test/SILOptimizer/devirtualize2.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -dce | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/diagnose_unreachable.sil b/test/SILOptimizer/diagnose_unreachable.sil
index b902ffa..75df051 100644
--- a/test/SILOptimizer/diagnose_unreachable.sil
+++ b/test/SILOptimizer/diagnose_unreachable.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -diagnose-unreachable -sil-print-debuginfo | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/eager_specialize.sil b/test/SILOptimizer/eager_specialize.sil
index 8d29794..ec818ac 100644
--- a/test/SILOptimizer/eager_specialize.sil
+++ b/test/SILOptimizer/eager_specialize.sil
@@ -1,7 +1,7 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -eager-specializer  %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -eager-specializer -sil-deadfuncelim  %s | %FileCheck --check-prefix=CHECK-DEADFUNCELIM %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -eager-specializer  %s -o %t.sil && %target-swift-frontend -assume-parsing-unqualified-ownership-sil -module-name=eager_specialize -emit-ir %t.sil | %FileCheck --check-prefix=CHECK-IRGEN %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -eager-specializer -sil-inline-generics=true -inline %s | %FileCheck --check-prefix=CHECK-EAGER-SPECIALIZE-AND-GENERICS-INLINE %s
+// RUN: %target-sil-opt -enable-sil-verify-all -eager-specializer  %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -eager-specializer -sil-deadfuncelim  %s | %FileCheck --check-prefix=CHECK-DEADFUNCELIM %s
+// RUN: %target-sil-opt -enable-sil-verify-all -eager-specializer  %s -o %t.sil && %target-swift-frontend -module-name=eager_specialize -emit-ir %t.sil | %FileCheck --check-prefix=CHECK-IRGEN %s
+// RUN: %target-sil-opt -enable-sil-verify-all -eager-specializer -sil-inline-generics=true -inline %s | %FileCheck --check-prefix=CHECK-EAGER-SPECIALIZE-AND-GENERICS-INLINE %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/early-rle.sil b/test/SILOptimizer/early-rle.sil
index 565926e..194a998 100644
--- a/test/SILOptimizer/early-rle.sil
+++ b/test/SILOptimizer/early-rle.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -early-redundant-load-elim | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -early-redundant-load-elim | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/earlycodemotion.sil b/test/SILOptimizer/earlycodemotion.sil
index 6ec1f2a..c860618 100644
--- a/test/SILOptimizer/earlycodemotion.sil
+++ b/test/SILOptimizer/earlycodemotion.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all %s -early-codemotion -retain-sinking | %FileCheck %s
+// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all %s -early-codemotion -retain-sinking | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/enum_jump_thread.sil b/test/SILOptimizer/enum_jump_thread.sil
index 6c780ee..8647999 100644
--- a/test/SILOptimizer/enum_jump_thread.sil
+++ b/test/SILOptimizer/enum_jump_thread.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg -cse | %FileCheck %s
 
 // Test if jump-threading is done to combine two enum instructions
 // into a single block.
diff --git a/test/SILOptimizer/epilogue_arc_dumper.sil b/test/SILOptimizer/epilogue_arc_dumper.sil
index 4578778..18b31bc 100644
--- a/test/SILOptimizer/epilogue_arc_dumper.sil
+++ b/test/SILOptimizer/epilogue_arc_dumper.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sil-epilogue-arc-dumper %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -sil-epilogue-arc-dumper %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/epilogue_release_dumper.sil b/test/SILOptimizer/epilogue_release_dumper.sil
index 970604f..ae161f9 100644
--- a/test/SILOptimizer/epilogue_release_dumper.sil
+++ b/test/SILOptimizer/epilogue_release_dumper.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sil-epilogue-retain-release-dumper %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -sil-epilogue-retain-release-dumper %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/escape_analysis.sil b/test/SILOptimizer/escape_analysis.sil
index b3c87a2..75bc38e 100644
--- a/test/SILOptimizer/escape_analysis.sil
+++ b/test/SILOptimizer/escape_analysis.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -escapes-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -escapes-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/exclusivity_static_diagnostics.sil b/test/SILOptimizer/exclusivity_static_diagnostics.sil
index e306419..58e15b3 100644
--- a/test/SILOptimizer/exclusivity_static_diagnostics.sil
+++ b/test/SILOptimizer/exclusivity_static_diagnostics.sil
@@ -16,8 +16,8 @@
 sil @takesInoutAndNoEscapeBlockClosure : $@convention(thin) (@inout Int, @owned @convention(block) @noescape () -> ()) -> ()
 sil @takesInoutAndNoEscapeOptionalBlockClosure : $@convention(thin) (@inout Int, @owned Optional<@convention(block) @noescape () -> ()>) -> ()
 
-// CHECK-LABEL: sil hidden @twoLocalInoutsDisaliased
-sil hidden @twoLocalInoutsDisaliased : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoLocalInoutsDisaliased
+sil hidden [ossa] @twoLocalInoutsDisaliased : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -37,8 +37,8 @@
   return %14 : $()
 }
 
-// CHECK-LABEL: sil hidden @twoLocalInoutsSimpleAliasing
-sil hidden @twoLocalInoutsSimpleAliasing : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoLocalInoutsSimpleAliasing
+sil hidden [ossa] @twoLocalInoutsSimpleAliasing : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -54,8 +54,8 @@
   return %8 : $()
 }
 
-// CHECK-LABEL: sil hidden @conflictingPriorAccess
-sil hidden @conflictingPriorAccess : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @conflictingPriorAccess
+sil hidden [ossa] @conflictingPriorAccess : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -73,8 +73,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil hidden @twoSequentialInouts
-sil hidden @twoSequentialInouts : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoSequentialInouts
+sil hidden [ossa] @twoSequentialInouts : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -92,8 +92,8 @@
 }
 
 
-// CHECK-LABEL: sil hidden @unconditionalBranch
-sil hidden @unconditionalBranch : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @unconditionalBranch
+sil hidden [ossa] @unconditionalBranch : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -107,8 +107,8 @@
   return %5 : $()
 }
 
-// CHECK-LABEL: sil hidden @diamondMergeStacks
-sil hidden @diamondMergeStacks : $@convention(thin) (Int, Builtin.Int1) -> () {
+// CHECK-LABEL: sil hidden [ossa] @diamondMergeStacks
+sil hidden [ossa] @diamondMergeStacks : $@convention(thin) (Int, Builtin.Int1) -> () {
 bb0(%0 : $Int, %1 : $Builtin.Int1):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -127,8 +127,8 @@
 }
 
 
-// CHECK-LABEL: sil hidden @loopMergeStacks
-sil hidden @loopMergeStacks : $@convention(thin) (Int, Builtin.Int1) -> () {
+// CHECK-LABEL: sil hidden [ossa] @loopMergeStacks
+sil hidden [ossa] @loopMergeStacks : $@convention(thin) (Int, Builtin.Int1) -> () {
 bb0(%0 : $Int, %1 : $Builtin.Int1):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -144,8 +144,8 @@
   return %5 : $()
 }
 
-// CHECK-LABEL: sil hidden @loopWithError
-sil hidden @loopWithError : $@convention(thin) (Int, Builtin.Int1) -> () {
+// CHECK-LABEL: sil hidden [ossa] @loopWithError
+sil hidden [ossa] @loopWithError : $@convention(thin) (Int, Builtin.Int1) -> () {
 bb0(%0 : $Int, %1 : $Builtin.Int1):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -164,8 +164,8 @@
   return %6 : $()
 }
 
-// CHECK-LABEL: sil hidden @modifySubAccessesAreAllowed
-sil hidden @modifySubAccessesAreAllowed : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @modifySubAccessesAreAllowed
+sil hidden [ossa] @modifySubAccessesAreAllowed : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -183,8 +183,8 @@
 
 // Multiple access kinds
 
-// CHECK-LABEL: sil hidden @twoLocalReadsSimpleAliasing
-sil hidden @twoLocalReadsSimpleAliasing : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoLocalReadsSimpleAliasing
+sil hidden [ossa] @twoLocalReadsSimpleAliasing : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %2 = project_box %1 : ${ var Int }, 0
@@ -198,8 +198,8 @@
   return %6 : $()
 }
 
-// CHECK-LABEL: sil hidden @localReadFollowedByModify
-sil hidden @localReadFollowedByModify : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @localReadFollowedByModify
+sil hidden [ossa] @localReadFollowedByModify : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %2 = project_box %1 : ${ var Int }, 0
@@ -213,8 +213,8 @@
   return %6 : $()
 }
 
-// CHECK-LABEL: sil hidden @localModifyFollowedByRead
-sil hidden @localModifyFollowedByRead : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @localModifyFollowedByRead
+sil hidden [ossa] @localModifyFollowedByRead : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %2 = project_box %1 : ${ var Int }, 0
@@ -233,8 +233,8 @@
   @_hasStorage var f: Int
   init()
 }
-// CHECK-LABEL: sil hidden @classStoredProperty
-sil hidden @classStoredProperty : $@convention(thin) (ClassWithStoredProperty) -> () {
+// CHECK-LABEL: sil hidden [ossa] @classStoredProperty
+sil hidden [ossa] @classStoredProperty : $@convention(thin) (ClassWithStoredProperty) -> () {
 bb0(%0 : @unowned $ClassWithStoredProperty):
   %1 = ref_element_addr %0 : $ClassWithStoredProperty, #ClassWithStoredProperty.f
 
@@ -251,8 +251,8 @@
   return %5 : $()
 }
 
-// CHECK-LABEL: sil hidden @lookThroughBeginBorrow
-sil hidden @lookThroughBeginBorrow : $@convention(thin) (ClassWithStoredProperty) -> () {
+// CHECK-LABEL: sil hidden [ossa] @lookThroughBeginBorrow
+sil hidden [ossa] @lookThroughBeginBorrow : $@convention(thin) (ClassWithStoredProperty) -> () {
 bb0(%0 : @unowned $ClassWithStoredProperty):
   %1 = begin_borrow %0 : $ClassWithStoredProperty
   %2 = begin_borrow %0 : $ClassWithStoredProperty
@@ -277,8 +277,8 @@
 
 // Treat 'alloc_box' as identity for project_box
 
-// CHECK-LABEL: sil hidden @twoAllocBoxProjections
-sil hidden @twoAllocBoxProjections : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoAllocBoxProjections
+sil hidden [ossa] @twoAllocBoxProjections : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -295,8 +295,8 @@
   return %8 : $()
 }
 
-// CHECK-LABEL: sil hidden @lookThroughMarkUninitialized
-sil hidden @lookThroughMarkUninitialized : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @lookThroughMarkUninitialized
+sil hidden [ossa] @lookThroughMarkUninitialized : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = alloc_box ${ var Int }
   %2 = mark_uninitialized [rootself] %1 : ${ var Int }
@@ -316,8 +316,8 @@
 sil_global hidden @global1 : $Int
 sil_global hidden @global2 : $Int
 
-// CHECK-LABEL: sil hidden @modifySameGlobal
-sil hidden @modifySameGlobal : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @modifySameGlobal
+sil hidden [ossa] @modifySameGlobal : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = global_addr @global1 :$*Int
   %2 = global_addr @global1 :$*Int
@@ -329,8 +329,8 @@
   return %5 : $()
 }
 
-// CHECK-LABEL: sil hidden @modifyDifferentGlobal
-sil hidden @modifyDifferentGlobal : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @modifyDifferentGlobal
+sil hidden [ossa] @modifyDifferentGlobal : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %1 = global_addr @global1 :$*Int
   %2 = global_addr @global2 :$*Int
@@ -346,8 +346,8 @@
 
 // If we have a sequence of begin read - begin write - begin read accesses make
 // sure the second read doesn't report a confusing read-read conflict.
-// CHECK-LABEL: sil hidden @readWriteReadConflictingThirdAccess
-sil hidden @readWriteReadConflictingThirdAccess : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @readWriteReadConflictingThirdAccess
+sil hidden [ossa] @readWriteReadConflictingThirdAccess : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -367,8 +367,8 @@
 
 // If we have a sequence of begin write - begin write - begin write accesses make sure the
 // third write doesn't report a conflict.
-// CHECK-LABEL: sil hidden @writeWriteWriteConflictingThirdAccess
-sil hidden @writeWriteWriteConflictingThirdAccess : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @writeWriteWriteConflictingThirdAccess
+sil hidden [ossa] @writeWriteWriteConflictingThirdAccess : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -389,8 +389,8 @@
 // If we have a sequence of begin write - end write - begin write - begin write
 // accesses make sure the it is the second begin write that gets the note
 // about the conflict and not the first
-// CHECK-LABEL: sil hidden @resetFirstAccessForNote
-sil hidden @resetFirstAccessForNote : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @resetFirstAccessForNote
+sil hidden [ossa] @resetFirstAccessForNote : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -415,7 +415,7 @@
 //
 //  The unreachable block below must branch to bN where
 //    N = 3/4 * INITIAL_SIZE - 2
-sil @blockMapRehash : $@convention(method) (Builtin.Int1) -> () {
+sil [ossa] @blockMapRehash : $@convention(method) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
  br bb1
 bb1:
@@ -471,8 +471,8 @@
 
 // Check that a pointer_to_address access passes diagnostics.
 //
-// CHECK-LABEL: sil hidden  @pointerToAddr
-sil hidden  @pointerToAddr : $@convention(thin) (Builtin.RawPointer) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @pointerToAddr
+sil hidden [ossa] @pointerToAddr : $@convention(thin) (Builtin.RawPointer) -> Int {
 bb0(%0: $Builtin.RawPointer):
   %adr = pointer_to_address %0 : $Builtin.RawPointer to [strict] $*Int
   %access = begin_access [read] [dynamic] %adr : $*Int
@@ -490,8 +490,8 @@
 // This only happens when mandatory passes are applied repeatedly.
 // e.g. importing from a debug standard library.
 //
-// CHECK-LABEL: sil hidden @inlinedStructElement
-sil hidden @inlinedStructElement : $@convention(thin) (@inout S) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @inlinedStructElement
+sil hidden [ossa] @inlinedStructElement : $@convention(thin) (@inout S) -> Int {
 bb0(%0 : $*S):
   %2 = begin_access [modify] [static] %0 : $*S
   %3 = struct_element_addr %2 : $*S, #S.x
@@ -505,8 +505,8 @@
 // Check inlined tuple element access.
 // This only happens when mandatory passes are applied repeatedly.
 //
-// CHECK-LABEL: sil hidden @inlinedTupleElement
-sil hidden @inlinedTupleElement : $@convention(thin) (@inout (Int, Int)) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @inlinedTupleElement
+sil hidden [ossa] @inlinedTupleElement : $@convention(thin) (@inout (Int, Int)) -> Int {
 bb0(%0 : $*(Int, Int)):
   %2 = begin_access [modify] [static] %0 : $*(Int, Int)
   %3 = tuple_element_addr %2 : $*(Int, Int), 0
@@ -520,8 +520,8 @@
 // Check inlined enum access.
 // This only happens when mandatory passes are applied repeatedly.
 //
-// CHECK-LABEL: sil hidden @inlinedEnumValue
-sil hidden @inlinedEnumValue : $@convention(thin) (Int) -> (@out Optional<Int>, Int) {
+// CHECK-LABEL: sil hidden [ossa] @inlinedEnumValue
+sil hidden [ossa] @inlinedEnumValue : $@convention(thin) (Int) -> (@out Optional<Int>, Int) {
 bb0(%0 : $*Optional<Int>, %1 : $Int):
   %6 = unchecked_take_enum_data_addr %0 : $*Optional<Int>, #Optional.some!enumelt.1
   %7 = begin_access [read] [static] %6 : $*Int
@@ -536,8 +536,8 @@
 // Check inlined array access.
 // This only happens when mandatory passes are applied repeatedly.
 //
-// CHECK-LABEL: sil hidden @inlinedArrayProp
-sil hidden @inlinedArrayProp : $@convention(thin) (@guaranteed Storage, Builtin.Word) -> Int {
+// CHECK-LABEL: sil hidden [ossa] @inlinedArrayProp
+sil hidden [ossa] @inlinedArrayProp : $@convention(thin) (@guaranteed Storage, Builtin.Word) -> Int {
 bb0(%0 : @guaranteed $Storage, %1 : $Builtin.Word):
   %2 = ref_tail_addr %0 : $Storage, $UInt
   %3 = begin_access [read] [static] %2 : $*UInt
@@ -554,7 +554,7 @@
 
 // Conflicts involving noescape closures.
 
-sil hidden @closureThatModifiesCaptureAndTakesInout: $@convention(thin) (@inout Int, @inout_aliasable Int) -> () {
+sil hidden [ossa] @closureThatModifiesCaptureAndTakesInout: $@convention(thin) (@inout Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int):
   %2 = begin_access [modify] [unknown] %1 : $*Int // expected-note {{conflicting access is here}}
   end_access %2 : $*Int
@@ -569,8 +569,8 @@
 // function type to @conventio(thin), we insert access enforcement on the caller
 // side for captured variables.
 //
-// CHECK-LABEL: sil hidden @inProgressModifyModifyConflictWithCallToClosure
-sil hidden @inProgressModifyModifyConflictWithCallToClosure : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressModifyModifyConflictWithCallToClosure
+sil hidden [ossa] @inProgressModifyModifyConflictWithCallToClosure : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -584,7 +584,7 @@
   return %9 : $()
 }
 
-sil hidden @closureWithArgument_1 : $@convention(thin) (Int, @inout_aliasable Int) -> () {
+sil hidden [ossa] @closureWithArgument_1 : $@convention(thin) (Int, @inout_aliasable Int) -> () {
 bb0(%0 : $Int, %1 : $*Int):
   %2 = begin_access [modify] [unknown] %1 : $*Int // expected-note 2 {{conflicting access is here}}
   end_access %2 : $*Int
@@ -592,8 +592,8 @@
   return %3 : $()
 }
 
-// CHECK-LABEL: sil hidden @inProgressConflictWithNoEscapeClosureArgument
-sil hidden @inProgressConflictWithNoEscapeClosureArgument : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressConflictWithNoEscapeClosureArgument
+sil hidden [ossa] @inProgressConflictWithNoEscapeClosureArgument : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -610,8 +610,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil hidden @inProgressConflictWithNoEscapeGuaranteedClosureArgument : $@convention(thin) (Int) -> () {
-sil hidden @inProgressConflictWithNoEscapeGuaranteedClosureArgument : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressConflictWithNoEscapeGuaranteedClosureArgument : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @inProgressConflictWithNoEscapeGuaranteedClosureArgument : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -630,7 +630,7 @@
   return %9 : $()
 }
 
-sil hidden @closureThatModifiesCapture_2 : $@convention(thin) (@inout_aliasable Int) -> () {
+sil hidden [ossa] @closureThatModifiesCapture_2 : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = begin_access [modify] [unknown] %0 : $*Int // expected-error {{overlapping accesses, but modification requires exclusive access; consider copying to a local variable}}
   end_access %1 : $*Int
@@ -638,8 +638,8 @@
   return %2 : $()
 }
 
-// CHECK-LABEL: sil hidden @inProgressReadModifyConflictWithNoEscapeClosureArgument
-sil hidden @inProgressReadModifyConflictWithNoEscapeClosureArgument : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressReadModifyConflictWithNoEscapeClosureArgument
+sil hidden [ossa] @inProgressReadModifyConflictWithNoEscapeClosureArgument : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -656,7 +656,7 @@
   return %9 : $()
 }
 
-sil hidden @closureWithConcreteReturn : $@convention(thin) (Int, @inout_aliasable Int) -> (Int) {
+sil hidden [ossa] @closureWithConcreteReturn : $@convention(thin) (Int, @inout_aliasable Int) -> (Int) {
 bb0(%0 : $Int, %1 : $*Int):
   %2 = begin_access [modify] [unknown] %1 : $*Int // expected-note {{conflicting access is here}}
   end_access %2 : $*Int
@@ -665,8 +665,8 @@
 
 sil [reabstraction_thunk] @thunkForClosureWithConcreteReturn : $@convention(thin) (Int, @noescape @callee_owned (Int) -> Int) -> @out Int
 
-// CHECK-LABEL: sil hidden @inProgressConflictWithNoEscapeClosureWithReabstractionThunk
-sil hidden @inProgressConflictWithNoEscapeClosureWithReabstractionThunk : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithReabstractionThunk
+sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithReabstractionThunk : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -689,7 +689,7 @@
 sil [reabstraction_thunk] @thunkForCalleeGuaranteed : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed () -> ()) -> ()
 sil [reabstraction_thunk] @withoutActuallyEscapingThunk : $@convention(thin) (@noescape @callee_guaranteed () -> ()) -> ()
 
-sil hidden @closureThatModifiesCapture_1: $@convention(thin) (@inout_aliasable Int) -> () {
+sil hidden [ossa] @closureThatModifiesCapture_1: $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %1 = begin_access [modify] [unknown] %0 : $*Int // expected-note 3{{conflicting access is here}}
   end_access %1 : $*Int
@@ -697,8 +697,8 @@
   return %2 : $()
 }
 
-// CHECK-LABEL: sil hidden @inProgressConflictWithNoEscapeClosureWithBlockStorage
-sil hidden @inProgressConflictWithNoEscapeClosureWithBlockStorage : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithBlockStorage
+sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithBlockStorage : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -727,8 +727,8 @@
   return %ret : $()
 }
 
-// CHECK-LABEL: sil hidden @inProgressConflictWithNoEscapeClosureWithOptionalBlockStorage
-sil hidden @inProgressConflictWithNoEscapeClosureWithOptionalBlockStorage : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithOptionalBlockStorage
+sil hidden [ossa] @inProgressConflictWithNoEscapeClosureWithOptionalBlockStorage : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -773,10 +773,10 @@
   var n: NestedStructWithStoredProps
 }
 
-sil @takesInoutIntAndStructWithStoredProps : $@convention(thin) (@inout Int, @inout StructWithStoredProps) -> ()
+sil [ossa] @takesInoutIntAndStructWithStoredProps : $@convention(thin) (@inout Int, @inout StructWithStoredProps) -> ()
 
-// CHECK-LABEL: sil hidden @twoSeparateStoredProperties
-sil hidden @twoSeparateStoredProperties : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoSeparateStoredProperties
+sil hidden [ossa] @twoSeparateStoredProperties : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var StructWithStoredProps }
   %3 = project_box %2 : ${ var StructWithStoredProps }, 0
@@ -793,8 +793,8 @@
   return %10 : $()
 }
 
-// CHECK-LABEL: sil hidden @twoSeparateNestedStoredProperties
-sil hidden @twoSeparateNestedStoredProperties : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoSeparateNestedStoredProperties
+sil hidden [ossa] @twoSeparateNestedStoredProperties : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var StructWithStoredProps }
   %3 = project_box %2 : ${ var StructWithStoredProps }, 0
@@ -813,8 +813,8 @@
   return %12 : $()
 }
 
-// CHECK-LABEL: sil hidden @theSameStoredProperty
-sil hidden @theSameStoredProperty : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @theSameStoredProperty
+sil hidden [ossa] @theSameStoredProperty : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var StructWithStoredProps }
   %3 = project_box %2 : ${ var StructWithStoredProps }, 0
@@ -831,8 +831,8 @@
   return %10 : $()
 }
 
-// CHECK-LABEL: sil hidden @storedPropertyAndAggregate
-sil hidden @storedPropertyAndAggregate : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @storedPropertyAndAggregate
+sil hidden [ossa] @storedPropertyAndAggregate : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var StructWithStoredProps }
   %3 = project_box %2 : ${ var StructWithStoredProps }, 0
@@ -848,8 +848,8 @@
   return %9 : $()
 }
 
-// CHECK-LABEL: sil hidden @nestedStoredPropertyAndAggregate
-sil hidden @nestedStoredPropertyAndAggregate : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @nestedStoredPropertyAndAggregate
+sil hidden [ossa] @nestedStoredPropertyAndAggregate : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var StructWithStoredProps }
   %3 = project_box %2 : ${ var StructWithStoredProps }, 0
@@ -866,8 +866,8 @@
   return %10 : $()
 }
 
-// CHECK-LABEL: sil hidden @twoSeparateTupleElements
-sil hidden @twoSeparateTupleElements : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @twoSeparateTupleElements
+sil hidden [ossa] @twoSeparateTupleElements : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var (Int, Int) }
   %3 = project_box %2 : ${ var (Int, Int) }, 0
@@ -884,8 +884,8 @@
   return %10 : $()
 }
 
-// CHECK-LABEL: sil hidden @sameTupleElement
-sil hidden @sameTupleElement : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @sameTupleElement
+sil hidden [ossa] @sameTupleElement : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var (Int, Int) }
   %3 = project_box %2 : ${ var (Int, Int) }, 0
@@ -902,7 +902,7 @@
   return %10 : $()
 }
 
-sil hidden @passNilToNoEscape : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @passNilToNoEscape : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -913,7 +913,7 @@
   return %7 : $()
 }
 
-sil private @closureForDirectPartialApplyTakingInout : $@convention(thin) (@inout Int, @inout_aliasable Int) -> () {
+sil private [ossa] @closureForDirectPartialApplyTakingInout : $@convention(thin) (@inout Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $*Int):
   %access = begin_access [read] [unknown] %1 : $*Int // expected-note 3 {{conflicting access is here}}
   %val = load [trivial] %access : $*Int
@@ -922,7 +922,7 @@
   return %v : $()
 }
 
-sil hidden @directPartialApplyTakingInout : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @directPartialApplyTakingInout : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %box = alloc_box ${ var Int }, var, name "i"
   %boxadr = project_box %box : ${ var Int }, 0
@@ -938,7 +938,7 @@
   return %v : $()
 }
 
-sil private @closureForDirectPartialApplyChain : $@convention(thin) (@inout Int, Int, @inout_aliasable Int) -> () {
+sil private [ossa] @closureForDirectPartialApplyChain : $@convention(thin) (@inout Int, Int, @inout_aliasable Int) -> () {
 bb0(%0 : $*Int, %1 : $Int, %2 : $*Int):
   %access = begin_access [read] [unknown] %2 : $*Int // expected-note {{conflicting access is here}}
   %val = load [trivial] %access : $*Int
@@ -947,7 +947,7 @@
   return %v : $()
 }
 
-sil hidden @directPartialApplyChain : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @directPartialApplyChain : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %box = alloc_box ${ var Int }, var, name "i"
   %boxadr = project_box %box : ${ var Int }, 0
@@ -964,7 +964,7 @@
   return %v : $()
 }
 
-sil private @closureForPartialApplyArgChain : $@convention(thin) (Int, @inout_aliasable Int) -> () {
+sil private [ossa] @closureForPartialApplyArgChain : $@convention(thin) (Int, @inout_aliasable Int) -> () {
 bb0(%0 : $Int, %1 : $*Int):
   %access = begin_access [read] [unknown] %1 : $*Int // expected-note {{conflicting access is here}}
   %val = load [trivial] %access : $*Int
@@ -973,7 +973,7 @@
   return %v : $()
 }
 
-sil hidden @partialApplyArgChain : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @partialApplyArgChain : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
@@ -999,7 +999,7 @@
 //
 // Check that this doesn't trigger the DiagnoseStaticExclusivity
 // assert that all accesses have a valid AccessedStorage source.
-sil @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
+sil [ossa] @lldb_unsupported_markuninitialized_testcase : $@convention(thin) (UnsafeMutablePointer<Any>) -> () {
 bb0(%0 : $UnsafeMutablePointer<Any>):
   %2 = struct_extract %0 : $UnsafeMutablePointer<Any>, #UnsafeMutablePointer._rawValue
   %3 = integer_literal $Builtin.Int64, 8
@@ -1023,12 +1023,12 @@
   return %9999 : $()
 }
 
-sil @addressor : $@convention(thin) () -> UnsafeMutablePointer<Int32>
+sil [ossa] @addressor : $@convention(thin) () -> UnsafeMutablePointer<Int32>
 
 // An addressor produces an unsafely accessed RawPointer. Pass the
 // address to an inout can result in an enforced (unknown) access on
 // the unsafe address. We need to handle this case without asserting.
-sil @addressorAccess : $@convention(thin) (@guaranteed ClassWithStoredProperty, Int32) -> () {
+sil [ossa] @addressorAccess : $@convention(thin) (@guaranteed ClassWithStoredProperty, Int32) -> () {
 bb0(%0 : @guaranteed $ClassWithStoredProperty, %1 : $Int32):
   %f = function_ref @addressor : $@convention(thin) () -> UnsafeMutablePointer<Int32>
   %up = apply %f() : $@convention(thin) () -> UnsafeMutablePointer<Int32>
@@ -1051,7 +1051,7 @@
 // which may only be used as a nonescaping closure, can be passed to a reabstraction thunk
 // without the @noescape function-type argument convention.
 
-sil @mutatingNoescapeHelper : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> () {
+sil [ossa] @mutatingNoescapeHelper : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> () {
 bb0(%0 : $Optional<UnsafePointer<Int32>>, %1 : $*Int32):
   %up = unchecked_enum_data %0 : $Optional<UnsafePointer<Int32>>, #Optional.some!enumelt.1
   %p = struct_extract %up : $UnsafePointer<Int32>, #UnsafePointer._rawValue
@@ -1064,7 +1064,7 @@
   return %v : $()
 }
 
-sil shared [transparent] [serializable] [reabstraction_thunk] @mutatingNoescapeThunk : $@convention(thin) (UnsafePointer<Int32>, @guaranteed @callee_guaranteed (Optional<UnsafePointer<Int32>>) -> ()) -> () {
+sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @mutatingNoescapeThunk : $@convention(thin) (UnsafePointer<Int32>, @guaranteed @callee_guaranteed (Optional<UnsafePointer<Int32>>) -> ()) -> () {
 bb0(%0 : $UnsafePointer<Int32>, %1 : @guaranteed $@callee_guaranteed (Optional<UnsafePointer<Int32>>) -> ()):
   %e = enum $Optional<UnsafePointer<Int32>>, #Optional.some!enumelt.1, %0 : $UnsafePointer<Int32>
   %c = apply %1(%e) : $@callee_guaranteed (Optional<UnsafePointer<Int32>>) -> ()
@@ -1072,12 +1072,12 @@
   return %v : $()
 }
 
-sil @takeMutatingNoescapeClosure : $@convention(thin) <τ_0_0> (UnsafePointer<τ_0_0>, @noescape @callee_guaranteed (UnsafePointer<Int32>) -> ()) -> ()
+sil [ossa] @takeMutatingNoescapeClosure : $@convention(thin) <τ_0_0> (UnsafePointer<τ_0_0>, @noescape @callee_guaranteed (UnsafePointer<Int32>) -> ()) -> ()
 
 // A (mutating) closure taking an @inout_aliasable argument may be
 // passed to a reabstraction_thunk as an escaping function type. This
 // is valid as long as the thunk is only used as a @nosecape type.
-sil @mutatingNoescapeWithThunk : $@convention(method) (UnsafePointer<Int32>, @inout Int32) -> () {
+sil [ossa] @mutatingNoescapeWithThunk : $@convention(method) (UnsafePointer<Int32>, @inout Int32) -> () {
 bb0(%0 : $UnsafePointer<Int32>, %1 : $*Int32):
   %f1 = function_ref @mutatingNoescapeHelper : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> ()
   %pa1 = partial_apply [callee_guaranteed] %f1(%1) : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> ()
@@ -1090,9 +1090,9 @@
   return %v : $()
 }
 
-sil @takeInoutAndMutatingNoescapeClosure : $@convention(thin) <τ_0_0> (@inout Int32, UnsafePointer<τ_0_0>, @noescape @callee_guaranteed (UnsafePointer<Int32>) -> ()) -> ()
+sil [ossa] @takeInoutAndMutatingNoescapeClosure : $@convention(thin) <τ_0_0> (@inout Int32, UnsafePointer<τ_0_0>, @noescape @callee_guaranteed (UnsafePointer<Int32>) -> ()) -> ()
 
-sil @mutatingNoescapeConflictWithThunk : $@convention(method) (UnsafePointer<Int32>, @inout Int32) -> () {
+sil [ossa] @mutatingNoescapeConflictWithThunk : $@convention(method) (UnsafePointer<Int32>, @inout Int32) -> () {
 bb0(%0 : $UnsafePointer<Int32>, %1 : $*Int32):
   %f1 = function_ref @mutatingNoescapeHelper : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> ()
   %pa1 = partial_apply [callee_guaranteed] %f1(%1) : $@convention(thin) (Optional<UnsafePointer<Int32>>, @inout_aliasable Int32) -> ()
@@ -1120,7 +1120,7 @@
 // unidentified. Addressors that require enforcement must start a
 // dynamic access within the addressor itself, before returning an
 // UnsafePointer.
-sil @testNestedKeypathAccess : $@convention(thin) (@guaranteed (UnsafeMutablePointer<Int>, Optional<AnyObject>)) -> () {
+sil [ossa] @testNestedKeypathAccess : $@convention(thin) (@guaranteed (UnsafeMutablePointer<Int>, Optional<AnyObject>)) -> () {
 bb0(%0 : @guaranteed $(UnsafeMutablePointer<Int>, Optional<AnyObject>)):
   %up = tuple_extract %0 : $(UnsafeMutablePointer<Int>, Optional<AnyObject>), 0
   %o = tuple_extract %0 : $(UnsafeMutablePointer<Int>, Optional<AnyObject>), 1
@@ -1136,7 +1136,7 @@
 }
 
 // Test a conflict on a noescape closure where multiple closures may be conditionally stored in an ObjC block.
-sil hidden @noEscapeClosureWithConditionalBlockStorage : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @noEscapeClosureWithConditionalBlockStorage : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %box = alloc_box ${ var Int }
   %boxadr = project_box %box : ${ var Int }, 0
@@ -1193,13 +1193,13 @@
 // Test that 'checkNoEscapePartialApply' does not assert on a noescape
 // closure passed through a block argument.
 
-sil hidden @closureWithNoCapture : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @closureWithNoCapture : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %2 = tuple ()
   return %2 : $()
 }
 
-sil hidden @closureWithConflict : $@convention(thin) (Int, @inout_aliasable Int) -> () {
+sil hidden [ossa] @closureWithConflict : $@convention(thin) (Int, @inout_aliasable Int) -> () {
 bb0(%0 : $Int, %1 : $*Int):
   %2 = begin_access [modify] [unknown] %1 : $*Int // expected-note {{conflicting access is here}}
   end_access %2 : $*Int
@@ -1207,7 +1207,7 @@
   return %v : $()
 }
 
-sil shared [transparent] [serializable] [reabstraction_thunk] @partialApplyPhiThunk : $@convention(thin) (@in_guaranteed Int, @guaranteed @noescape @callee_guaranteed (Int) -> (@error Error)) -> (@error Error) {
+sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @partialApplyPhiThunk : $@convention(thin) (@in_guaranteed Int, @guaranteed @noescape @callee_guaranteed (Int) -> (@error Error)) -> (@error Error) {
 bb0(%0 : $*Int, %1 : $@noescape @callee_guaranteed (Int) -> (@error Error)):
   %val = load [trivial] %0 : $*Int
   try_apply %1(%val) : $@noescape @callee_guaranteed (Int) -> (@error Error), normal bb1, error bb2
@@ -1219,10 +1219,10 @@
   throw %5 : $Error
 }
 
-sil @takeGenericNoEscapeFunction : $@convention(method) <τ_0_0> (@inout τ_0_0, @noescape @callee_guaranteed (@in_guaranteed τ_0_0) -> (@error Error)) -> (@error Error)
+sil [ossa] @takeGenericNoEscapeFunction : $@convention(method) <τ_0_0> (@inout τ_0_0, @noescape @callee_guaranteed (@in_guaranteed τ_0_0) -> (@error Error)) -> (@error Error)
 
-// CHECK-LABEL: sil @testPartialApplyPhi
-sil @testPartialApplyPhi : $@convention(thin) (Int, @inout Int) -> (@error Error) {
+// CHECK-LABEL: sil [ossa] @testPartialApplyPhi
+sil [ossa] @testPartialApplyPhi : $@convention(thin) (Int, @inout Int) -> (@error Error) {
 bb0(%0 : $Int, %1 : $*Int):
   cond_br undef, bb1, bb2
 
@@ -1261,8 +1261,8 @@
   throw %e : $Error
 }
 
-// CHECK-LABEL: sil @testDirectPartialApplyPhi
-sil @testDirectPartialApplyPhi : $@convention(thin) (@inout Int) -> (@error Error) {
+// CHECK-LABEL: sil [ossa] @testDirectPartialApplyPhi
+sil [ossa] @testDirectPartialApplyPhi : $@convention(thin) (@inout Int) -> (@error Error) {
 bb0(%0 : $*Int):
   cond_br undef, bb1, bb2
 
@@ -1293,7 +1293,7 @@
 
 sil @takeEscapingClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> ()
 
-sil private @nestedInWithoutActuallyEscapingVerify : $@convention(thin) (@inout_aliasable Int) -> () {
+sil private [ossa] @nestedInWithoutActuallyEscapingVerify : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%0 : $*Int):
   %a = begin_access [modify] [unknown] %0 : $*Int
   end_access %a : $*Int
@@ -1301,8 +1301,8 @@
   return %v : $()
 }
 
-// CHECK-LABEL: sil hidden @testWithoutActuallyEscapingVerify : $@convention(thin) (@inout Int) -> () {
-sil hidden @testWithoutActuallyEscapingVerify : $@convention(thin) (@inout Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @testWithoutActuallyEscapingVerify : $@convention(thin) (@inout Int) -> () {
+sil hidden [ossa] @testWithoutActuallyEscapingVerify : $@convention(thin) (@inout Int) -> () {
 bb0(%0 : $*Int):
   %2 = function_ref @nestedInWithoutActuallyEscapingVerify : $@convention(thin) (@inout_aliasable Int) -> ()
   %3 = partial_apply [callee_guaranteed] %2(%0) : $@convention(thin) (@inout_aliasable Int) -> ()
@@ -1320,14 +1320,14 @@
   return %14 : $()
 }
 
-// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @thunkForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
-sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] @thunkForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+// CHECK-LABEL: sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @thunkForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+sil shared [transparent] [serializable] [reabstraction_thunk] [without_actually_escaping] [ossa] @thunkForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
 bb0(%0 : @guaranteed $@callee_guaranteed () -> ()):
   %1 = apply %0() : $@callee_guaranteed () -> ()
   return %1 : $()
 }
 
-sil private @closureForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
+sil private [ossa] @closureForWithoutActuallyEscapingVerify : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> () {
 bb0(%0 : @guaranteed $@callee_guaranteed () -> ()):
   %2 = function_ref @takeEscapingClosure : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> ()
   %3 = apply %2(%0) : $@convention(thin) (@guaranteed @callee_guaranteed () -> ()) -> ()
@@ -1340,9 +1340,9 @@
 // <rdar://problem/43059088> Assertion in DiagnoseStaticExclusivity
 // Noescape closure verification should not assert.
 
-// CHECK-LABEL: sil hidden @testWithoutActuallyEscapingBlockVerify : $@convention(thin) (Int) -> () {
+// CHECK-LABEL: sil hidden [ossa] @testWithoutActuallyEscapingBlockVerify : $@convention(thin) (Int) -> () {
 // CHECK: convert_function %{{.*}} : $@convention(block) () -> () to [without_actually_escaping] $@convention(block) () -> ()
-sil hidden @testWithoutActuallyEscapingBlockVerify : $@convention(thin) (Int) -> () {
+sil hidden [ossa] @testWithoutActuallyEscapingBlockVerify : $@convention(thin) (Int) -> () {
 bb0(%0 : $Int):
   %box = alloc_box ${ var Int }, var, name "localVal"
   %projbox = project_box %box : ${ var Int }, 0
@@ -1370,10 +1370,10 @@
   return %v : $()
 }
 
-sil @testWithoutActuallyEscapingBlockVerifyClosure : $@convention(thin) (@inout_aliasable Int) -> ()
+sil [ossa] @testWithoutActuallyEscapingBlockVerifyClosure : $@convention(thin) (@inout_aliasable Int) -> ()
 
 // thunk for @escaping @callee_guaranteed () -> ()
-sil shared [transparent] [serializable] [reabstraction_thunk] @$sIeg_IeyB_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed () -> ()) -> () {
+sil shared [transparent] [serializable] [reabstraction_thunk] [ossa] @$sIeg_IeyB_TR : $@convention(c) (@inout_aliasable @block_storage @callee_guaranteed () -> ()) -> () {
 // %0
 bb0(%0 : $*@block_storage @callee_guaranteed () -> ()):
   %1 = project_block_storage %0 : $*@block_storage @callee_guaranteed () -> ()
@@ -1386,7 +1386,7 @@
   return %6 : $()
 } // end sil function '$sIeg_IeyB_TR'
 
-sil private @testWithoutActuallyEscapingBlockVerifyClause : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
+sil private [ossa] @testWithoutActuallyEscapingBlockVerifyClause : $@convention(thin) (@guaranteed @convention(block) () -> ()) -> () {
 bb0(%0 : @guaranteed $@convention(block) () -> ()):
   %1 = copy_block %0 : $@convention(block) () -> ()
   %3 = begin_borrow %1 : $@convention(block) () -> ()
diff --git a/test/SILOptimizer/exclusivity_static_diagnostics_inlined.swift b/test/SILOptimizer/exclusivity_static_diagnostics_inlined.swift
index a2f671a..a47be2a 100644
--- a/test/SILOptimizer/exclusivity_static_diagnostics_inlined.swift
+++ b/test/SILOptimizer/exclusivity_static_diagnostics_inlined.swift
@@ -1,8 +1,8 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -enforce-exclusivity=none -emit-sil -Onone %s -o %t/Onone.sil
-// RUN: %target-sil-opt %t/Onone.sil -inline -assume-parsing-unqualified-ownership-sil -o %t/inlined.sil
+// RUN: %target-sil-opt %t/Onone.sil -inline -o %t/inlined.sil
 // RUN: %FileCheck %s --check-prefix=INLINE < %t/inlined.sil
-// RUN: %target-sil-opt -enable-sil-verify-all %t/inlined.sil -enforce-exclusivity=unchecked -diagnose-static-exclusivity -assume-parsing-unqualified-ownership-sil -o /dev/null
+// RUN: %target-sil-opt -enable-sil-verify-all %t/inlined.sil -enforce-exclusivity=unchecked -diagnose-static-exclusivity -o /dev/null
 
 public protocol SomeP {
   var someV: Int { get set }
diff --git a/test/SILOptimizer/existential_transform_extras.sil b/test/SILOptimizer/existential_transform_extras.sil
index a4517e5..8438cff 100644
--- a/test/SILOptimizer/existential_transform_extras.sil
+++ b/test/SILOptimizer/existential_transform_extras.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -enable-sil-existential-specializer -existential-specializer   | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -enable-sil-existential-specializer -existential-specializer   | %FileCheck %s
 
 // Additional tests for existential_specializer
 
diff --git a/test/SILOptimizer/existential_type_propagation.sil b/test/SILOptimizer/existential_type_propagation.sil
index eb27b3c..3883943 100644
--- a/test/SILOptimizer/existential_type_propagation.sil
+++ b/test/SILOptimizer/existential_type_propagation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -devirtualizer -inline -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -sil-combine -devirtualizer -inline -sil-combine | %FileCheck %s
 
 // Check that type propagation is performed correctly for existentials.
 // The concrete type set in init_existential instructions should be propagated
diff --git a/test/SILOptimizer/fold_enums.sil b/test/SILOptimizer/fold_enums.sil
index faa4f67..235ac8b 100644
--- a/test/SILOptimizer/fold_enums.sil
+++ b/test/SILOptimizer/fold_enums.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O -emit-sil %s | %FileCheck %s
+// RUN: %target-swift-frontend -O -emit-sil %s | %FileCheck %s
 
 // Check that the optimizer can detect when an enum (e.g. Optional) is being deconstructed
 // and then recreated in the same form. It should replace it with the original value in
diff --git a/test/SILOptimizer/funcsig_deadarg_explode.sil b/test/SILOptimizer/funcsig_deadarg_explode.sil
index 5f4cdd6..4b9a84d 100644
--- a/test/SILOptimizer/funcsig_deadarg_explode.sil
+++ b/test/SILOptimizer/funcsig_deadarg_explode.sil
@@ -1,7 +1,7 @@
 
 // This file makes sure that we do not explode dead parameters.
 
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -function-signature-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -function-signature-opts %s | %FileCheck %s
 // REQUIRES: asserts
 
 sil_stage canonical
@@ -32,4 +32,4 @@
 }
 
 // CHECK-LABEL: sil shared @$s6calleeTf4dxd_n : $@convention(thin) (@guaranteed Klass) -> () {
-// CHECK: bb0([[KLASS:%[0-9]+]] : $Klass):
\ No newline at end of file
+// CHECK: bb0([[KLASS:%[0-9]+]] : $Klass):
diff --git a/test/SILOptimizer/funcsig_opaque.sil b/test/SILOptimizer/funcsig_opaque.sil
index fe146d3..7730a44 100644
--- a/test/SILOptimizer/funcsig_opaque.sil
+++ b/test/SILOptimizer/funcsig_opaque.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -function-signature-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -function-signature-opts %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/function_order.sil b/test/SILOptimizer/function_order.sil
index ee7d12d..79a1bd5 100644
--- a/test/SILOptimizer/function_order.sil
+++ b/test/SILOptimizer/function_order.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -function-order-printer -o /dev/null | %FileCheck --check-prefix=CHECK %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -function-order-printer -o /dev/null | %FileCheck --check-prefix=CHECK %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/functionsigopts.sil b/test/SILOptimizer/functionsigopts.sil
index a0195e5..a25565c 100644
--- a/test/SILOptimizer/functionsigopts.sil
+++ b/test/SILOptimizer/functionsigopts.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts %s | %FileCheck -check-prefix=CHECK-NEGATIVE %s
+// RUN: %target-sil-opt -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-inline-generics -enable-sil-verify-all -inline -function-signature-opts %s | %FileCheck -check-prefix=CHECK-NEGATIVE %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/functionsigopts_sroa.sil b/test/SILOptimizer/functionsigopts_sroa.sil
index 1e11833..6d03520 100644
--- a/test/SILOptimizer/functionsigopts_sroa.sil
+++ b/test/SILOptimizer/functionsigopts_sroa.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-expand-all -inline -function-signature-opts %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all -enable-expand-all -inline -function-signature-opts %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/global_property_opt.sil b/test/SILOptimizer/global_property_opt.sil
index 9233e5e..2893b8d 100644
--- a/test/SILOptimizer/global_property_opt.sil
+++ b/test/SILOptimizer/global_property_opt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -global-property-opt %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -global-property-opt %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/global_property_opt_objc.sil b/test/SILOptimizer/global_property_opt_objc.sil
index ea123be..100aa00 100644
--- a/test/SILOptimizer/global_property_opt_objc.sil
+++ b/test/SILOptimizer/global_property_opt_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -global-property-opt %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -global-property-opt %s | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/globalopt-iter.sil b/test/SILOptimizer/globalopt-iter.sil
index 9daabd7..7e35d90 100644
--- a/test/SILOptimizer/globalopt-iter.sil
+++ b/test/SILOptimizer/globalopt-iter.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -object-outliner | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -object-outliner | %FileCheck %s
 
 
 import Builtin
diff --git a/test/SILOptimizer/globalopt.sil b/test/SILOptimizer/globalopt.sil
index 78feb24..994bac4 100644
--- a/test/SILOptimizer/globalopt.sil
+++ b/test/SILOptimizer/globalopt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -global-opt | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -global-opt | %FileCheck %s
 //
 // ginit.cold has a hammock with an initializer call on the slow path.
 // ginit.loop has a loop containing an initializer call.
diff --git a/test/SILOptimizer/guaranteed_arc_opts.sil b/test/SILOptimizer/guaranteed_arc_opts.sil
index eb294d5..8a227a1 100644
--- a/test/SILOptimizer/guaranteed_arc_opts.sil
+++ b/test/SILOptimizer/guaranteed_arc_opts.sil
@@ -6,12 +6,12 @@
 
 sil @kraken : $@convention(thin) () -> ()
 
-// CHECK-LABEL: sil @copyvalue_test1 : $@convention(thin) (Builtin.NativeObject, Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @copyvalue_test1 : $@convention(thin) (Builtin.NativeObject, Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG1:%.*]] : @unowned $Builtin.NativeObject, [[ARG2:%.*]] : @unowned $Builtin.NativeObject):
 // CHECK-NOT: copy_value [[ARG1]]
 // CHECK: copy_value [[ARG2]]
 // CHECK-NOT: destroy_value [[ARG1]]
-sil @copyvalue_test1 : $@convention(thin) (Builtin.NativeObject, Builtin.NativeObject) -> () {
+sil [ossa] @copyvalue_test1 : $@convention(thin) (Builtin.NativeObject, Builtin.NativeObject) -> () {
 bb0(%0 : @unowned $Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject):
   %2 = copy_value %0 : $Builtin.NativeObject
   copy_value %1 : $Builtin.NativeObject
@@ -20,12 +20,12 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @copyvalue_test2 : $@convention(thin) (Builtin.NativeObject, @in Builtin.Int32) -> Builtin.NativeObject {
+// CHECK-LABEL: sil [ossa] @copyvalue_test2 : $@convention(thin) (Builtin.NativeObject, @in Builtin.Int32) -> Builtin.NativeObject {
 // CHECK: bb0([[ARG1:%.*]] : @unowned $Builtin.NativeObject
 // CHECK-NOT: copy_value
 // CHECK-NOT: destroy_value
 // CHECK: return [[ARG1]]
-sil @copyvalue_test2 : $@convention(thin) (Builtin.NativeObject, @in Builtin.Int32) -> Builtin.NativeObject {
+sil [ossa] @copyvalue_test2 : $@convention(thin) (Builtin.NativeObject, @in Builtin.Int32) -> Builtin.NativeObject {
 bb0(%0 : @unowned $Builtin.NativeObject, %1 : $*Builtin.Int32):
   %2 = copy_value %0 : $Builtin.NativeObject
   %3 = integer_literal $Builtin.Int32, 0
@@ -34,10 +34,10 @@
   return %2 : $Builtin.NativeObject
 }
 
-// CHECK-LABEL: sil @copyvalue_test3 : $@convention(thin) (Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @copyvalue_test3 : $@convention(thin) (Builtin.NativeObject) -> () {
 // CHECK: copy_value
 // CHECK: destroy_value
-sil @copyvalue_test3 : $@convention(thin) (Builtin.NativeObject) -> () {
+sil [ossa] @copyvalue_test3 : $@convention(thin) (Builtin.NativeObject) -> () {
 bb0(%0 : @unowned $Builtin.NativeObject):
   copy_value %0 : $Builtin.NativeObject
   %1 = function_ref @kraken : $@convention(thin) () -> ()
@@ -47,9 +47,9 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @copyvalue_test4 : $@convention(thin) (Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @copyvalue_test4 : $@convention(thin) (Builtin.NativeObject) -> () {
 // CHECK: destroy_value
-sil @copyvalue_test4 : $@convention(thin) (Builtin.NativeObject) -> () {
+sil [ossa] @copyvalue_test4 : $@convention(thin) (Builtin.NativeObject) -> () {
 bb0(%0 : @unowned $Builtin.NativeObject):
   destroy_value %0 : $Builtin.NativeObject
   %9999 = tuple()
diff --git a/test/SILOptimizer/guaranteed_arc_opts_qualified.sil b/test/SILOptimizer/guaranteed_arc_opts_qualified.sil
index d8e5d21..7dc2e6d 100644
--- a/test/SILOptimizer/guaranteed_arc_opts_qualified.sil
+++ b/test/SILOptimizer/guaranteed_arc_opts_qualified.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt  -assume-parsing-unqualified-ownership-sil -guaranteed-arc-opts %s | %FileCheck %s
+// RUN: %target-sil-opt  -guaranteed-arc-opts %s | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SILOptimizer/high_level_cse.sil b/test/SILOptimizer/high_level_cse.sil
index fe5875e..7f32d5b 100644
--- a/test/SILOptimizer/high_level_cse.sil
+++ b/test/SILOptimizer/high_level_cse.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -high-level-cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -high-level-cse | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/high_level_licm.sil b/test/SILOptimizer/high_level_licm.sil
index 13bd783..b24855d 100644
--- a/test/SILOptimizer/high_level_licm.sil
+++ b/test/SILOptimizer/high_level_licm.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -high-level-licm | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -high-level-licm | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_begin_apply.sil b/test/SILOptimizer/inline_begin_apply.sil
index cd3794c..8cbd755 100644
--- a/test/SILOptimizer/inline_begin_apply.sil
+++ b/test/SILOptimizer/inline_begin_apply.sil
@@ -20,7 +20,7 @@
 
 sil @make_indirect : $<T: SomeClass> () -> (@out Indirect<T>)
 
-sil [transparent] @test_one_yield : $@yield_once <C: SomeClass> () -> (@yields @in Indirect<C>) {
+sil [transparent] [ossa] @test_one_yield : $@yield_once <C: SomeClass> () -> (@yields @in Indirect<C>) {
 entry:
   %marker = function_ref @marker : $@convention(thin) (Builtin.Int32) -> ()
   %1000 = integer_literal $Builtin.Int32, 1000
@@ -109,7 +109,7 @@
   return %ret : $()
 }
 
-sil [transparent] @test_two_yield : $@yield_once <C: SomeClass> (Builtin.Int1) -> (@yields @in Indirect<C>, @yields Builtin.Int64) {
+sil [transparent] [ossa] @test_two_yield : $@yield_once <C: SomeClass> (Builtin.Int1) -> (@yields @in Indirect<C>, @yields Builtin.Int64) {
 entry(%0 : $Builtin.Int1):
   %marker = function_ref @marker : $@convention(thin) (Builtin.Int32) -> ()
   %1000 = integer_literal $Builtin.Int32, 1000
@@ -179,7 +179,7 @@
   return %ret : $()
 }
 
-// CHECK-LABEL: sil @test_simple_call_yield_owned : $@convention(thin) (Builtin.Int1, @owned SomeClass) -> () {
+// CHECK-LABEL: sil [ossa] @test_simple_call_yield_owned : $@convention(thin) (Builtin.Int1, @owned SomeClass) -> () {
 // CHECK:      bb0(%0 : $Builtin.Int1, %1 : @owned $SomeClass):
 // CHECK-NEXT:   // function_ref
 // CHECK-NEXT:   %2 = function_ref @marker
@@ -201,7 +201,7 @@
 // CHECK-NEXT:   [[T0:%.*]] = tuple ()
 // CHECK-NEXT:   return [[T0]] : $()
 
-sil [transparent] @yield_owned : $@yield_once(@owned SomeClass) -> (@yields @owned SomeClass) {
+sil [transparent] [ossa] [ossa] @yield_owned : $@yield_once(@owned SomeClass) -> (@yields @owned SomeClass) {
 entry(%0 : @owned $SomeClass):
   %marker = function_ref @marker : $@convention(thin) (Builtin.Int32) -> ()
   %1000 = integer_literal $Builtin.Int32, 1000
@@ -222,7 +222,7 @@
   unwind
 }
 
-sil @test_simple_call_yield_owned : $(Builtin.Int1, @owned SomeClass) -> () {
+sil [ossa] @test_simple_call_yield_owned : $(Builtin.Int1, @owned SomeClass) -> () {
 entry(%flag : $Builtin.Int1, %c: @owned $SomeClass):
   %0 = function_ref @yield_owned : $@convention(thin) @yield_once(@owned SomeClass) -> (@yields @owned SomeClass)
   (%value, %token) = begin_apply %0(%c) : $@convention(thin) @yield_once(@owned SomeClass) -> (@yields @owned SomeClass)
@@ -243,7 +243,7 @@
 
 sil @use : $@convention(thin) (@in Builtin.Int8) -> ()
 
-sil [transparent] @yield_inout : $@yield_once() -> (@yields @inout Builtin.Int8) {
+sil [transparent] [ossa] [ossa] @yield_inout : $@yield_once() -> (@yields @inout Builtin.Int8) {
 entry:
   %addr = alloc_stack $Builtin.Int8
   %8 = integer_literal $Builtin.Int8, 8
@@ -266,7 +266,7 @@
 }
 
 
-// CHECK-LABEL: sil @test_simple_call_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @test_simple_call_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
 // CHECK:      bb0(%0 : $Builtin.Int1):
 // CHECK-NEXT:   %1 = alloc_stack $Builtin.Int8
 // CHECK-NEXT:   %2 = integer_literal $Builtin.Int8, 8
@@ -296,7 +296,7 @@
 // CHECK-NEXT:   return [[T0]] : $()
 // CHECK:      }
 
-sil @test_simple_call_yield_inout : $(Builtin.Int1) -> () {
+sil [ossa] @test_simple_call_yield_inout : $(Builtin.Int1) -> () {
 entry(%flag : $Builtin.Int1):
   %0 = function_ref @yield_inout : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
   (%addr, %token) = begin_apply %0() : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
@@ -318,10 +318,10 @@
 }
 
 //   We can't inline yet if there are multiple ends.
-// CHECK-LABEL: sil @test_multi_end_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @test_multi_end_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
 // CHECK:       [[T0:%.*]] = function_ref @yield_inout
 // CHECK:       begin_apply [[T0]]
-sil @test_multi_end_yield_inout : $(Builtin.Int1) -> () {
+sil [ossa] @test_multi_end_yield_inout : $(Builtin.Int1) -> () {
 entry(%flag : $Builtin.Int1):
   %0 = function_ref @yield_inout : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
   (%addr, %token) = begin_apply %0() : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
@@ -341,10 +341,10 @@
 }
 
 //   We can't inline yet if there are multiple aborts.
-// CHECK-LABEL: sil @test_multi_abort_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @test_multi_abort_yield_inout : $@convention(thin) (Builtin.Int1) -> () {
 // CHECK:       [[T0:%.*]] = function_ref @yield_inout
 // CHECK:       begin_apply [[T0]]
-sil @test_multi_abort_yield_inout : $(Builtin.Int1) -> () {
+sil [ossa] @test_multi_abort_yield_inout : $(Builtin.Int1) -> () {
 entry(%flag : $Builtin.Int1):
   %0 = function_ref @yield_inout : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
   (%addr, %token) = begin_apply %0() : $@convention(thin) @yield_once() -> (@yields @inout Builtin.Int8)
@@ -363,7 +363,7 @@
   return %ret : $()
 }
 
-sil [transparent] @no_yields : $@yield_once () -> (@yields @inout Builtin.Int8) {
+sil [transparent] [ossa] @no_yields : $@yield_once () -> (@yields @inout Builtin.Int8) {
 entry:
   %3000 = integer_literal $Builtin.Int32, 3000
   %marker = function_ref @marker : $@convention(thin) (Builtin.Int32) -> ()
@@ -371,7 +371,7 @@
   unreachable
 }
 
-// CHECK-LABEL: sil @test_simple_call_no_yields : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @test_simple_call_no_yields : $@convention(thin) () -> () {
 // CHECK:      bb0:
 // CHECK-NEXT:   [[T0:%.*]] = integer_literal $Builtin.Int32, 3000
 // CHECK-NEXT:   // function_ref
@@ -387,7 +387,7 @@
 // CHECK-NEXT:   [[T0:%.*]] = tuple ()
 // CHECK-NEXT:   return [[T0]] : $()
 // CHECK:      }
-sil @test_simple_call_no_yields : $() -> () {
+sil [ossa] @test_simple_call_no_yields : $() -> () {
 entry:
   %0 = function_ref @no_yields : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int8)
   (%addr, %token) = begin_apply %0() : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int8)
@@ -398,7 +398,7 @@
   return %ret : $()
 }
 
-sil [transparent] @stack_overlap : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int32) {
+sil [transparent] [ossa] @stack_overlap : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int32) {
 entry:
   %marker = function_ref @marker : $@convention(thin) (Builtin.Int32) -> ()
   %temp = alloc_stack $Builtin.Int32
@@ -422,7 +422,7 @@
   unwind
 }
 
-// CHECK-LABEL: sil @test_stack_overlap_dealloc
+// CHECK-LABEL: sil [ossa] @test_stack_overlap_dealloc
 // CHECK:       bb0:
 // CHECK-NEXT:    [[A16:%.*]] = alloc_stack $Builtin.Int16
 // CHECK-NEXT:    // function_ref
@@ -443,7 +443,7 @@
 // CHECK-NEXT:    [[RET:%.*]] = tuple ()
 // CHECK-NEXT:    return [[RET]] : $()
 // CHECK-LABEL: // end sil function 'test_stack_overlap_dealloc'
-sil @test_stack_overlap_dealloc : $() -> () {
+sil [ossa] @test_stack_overlap_dealloc : $() -> () {
 bb0:
   %stack = alloc_stack $Builtin.Int16
   %0 = function_ref @stack_overlap : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int32)
@@ -454,7 +454,7 @@
   return %ret : $()
 }
 
-// CHECK-LABEL: sil @test_stack_overlap_alloc
+// CHECK-LABEL: sil [ossa] @test_stack_overlap_alloc
 // CHECK:       bb0:
 // CHECK-NEXT:    // function_ref
 // CHECK-NEXT:    [[MARKER:%.*]] = function_ref @marker
@@ -475,7 +475,7 @@
 // CHECK-NEXT:    [[RET:%.*]] = tuple ()
 // CHECK-NEXT:    return [[RET]] : $()
 // CHECK-LABEL: // end sil function 'test_stack_overlap_alloc'
-sil @test_stack_overlap_alloc : $() -> () {
+sil [ossa] @test_stack_overlap_alloc : $() -> () {
 bb0:
   %0 = function_ref @stack_overlap : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int32)
   (%value, %token) = begin_apply %0() : $@convention(thin) @yield_once () -> (@yields @inout Builtin.Int32)
diff --git a/test/SILOptimizer/inline_caches.sil b/test/SILOptimizer/inline_caches.sil
index 10065fa..525d375 100644
--- a/test/SILOptimizer/inline_caches.sil
+++ b/test/SILOptimizer/inline_caches.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_devirtualize_specialize.sil b/test/SILOptimizer/inline_devirtualize_specialize.sil
index 2f8ce4c..79c3085 100644
--- a/test/SILOptimizer/inline_devirtualize_specialize.sil
+++ b/test/SILOptimizer/inline_devirtualize_specialize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer -generic-specializer -inline -dce | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer -generic-specializer -inline -dce | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_generics.sil b/test/SILOptimizer/inline_generics.sil
index 8b6dc08..e43e678 100644
--- a/test/SILOptimizer/inline_generics.sil
+++ b/test/SILOptimizer/inline_generics.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-inline-generics=true | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-inline-generics=false | %FileCheck --check-prefix=DISABLED-GENERIC-INLINING-CHECK %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-inline-generics=true | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-inline-generics=false | %FileCheck --check-prefix=DISABLED-GENERIC-INLINING-CHECK %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_heuristics.sil b/test/SILOptimizer/inline_heuristics.sil
index 615b2c2..53373be 100644
--- a/test/SILOptimizer/inline_heuristics.sil
+++ b/test/SILOptimizer/inline_heuristics.sil
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-inline-generics=true -sil-partial-specialization=false -debug-only=sil-inliner 2>%t/log | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-inline-generics=true -sil-partial-specialization=false -debug-only=sil-inliner 2>%t/log | %FileCheck %s
 // RUN: %FileCheck %s --check-prefix=CHECK-LOG <%t/log
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-inline-generics=true -sil-partial-specialization=true -generic-specializer -debug-only=sil-inliner 2>%t/log | %FileCheck %s --check-prefix=CHECK-PARTIAL-SPECIALIZATION
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-inline-generics=true -sil-partial-specialization=true -generic-specializer -debug-only=sil-inliner 2>%t/log | %FileCheck %s --check-prefix=CHECK-PARTIAL-SPECIALIZATION
 // REQUIRES: asserts
 
 // This test checks the inline heuristics based on the debug log output of
diff --git a/test/SILOptimizer/inline_late.sil b/test/SILOptimizer/inline_late.sil
index 61ea051..a0fc5fa 100644
--- a/test/SILOptimizer/inline_late.sil
+++ b/test/SILOptimizer/inline_late.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -late-inline -sil-inline-threshold=50 | %FileCheck %s --check-prefix=LATE
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -late-inline -sil-inline-threshold=50 -module-name Swift | %FileCheck %s --check-prefix=STDLIBLATE
+// RUN: %target-sil-opt -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -late-inline -sil-inline-threshold=50 | %FileCheck %s --check-prefix=LATE
+// RUN: %target-sil-opt -enable-sil-verify-all %s -late-inline -sil-inline-threshold=50 -module-name Swift | %FileCheck %s --check-prefix=STDLIBLATE
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_semantics.sil b/test/SILOptimizer/inline_semantics.sil
index dbec397..15fc879 100644
--- a/test/SILOptimizer/inline_semantics.sil
+++ b/test/SILOptimizer/inline_semantics.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inline_tryApply.sil b/test/SILOptimizer/inline_tryApply.sil
index c9e2fdb..6f423e5 100644
--- a/test/SILOptimizer/inline_tryApply.sil
+++ b/test/SILOptimizer/inline_tryApply.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -early-inline -sil-inline-threshold=50 | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inlinecaches_arc.sil b/test/SILOptimizer/inlinecaches_arc.sil
index ad47eb0..2a69333 100644
--- a/test/SILOptimizer/inlinecaches_arc.sil
+++ b/test/SILOptimizer/inlinecaches_arc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  -emit-sorted-sil | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt -code-sinking  -emit-sorted-sil | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inlinecaches_invalidate_failure.sil b/test/SILOptimizer/inlinecaches_invalidate_failure.sil
index ec3c153..77c1bba 100644
--- a/test/SILOptimizer/inlinecaches_invalidate_failure.sil
+++ b/test/SILOptimizer/inlinecaches_invalidate_failure.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -specdevirt -code-sinking  -sil-verify-without-invalidation
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -specdevirt -code-sinking  -sil-verify-without-invalidation
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inlinecaches_objc.sil b/test/SILOptimizer/inlinecaches_objc.sil
index 3058b98..92b581e 100644
--- a/test/SILOptimizer/inlinecaches_objc.sil
+++ b/test/SILOptimizer/inlinecaches_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/inliner_coldblocks.sil b/test/SILOptimizer/inliner_coldblocks.sil
index 3e88531..cd2402b 100644
--- a/test/SILOptimizer/inliner_coldblocks.sil
+++ b/test/SILOptimizer/inliner_coldblocks.sil
@@ -1,8 +1,8 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-remarks=sil-inliner -o %t.sil 2>&1 | %FileCheck -check-prefix=REMARKS_PASSED %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-remarks=sil-inliner -o %t.sil 2>&1 | %FileCheck -check-prefix=REMARKS_PASSED %s
 // RUN: %FileCheck %s < %t.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-remarks-missed=sil-inliner -o /dev/null 2>&1 | %FileCheck -check-prefix=REMARKS_MISSED %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -save-optimization-record-path %t.yaml -o /dev/null 2>&1 | %FileCheck -allow-empty -check-prefix=NO_REMARKS %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-remarks-missed=sil-inliner -o /dev/null 2>&1 | %FileCheck -check-prefix=REMARKS_MISSED %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -save-optimization-record-path %t.yaml -o /dev/null 2>&1 | %FileCheck -allow-empty -check-prefix=NO_REMARKS %s
 // RUN: %FileCheck -check-prefix=YAML %s < %t.yaml
 
 // REMARKS_PASSED-NOT: remark:
diff --git a/test/SILOptimizer/inliner_spa.sil b/test/SILOptimizer/inliner_spa.sil
index 4de4986..ba18bcb 100644
--- a/test/SILOptimizer/inliner_spa.sil
+++ b/test/SILOptimizer/inliner_spa.sil
@@ -1,5 +1,5 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -inline -print-shortest-path-info 2>%t/log >/dev/null
+// RUN: %target-sil-opt %s -inline -print-shortest-path-info 2>%t/log >/dev/null
 // RUN: %FileCheck %s <%t/log
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/iv_info_printer.sil b/test/SILOptimizer/iv_info_printer.sil
index 91354d8..192ca1a 100644
--- a/test/SILOptimizer/iv_info_printer.sil
+++ b/test/SILOptimizer/iv_info_printer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -iv-info-printer 2>&1 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -iv-info-printer 2>&1 | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/latecodemotion.sil b/test/SILOptimizer/latecodemotion.sil
index afb3ea3..a2ecdc7 100644
--- a/test/SILOptimizer/latecodemotion.sil
+++ b/test/SILOptimizer/latecodemotion.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -late-codemotion -release-hoisting -retain-sinking | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -late-codemotion -release-hoisting -retain-sinking | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/let_properties_opts.sil b/test/SILOptimizer/let_properties_opts.sil
index 3ff5296..32d2ef1 100644
--- a/test/SILOptimizer/let_properties_opts.sil
+++ b/test/SILOptimizer/let_properties_opts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -let-properties-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s | %FileCheck %s
+// RUN: %target-sil-opt -let-properties-opt -enable-sil-verify-all %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/licm.sil b/test/SILOptimizer/licm.sil
index d30efae..f1deec3 100644
--- a/test/SILOptimizer/licm.sil
+++ b/test/SILOptimizer/licm.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -licm | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -licm | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/licm_apply.sil b/test/SILOptimizer/licm_apply.sil
index a149504..376e695 100644
--- a/test/SILOptimizer/licm_apply.sil
+++ b/test/SILOptimizer/licm_apply.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -licm | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -licm | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/licm_exclusivity.sil b/test/SILOptimizer/licm_exclusivity.sil
index 5891500..5a2a70a 100644
--- a/test/SILOptimizer/licm_exclusivity.sil
+++ b/test/SILOptimizer/licm_exclusivity.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=checked -enable-sil-verify-all %s -licm | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=checked -enable-sil-verify-all %s -licm | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/licm_multiend.sil b/test/SILOptimizer/licm_multiend.sil
index 78b06b2..d1c4c7f 100644
--- a/test/SILOptimizer/licm_multiend.sil
+++ b/test/SILOptimizer/licm_multiend.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -licm | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -licm | %FileCheck %s
 // REQUIRES: CPU=x86_64
 // REQUIRES: OS=macosx
 
diff --git a/test/SILOptimizer/loop-region-analysis.sil b/test/SILOptimizer/loop-region-analysis.sil
index 084b0bf..07539b2 100644
--- a/test/SILOptimizer/loop-region-analysis.sil
+++ b/test/SILOptimizer/loop-region-analysis.sil
@@ -1,6 +1,6 @@
 // All bbs should have IDs that match the rpo order put out when printing with -emit-sorted-sil
 
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name Swift -loop-region-view-text -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name Swift -loop-region-view-text -o /dev/null | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/loop_canonicalizer.sil b/test/SILOptimizer/loop_canonicalizer.sil
index c8456e7..560fe21 100644
--- a/test/SILOptimizer/loop_canonicalizer.sil
+++ b/test/SILOptimizer/loop_canonicalizer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -compute-dominance-info -compute-loop-info -loop-canonicalizer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -compute-dominance-info -compute-loop-info -loop-canonicalizer %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/loop_info_printer.sil b/test/SILOptimizer/loop_info_printer.sil
index f50df70..09305d8 100644
--- a/test/SILOptimizer/loop_info_printer.sil
+++ b/test/SILOptimizer/loop_info_printer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -loop-info-printer 2>&1 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -loop-info-printer 2>&1 | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/loop_unroll.sil b/test/SILOptimizer/loop_unroll.sil
index 1a3aa75..faa1421 100644
--- a/test/SILOptimizer/loop_unroll.sil
+++ b/test/SILOptimizer/loop_unroll.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -loop-unroll %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -loop-unroll %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/looprotate.sil b/test/SILOptimizer/looprotate.sil
index 7a2505e..73d8530 100644
--- a/test/SILOptimizer/looprotate.sil
+++ b/test/SILOptimizer/looprotate.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all -loop-rotate %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all -loop-rotate %s | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/loweraggregateinstrs.sil b/test/SILOptimizer/loweraggregateinstrs.sil
index 720b5ca..9f2e3da 100644
--- a/test/SILOptimizer/loweraggregateinstrs.sil
+++ b/test/SILOptimizer/loweraggregateinstrs.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -lower-aggregate-instrs | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -lower-aggregate-instrs | %FileCheck %s
 
 // This file makes sure that given the current code-size metric we properly
 // expand operations for small structs and not for large structs in a consistent
diff --git a/test/SILOptimizer/loweraggregateinstrs_expandall.sil b/test/SILOptimizer/loweraggregateinstrs_expandall.sil
index 3a3e53b..08b3ac3 100644
--- a/test/SILOptimizer/loweraggregateinstrs_expandall.sil
+++ b/test/SILOptimizer/loweraggregateinstrs_expandall.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -enable-expand-all %s -lower-aggregate-instrs | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -enable-expand-all %s -lower-aggregate-instrs | %FileCheck %s
 
 // This file makes sure that the mechanics of expanding aggregate instructions
 // work. With that in mind, we expand all structs here ignoring code-size
diff --git a/test/SILOptimizer/lslocation_expansion.sil b/test/SILOptimizer/lslocation_expansion.sil
index 9dbccfb..28f01f4 100644
--- a/test/SILOptimizer/lslocation_expansion.sil
+++ b/test/SILOptimizer/lslocation_expansion.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-expand-all %s -lslocation-dump -ml=only-expansion | %FileCheck %s
+// RUN: %target-sil-opt -enable-expand-all %s -lslocation-dump -ml=only-expansion | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/lslocation_reduction.sil b/test/SILOptimizer/lslocation_reduction.sil
index eb239cc..372f8a3 100644
--- a/test/SILOptimizer/lslocation_reduction.sil
+++ b/test/SILOptimizer/lslocation_reduction.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -lslocation-dump -ml=only-reduction | %FileCheck %s
+// RUN: %target-sil-opt %s -lslocation-dump -ml=only-reduction | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/lslocation_type_only_expansion.sil b/test/SILOptimizer/lslocation_type_only_expansion.sil
index 1d75995..cb87590 100644
--- a/test/SILOptimizer/lslocation_type_only_expansion.sil
+++ b/test/SILOptimizer/lslocation_type_only_expansion.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -lslocation-dump -ml=only-type-expansion | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -lslocation-dump-use-new-projection -lslocation-dump -ml=only-type-expansion | %FileCheck %s
+// RUN: %target-sil-opt %s -lslocation-dump -ml=only-type-expansion | %FileCheck %s
+// RUN: %target-sil-opt %s -lslocation-dump-use-new-projection -lslocation-dump -ml=only-type-expansion | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/mandatory_inlining.sil b/test/SILOptimizer/mandatory_inlining.sil
index d5a7ba3..db99d67 100644
--- a/test/SILOptimizer/mandatory_inlining.sil
+++ b/test/SILOptimizer/mandatory_inlining.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -module-name mandatory_inlining -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -module-name mandatory_inlining -enable-sil-verify-all %s -mandatory-inlining | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/mandatory_inlining_circular.sil b/test/SILOptimizer/mandatory_inlining_circular.sil
index ba57afe..1fc7c85 100644
--- a/test/SILOptimizer/mandatory_inlining_circular.sil
+++ b/test/SILOptimizer/mandatory_inlining_circular.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mandatory-inlining -verify
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mandatory-inlining -verify
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/mandatory_inlining_open_existential.sil b/test/SILOptimizer/mandatory_inlining_open_existential.sil
index d46ca29..39978a4 100644
--- a/test/SILOptimizer/mandatory_inlining_open_existential.sil
+++ b/test/SILOptimizer/mandatory_inlining_open_existential.sil
@@ -10,7 +10,7 @@
   func f7() -> () -> Self
 }
 
-sil hidden @caller : $@convention(thin) (@in P) -> () {
+sil hidden [ossa] @caller : $@convention(thin) (@in P) -> () {
 bb0(%0 : $*P):
   %2 = open_existential_addr immutable_access %0 : $*P to $*@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0") P
   %3 = witness_method $@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0") P, #P.f7!1, %2 : $*@opened("214EF566-CD33-11E6-A1F0-34363BD08DA0") P : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@in_guaranteed τ_0_0) -> @owned @callee_owned () -> @out τ_0_0
@@ -29,7 +29,7 @@
   return %15 : $()
 }
 
-sil hidden [transparent] @callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@owned @callee_owned () -> @out τ_0_0) -> @out P {
+sil hidden [transparent] [ossa] @callee : $@convention(thin) <τ_0_0 where τ_0_0 : P> (@owned @callee_owned () -> @out τ_0_0) -> @out P {
 bb0(%0 : $*P, %1 : @owned $@callee_owned () -> @out τ_0_0):
   %2 = alloc_stack $τ_0_0
   %3 = apply %1(%2) : $@callee_owned () -> @out τ_0_0
diff --git a/test/SILOptimizer/mandatory_inlining_ownership.sil b/test/SILOptimizer/mandatory_inlining_ownership.sil
index eb7d436..33ac16e 100644
--- a/test/SILOptimizer/mandatory_inlining_ownership.sil
+++ b/test/SILOptimizer/mandatory_inlining_ownership.sil
@@ -10,14 +10,14 @@
   init(i: Builtin.Int64) { self.i = i }
 }
 
-sil [transparent] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64 {
+sil [transparent] [ossa] @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64 {
 bb(%0 : @guaranteed $C):
   %1 = ref_element_addr %0 : $C, #C.i
   %2 = load [trivial] %1 : $*Builtin.Int64
   return %2 : $Builtin.Int64
 }
 
-// CHECK-LABEL: sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
+// CHECK-LABEL: sil [ossa] @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
 // CHECK: bb0(%0 : @owned $C):
 // CHECK:   [[BORROW:%.*]] = begin_borrow %0 : $C
 // CHECK:   [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
@@ -26,7 +26,7 @@
 // CHECK:   destroy_value %0 : $C
 // CHECK:   return [[VAL]] : $Builtin.Int64
 // CHECK-LABEL: } // end sil function 'callerWithOwned'
-sil @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
+sil [ossa] @callerWithOwned : $@convention(thin) (@owned C) -> Builtin.Int64 {
 bb(%0 : @owned $C):
   %fn = function_ref @calleeWithGuaranteed : $@convention(thin) (@guaranteed C) -> Builtin.Int64
   %call = apply %fn(%0) : $@convention(thin) (@guaranteed C) -> Builtin.Int64
@@ -36,7 +36,7 @@
 
 struct MyError : Error {}
 
-sil [transparent] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error) {
+sil [transparent] [ossa] @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error) {
 bb(%0 : @guaranteed $C):
   %1 = ref_element_addr %0 : $C, #C.i
   %2 = load [trivial] %1 : $*Builtin.Int64
@@ -52,7 +52,7 @@
   return %2 : $Builtin.Int64
 }
 
-// CHECK-LABEL: sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
+// CHECK-LABEL: sil [ossa] @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
 // CHECK: bb0(%0 : @owned $C):
 // CHECK:   [[BORROW:%.*]] = begin_borrow %0 : $C
 // CHECK:   [[ADDR:%.*]] = ref_element_addr [[BORROW]] : $C, #C.i
@@ -67,7 +67,7 @@
 // CHECK:   destroy_value %0 : $C
 // CHECK:   return [[VAL]] : $Builtin.Int64
 // CHECK-LABEL: } // end sil function 'callerWithThrow'
-sil @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
+sil [ossa] @callerWithThrow : $@convention(thin) (@owned C) -> (Builtin.Int64, @error Error) {
 bb(%0 : @owned $C):
   %fn = function_ref @calleeWithGuaranteedThrows : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error)
   try_apply %fn(%0) : $@convention(thin) (@guaranteed C) -> (Builtin.Int64, @error Error), normal bb1, error bb2
diff --git a/test/SILOptimizer/mandatory_inlining_resilience.sil b/test/SILOptimizer/mandatory_inlining_resilience.sil
index d2035f2..ec6c790 100644
--- a/test/SILOptimizer/mandatory_inlining_resilience.sil
+++ b/test/SILOptimizer/mandatory_inlining_resilience.sil
@@ -12,7 +12,7 @@
 
 sil_global [let] @my_global : $Int
 
-sil hidden [global_init] @private_function : $@convention(thin) () -> Builtin.RawPointer {
+sil hidden [global_init] [ossa] @private_function : $@convention(thin) () -> Builtin.RawPointer {
 bb0:
   %4 = global_addr @my_global : $*Int
   %5 = address_to_pointer %4 : $*Int to $Builtin.RawPointer
@@ -21,7 +21,7 @@
 
 // This function is transparent, but not serialized. We cannot inline it into
 // serialized_caller.
-sil [transparent] @transparent_callee : $@convention(thin) () -> Int {
+sil [transparent] [ossa] @transparent_callee : $@convention(thin) () -> Int {
 bb0:
   %0 = function_ref @private_function : $@convention(thin) () -> Builtin.RawPointer
   %1 = apply %0() : $@convention(thin) () -> Builtin.RawPointer
@@ -30,8 +30,8 @@
   return %3 : $Int
 }
 
-// CHECK-LABEL: sil [serialized] @serialized_callee
-sil [serialized] @serialized_callee : $@convention(method) (@thin S.Type) -> S {
+// CHECK-LABEL: sil [serialized] [ossa] @serialized_callee
+sil [serialized] [ossa] @serialized_callee : $@convention(method) (@thin S.Type) -> S {
 bb0(%0 : $@thin S.Type):
   %1 = alloc_box ${ var S }, var, name "self"
   %2 = mark_uninitialized [rootself] %1 : ${ var S }
diff --git a/test/SILOptimizer/mark_uninitialized_fixup.sil b/test/SILOptimizer/mark_uninitialized_fixup.sil
index fc2e36e..3531375 100644
--- a/test/SILOptimizer/mark_uninitialized_fixup.sil
+++ b/test/SILOptimizer/mark_uninitialized_fixup.sil
@@ -4,11 +4,11 @@
 
 import Builtin
 
-// CHECK-LABEL: sil @single_bb_single_proj_case : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @single_bb_single_proj_case : $@convention(thin) () -> () {
 // CHECK: [[BOX:%.*]] = alloc_box ${ var Builtin.Int32 }
 // CHECK: [[PB:%.*]] = project_box [[BOX]]
 // CHECK: mark_uninitialized [rootself] [[PB]]
-sil @single_bb_single_proj_case : $@convention(thin) () -> () {
+sil [ossa] @single_bb_single_proj_case : $@convention(thin) () -> () {
 bb0:
   %0 = alloc_box ${ var Builtin.Int32 }
   %1 = mark_uninitialized [rootself] %0 : ${ var Builtin.Int32 }
@@ -18,12 +18,12 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @single_bb_multiple_proj_case : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @single_bb_multiple_proj_case : $@convention(thin) () -> () {
 // CHECK: [[BOX:%.*]] = alloc_box ${ var Builtin.Int32 }
 // CHECK: [[PB:%.*]] = project_box [[BOX]]
 // CHECK: mark_uninitialized [rootself] [[PB]]
 // CHECK: project_box [[BOX]]
-sil @single_bb_multiple_proj_case : $@convention(thin) () -> () {
+sil [ossa] @single_bb_multiple_proj_case : $@convention(thin) () -> () {
 bb0:
   %0 = alloc_box ${ var Builtin.Int32 }
   %1 = mark_uninitialized [rootself] %0 : ${ var Builtin.Int32 }
@@ -35,7 +35,7 @@
 }
 
 
-// CHECK-LABEL: sil @multiple_bb_case : $@convention(thin) () -> () {
+// CHECK-LABEL: sil [ossa] @multiple_bb_case : $@convention(thin) () -> () {
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var Builtin.Int32 }
 // CHECK:   [[PB:%.*]] = project_box [[BOX]]
 // CHECK:   mark_uninitialized [rootself] [[PB]]
@@ -43,7 +43,7 @@
 //
 // CHECK: [[NEXT_BB]]:
 // CHECK:   project_box [[BOX]]
-sil @multiple_bb_case : $@convention(thin) () -> () {
+sil [ossa] @multiple_bb_case : $@convention(thin) () -> () {
 bb0:
   %0 = alloc_box ${ var Builtin.Int32 }
   %1 = mark_uninitialized [rootself] %0 : ${ var Builtin.Int32 }
@@ -61,14 +61,14 @@
   var _value: Builtin.Int1
 }
 
-// CHECK-LABEL: sil @test_rauw_uses_of_project_box : $@convention(thin) (Builtin.Int1, @thin Bool.Type) -> Bool {
+// CHECK-LABEL: sil [ossa] @test_rauw_uses_of_project_box : $@convention(thin) (Builtin.Int1, @thin Bool.Type) -> Bool {
 // CHECK: [[BOX:%.*]] = alloc_box ${ var Bool }
 // CHECK: [[PB:%.*]] = project_box [[BOX]]
 // CHECK: [[MUI:%.*]] = mark_uninitialized [rootself] [[PB]]
 // CHECK: struct_element_addr [[MUI]]
 // CHECK: load [trivial] [[MUI]]
 // CHECK: destroy_value [[BOX]]
-sil @test_rauw_uses_of_project_box : $@convention(thin) (Builtin.Int1, @thin Bool.Type) -> Bool {
+sil [ossa] @test_rauw_uses_of_project_box : $@convention(thin) (Builtin.Int1, @thin Bool.Type) -> Bool {
 bb0(%0 : $Builtin.Int1, %1 : $@thin Bool.Type):
   %2 = alloc_box ${ var Bool }, var, name "self"
   %3 = mark_uninitialized [rootself] %2 : ${ var Bool }
@@ -84,7 +84,7 @@
 // This is a simulation of the type of callee generated by capture promotion.
 sil @capture_promotion_generated_callee : $@convention(thin) (@in Bool) -> ()
 
-// CHECK-LABEL: sil @test_copyvalue_use_of_projectbox : $@convention(thin) (Builtin.Int1) -> () {
+// CHECK-LABEL: sil [ossa] @test_copyvalue_use_of_projectbox : $@convention(thin) (Builtin.Int1) -> () {
 // CHECK: bb0([[ARG:%.*]] : $Builtin.Int1):
 // CHECK:   [[BOX:%.*]] = alloc_box ${ var Bool }, var, name "self"
 // CHECK:   [[PB:%.*]] = project_box [[BOX]]
@@ -93,7 +93,7 @@
 // CHECK:   [[PB_BOX_COPY:%.*]] = project_box [[BOX_COPY]]
 // CHECK:   destroy_value [[BOX_COPY]]
 // CHECK:   destroy_value [[BOX]]
-sil @test_copyvalue_use_of_projectbox : $@convention(thin) (Builtin.Int1) -> () {
+sil [ossa] @test_copyvalue_use_of_projectbox : $@convention(thin) (Builtin.Int1) -> () {
 bb0(%0 : $Builtin.Int1):
   // Initial initialization.
   %1 = alloc_box ${ var Bool }, var, name "self"
diff --git a/test/SILOptimizer/mem-behavior.sil b/test/SILOptimizer/mem-behavior.sil
index 0f40df9..3d101db 100644
--- a/test/SILOptimizer/mem-behavior.sil
+++ b/test/SILOptimizer/mem-behavior.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -aa-kind=basic-aa -mem-behavior-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -aa-kind=basic-aa -mem-behavior-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/mem2reg.sil b/test/SILOptimizer/mem2reg.sil
index 7056ebb..ebb445c 100644
--- a/test/SILOptimizer/mem2reg.sil
+++ b/test/SILOptimizer/mem2reg.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mem2reg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mem2reg | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/mem2reg_liveness.sil b/test/SILOptimizer/mem2reg_liveness.sil
index cf1fbcf..8378cdb 100644
--- a/test/SILOptimizer/mem2reg_liveness.sil
+++ b/test/SILOptimizer/mem2reg_liveness.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mem2reg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mem2reg | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/mem2reg_simple.sil b/test/SILOptimizer/mem2reg_simple.sil
index 7105fb9..a17a3cf 100644
--- a/test/SILOptimizer/mem2reg_simple.sil
+++ b/test/SILOptimizer/mem2reg_simple.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mem2reg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mem2reg | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/mem2reg_unreachable.sil b/test/SILOptimizer/mem2reg_unreachable.sil
index 0270996..b179411 100644
--- a/test/SILOptimizer/mem2reg_unreachable.sil
+++ b/test/SILOptimizer/mem2reg_unreachable.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -mem2reg
+// RUN: %target-sil-opt -enable-sil-verify-all %s -mem2reg
 
 // Make sure we are not crashing on blocks that are not dominated by the entry block.
 
diff --git a/test/SILOptimizer/merge_cond_fail.sil b/test/SILOptimizer/merge_cond_fail.sil
index 1dcd79a..b298de2 100644
--- a/test/SILOptimizer/merge_cond_fail.sil
+++ b/test/SILOptimizer/merge_cond_fail.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -merge-cond_fails | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -merge-cond_fails | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/mm_inlinecaches_multiple.sil b/test/SILOptimizer/mm_inlinecaches_multiple.sil
index 11e9408..0282c9a 100644
--- a/test/SILOptimizer/mm_inlinecaches_multiple.sil
+++ b/test/SILOptimizer/mm_inlinecaches_multiple.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  -wmo | %FileCheck --check-prefix=CHECK-WMO %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt -code-sinking  | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt -code-sinking  -wmo | %FileCheck --check-prefix=CHECK-WMO %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/move_cond_fail_simplify_cfg.sil b/test/SILOptimizer/move_cond_fail_simplify_cfg.sil
index 87af683..fc3dc15 100644
--- a/test/SILOptimizer/move_cond_fail_simplify_cfg.sil
+++ b/test/SILOptimizer/move_cond_fail_simplify_cfg.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -move-cond-fail-to-preds | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -move-cond-fail-to-preds | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/no_size_specialization.swift b/test/SILOptimizer/no_size_specialization.swift
new file mode 100644
index 0000000..27e5b8b
--- /dev/null
+++ b/test/SILOptimizer/no_size_specialization.swift
@@ -0,0 +1,21 @@
+// RUN: %target-swift-frontend  %s -O -emit-sil | %FileCheck %s -check-prefix=CHECK-O
+// RUN: %target-swift-frontend  %s -Osize -emit-sil | %FileCheck %s -check-prefix=CHECK-OSIZE
+
+@_semantics("optimize.sil.specialize.generic.size.never")
+func foo<T>(_ t: T) -> T {
+  return t
+}
+
+// CHECK-O-LABEL: sil @{{.*}}test
+// CHECK-O: %0 = integer_literal
+// CHECK-O: %1 = struct $Int
+// CHECK-O: return %1
+
+// CHECK-OSIZE-LABEL: sil {{.*}} @{{.*}}foo
+
+// CHECK-OSIZE-LABEL: sil @{{.*}}test
+// CHECK-OSIZE: function_ref {{.*}}foo
+// CHECK-OSIZE: apply
+public func test() -> Int {
+  return foo(27)
+}
diff --git a/test/SILOptimizer/noreturn_folding.sil b/test/SILOptimizer/noreturn_folding.sil
index 329e389..7cdbea8 100644
--- a/test/SILOptimizer/noreturn_folding.sil
+++ b/test/SILOptimizer/noreturn_folding.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all -noreturn-folding < %s | %FileCheck %s
+// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all -noreturn-folding < %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/objectoutliner.sil b/test/SILOptimizer/objectoutliner.sil
index 4982d23..5849310 100644
--- a/test/SILOptimizer/objectoutliner.sil
+++ b/test/SILOptimizer/objectoutliner.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -object-outliner | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -object-outliner | %FileCheck %s
 //
 
 sil_stage canonical
diff --git a/test/SILOptimizer/opaque_values_mandatory.sil b/test/SILOptimizer/opaque_values_mandatory.sil
index 89ddb5c..85bcee3 100644
--- a/test/SILOptimizer/opaque_values_mandatory.sil
+++ b/test/SILOptimizer/opaque_values_mandatory.sil
@@ -12,7 +12,7 @@
 // CHECK: bb0(%0 : $T):
 // CHECK: return %0 : $T
 // CHECK-LABEL: } // end sil function 'f010_diagnose_identity'
-sil hidden @f010_diagnose_identity : $@convention(thin) <T> (@in T) -> @out T {
+sil hidden [ossa] @f010_diagnose_identity : $@convention(thin) <T> (@in T) -> @out T {
 bb0(%0 : $T):
   %c = copy_value %0 : $T
   destroy_value %0 : $T
@@ -30,7 +30,7 @@
 // CHECK: destroy_value %1 : $T
 // CHECK: return %{{.*}} : $()
 // CHECK-LABEL: } // end sil function 'f020_assign_inout'
-sil hidden @f020_assign_inout : $@convention(thin) <T> (@inout T, @in T) -> () {
+sil hidden [ossa] @f020_assign_inout : $@convention(thin) <T> (@inout T, @in T) -> () {
 bb0(%0 : $*T, %1 : $T):
   %2 = copy_value %1 : $T
   assign %2 to %0 : $*T
diff --git a/test/SILOptimizer/opaque_values_opt.sil b/test/SILOptimizer/opaque_values_opt.sil
index a67ecf5..22f5708 100644
--- a/test/SILOptimizer/opaque_values_opt.sil
+++ b/test/SILOptimizer/opaque_values_opt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -O -enable-sil-opaque-values -emit-sorted-sil -assume-parsing-unqualified-ownership-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -O -enable-sil-opaque-values -emit-sorted-sil %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/opened_archetype_operands_tracking.sil b/test/SILOptimizer/opened_archetype_operands_tracking.sil
index 7b72a81..932fab5 100644
--- a/test/SILOptimizer/opened_archetype_operands_tracking.sil
+++ b/test/SILOptimizer/opened_archetype_operands_tracking.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-inline-generics -enable-sil-verify-all %s -O | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -jumpthread-simplify-cfg -enable-sil-verify-all %s -O | %FileCheck --check-prefix=CHECK-SIMPLIFY-CFG %s
+// RUN: %target-sil-opt -sil-inline-generics -enable-sil-verify-all %s -O | %FileCheck %s
+// RUN: %target-sil-opt -jumpthread-simplify-cfg -enable-sil-verify-all %s -O | %FileCheck --check-prefix=CHECK-SIMPLIFY-CFG %s
 
 // Check some corner cases related to tracking of opened archetypes.
 // For example, the compiler used to crash compiling the "process" function (rdar://28024272)
diff --git a/test/SILOptimizer/optimize_never.sil b/test/SILOptimizer/optimize_never.sil
index 60ad31c..1ed4f03 100644
--- a/test/SILOptimizer/optimize_never.sil
+++ b/test/SILOptimizer/optimize_never.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline -generic-specializer -inline %s > %t.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-full-demangle -enable-sil-verify-all -specdevirt %t.sil | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -inline -generic-specializer -inline %s > %t.sil
+// RUN: %target-sil-opt -sil-full-demangle -enable-sil-verify-all -specdevirt %t.sil | %FileCheck %s
 
 // Check that the  @_optimize(none) annotation prevents
 // any optimizations of the annotated function:
diff --git a/test/SILOptimizer/optimizer_counters.sil b/test/SILOptimizer/optimizer_counters.sil
index 05bc872..3e4bdc4 100644
--- a/test/SILOptimizer/optimizer_counters.sil
+++ b/test/SILOptimizer/optimizer_counters.sil
@@ -1,9 +1,9 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-modules 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-MODULES %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-functions 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-FUNCTIONS %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-dump-all 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ALL %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-modules -sil-stats-only-instructions=integer_literal,builtin 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-INSTRUCTIONS %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-functions -sil-stats-only-function=test_simple 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-FUNCTION %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -O -sil-stats-functions -sil-stats-only-functions=test 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-FUNCTIONS %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-modules 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-MODULES %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-functions 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-FUNCTIONS %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-dump-all 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ALL %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-modules -sil-stats-only-instructions=integer_literal,builtin 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-INSTRUCTIONS %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-functions -sil-stats-only-function=test_simple 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-FUNCTION %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -O -sil-stats-functions -sil-stats-only-functions=test 2>&1 | %FileCheck --check-prefix=CHECK-SIL-STATS-ONLY-FUNCTIONS %s
 
 
 // Test different modes of optimizer counters statistics collection.
diff --git a/test/SILOptimizer/ownership_model_eliminator.sil b/test/SILOptimizer/ownership_model_eliminator.sil
index b55fd43..e630e7d 100644
--- a/test/SILOptimizer/ownership_model_eliminator.sil
+++ b/test/SILOptimizer/ownership_model_eliminator.sil
@@ -23,7 +23,7 @@
 // CHECK: apply {{%[0-9]+}}([[LOAD3]])
 // CHECK: [[LOAD4:%[0-9]+]] = load [[ARG2]] : $*Builtin.Int32
 // CHECK: apply {{%[0-9]+}}([[LOAD4]])
-sil @load : $@convention(thin) (@in Builtin.NativeObject, @in Builtin.Int32) -> () {
+sil [ossa] @load : $@convention(thin) (@in Builtin.NativeObject, @in Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : $*Builtin.Int32):
   %use_native_object_func = function_ref @use_native_object : $@convention(thin) (@owned Builtin.NativeObject) -> ()
   %use_int32_func = function_ref @use_int32 : $@convention(thin) (Builtin.Int32) -> ()
@@ -50,7 +50,7 @@
 // CHECK: store [[ARG2]] to [[ARG1]] : $*Builtin.NativeObject
 // CHECK: strong_release [[OLDVAL]]
 // CHECK: store [[ARG4]] to [[ARG3]] : $*Builtin.Int32
-sil @store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject, @in Builtin.Int32, Builtin.Int32) -> () {
+sil [ossa] @store : $@convention(thin) (@in Builtin.NativeObject, Builtin.NativeObject, @in Builtin.Int32, Builtin.Int32) -> () {
 bb0(%0 : $*Builtin.NativeObject, %1 : @unowned $Builtin.NativeObject, %2 : $*Builtin.Int32, %3 : $Builtin.Int32):
   %4 = copy_value %1 : $Builtin.NativeObject
   %5 = copy_value %1 : $Builtin.NativeObject
@@ -66,7 +66,7 @@
 // CHECK: [[BORROWED_VALUE:%[0-9]+]] = load [[ARG]] : $*Builtin.NativeObject
 // CHECK: unchecked_ref_cast [[BORROWED_VALUE]]
 // CHECK-NOT: end_borrow
-sil @borrow : $@convention(thin) (@in Builtin.NativeObject) -> () {
+sil [ossa] @borrow : $@convention(thin) (@in Builtin.NativeObject) -> () {
 bb0(%0 : $*Builtin.NativeObject):
   %1 = load_borrow %0 : $*Builtin.NativeObject
   %2 = unchecked_ref_cast %1 : $Builtin.NativeObject to $Builtin.NativeObject
@@ -82,7 +82,7 @@
 // CHECK: strong_retain [[ARG1]]
 // CHECK: strong_release [[ARG1]]
 // CHECK: return [[ARG1]]
-sil @copy_value_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [ossa] @copy_value_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = function_ref @opaque_function : $@convention(thin) () -> ()
   %2 = copy_value %0 : $Builtin.NativeObject
@@ -100,7 +100,7 @@
 // CHECK-NEXT: tuple ()
 // CHECK-NEXT: return
 // CHECK: } // end sil function 'begin_borrow_store_borrow'
-sil @begin_borrow_store_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @begin_borrow_store_borrow : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   %1 = begin_borrow %0 : $Builtin.NativeObject
   end_borrow %1 : $Builtin.NativeObject
@@ -123,7 +123,7 @@
 // CHECK-NEXT: unowned_release [[ARG]] : $@sil_unowned Builtin.NativeObject
 // CHECK-NEXT: tuple ()
 // CHECK-NEXT: return
-sil @copy_unowned_value_test : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> () {
+sil [ossa] @copy_unowned_value_test : $@convention(thin) (@owned @sil_unowned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $@sil_unowned Builtin.NativeObject):
   %1 = copy_unowned_value %0 : $@sil_unowned Builtin.NativeObject
   destroy_value %1 : $Builtin.NativeObject
@@ -139,7 +139,7 @@
 // CHECK: strong_release [[ARG1]] : $Builtin.NativeObject
 // CHECK: strong_release [[ARG1]] : $Builtin.NativeObject
 // CHECK: } // end sil function 'unmanaged_retain_release_test'
-sil @unmanaged_retain_release_test : $@convention(thin) (@owned Builtin.NativeObject, @owned C) -> () {
+sil [ossa] @unmanaged_retain_release_test : $@convention(thin) (@owned Builtin.NativeObject, @owned C) -> () {
 bb0(%0 : @owned $Builtin.NativeObject, %1 : @owned $C):
   unmanaged_retain_value %0 : $Builtin.NativeObject
   unmanaged_autorelease_value %1 : $C
@@ -164,7 +164,7 @@
 // CHECK: [[FAILBB]]:
 // CHECK-NEXT:   strong_release [[ARG]]
 // CHECK-NEXT:   br bb3
-sil @checked_cast_br_lowered : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @checked_cast_br_lowered : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   checked_cast_br %0 : $Builtin.NativeObject to $C, bb1, bb2
 
@@ -183,7 +183,7 @@
 
 // CHECK-LABEL: sil @end_lifetime_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 // CHECK-NOT: end_lifetime {{%.*}} : $Builtin.NativeObject
-sil @end_lifetime_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @end_lifetime_test : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject):
   end_lifetime %0 : $Builtin.NativeObject
   %9999 = tuple()
@@ -193,7 +193,7 @@
 // CHECK-LABEL: sil @unchecked_ownership_conversion_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
 // CHECK: bb0([[ARG:%.*]] : $Builtin.NativeObject):
 // CHECK: return [[ARG]] : $Builtin.NativeObject
-sil @unchecked_ownership_conversion_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [ossa] @unchecked_ownership_conversion_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = unchecked_ownership_conversion %0 : $Builtin.NativeObject, @guaranteed to @owned
   return %1 : $Builtin.NativeObject
@@ -214,7 +214,7 @@
 // CHECK: [[EPILOG_BB]]:
 // CHECK:   return
 // CHECK: } // end sil function 'switch_enum_default_case'
-sil @switch_enum_default_case : $@convention(thin) (@owned Either<Builtin.NativeObject, Builtin.UnknownObject>) -> () {
+sil [ossa] @switch_enum_default_case : $@convention(thin) (@owned Either<Builtin.NativeObject, Builtin.UnknownObject>) -> () {
 bb0(%0 : @owned $Either<Builtin.NativeObject, Builtin.UnknownObject>):
   switch_enum %0 : $Either<Builtin.NativeObject, Builtin.UnknownObject>, case #Either.left!enumelt.1: bb1, default bb2
 
@@ -256,7 +256,7 @@
 // CHECK:   [[RESULT:%.*]] = tuple ([[TUP_ELT_0]] : {{.*}}, [[TUP_ELT_1]] : {{.*}}, [[STRUCT_FIELD_0]] : {{.*}}, [[STRUCT_FIELD_1]] : {{.*}}, [[STRUCT_FIELD_2]] : {{.*}})
 // CHECK:   return [[RESULT]]
 // CHECK: } // end sil function 'test_destructure_struct_tuple'
-sil @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned TestArray2) -> @owned (Builtin.NativeObject, Builtin.Int32, TestArrayStorage, Builtin.Int32, TestArrayStorage) {
+sil [ossa] @test_destructure_struct_tuple : $@convention(thin) (@owned (Builtin.NativeObject, Builtin.Int32), @owned TestArray2) -> @owned (Builtin.NativeObject, Builtin.Int32, TestArrayStorage, Builtin.Int32, TestArrayStorage) {
 bb0(%0 : @owned $(Builtin.NativeObject, Builtin.Int32), %1 : @owned $TestArray2):
   (%2, %3) = destructure_tuple %0 : $(Builtin.NativeObject, Builtin.Int32)
   (%4, %5, %6) = destructure_struct %1 : $TestArray2
@@ -273,7 +273,7 @@
 // CHECK-NOT: destructure_struct
 // CHECK-NOT: destructure_tuple
 // CHECK: } // end sil function 'test_empty_destructure'
-sil @test_empty_destructure : $@convention(thin) () -> () {
+sil [ossa] @test_empty_destructure : $@convention(thin) () -> () {
 bb0:
   %0 = struct $EmptyStruct()
   () = destructure_struct %0 : $EmptyStruct
diff --git a/test/SILOptimizer/pa_removal.sil b/test/SILOptimizer/pa_removal.sil
index fbb5fc2..29ad787 100644
--- a/test/SILOptimizer/pa_removal.sil
+++ b/test/SILOptimizer/pa_removal.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/partial_specialization.sil b/test/SILOptimizer/partial_specialization.sil
index a99b25e..994d206 100644
--- a/test/SILOptimizer/partial_specialization.sil
+++ b/test/SILOptimizer/partial_specialization.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer -sil-partial-specialization -sil-partial-specialization-with-generic-substitutions  %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -generic-specializer -sil-partial-specialization -sil-partial-specialization-with-generic-substitutions  %s | %FileCheck %s
 
 // Test different cases of partial specialization.
 // In particular, test the correctness of partial specializaitons where substitutions may be generic.
diff --git a/test/SILOptimizer/partial_specialization_debug.sil b/test/SILOptimizer/partial_specialization_debug.sil
index 2fd5eb4..8696888 100644
--- a/test/SILOptimizer/partial_specialization_debug.sil
+++ b/test/SILOptimizer/partial_specialization_debug.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer -sil-partial-specialization=0 -sil-partial-specialization-with-generic-substitutions -debug-only=generic-specializer %s -o /dev/null 2>&1 | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -generic-specializer -sil-partial-specialization=0 -sil-partial-specialization-with-generic-substitutions -debug-only=generic-specializer %s -o /dev/null 2>&1 | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/peephole_thick_to_objc_metatype.sil b/test/SILOptimizer/peephole_thick_to_objc_metatype.sil
index 4793af2..136c56c 100644
--- a/test/SILOptimizer/peephole_thick_to_objc_metatype.sil
+++ b/test/SILOptimizer/peephole_thick_to_objc_metatype.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/peephole_trunc_and_ext.sil b/test/SILOptimizer/peephole_trunc_and_ext.sil
index eab8a64..c13cf6c 100644
--- a/test/SILOptimizer/peephole_trunc_and_ext.sil
+++ b/test/SILOptimizer/peephole_trunc_and_ext.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend %s -assume-parsing-unqualified-ownership-sil -emit-sil -O -o - -sil-verify-all | %FileCheck %s
+// RUN: %target-swift-frontend %s -emit-sil -O -o - -sil-verify-all | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/performance_inliner.sil b/test/SILOptimizer/performance_inliner.sil
index 2d96518..558734b 100644
--- a/test/SILOptimizer/performance_inliner.sil
+++ b/test/SILOptimizer/performance_inliner.sil
@@ -1,5 +1,5 @@
 
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -inline -sil-combine | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/polymorphic_inline_caches.sil b/test/SILOptimizer/polymorphic_inline_caches.sil
index f981562..16efb83 100644
--- a/test/SILOptimizer/polymorphic_inline_caches.sil
+++ b/test/SILOptimizer/polymorphic_inline_caches.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -specdevirt -code-sinking  -dce -early-codemotion -disable-sil-cm-rr-cm=0  -retain-sinking | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -specdevirt -code-sinking  -dce -early-codemotion -disable-sil-cm-rr-cm=0  -retain-sinking | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/postdomtree_verification_crash.sil b/test/SILOptimizer/postdomtree_verification_crash.sil
index c5c3683..56afe09 100644
--- a/test/SILOptimizer/postdomtree_verification_crash.sil
+++ b/test/SILOptimizer/postdomtree_verification_crash.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all  -sil-verify-without-invalidation %s -compute-dominance-info
+// RUN: %target-sil-opt -enable-sil-verify-all  -sil-verify-without-invalidation %s -compute-dominance-info
 
 // Check if post-dominator verification does not crash on multiple roots.
 
diff --git a/test/SILOptimizer/pound_assert.sil b/test/SILOptimizer/pound_assert.sil
index a91cea7..930cea4 100644
--- a/test/SILOptimizer/pound_assert.sil
+++ b/test/SILOptimizer/pound_assert.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-experimental-static-assert -assume-parsing-unqualified-ownership-sil %s -dataflow-diagnostics -verify
+// RUN: %target-sil-opt -enable-experimental-static-assert %s -dataflow-diagnostics -verify
 
 sil_stage canonical
 
@@ -29,3 +29,77 @@
   %5 = builtin "poundAssert"(%3 : $Builtin.Int1, %4 : $Builtin.RawPointer) : $()
   return undef : $()
 }
+
+// Tests that piecewise initialization of memory works, by piecewise
+// initializing a tuple.
+sil @piecewiseInit : $@convention(thin) () -> Bool {
+bb0:
+  // Allocate and initialize the tuple to (1, 2).
+  %0 = alloc_stack $(Int64, Int64), var, name "tup"
+  %1 = tuple_element_addr %0 : $*(Int64, Int64), 0
+  %2 = tuple_element_addr %0 : $*(Int64, Int64), 1
+  %3 = integer_literal $Builtin.Int64, 1
+  %4 = struct $Int64 (%3 : $Builtin.Int64)
+  store %4 to %1 : $*Int64
+  %6 = integer_literal $Builtin.Int64, 2
+  %7 = struct $Int64 (%6 : $Builtin.Int64)
+  store %7 to %2 : $*Int64
+
+  // Read the first element from the tuple.
+  %9 = begin_access [read] [static] %0 : $*(Int64, Int64)
+  %10 = tuple_element_addr %9 : $*(Int64, Int64), 0
+  %11 = load %10 : $*Int64
+  end_access %9 : $*(Int64, Int64)
+
+  // Check that the first element is what we put in.
+  %13 = struct_extract %11 : $Int64, #Int64._value
+  %14 = builtin "cmp_eq_Int64"(%3 : $Builtin.Int64, %13 : $Builtin.Int64) : $Builtin.Int1
+  %15 = struct $Bool (%14 : $Builtin.Int1)
+
+  // Deallocate and return.
+  dealloc_stack %0 : $*(Int64, Int64)
+  return %15 : $Bool
+}
+
+// Tests copy_addr interpretation.
+sil @copyAddr : $@convention(thin) () -> Bool {
+  // Allocate an initialize an Int64 to 1.
+  %0 = alloc_stack $Int64
+  %1 = integer_literal $Builtin.Int64, 1
+  %2 = struct $Int64 (%1 : $Builtin.Int64)
+  store %2 to %0 : $*Int64
+
+  // Allocate another Int64 and copy to it.
+  %4 = alloc_stack $Int64
+  copy_addr %0 to %4 : $*Int64
+
+  // Check that the value is what we put in the original Int64.
+  %5 = begin_access [read] [static] %4 : $*Int64
+  %6 = load %5 : $*Int64
+  end_access %5 : $*Int64
+  %8 = struct_extract %6 : $Int64, #Int64._value
+  %9 = builtin "cmp_eq_Int64"(%1 : $Builtin.Int64, %8 : $Builtin.Int64) : $Builtin.Int1
+  %10 = struct $Bool (%9 : $Builtin.Int1)
+
+  // Deallocate and return.
+  dealloc_stack %4 : $*Int64
+  dealloc_stack %0 : $*Int64
+  return %10 : $Bool
+}
+
+sil @invokeTests : $@convention(thin) () -> () {
+  %0 = function_ref @piecewiseInit : $@convention(thin) () -> Bool
+  %1 = apply %0() : $@convention(thin) () -> Bool
+  %2 = struct_extract %1 : $Bool, #Bool._value
+  %3 = string_literal utf8 ""
+  %4 = builtin "poundAssert"(%2 : $Builtin.Int1, %3 : $Builtin.RawPointer) : $()
+
+  %5 = function_ref @copyAddr : $@convention(thin) () -> Bool
+  %6 = apply %5() : $@convention(thin) () -> Bool
+  %7 = struct_extract %6 : $Bool, #Bool._value
+  %8 = string_literal utf8 ""
+  %9 = builtin "poundAssert"(%7 : $Builtin.Int1, %8 : $Builtin.RawPointer) : $()
+
+  %ret = tuple ()
+  return %ret : $()
+}
diff --git a/test/SILOptimizer/pound_assert.swift b/test/SILOptimizer/pound_assert.swift
index d959385..297aa1f 100644
--- a/test/SILOptimizer/pound_assert.swift
+++ b/test/SILOptimizer/pound_assert.swift
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -enable-experimental-static-assert -emit-sil %s -verify -Xllvm -debug -Xllvm -debug-only -Xllvm ConstExpr
+// RUN: %target-swift-frontend -enable-experimental-static-assert -emit-sil %s -verify
 
 // REQUIRES: asserts
 
@@ -25,8 +25,23 @@
   #assert(isOne(Int(readLine()!)!), "input is not 1") // expected-error{{#assert condition not constant}}
 }
 
-// We don't support mutation, so the only loop we can make is infinite.
-// TODO: As soon as we support mutation, add tests with finite loops.
+func loops1(a: Int) -> Int {
+  var x = 42
+  while x <= 42 {
+    x += a
+  } // expected-note {{control flow loop found}}
+  return x
+}
+
+func loops2(a: Int) -> Int {
+  var x = 42
+  // expected-note @+1 {{could not fold operation}}
+  for i in 0 ... a {
+    x += i
+  }
+  return x
+}
+
 func infiniteLoop() -> Int {
   // expected-note @+2 {{condition always evaluates to true}}
   // expected-note @+1 {{control flow loop found}}
@@ -35,7 +50,15 @@
   return 1
 }
 
-func test_infiniteLoop() {
+func test_loops() {
+  // expected-error @+2 {{#assert condition not constant}}
+  // expected-note @+1 {{when called from here}}
+  #assert(loops1(a: 20000) > 42)
+
+  // expected-error @+2 {{#assert condition not constant}}
+  // expected-note @+1 {{when called from here}}
+  #assert(loops2(a: 20000) > 42)
+
   // expected-error @+2 {{#assert condition not constant}}
   // expected-note @+1 {{when called from here}}
   #assert(infiniteLoop() == 1)
@@ -82,12 +105,12 @@
   var topLevelVar = 1 // expected-warning {{never mutated}}
   #assert(topLevelVar == 1)
 
+  // expected-note @+1 {{could not fold operation}}
   var topLevelVarConditionallyMutated = 1
   if topLevelVarConditionallyMutated < 0 {
     topLevelVarConditionallyMutated += 1
   }
-  // expected-error @+2 {{#assert condition not constant}}
-  // expected-note @+1 {{could not fold operation}}
+  // expected-error @+1 {{#assert condition not constant}}
   #assert(topLevelVarConditionallyMutated == 1)
 
   // expected-error @+1 {{#assert condition not constant}}
@@ -156,3 +179,47 @@
   #assert(cs.x.1 == 2)
   #assert(cs.y == 3)
 }
+
+//===----------------------------------------------------------------------===//
+// Mutation
+//===----------------------------------------------------------------------===//
+
+struct InnerStruct {
+  var a, b: Int
+}
+
+struct MutableStruct {
+  var x: InnerStruct
+  var y: Int
+}
+
+func addOne(to target: inout Int) {
+  target += 1
+}
+
+func callInout() -> Bool {
+  var myMs = MutableStruct(x: InnerStruct(a: 1, b: 2), y: 3)
+  addOne(to: &myMs.x.a)
+  addOne(to: &myMs.y)
+  return (myMs.x.a + myMs.x.b + myMs.y) == 8
+}
+
+func replaceAggregate() -> Bool {
+  var myMs = MutableStruct(x: InnerStruct(a: 1, b: 2), y: 3)
+  myMs.x = InnerStruct(a: 10, b: 20)
+  return myMs.x.a == 10 && myMs.x.b == 20 && myMs.y == 3
+}
+
+func shouldNotAlias() -> Bool {
+  var x = 1
+  var y = x
+  x += 1
+  y += 2
+  return x == 2 && y == 3
+}
+
+func invokeMutationTests() {
+  #assert(callInout())
+  #assert(replaceAggregate())
+  #assert(shouldNotAlias())
+}
diff --git a/test/SILOptimizer/predictable_memopt.sil b/test/SILOptimizer/predictable_memopt.sil
index 4bf5838..8610488 100644
--- a/test/SILOptimizer/predictable_memopt.sil
+++ b/test/SILOptimizer/predictable_memopt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -predictable-memopt  | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -predictable-memopt  | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/prespecialization_with_definition.sil b/test/SILOptimizer/prespecialization_with_definition.sil
index 5ef4ca1..d178e62 100644
--- a/test/SILOptimizer/prespecialization_with_definition.sil
+++ b/test/SILOptimizer/prespecialization_with_definition.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -emit-ir %s -module-name main -assume-parsing-unqualified-ownership-sil | %FileCheck %s
+// RUN: %target-swift-frontend -emit-ir %s -module-name main | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/pure_apply.swift b/test/SILOptimizer/pure_apply.swift
index f93df4d..61adbb9 100644
--- a/test/SILOptimizer/pure_apply.swift
+++ b/test/SILOptimizer/pure_apply.swift
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/raw_sil_inst_lowering.sil b/test/SILOptimizer/raw_sil_inst_lowering.sil
index 3181229..5557a5b 100644
--- a/test/SILOptimizer/raw_sil_inst_lowering.sil
+++ b/test/SILOptimizer/raw_sil_inst_lowering.sil
@@ -7,22 +7,22 @@
 
 class SomeClass {}
 
-// CHECK-LABEL: sil @non_box_assign_trivial
+// CHECK-LABEL: sil [ossa] @non_box_assign_trivial
 // CHECK-NOT: load
 // CHECK: store
 // CHECK: return
-sil @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
+sil [ossa] @non_box_assign_trivial : $@convention(thin) (@inout Bool, Bool) -> () {
 bb0(%0 : $*Bool, %1 : $Bool):
   assign %1 to %0 : $*Bool
   %9 = tuple ()
   return %9 : $()
 }
 
-// CHECK-LABEL: sil @non_box_assign
+// CHECK-LABEL: sil [ossa] @non_box_assign
 // CHECK: load
 // CHECK: store
 // CHECK: return
-sil @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
+sil [ossa] @non_box_assign : $@convention(thin) (@inout SomeClass, @owned SomeClass) -> () {
 bb0(%0 : $*SomeClass, %1 : @owned $SomeClass):
   assign %1 to %0 : $*SomeClass
   %9 = tuple ()
diff --git a/test/SILOptimizer/rcidentity.sil b/test/SILOptimizer/rcidentity.sil
index ebea583..d418b59 100644
--- a/test/SILOptimizer/rcidentity.sil
+++ b/test/SILOptimizer/rcidentity.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -rc-id-dumper %s -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt -rc-id-dumper %s -o /dev/null | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/recursive_func.sil b/test/SILOptimizer/recursive_func.sil
index 9b65ce2..b6c1e38 100644
--- a/test/SILOptimizer/recursive_func.sil
+++ b/test/SILOptimizer/recursive_func.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O %s  -emit-sil | %FileCheck %s
+// RUN: %target-swift-frontend -O %s  -emit-sil | %FileCheck %s
 
 // rdar://16761933
 // Make sure we can handle recursive function within a class.
diff --git a/test/SILOptimizer/recursive_single.sil b/test/SILOptimizer/recursive_single.sil
index 13247b3..35e7144 100644
--- a/test/SILOptimizer/recursive_single.sil
+++ b/test/SILOptimizer/recursive_single.sil
@@ -1,4 +1,4 @@
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -O %s -emit-sil | %FileCheck %s
+// RUN: %target-swift-frontend -O %s -emit-sil | %FileCheck %s
 
 // rdar://16761933
 // Make sure we can handle recursive function within a class that
diff --git a/test/SILOptimizer/redundant_load_and_dead_store_elim.sil b/test/SILOptimizer/redundant_load_and_dead_store_elim.sil
index b03d8a4..0cfa828 100644
--- a/test/SILOptimizer/redundant_load_and_dead_store_elim.sil
+++ b/test/SILOptimizer/redundant_load_and_dead_store_elim.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -redundant-load-elim -dead-store-elim | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -redundant-load-elim -dead-store-elim | %FileCheck %s
 
 // NOTE, the order redundant-load and dead-store are ran is important. we have a pass dependence for some
 // of the tests to work.
diff --git a/test/SILOptimizer/redundant_load_elim.sil b/test/SILOptimizer/redundant_load_elim.sil
index 4db0165..8c5cef5 100644
--- a/test/SILOptimizer/redundant_load_elim.sil
+++ b/test/SILOptimizer/redundant_load_elim.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -redundant-load-elim | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -redundant-load-elim | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/redundant_load_elim_with_casts.sil b/test/SILOptimizer/redundant_load_elim_with_casts.sil
index 25daf4f..ab56fd6 100644
--- a/test/SILOptimizer/redundant_load_elim_with_casts.sil
+++ b/test/SILOptimizer/redundant_load_elim_with_casts.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -module-name Swift -redundant-load-elim | %FileCheck -check-prefix=CHECK-FUTURE %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -module-name Swift -redundant-load-elim | %FileCheck -check-prefix=CHECK-FUTURE %s
 //
 // FIXME: Contains tests which are handled by old RLE, but not current one. Mostly due to casting. Eventually we probably should
 // handle these cases if they turn out to be important.
diff --git a/test/SILOptimizer/ref_elt_addr.sil b/test/SILOptimizer/ref_elt_addr.sil
index e5451cd..ec731ab 100644
--- a/test/SILOptimizer/ref_elt_addr.sil
+++ b/test/SILOptimizer/ref_elt_addr.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -cse | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/remove_unused_func.sil b/test/SILOptimizer/remove_unused_func.sil
index c435bdd..e3f5507 100644
--- a/test/SILOptimizer/remove_unused_func.sil
+++ b/test/SILOptimizer/remove_unused_func.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-deadfuncelim | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-deadfuncelim | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/retain_release_code_motion.sil b/test/SILOptimizer/retain_release_code_motion.sil
index 0cc3bf3..a466de5 100644
--- a/test/SILOptimizer/retain_release_code_motion.sil
+++ b/test/SILOptimizer/retain_release_code_motion.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -retain-sinking -late-release-hoisting %s | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -release-hoisting %s | %FileCheck --check-prefix=CHECK-RELEASE-HOISTING %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -retain-sinking -retain-sinking -late-release-hoisting %s | %FileCheck --check-prefix=CHECK-MULTIPLE-RS-ROUNDS %s
+// RUN: %target-sil-opt -enable-sil-verify-all -retain-sinking -late-release-hoisting %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -release-hoisting %s | %FileCheck --check-prefix=CHECK-RELEASE-HOISTING %s
+// RUN: %target-sil-opt -enable-sil-verify-all -retain-sinking -retain-sinking -late-release-hoisting %s | %FileCheck --check-prefix=CHECK-MULTIPLE-RS-ROUNDS %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/select_enum_addr_reads_memory.sil b/test/SILOptimizer/select_enum_addr_reads_memory.sil
index 9691217..339e6c1 100644
--- a/test/SILOptimizer/select_enum_addr_reads_memory.sil
+++ b/test/SILOptimizer/select_enum_addr_reads_memory.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -loop-rotate %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -loop-rotate %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/semantic-arc-opts.sil b/test/SILOptimizer/semantic-arc-opts.sil
index a16f788..ea0b835 100644
--- a/test/SILOptimizer/semantic-arc-opts.sil
+++ b/test/SILOptimizer/semantic-arc-opts.sil
@@ -20,10 +20,10 @@
 // Tests //
 ///////////
 
-// CHECK-LABEL: sil @argument_only_destroy_user_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @argument_only_destroy_user_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK-NOT: copy_value
 // CHECK-NOT: destroy_value
-sil @argument_only_destroy_user_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @argument_only_destroy_user_test : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   destroy_value %1 : $Builtin.NativeObject
@@ -31,7 +31,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @argument_diamond_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
+// CHECK-LABEL: sil [ossa] @argument_diamond_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Builtin.NativeObject):
 // CHECK-NEXT: [[RESULT:%.*]] = copy_value [[ARG]]
 // CHECK-NEXT: cond_br undef, [[LHSBB:bb[0-9]+]], [[RHSBB:bb[0-9]+]]
@@ -44,7 +44,7 @@
 //
 // CHECK: [[EPILOGBB]]:
 // CHECK-NEXT: return [[RESULT]]
-sil @argument_diamond_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
+sil [ossa] @argument_diamond_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> @owned Builtin.NativeObject {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %2 = copy_value %1 : $Builtin.NativeObject
@@ -62,7 +62,7 @@
   return %2 : $Builtin.NativeObject
 }
 
-// CHECK-LABEL: sil @argument_copy_borrow_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @argument_copy_borrow_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $Builtin.NativeObject
 // CHECK-NOT: copy_value
 // CHECK-NOT: begin_borrow
@@ -70,7 +70,7 @@
 // CHECK-NOT: end_borrow
 // CHECK-NOT: destroy_value
 // CHECK: } // end sil function 'argument_copy_borrow_test_case'
-sil @argument_copy_borrow_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @argument_copy_borrow_test_case : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %2 = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -82,12 +82,12 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @argument_copy_of_copy : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @argument_copy_of_copy : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: bb0
 // CHECK-NEXT: tuple
 // CHECK-NEXT: return
 // CHECK-NEXT: } // end sil function 'argument_copy_of_copy'
-sil @argument_copy_of_copy : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @argument_copy_of_copy : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %2 = begin_borrow %1 : $Builtin.NativeObject
@@ -101,7 +101,7 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @copy_struct_extract_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+// CHECK-LABEL: sil [ossa] @copy_struct_extract_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $NativeObjectPair):
 // CHECK-NOT: copy_value
 // CHECK-NOT: begin_borrow
@@ -110,7 +110,7 @@
 // CHECK-NEXT: tuple
 // CHECK-NEXT: return
 // CHECK: } // end sil function 'copy_struct_extract_guaranteed_use'
-sil @copy_struct_extract_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+sil [ossa] @copy_struct_extract_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 bb0(%0 : @guaranteed $NativeObjectPair):
   %1 = copy_value %0 : $NativeObjectPair
   %2 = begin_borrow %1 : $NativeObjectPair
@@ -123,13 +123,13 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @struct_extract_copy_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+// CHECK-LABEL: sil [ossa] @struct_extract_copy_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 // CHECK: bb0([[ARG:%.*]] : @guaranteed $NativeObjectPair):
 // CHECK:   [[FIELD:%.*]] = struct_extract [[ARG]]
 // CHECK:   apply {{%.*}}([[FIELD]])
 // CHECK-NOT: destroy_value
 // CHECK: } // end sil function 'struct_extract_copy_guaranteed_use'
-sil @struct_extract_copy_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+sil [ossa] @struct_extract_copy_guaranteed_use : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 bb0(%0 : @guaranteed $NativeObjectPair):
   %1 = struct_extract %0 : $NativeObjectPair, #NativeObjectPair.obj1
   %2 = copy_value %1 : $Builtin.NativeObject
@@ -144,10 +144,10 @@
 
 // For now we do not support recreating forwarding instructions since we do not
 // dynamically recompute ownership.
-// CHECK-LABEL: sil @do_not_process_forwarding_uses : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+// CHECK-LABEL: sil [ossa] @do_not_process_forwarding_uses : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 // CHECK: copy_value
 // CHECK: } // end sil function 'do_not_process_forwarding_uses'
-sil @do_not_process_forwarding_uses : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
+sil [ossa] @do_not_process_forwarding_uses : $@convention(thin) (@guaranteed NativeObjectPair) -> () {
 bb0(%0 : @guaranteed $NativeObjectPair):
   %1 = copy_value %0 : $NativeObjectPair
   (%2, %3) = destructure_struct %1 : $NativeObjectPair
@@ -160,10 +160,10 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @do_not_process_forwarding_uses_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @do_not_process_forwarding_uses_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 // CHECK: copy_value
 // CHECK: } // end sil function 'do_not_process_forwarding_uses_2'
-sil @do_not_process_forwarding_uses_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
+sil [ossa] @do_not_process_forwarding_uses_2 : $@convention(thin) (@guaranteed Builtin.NativeObject) -> () {
 bb0(%0 : @guaranteed $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %2 = unchecked_ref_cast %1 : $Builtin.NativeObject to $Builtin.NativeObject
@@ -177,10 +177,10 @@
 // Do not eliminate a copy from an unowned value. This will cause us to pass the
 // unowned value as guaranteed... =><=.
 //
-// CHECK-LABEL: sil @unowned_arg_copy : $@convention(thin) (Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @unowned_arg_copy : $@convention(thin) (Builtin.NativeObject) -> () {
 // CHECK: copy_value
 // CHECK: } // end sil function 'unowned_arg_copy'
-sil @unowned_arg_copy : $@convention(thin) (Builtin.NativeObject) -> () {
+sil [ossa] @unowned_arg_copy : $@convention(thin) (Builtin.NativeObject) -> () {
 bb0(%0 : @unowned $Builtin.NativeObject):
   %1 = copy_value %0 : $Builtin.NativeObject
   %2 = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
@@ -190,13 +190,13 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @dead_live_range_multiple_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @dead_live_range_multiple_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 // CHECK-NOT: copy_value
 // CHECK-NOT: destroy_value
 // CHECK: bb3:
 // CHECK:     destroy_value
 // CHECK: } // end sil function 'dead_live_range_multiple_destroy_value'
-sil @dead_live_range_multiple_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @dead_live_range_multiple_destroy_value : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject) :
   %1 = copy_value %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb2
@@ -215,12 +215,12 @@
   return %9999 : $()
 }
 
-// CHECK-LABEL: sil @dead_live_range_multiple_destroy_value_consuming_user : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+// CHECK-LABEL: sil [ossa] @dead_live_range_multiple_destroy_value_consuming_user : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 // CHECK: copy_value
 // CHECK: destroy_value
 // CHECK: destroy_value
 // CHECK: } // end sil function 'dead_live_range_multiple_destroy_value_consuming_user'
-sil @dead_live_range_multiple_destroy_value_consuming_user : $@convention(thin) (@owned Builtin.NativeObject) -> () {
+sil [ossa] @dead_live_range_multiple_destroy_value_consuming_user : $@convention(thin) (@owned Builtin.NativeObject) -> () {
 bb0(%0 : @owned $Builtin.NativeObject) :
   %1 = copy_value %0 : $Builtin.NativeObject
   cond_br undef, bb1, bb2
@@ -239,3 +239,40 @@
   %9999 = tuple()
   return %9999 : $()
 }
+
+// Simple in_guaranteed argument load_copy.
+// CHECK-LABEL: sil [ossa] @load_copy_from_in_guaranteed : $@convention(thin) (@in_guaranteed Builtin.NativeObject) -> () {
+// CHECK: bb0([[ARG:%.*]] :
+// CHECK: load_borrow
+// CHECK: load_borrow
+// CHECK: load [copy]
+// CHECK: } // end sil function 'load_copy_from_in_guaranteed'
+sil [ossa] @load_copy_from_in_guaranteed : $@convention(thin) (@in_guaranteed Builtin.NativeObject) -> () {
+bb0(%0 : $*Builtin.NativeObject):
+  %g = function_ref @guaranteed_user : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
+  // Simple same bb.
+  %1 = load [copy] %0 : $*Builtin.NativeObject
+  apply %g(%1) : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
+  destroy_value %1 : $Builtin.NativeObject
+
+  // Diamond.
+  %2 = load [copy] %0 : $*Builtin.NativeObject
+  cond_br undef, bb1, bb2
+
+bb1:
+  apply %g(%2) : $@convention(thin) (@guaranteed Builtin.NativeObject) -> ()
+  destroy_value %2 : $Builtin.NativeObject
+  br bb3
+
+bb2:
+  destroy_value %2 : $Builtin.NativeObject
+  br bb3
+
+bb3:
+  // Consuming use blocks.
+  %3 = load [copy] %0 : $*Builtin.NativeObject
+  %4 = function_ref @owned_user : $@convention(thin) (@owned Builtin.NativeObject) -> ()
+  apply %4(%3) : $@convention(thin) (@owned Builtin.NativeObject) -> ()
+  %9999 = tuple()
+  return %9999 : $()
+}
diff --git a/test/SILOptimizer/side-effect.sil b/test/SILOptimizer/side-effect.sil
index 3175fbc..b08e861 100644
--- a/test/SILOptimizer/side-effect.sil
+++ b/test/SILOptimizer/side-effect.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -module-name Swift -side-effects-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -module-name Swift -side-effects-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/sil_combine.sil b/test/SILOptimizer/sil_combine.sil
index 39c3ed1..7869ea5 100644
--- a/test/SILOptimizer/sil_combine.sil
+++ b/test/SILOptimizer/sil_combine.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
@@ -614,6 +614,30 @@
   return %2 : $Builtin.RawPointer
 }
 
+sil @test_closure : $@convention(thin) (@guaranteed C) -> ()
+
+// CHECK-LABEL: sil @dead_closure_elimination
+// CHECK:      bb0(%0 : $C):
+// CHECK-NEXT:   cond_br
+// CHECK-NOT:  strong_release
+// CHECK:      bb2:
+// CHECK-NEXT:   strong_release %0
+// CHECK         return
+sil @dead_closure_elimination : $@convention(thin) (@owned C) -> () {
+bb0(%0 : $C):
+  %1 = function_ref @test_closure : $@convention(thin) (@guaranteed C) -> ()
+  %2 = partial_apply [callee_guaranteed] %1(%0) : $@convention(thin) (@guaranteed C) -> ()
+  cond_br undef, bb1, bb2
+bb1:
+  strong_retain %2 : $@callee_guaranteed () -> ()
+  strong_release %2 : $@callee_guaranteed () -> ()
+  br bb2
+bb2:
+  release_value %2 : $@callee_guaranteed () -> ()
+  %5 = tuple()
+  return %5 : $()
+}
+
 ////////////////////////////////////////////
 // Load Proj To GEP Load Canonicalization //
 ////////////////////////////////////////////
@@ -3551,3 +3575,42 @@
   return %4 : $Builtin.Int64
 }
 
+// <rdar://46746188> crash in swift_getObjCClassFromObject
+// class TestDocument: NSPersistentDocument {
+//   override init() {
+//     super.init()
+//   }
+//   convenience init(type: String) throws {
+//     self.init()
+//   }
+// }
+// After inlining the __allocating_init, we have two uses of the value_metatype.
+// The second use goes through a thick_to_objc_metatype. When SILCombine replaces 
+// thick_to_objc_metatype with value_metatype, it cannot extend the liverange
+// of value_metatype's operand.
+@objc class TestObjCInit {
+  init()
+
+  convenience init(type: String) throws
+}
+// CHECK-LABEL: sil hidden [thunk] @objc_init_partial_dealloc : $@convention(objc_method) (@owned TestObjCInit) -> Optional<TestObjCInit> {
+// CHECK: bb0(%0 : $TestObjCInit):
+// CHECK:   [[VMT2:%.*]] = value_metatype $@objc_metatype TestObjCInit.Type, %0 : $TestObjCInit
+// CHECK:   [[VMT:%.*]] = value_metatype $@thick TestObjCInit.Type, %0 : $TestObjCInit
+// CHECK:   dealloc_partial_ref %0 : $TestObjCInit, [[VMT]] : $@thick TestObjCInit.Type
+// CHECK-NOT: value_metatype
+// CHECK:   [[O:%.*]] = alloc_ref_dynamic [objc] [[VMT2]] : $@objc_metatype TestObjCInit.Type, $TestObjCInit
+// CHECK:   [[M:%.*]] = objc_method [[O]] : $TestObjCInit, #TestObjCInit.init!initializer.1.foreign : (TestObjCInit.Type) -> () -> TestObjCInit, $@convention(objc_method) (@owned TestObjCInit) -> @owned TestObjCInit
+// CHECK:   apply [[M]]([[O]]) : $@convention(objc_method) (@owned TestObjCInit) -> @owned TestObjCInit
+// CHECK-LABEL: } // end sil function 'objc_init_partial_dealloc'
+sil hidden [thunk] @objc_init_partial_dealloc : $@convention(objc_method) (@owned TestObjCInit) -> Optional<TestObjCInit> {
+bb0(%2 : $TestObjCInit):
+  %8 = value_metatype $@thick TestObjCInit.Type, %2 : $TestObjCInit
+  dealloc_partial_ref %2 : $TestObjCInit, %8 : $@thick TestObjCInit.Type
+  %11 = thick_to_objc_metatype %8 : $@thick TestObjCInit.Type to $@objc_metatype TestObjCInit.Type
+  %12 = alloc_ref_dynamic [objc] %11 : $@objc_metatype TestObjCInit.Type, $TestObjCInit
+  %13 = objc_method %12 : $TestObjCInit, #TestObjCInit.init!initializer.1.foreign : (TestObjCInit.Type) -> () -> TestObjCInit, $@convention(objc_method) (@owned TestObjCInit) -> @owned TestObjCInit
+  %14 = apply %13(%12) : $@convention(objc_method) (@owned TestObjCInit) -> @owned TestObjCInit
+  %19 = enum $Optional<TestObjCInit>, #Optional.some!enumelt.1, %14 : $TestObjCInit
+  return %19 : $Optional<TestObjCInit>
+}
diff --git a/test/SILOptimizer/sil_combine_apply.sil b/test/SILOptimizer/sil_combine_apply.sil
index c9d89ac..ed3c25c 100644
--- a/test/SILOptimizer/sil_combine_apply.sil
+++ b/test/SILOptimizer/sil_combine_apply.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -sil-combine-disable-alloc-stack-opts | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -sil-combine-disable-alloc-stack-opts | %FileCheck %s
 
 import Builtin
 
diff --git a/test/SILOptimizer/sil_combine_bitops.sil b/test/SILOptimizer/sil_combine_bitops.sil
index 45b15fc..4126846 100644
--- a/test/SILOptimizer/sil_combine_bitops.sil
+++ b/test/SILOptimizer/sil_combine_bitops.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 // Test optimizations for binary bit operations.
 
diff --git a/test/SILOptimizer/sil_combine_concrete_existential.sil b/test/SILOptimizer/sil_combine_concrete_existential.sil
index f8a96c8..c2acdbc 100644
--- a/test/SILOptimizer/sil_combine_concrete_existential.sil
+++ b/test/SILOptimizer/sil_combine_concrete_existential.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 // These tests exercise the same SILCombine optimization as
 // existential_type_propagation.sil, but cover additional corner
diff --git a/test/SILOptimizer/sil_combine_devirt.sil b/test/SILOptimizer/sil_combine_devirt.sil
index d04ea79..7fdf5a2 100644
--- a/test/SILOptimizer/sil_combine_devirt.sil
+++ b/test/SILOptimizer/sil_combine_devirt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -devirtualizer | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sil_combine_enum_addr.sil b/test/SILOptimizer/sil_combine_enum_addr.sil
index 12b70cc..390b6ab 100644
--- a/test/SILOptimizer/sil_combine_enum_addr.sil
+++ b/test/SILOptimizer/sil_combine_enum_addr.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -jumpthread-simplify-cfg | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sil_combine_enums.sil b/test/SILOptimizer/sil_combine_enums.sil
index 728a76d..706281c 100644
--- a/test/SILOptimizer/sil_combine_enums.sil
+++ b/test/SILOptimizer/sil_combine_enums.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sil_combine_global_addr.sil b/test/SILOptimizer/sil_combine_global_addr.sil
index ccdccdd..39a1d55 100644
--- a/test/SILOptimizer/sil_combine_global_addr.sil
+++ b/test/SILOptimizer/sil_combine_global_addr.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -devirtualizer | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last -devirtualizer | %FileCheck %s
 
 // Test to see if concrete type can be propagated from
 // global_addr in sil_combiner.
diff --git a/test/SILOptimizer/sil_combine_objc.sil b/test/SILOptimizer/sil_combine_objc.sil
index 6f95ee0..53babde 100644
--- a/test/SILOptimizer/sil_combine_objc.sil
+++ b/test/SILOptimizer/sil_combine_objc.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -verify-skip-unreachable-must-be-last | %FileCheck %s
 // REQUIRES: objc_interop
 
 // See https://bugs.swift.org/browse/SR-5065, rdar://32511494
diff --git a/test/SILOptimizer/sil_combine_objc_bridge.sil b/test/SILOptimizer/sil_combine_objc_bridge.sil
index a82500d..3744fec 100644
--- a/test/SILOptimizer/sil_combine_objc_bridge.sil
+++ b/test/SILOptimizer/sil_combine_objc_bridge.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/sil_combine_opaque.sil b/test/SILOptimizer/sil_combine_opaque.sil
index 549fbed..ac1f8f9 100644
--- a/test/SILOptimizer/sil_combine_opaque.sil
+++ b/test/SILOptimizer/sil_combine_opaque.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sil-combine %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all -sil-combine %s | %FileCheck %s
 
 struct S<T> {
   var t : T
diff --git a/test/SILOptimizer/sil_combine_same_ops.sil b/test/SILOptimizer/sil_combine_same_ops.sil
index 307c183..ca58137 100644
--- a/test/SILOptimizer/sil_combine_same_ops.sil
+++ b/test/SILOptimizer/sil_combine_same_ops.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 // Test optimization of various builtins which receive the same value in their first and second operand.
 
diff --git a/test/SILOptimizer/sil_combine_uncheck.sil b/test/SILOptimizer/sil_combine_uncheck.sil
index c1d44ff..4e294b4 100644
--- a/test/SILOptimizer/sil_combine_uncheck.sil
+++ b/test/SILOptimizer/sil_combine_uncheck.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine -remove-runtime-asserts | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine -remove-runtime-asserts | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sil_combiner_concrete_prop_all_args.sil b/test/SILOptimizer/sil_combiner_concrete_prop_all_args.sil
index ef6b0ec..f6def68 100644
--- a/test/SILOptimizer/sil_combiner_concrete_prop_all_args.sil
+++ b/test/SILOptimizer/sil_combiner_concrete_prop_all_args.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -wmo -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -inline -sil-combine -generic-specializer  -allocbox-to-stack -copy-forwarding -lower-aggregate-instrs -mem2reg -devirtualizer -late-inline -dead-arg-signature-opt -dce | %FileCheck %s
+// RUN: %target-sil-opt -wmo -enable-sil-verify-all %s -inline -sil-combine -generic-specializer  -allocbox-to-stack -copy-forwarding -lower-aggregate-instrs -mem2reg -devirtualizer -late-inline -dead-arg-signature-opt -dce | %FileCheck %s
 import Builtin
 import Swift
 import SwiftShims
diff --git a/test/SILOptimizer/sil_locations.sil b/test/SILOptimizer/sil_locations.sil
index 48b3aa6..2d83559 100644
--- a/test/SILOptimizer/sil_locations.sil
+++ b/test/SILOptimizer/sil_locations.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -sil-print-debuginfo -enable-sil-verify-all -mandatory-inlining -emit-verbose-sil %s | %FileCheck %s
+// RUN: %target-sil-opt -sil-print-debuginfo -enable-sil-verify-all -mandatory-inlining -emit-verbose-sil %s | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/sil_simplify_instrs.sil b/test/SILOptimizer/sil_simplify_instrs.sil
index 44eb8b5..37ea2ee 100644
--- a/test/SILOptimizer/sil_simplify_instrs.sil
+++ b/test/SILOptimizer/sil_simplify_instrs.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/simp_enum.sil b/test/SILOptimizer/simp_enum.sil
index 59a34a4..556352a 100644
--- a/test/SILOptimizer/simp_enum.sil
+++ b/test/SILOptimizer/simp_enum.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -sil-combine | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/simplify_cfg.sil b/test/SILOptimizer/simplify_cfg.sil
index 928ad5d..ba6cbe8 100644
--- a/test/SILOptimizer/simplify_cfg.sil
+++ b/test/SILOptimizer/simplify_cfg.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enforce-exclusivity=none -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 // FIXME: Update for select_enum change.
 
 // Declare this SIL to be canonical because some tests break raw SIL
diff --git a/test/SILOptimizer/simplify_cfg_and_combine.sil b/test/SILOptimizer/simplify_cfg_and_combine.sil
index b157736..dad6a89 100644
--- a/test/SILOptimizer/simplify_cfg_and_combine.sil
+++ b/test/SILOptimizer/simplify_cfg_and_combine.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg -sil-combine -jumpthread-simplify-cfg -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg -sil-combine -jumpthread-simplify-cfg -sil-combine | %FileCheck %s
 
 // These require both SimplifyCFG and SILCombine
 
diff --git a/test/SILOptimizer/simplify_cfg_args.sil b/test/SILOptimizer/simplify_cfg_args.sil
index 3b49f66..a61a35a 100644
--- a/test/SILOptimizer/simplify_cfg_args.sil
+++ b/test/SILOptimizer/simplify_cfg_args.sil
@@ -1,5 +1,5 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -late-codemotion -jumpthread-simplify-cfg | %FileCheck %s --check-prefix=CHECK_WITH_CODEMOTION
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -late-codemotion -jumpthread-simplify-cfg | %FileCheck %s --check-prefix=CHECK_WITH_CODEMOTION
 
 sil_stage raw
 
diff --git a/test/SILOptimizer/simplify_cfg_args_crash.sil b/test/SILOptimizer/simplify_cfg_args_crash.sil
index 7800f08..e87e1fa 100644
--- a/test/SILOptimizer/simplify_cfg_args_crash.sil
+++ b/test/SILOptimizer/simplify_cfg_args_crash.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -simplify-bb-args -sroa-bb-args | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -simplify-bb-args -sroa-bb-args | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/simplify_cfg_jump_thread_crash.sil b/test/SILOptimizer/simplify_cfg_jump_thread_crash.sil
index b83d2c1..0ba6df3 100644
--- a/test/SILOptimizer/simplify_cfg_jump_thread_crash.sil
+++ b/test/SILOptimizer/simplify_cfg_jump_thread_crash.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/simplify_cfg_opaque.sil b/test/SILOptimizer/simplify_cfg_opaque.sil
index 96e4df3..995f2f83 100644
--- a/test/SILOptimizer/simplify_cfg_opaque.sil
+++ b/test/SILOptimizer/simplify_cfg_opaque.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/simplify_cfg_select_enum.sil b/test/SILOptimizer/simplify_cfg_select_enum.sil
index b38a219..c3ac06c 100644
--- a/test/SILOptimizer/simplify_cfg_select_enum.sil
+++ b/test/SILOptimizer/simplify_cfg_select_enum.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 // Two select_enum instructions must not be considered as the same "condition",
 // even if they have the same enum operand.
diff --git a/test/SILOptimizer/simplify_cfg_simple.sil b/test/SILOptimizer/simplify_cfg_simple.sil
index 399c466..68834ac 100644
--- a/test/SILOptimizer/simplify_cfg_simple.sil
+++ b/test/SILOptimizer/simplify_cfg_simple.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -simplify-cfg %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -simplify-cfg %s | %FileCheck %s
 //
 // Make sure that we can succesfully call simplify-cfg with that name via sil-opt.
 
diff --git a/test/SILOptimizer/simplify_cfg_unique_values.sil b/test/SILOptimizer/simplify_cfg_unique_values.sil
index 62ebf14..3fec786 100644
--- a/test/SILOptimizer/simplify_cfg_unique_values.sil
+++ b/test/SILOptimizer/simplify_cfg_unique_values.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -jumpthread-simplify-cfg | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/simplify_unreachable_containing_blocks.sil b/test/SILOptimizer/simplify_unreachable_containing_blocks.sil
index f704435..100afca 100644
--- a/test/SILOptimizer/simplify_unreachable_containing_blocks.sil
+++ b/test/SILOptimizer/simplify_unreachable_containing_blocks.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -simplify-unreachable-containing-blocks -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all %s | %FileCheck %s
+// RUN: %target-sil-opt -simplify-unreachable-containing-blocks -module-name Swift -enable-sil-verify-all %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sink.sil b/test/SILOptimizer/sink.sil
index 80ee91b..2c00f37 100644
--- a/test/SILOptimizer/sink.sil
+++ b/test/SILOptimizer/sink.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -code-sinking | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -code-sinking | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/specialize.sil b/test/SILOptimizer/specialize.sil
index fee76dd..057fff1 100644
--- a/test/SILOptimizer/specialize.sil
+++ b/test/SILOptimizer/specialize.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sil-partial-specialization -generic-specializer -save-optimization-record-path=%t.yaml %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -sil-partial-specialization -generic-specializer -save-optimization-record-path=%t.yaml %s | %FileCheck %s
 // RUN: %FileCheck -check-prefix=YAML %s < %t.yaml
 
 sil_stage canonical
diff --git a/test/SILOptimizer/specialize_cg_update_crash.sil b/test/SILOptimizer/specialize_cg_update_crash.sil
index 6285133..ae5233b 100644
--- a/test/SILOptimizer/specialize_cg_update_crash.sil
+++ b/test/SILOptimizer/specialize_cg_update_crash.sil
@@ -1,7 +1,7 @@
 
 // RUN: %empty-directory(%t)
-// RUN: %target-swift-frontend -parse-stdlib -assume-parsing-unqualified-ownership-sil -parse-as-library  -module-name TestMod %S/Inputs/TestMod.sil -emit-module-path %t/TestMod.swiftmodule
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -inline -I %t %s | %FileCheck %s
+// RUN: %target-swift-frontend -parse-stdlib -parse-as-library  -module-name TestMod %S/Inputs/TestMod.sil -emit-module-path %t/TestMod.swiftmodule
+// RUN: %target-sil-opt -enable-sil-verify-all -inline -I %t %s | %FileCheck %s
 
 // Test if the CG is updated correctly during specialization and
 // there is no crash because of a missing CG node for a deserialized function.
diff --git a/test/SILOptimizer/specialize_default_witness.sil b/test/SILOptimizer/specialize_default_witness.sil
index 462243f..7d97b48 100644
--- a/test/SILOptimizer/specialize_default_witness.sil
+++ b/test/SILOptimizer/specialize_default_witness.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/specialize_default_witness_resilience.sil b/test/SILOptimizer/specialize_default_witness_resilience.sil
index 127cfa5..2579fa7 100644
--- a/test/SILOptimizer/specialize_default_witness_resilience.sil
+++ b/test/SILOptimizer/specialize_default_witness_resilience.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-resilience -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-resilience -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/specialize_inherited.sil b/test/SILOptimizer/specialize_inherited.sil
index 4d13a05..26ceaec 100644
--- a/test/SILOptimizer/specialize_inherited.sil
+++ b/test/SILOptimizer/specialize_inherited.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -generic-specializer -module-name inherit | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -generic-specializer -module-name inherit | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/specialize_metatypes_with_nondefault_representation.sil b/test/SILOptimizer/specialize_metatypes_with_nondefault_representation.sil
index 81ebf2d..6e8e419 100644
--- a/test/SILOptimizer/specialize_metatypes_with_nondefault_representation.sil
+++ b/test/SILOptimizer/specialize_metatypes_with_nondefault_representation.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -generic-specializer | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -generic-specializer | %FileCheck %s
 
 // REQUIRES: objc_interop
 
diff --git a/test/SILOptimizer/specialize_no_definition.sil b/test/SILOptimizer/specialize_no_definition.sil
index 96b6061..b8180a5 100644
--- a/test/SILOptimizer/specialize_no_definition.sil
+++ b/test/SILOptimizer/specialize_no_definition.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer -save-optimization-record-path=%t.yaml -o /dev/null %s
+// RUN: %target-sil-opt -enable-sil-verify-all -generic-specializer -save-optimization-record-path=%t.yaml -o /dev/null %s
 // RUN: %FileCheck %s < %t.yaml
 
 import Builtin
diff --git a/test/SILOptimizer/specialize_opaque.sil b/test/SILOptimizer/specialize_opaque.sil
index 6d524f5..97f93f5 100644
--- a/test/SILOptimizer/specialize_opaque.sil
+++ b/test/SILOptimizer/specialize_opaque.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-sil-opaque-values -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-opaque-values -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/specialize_reabstraction.sil b/test/SILOptimizer/specialize_reabstraction.sil
index d4ad9e7..8e12ff7 100644
--- a/test/SILOptimizer/specialize_reabstraction.sil
+++ b/test/SILOptimizer/specialize_reabstraction.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -generic-specializer %s | %FileCheck %s
 
 
 sil_stage canonical
diff --git a/test/SILOptimizer/specialize_recursive_generics.sil b/test/SILOptimizer/specialize_recursive_generics.sil
index 131c19e..b9bff44 100644
--- a/test/SILOptimizer/specialize_recursive_generics.sil
+++ b/test/SILOptimizer/specialize_recursive_generics.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -generic-specializer -cse | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -generic-specializer -cse | %FileCheck %s
 
 // Check that SIL cloner can correctly handle specialization of recursive
 // functions with generic arguments.
diff --git a/test/SILOptimizer/split_critical_edges.sil b/test/SILOptimizer/split_critical_edges.sil
index 5a74830..482f545 100644
--- a/test/SILOptimizer/split_critical_edges.sil
+++ b/test/SILOptimizer/split_critical_edges.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -enable-objc-interop -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -split-critical-edges | %FileCheck %s
+// RUN: %target-sil-opt -enable-objc-interop -enable-sil-verify-all %s -split-critical-edges | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/sr-5068.sil b/test/SILOptimizer/sr-5068.sil
index 4d2989a..0a530f4 100644
--- a/test/SILOptimizer/sr-5068.sil
+++ b/test/SILOptimizer/sr-5068.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -sil-combine | %FileCheck %s
+// RUN: %target-sil-opt %s -sil-combine | %FileCheck %s
 
 // REQUIRES: PTRSIZE=64
 
diff --git a/test/SILOptimizer/sroa.sil b/test/SILOptimizer/sroa.sil
index 123a6b8..5918329 100644
--- a/test/SILOptimizer/sroa.sil
+++ b/test/SILOptimizer/sroa.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -sroa %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -sroa %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/sroa_bbargs.sil b/test/SILOptimizer/sroa_bbargs.sil
index c83b18a..cc530a3 100644
--- a/test/SILOptimizer/sroa_bbargs.sil
+++ b/test/SILOptimizer/sroa_bbargs.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enforce-exclusivity=none -enable-sil-verify-all -sroa-bb-args %s | %FileCheck %s
+// RUN: %target-sil-opt -enforce-exclusivity=none -enable-sil-verify-all -sroa-bb-args %s | %FileCheck %s
 
 // Declare this SIL to be canonical because some tests break raw SIL
 // conventions. e.g. address-type block args. -enforce-exclusivity=none is also
diff --git a/test/SILOptimizer/stack_promotion.sil b/test/SILOptimizer/stack_promotion.sil
index 9915d8f..51586f0 100644
--- a/test/SILOptimizer/stack_promotion.sil
+++ b/test/SILOptimizer/stack_promotion.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -stack-promotion -enable-sil-verify-all %s | %FileCheck %s
+// RUN: %target-sil-opt -stack-promotion -enable-sil-verify-all %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/static_initializer.sil b/test/SILOptimizer/static_initializer.sil
index 40d26ac..80d68a6 100644
--- a/test/SILOptimizer/static_initializer.sil
+++ b/test/SILOptimizer/static_initializer.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -global-opt | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -global-opt | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/SILOptimizer/strip_debug_info.sil b/test/SILOptimizer/strip_debug_info.sil
index 324dbed..351d37f 100644
--- a/test/SILOptimizer/strip_debug_info.sil
+++ b/test/SILOptimizer/strip_debug_info.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -strip-debug-info %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -strip-debug-info %s | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/temp_rvalue_opt.sil b/test/SILOptimizer/temp_rvalue_opt.sil
index 44a529e..aa7c28d 100644
--- a/test/SILOptimizer/temp_rvalue_opt.sil
+++ b/test/SILOptimizer/temp_rvalue_opt.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s -temp-rvalue-opt | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s -temp-rvalue-opt | %FileCheck %s
 
 sil_stage canonical
 
diff --git a/test/SILOptimizer/typed-access-tb-aa.sil b/test/SILOptimizer/typed-access-tb-aa.sil
index 90d7f5b..0c07a8b 100644
--- a/test/SILOptimizer/typed-access-tb-aa.sil
+++ b/test/SILOptimizer/typed-access-tb-aa.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %s -aa-kind=typed-access-tb-aa -aa-dump -o /dev/null | %FileCheck %s
+// RUN: %target-sil-opt %s -aa-kind=typed-access-tb-aa -aa-dump -o /dev/null | %FileCheck %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/unexpected_error.sil b/test/SILOptimizer/unexpected_error.sil
index 9974017..6196db4 100644
--- a/test/SILOptimizer/unexpected_error.sil
+++ b/test/SILOptimizer/unexpected_error.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -dce %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -dce %s | %FileCheck %s
 import Swift
 
 // CHECK-LABEL: sil @unexpected_error : $@convention(thin) (Error) -> () {
diff --git a/test/SILOptimizer/unreachable_dealloc_stack.sil b/test/SILOptimizer/unreachable_dealloc_stack.sil
index 33f6392..da60e6f 100644
--- a/test/SILOptimizer/unreachable_dealloc_stack.sil
+++ b/test/SILOptimizer/unreachable_dealloc_stack.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -module-name Swift -enable-sil-verify-all %s -diagnostics | %FileCheck %s
+// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all %s -diagnostics | %FileCheck %s
 
 sil_stage raw
 
diff --git a/test/SILOptimizer/unsafe_guaranteed_peephole.sil b/test/SILOptimizer/unsafe_guaranteed_peephole.sil
index 7560708..d1690a0 100644
--- a/test/SILOptimizer/unsafe_guaranteed_peephole.sil
+++ b/test/SILOptimizer/unsafe_guaranteed_peephole.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all -unsafe-guaranteed-peephole %s | %FileCheck %s
+// RUN: %target-sil-opt -enable-sil-verify-all -unsafe-guaranteed-peephole %s | %FileCheck %s
 sil_stage canonical
 
 import Builtin
diff --git a/test/SILOptimizer/verifier.sil b/test/SILOptimizer/verifier.sil
index 02a4846..4d65b1b 100644
--- a/test/SILOptimizer/verifier.sil
+++ b/test/SILOptimizer/verifier.sil
@@ -1,4 +1,4 @@
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s
+// RUN: %target-sil-opt -enable-sil-verify-all %s
 
 // REQUIRES: asserts
 
diff --git a/test/SILOptimizer/verifier_reject.sil b/test/SILOptimizer/verifier_reject.sil
index 0aba723..3ffff73 100644
--- a/test/SILOptimizer/verifier_reject.sil
+++ b/test/SILOptimizer/verifier_reject.sil
@@ -1,5 +1,5 @@
 // RUN: %empty-directory(%t)
-// RUN: not --crash %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all %s 2> %t/err.txt
+// RUN: not --crash %target-sil-opt -enable-sil-verify-all %s 2> %t/err.txt
 // RUN: %FileCheck %s < %t/err.txt
 
 // REQUIRES: asserts
diff --git a/test/SILOptimizer/verify_noescape_closure.sil b/test/SILOptimizer/verify_noescape_closure.sil
index c1e7823..c5d627b 100644
--- a/test/SILOptimizer/verify_noescape_closure.sil
+++ b/test/SILOptimizer/verify_noescape_closure.sil
@@ -16,13 +16,13 @@
 
 sil @takesEscapingClosure : $@convention(thin) (@owned @callee_owned () -> ()) -> ()
 
-sil hidden @closureWithArgument : $@convention(thin) (@inout_aliasable Int) -> () {
+sil hidden [ossa] @closureWithArgument : $@convention(thin) (@inout_aliasable Int) -> () {
 bb0(%1 : $*Int):
   %3 = tuple ()
   return %3 : $()
 }
 
-sil @missingNoescape : $@convention(thin) (Int) ->() {
+sil [ossa] @missingNoescape : $@convention(thin) (Int) ->() {
 bb0(%0 : $Int):
   %2 = alloc_box ${ var Int }
   %3 = project_box %2 : ${ var Int }, 0
diff --git a/test/Sema/complex_expressions.swift b/test/Sema/complex_expressions.swift
index eeafa87..788919b 100644
--- a/test/Sema/complex_expressions.swift
+++ b/test/Sema/complex_expressions.swift
@@ -1,9 +1,5 @@
 // RUN: %target-typecheck-verify-swift
 
-// SR-139:
-// Infinite recursion parsing bitwise operators
-let x = UInt32(0x1FF)&0xFF << 24 | UInt32(0x1FF)&0xFF << 16 | UInt32(0x1FF)&0xFF << 8 | (UInt32(0x1FF)&0xFF);
-
 // SR-838:
 // expression test_seconds() was too complex to be solved in reasonable time
 struct Nano : CustomStringConvertible {
diff --git a/test/Sema/exhaustive_switch.swift b/test/Sema/exhaustive_switch.swift
index 728d13e..9d97de9 100644
--- a/test/Sema/exhaustive_switch.swift
+++ b/test/Sema/exhaustive_switch.swift
@@ -420,164 +420,6 @@
   }
 }
 
-enum LargeSpaceEnum {
-  case case0
-  case case1
-  case case2
-  case case3
-  case case4
-  case case5
-  case case6
-  case case7
-  case case8
-  case case9
-  case case10
-}
-
-func notQuiteBigEnough() -> Bool {
-  switch (LargeSpaceEnum.case1, LargeSpaceEnum.case2) { // expected-error {{switch must be exhaustive}}
-  // expected-note@-1 110 {{add missing case:}}
-  case (.case0, .case0): return true
-  case (.case1, .case1): return true
-  case (.case2, .case2): return true
-  case (.case3, .case3): return true
-  case (.case4, .case4): return true
-  case (.case5, .case5): return true
-  case (.case6, .case6): return true
-  case (.case7, .case7): return true
-  case (.case8, .case8): return true
-  case (.case9, .case9): return true
-  case (.case10, .case10): return true
-  }
-}
-
-enum OverlyLargeSpaceEnum {
-  case case0
-  case case1
-  case case2
-  case case3
-  case case4
-  case case5
-  case case6
-  case case7
-  case case8
-  case case9
-  case case10
-  case case11
-}
-
-enum ContainsOverlyLargeEnum {
-  case one(OverlyLargeSpaceEnum)
-  case two(OverlyLargeSpaceEnum)
-  case three(OverlyLargeSpaceEnum, OverlyLargeSpaceEnum)
-}
-
-func quiteBigEnough() -> Bool {
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
-  // expected-note@-1 {{do you want to add a default clause?}}
-  case (.case0, .case0): return true
-  case (.case1, .case1): return true
-  case (.case2, .case2): return true
-  case (.case3, .case3): return true
-  case (.case4, .case4): return true
-  case (.case5, .case5): return true
-  case (.case6, .case6): return true
-  case (.case7, .case7): return true
-  case (.case8, .case8): return true
-  case (.case9, .case9): return true
-  case (.case10, .case10): return true
-  case (.case11, .case11): return true
-  }
-
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
-  // expected-note@-1 {{do you want to add a default clause?}}
-  case (.case0, _): return true
-  case (.case1, _): return true
-  case (.case2, _): return true
-  case (.case3, _): return true
-  case (.case4, _): return true
-  case (.case5, _): return true
-  case (.case6, _): return true
-  case (.case7, _): return true
-  case (.case8, _): return true
-  case (.case9, _): return true
-  case (.case10, _): return true
-  }
-
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) { // expected-error {{the compiler is unable to check that this switch is exhaustive in reasonable time}}
-  case (.case0, _): return true
-  case (.case1, _): return true
-  case (.case2, _): return true
-  case (.case3, _): return true
-  case (.case4, _): return true
-  case (.case5, _): return true
-  case (.case6, _): return true
-  case (.case7, _): return true
-  case (.case8, _): return true
-  case (.case9, _): return true
-  case (.case10, _): return true
-  @unknown default: return false // expected-note {{remove '@unknown' to handle remaining values}} {{3-12=}}
-  }
-
-
-  // No diagnostic
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) {
-  case (.case0, _): return true
-  case (.case1, _): return true
-  case (.case2, _): return true
-  case (.case3, _): return true
-  case (.case4, _): return true
-  case (.case5, _): return true
-  case (.case6, _): return true
-  case (.case7, _): return true
-  case (.case8, _): return true
-  case (.case9, _): return true
-  case (.case10, _): return true
-  case (.case11, _): return true
-  }
-
-  // No diagnostic
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) {
-  case (_, .case0): return true
-  case (_, .case1): return true
-  case (_, .case2): return true
-  case (_, .case3): return true
-  case (_, .case4): return true
-  case (_, .case5): return true
-  case (_, .case6): return true
-  case (_, .case7): return true
-  case (_, .case8): return true
-  case (_, .case9): return true
-  case (_, .case10): return true
-  case (_, .case11): return true
-  }
-
-  // No diagnostic
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) {
-  case (_, _): return true
-  }
-
-  // No diagnostic
-  switch (OverlyLargeSpaceEnum.case1, OverlyLargeSpaceEnum.case2) {
-  case (.case0, .case0): return true
-  case (.case1, .case1): return true
-  case (.case2, .case2): return true
-  case (.case3, .case3): return true
-  case _: return true
-  }
-  
-  // No diagnostic
-  switch ContainsOverlyLargeEnum.one(.case0) {
-  case .one: return true
-  case .two: return true
-  case .three: return true
-  }
-
-  // Make sure we haven't just stopped emitting diagnostics.
-  switch OverlyLargeSpaceEnum.case1 { // expected-error {{switch must be exhaustive}} expected-note 12 {{add missing case}} expected-note {{handle unknown values}}
-  }
-}
-
 indirect enum InfinitelySized {
   case one
   case two
@@ -606,6 +448,83 @@
   }
 }
 
+func sr6316() {
+  let bool1 = false
+  let bool2 = false
+  let bool3 = false
+  let bool4 = true
+  let bool5 = false
+  let bool6 = true
+  let bool7 = true
+  let bool8 = false
+  let bool9 = false
+
+  switch (bool1, (bool2, bool4, bool6, bool8), (bool3, bool5, bool7, bool9)) {
+  // expected-error@-1 {{switch must be exhaustive}}
+  // expected-note@-2 {{add missing case: '(false, (_, false, true, _), (_, true, _, _))'}}
+  // expected-note@-3 {{add missing case: '(_, (_, true, _, _), (_, false, true, _))'}}
+  case (true, (_, _, _, _), (_, true, true, _)):
+    break
+  case (true, (_, _, _, _), (_, _, false, _)):
+    break
+  case (_, (_, true, true, _), (_, _, false, _)):
+    break
+  case (_, (_, _, false, _), (_, true, true, _)):
+    break
+  case (_, (_, true, true, _), (_, true, true, _)):
+    break
+  case (_, (_, _, false, _), (_, _, false, _)):
+    break
+  case (_, (_, false, _, _), (_, false, _, _)):
+    break
+  }
+}
+
+func sr6652() {
+  enum A {
+    indirect case a([A], foo: Bool)
+    indirect case b(Dictionary<String, Int>)
+    indirect case c(A, foo: [A])
+    indirect case d(if: A, then: A, else: A)
+    indirect case e(A, A, foo: Bool)
+    indirect case f(A)
+    case g(String, foo: Bool)
+    case string(String)
+    case `nil`
+
+    static func eke(_ lhs: A, _ rhs: A) -> Bool { return false }
+  }
+
+  enum B {
+    static func eke(_ lhs: B, _ rhs: B) -> Bool { return false }
+  }
+
+  enum C {
+    static func eke(_ lhs: C, _ rhs: C) -> Bool { return false }
+  }
+
+  enum D {
+    case a(A)
+    case b(B)
+    case c(C)
+    indirect case d([D])
+
+    // No diagnostic
+    static func eke(_ lhs: D, _ rhs: D) -> Bool {
+      switch (lhs, rhs) {
+      case (.a(let r1), .a(let r2)): return A.eke(r1, r2)
+      case (.a, _): return false
+      case (.b(let r1), .b(let r2)): return B.eke(r1, r2)
+      case (.b, _): return false
+      case (.c(let r1),  .c(let r2)): return C.eke(r1, r2)
+      case (.c, _): return false
+      case (.d(let r1),  .d(let r2)): return zip(r1, r2).allSatisfy(D.eke)
+      case (.d, _): return false
+      }
+    }
+  }
+}
+
 func diagnoseDuplicateLiterals() {
   let str = "def"
   let int = 2
diff --git a/test/Sema/pound_diagnostics.swift b/test/Sema/pound_diagnostics.swift
index c6883b5..c4cf8d4 100644
--- a/test/Sema/pound_diagnostics.swift
+++ b/test/Sema/pound_diagnostics.swift
@@ -72,3 +72,13 @@
   #error("private error") // expected-error  {{private error}}
   func bar() {}
 }
+
+protocol MyProtocol {
+  #warning("warnings can show up in protocols too!") // expected-warning {{warnings can show up in protocols too!}}
+}
+
+#warning("""
+         warnings support multi-line string literals
+         """) // expected-warning @-2 {{warnings support multi-line string literals}}
+
+#warning(#"warnings support \(custom string delimiters)"#) // expected-warning {{warnings support \\(custom string delimiters)}}
diff --git a/test/Sema/struct_equatable_hashable.swift b/test/Sema/struct_equatable_hashable.swift
index f38ea30..d85e6f4 100644
--- a/test/Sema/struct_equatable_hashable.swift
+++ b/test/Sema/struct_equatable_hashable.swift
@@ -261,6 +261,60 @@
 struct ImpliedMain: ImplierMain {}
 extension ImpliedOther: ImplierMain {}
 
+
+// Hashable conformances that rely on a manual implementation of `hashValue`
+// should produce a deprecation warning.
+struct OldSchoolStruct: Hashable {
+  static func ==(left: OldSchoolStruct, right: OldSchoolStruct) -> Bool {
+    return true
+  }
+  var hashValue: Int { return 42 }
+  // expected-warning@-1{{'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'OldSchoolStruct' to 'Hashable' by implementing 'hash(into:)' instead}}
+}
+enum OldSchoolEnum: Hashable {
+  case foo
+  case bar
+
+  static func ==(left: OldSchoolEnum, right: OldSchoolEnum) -> Bool {
+    return true
+  }
+  var hashValue: Int { return 23 }
+  // expected-warning@-1{{'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'OldSchoolEnum' to 'Hashable' by implementing 'hash(into:)' instead}}
+}
+class OldSchoolClass: Hashable {
+  static func ==(left: OldSchoolClass, right: OldSchoolClass) -> Bool {
+    return true
+  }
+  var hashValue: Int { return -9000 }
+  // expected-warning@-1{{'Hashable.hashValue' is deprecated as a protocol requirement; conform type 'OldSchoolClass' to 'Hashable' by implementing 'hash(into:)' instead}}
+}
+
+// However, it's okay to implement `hashValue` as long as `hash(into:)` is also
+// provided.
+struct MixedStruct: Hashable {
+  static func ==(left: MixedStruct, right: MixedStruct) -> Bool {
+    return true
+  }
+  func hash(into hasher: inout Hasher) {}
+  var hashValue: Int { return 42 }
+}
+enum MixedEnum: Hashable {
+  case foo
+  case bar
+  static func ==(left: MixedEnum, right: MixedEnum) -> Bool {
+    return true
+  }
+  func hash(into hasher: inout Hasher) {}
+  var hashValue: Int { return 23 }
+}
+class MixedClass: Hashable {
+  static func ==(left: MixedClass, right: MixedClass) -> Bool {
+    return true
+  }
+  func hash(into hasher: inout Hasher) {}
+  var hashValue: Int { return -9000 }
+}
+
 // FIXME: Remove -verify-ignore-unknown.
 // <unknown>:0: error: unexpected error produced: invalid redeclaration of 'hashValue'
 // <unknown>:0: error: unexpected note produced: candidate has non-matching type '(Foo, Foo) -> Bool'
diff --git a/test/Serialization/Inputs/def_basic_objc.sil b/test/Serialization/Inputs/def_basic_objc.sil
index 885f5b2..9d56936 100644
--- a/test/Serialization/Inputs/def_basic_objc.sil
+++ b/test/Serialization/Inputs/def_basic_objc.sil
@@ -8,7 +8,7 @@
 class SomeClass : SomeProtocol { }
 
 // CHECK-LABEL: @objc_classes : $@convention(thin) (@thick NSObject.Type) -> ()
-sil [transparent] [serialized] @objc_classes : $@convention(thin) (@thick NSObject.Type) -> () {
+sil [transparent] [serialized] [ossa] @objc_classes : $@convention(thin) (@thick NSObject.Type) -> () {
 bb0(%0 : $@thick NSObject.Type):
   %1 = thick_to_objc_metatype %0 : $@thick NSObject.Type to $@objc_metatype NSObject.Type
   // CHECK: %2 = alloc_ref_dynamic [objc] %1 : $@objc_metatype NSObject.Type, $NSObject
@@ -25,16 +25,16 @@
   override init()
 }
 
-sil [serialized] @test_super_method : $@convention(method) (@guaranteed Bas) -> Bas
-sil [serialized] @swift_StringToNSString : $@convention(thin) (@inout String) -> @owned NSString
-sil [serialized] @$sSSSSycSSmcfC : $@convention(thin) (@thin String.Type) -> @owned String
+sil [serialized] [ossa] @test_super_method : $@convention(method) (@guaranteed Bas) -> Bas
+sil [serialized] [ossa] @swift_StringToNSString : $@convention(thin) (@inout String) -> @owned NSString
+sil [serialized] [ossa] @$sSSSSycSSmcfC : $@convention(thin) (@thin String.Type) -> @owned String
 
 protocol SomeClassProtocol : class {}
 
 // CHECK-LABEL: sil public_external [transparent] [serialized] @metatype_to_object
 // CHECK:         {{%.*}} = objc_metatype_to_object {{%.*}} : $@objc_metatype SomeClass.Type to $AnyObject
 // CHECK:         {{%.*}} = objc_existential_metatype_to_object {{%.*}} : $@objc_metatype SomeClassProtocol.Type to $AnyObject
-sil [transparent] [serialized] @metatype_to_object : $@convention(thin) (@objc_metatype SomeClass.Type, @objc_metatype SomeClassProtocol.Type) -> @owned (AnyObject, AnyObject) {
+sil [transparent] [serialized] [ossa] @metatype_to_object : $@convention(thin) (@objc_metatype SomeClass.Type, @objc_metatype SomeClassProtocol.Type) -> @owned (AnyObject, AnyObject) {
 entry(%a : $@objc_metatype SomeClass.Type, %b : $@objc_metatype SomeClassProtocol.Type):
   %x = objc_metatype_to_object %a : $@objc_metatype SomeClass.Type to $AnyObject
   %y = objc_existential_metatype_to_object %b : $@objc_metatype SomeClassProtocol.Type to $AnyObject
@@ -45,7 +45,7 @@
 @objc protocol ObjCProto {}
 
 // CHECK-LABEL: sil public_external [transparent] [serialized] @protocol_conversion
-sil [transparent] [serialized] @protocol_conversion : $@convention(thin) () -> @owned Protocol {
+sil [transparent] [serialized] [ossa] @protocol_conversion : $@convention(thin) () -> @owned Protocol {
 entry:
   // CHECK: {{%.*}} = objc_protocol #ObjCProto : $Protocol
   %p = objc_protocol #ObjCProto : $Protocol
@@ -55,7 +55,7 @@
 @_transparent public func serialize_all() {
 }
 
-sil [transparent] [serialized] @$s14def_basic_objc13serialize_allyyF : $@convention(thin) () -> () {
+sil [transparent] [serialized] [ossa] @$s14def_basic_objc13serialize_allyyF : $@convention(thin) () -> () {
 bb0:
   %26 = function_ref @objc_classes : $@convention(thin) (@thick NSObject.Type) -> ()
 
diff --git a/test/Serialization/Recovery/typedefs.swift b/test/Serialization/Recovery/typedefs.swift
index 5601bec..d218ad3 100644
--- a/test/Serialization/Recovery/typedefs.swift
+++ b/test/Serialization/Recovery/typedefs.swift
@@ -20,7 +20,7 @@
 import Typedefs
 import Lib
 
-// CHECK-SIL-LABEL: sil hidden @$s8typedefs11testSymbolsyyF
+// CHECK-SIL-LABEL: sil hidden [ossa] @$s8typedefs11testSymbolsyyF
 func testSymbols() {
   // Check that the symbols are not using 'Bool'.
   // CHECK-SIL: function_ref @$s3Lib1xs5Int32Vvau
diff --git a/test/Serialization/basic_sil.swift b/test/Serialization/basic_sil.swift
index 9802390..76e2227 100644
--- a/test/Serialization/basic_sil.swift
+++ b/test/Serialization/basic_sil.swift
@@ -1,8 +1,8 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-build-swift -Xfrontend -assume-parsing-unqualified-ownership-sil -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -enable-objc-interop -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil
+// RUN: %target-build-swift -emit-module -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -Xfrontend -enable-objc-interop -o %t/def_basic.swiftmodule %S/Inputs/def_basic.sil
 // RUN: llvm-bcanalyzer %t/def_basic.swiftmodule | %FileCheck %s
 // RUN: %target-build-swift -emit-sil -I %t %s -o %t/basic_sil.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -I %t %t/basic_sil.sil -performance-linker | %FileCheck %S/Inputs/def_basic.sil
+// RUN: %target-sil-opt -I %t %t/basic_sil.sil -performance-linker | %FileCheck %S/Inputs/def_basic.sil
 
 // This test currently is written such that no optimizations are assumed.
 // REQUIRES: swift_test_mode_optimize_none
diff --git a/test/Serialization/basic_sil_objc.swift b/test/Serialization/basic_sil_objc.swift
index 40420c4..cfaeaa6 100644
--- a/test/Serialization/basic_sil_objc.swift
+++ b/test/Serialization/basic_sil_objc.swift
@@ -3,7 +3,7 @@
 // RUN: llvm-bcanalyzer %t/def_basic_objc.swiftmodule | %FileCheck %s
 
 // RUN: %target-build-swift -Xfrontend %clang-importer-sdk -emit-sil -I %t %s -o %t/basic_sil_objc.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil %t/basic_sil_objc.sil -performance-linker -I %t | %FileCheck %S/Inputs/def_basic_objc.sil
+// RUN: %target-sil-opt %t/basic_sil_objc.sil -performance-linker -I %t | %FileCheck %S/Inputs/def_basic_objc.sil
 
 // This test currently is written such that no optimizations are assumed.
 // REQUIRES: swift_test_mode_optimize_none
diff --git a/test/Serialization/function.swift b/test/Serialization/function.swift
index 5176667..a7e14fc 100644
--- a/test/Serialization/function.swift
+++ b/test/Serialization/function.swift
@@ -13,7 +13,7 @@
   return x == y
 }
 
-// SIL: sil @main
+// SIL: sil [ossa] @main
 // SIL:   [[RAW:%.+]] = global_addr @$s8function3rawSivp : $*Int
 // SIL:   [[ZERO:%.+]] = function_ref @$s8def_func7getZeroSiyF : $@convention(thin) () -> Int
 // SIL:   [[RESULT:%.+]] = apply [[ZERO]]() : $@convention(thin) () -> Int
diff --git a/test/Serialization/inherited-initializer.swift b/test/Serialization/inherited-initializer.swift
index b7beffd..7ad85e8 100644
--- a/test/Serialization/inherited-initializer.swift
+++ b/test/Serialization/inherited-initializer.swift
@@ -6,7 +6,7 @@
 
 class InheritsInit : Base {}
 
-// CHECK-LABEL: sil hidden @$s4main10testSimpleyyF
+// CHECK-LABEL: sil hidden [ossa] @$s4main10testSimpleyyF
 func testSimple() {
   // CHECK: [[DEFAULT:%.+]] = function_ref @$s24InheritedInitializerBase0C0CyACSicfcfA_
   // CHECK: [[ARG:%.+]] = apply [[DEFAULT]]()
@@ -29,7 +29,7 @@
 class ModifiedGenericSub<U> : GenericBase<Reinitializable<U>> {}
 class NonGenericSub : GenericBase<Reinitializable<Int>> {}
 
-// CHECK-LABEL: sil hidden @$s4main11testGenericyyF
+// CHECK-LABEL: sil hidden [ossa] @$s4main11testGenericyyF
 func testGeneric() {
   // CHECK: [[TYPE:%.+]] = metatype $@thick GenericSub<Reinitializable<Int8>>.Type
   // CHECK: [[DEFAULT:%.+]] = function_ref @$s24InheritedInitializerBase07GenericC0CyACyxGxcfcfA_
diff --git a/test/Serialization/objc.swift b/test/Serialization/objc.swift
index dd15cc4..b34e42b 100644
--- a/test/Serialization/objc.swift
+++ b/test/Serialization/objc.swift
@@ -7,13 +7,13 @@
 
 import def_objc
 
-// SIL: sil hidden @$s4objc9testProto3objy04def_A09ObjCProto_p_tF : $@convention(thin) (@guaranteed ObjCProto) -> () {
+// SIL: sil hidden [ossa] @$s4objc9testProto3objy04def_A09ObjCProto_p_tF : $@convention(thin) (@guaranteed ObjCProto) -> () {
 func testProto(obj obj: ObjCProto) {
   // SIL: = objc_method {{%.*}} : $@opened({{.*}}) ObjCProto, #ObjCProto.doSomething!1.foreign
   obj.doSomething()
 }
 
-// SIL: sil hidden @$s4objc9testClass3objy04def_A09ObjCClassC_tF : $@convention(thin) (@guaranteed ObjCClass) -> () {
+// SIL: sil hidden [ossa] @$s4objc9testClass3objy04def_A09ObjCClassC_tF : $@convention(thin) (@guaranteed ObjCClass) -> () {
 func testClass(obj obj: ObjCClass) {
   // SIL: = objc_method %{{.+}} : $ObjCClass, #ObjCClass.implicitlyObjC!1.foreign
   obj.implicitlyObjC()
@@ -22,7 +22,7 @@
   ObjCClass.classMethod()
 }
 
-// SIL: sil hidden @$s4objc15testNativeClass3objy04def_A012NonObjCClassC_tF : $@convention(thin) (@guaranteed NonObjCClass) -> () {
+// SIL: sil hidden [ossa] @$s4objc15testNativeClass3objy04def_A012NonObjCClassC_tF : $@convention(thin) (@guaranteed NonObjCClass) -> () {
 func testNativeClass(obj obj: NonObjCClass) {
   // SIL: = objc_method %{{.+}} : $NonObjCClass, #NonObjCClass.doSomething!1.foreign
   // SIL: = objc_method %{{.+}} : $NonObjCClass, #NonObjCClass.objcMethod!1.foreign
diff --git a/test/Serialization/sil_box_types.sil b/test/Serialization/sil_box_types.sil
index a0409c2..affbd1a 100644
--- a/test/Serialization/sil_box_types.sil
+++ b/test/Serialization/sil_box_types.sil
@@ -11,14 +11,14 @@
 }
 
 // CHECK-LABEL: sil @boxes : $@convention(thin) (<τ_0_0> { var τ_0_0 } <Builtin.Int32>, <τ_0_0> { var τ_0_0 } <Builtin.Int32>) -> () {
-sil @boxes : $@convention(thin) (<τ_0_0> { var τ_0_0 } <Builtin.Int32>, <τ_0_0> { var τ_0_0 } <Builtin.Int32>) -> () {
+sil [ossa] @boxes : $@convention(thin) (<τ_0_0> { var τ_0_0 } <Builtin.Int32>, <τ_0_0> { var τ_0_0 } <Builtin.Int32>) -> () {
 // CHECK: bb0(%0 : $<τ_0_0> { var τ_0_0 } <Builtin.Int32>, %1 : $<τ_0_0> { var τ_0_0 } <Builtin.Int32>):
 entry(%0 : @unowned $<τ_0_0> { var τ_0_0 } <Builtin.Int32>, %1 : @unowned $<τ_0_0> { var τ_0_0 } <Builtin.Int32>):
   return undef : $()
 }
 
 // CHECK-LABEL: sil @boxes_extra_reqs : $@convention(thin) <T where T : Q, T.AT : P> (@owned <τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>) -> () {
-sil @boxes_extra_reqs : $@convention(thin) <T where T : Q, T.AT : P> (@owned <τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>) -> () {
+sil [ossa] @boxes_extra_reqs : $@convention(thin) <T where T : Q, T.AT : P> (@owned <τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>) -> () {
 // CHECK: bb0(%0 : $<τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>)
 bb0(%0 : @owned $<τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>):
   %1 = project_box %0 : $<τ_0_0 where τ_0_0 : Q, τ_0_0.AT : P> { var τ_0_0 } <T>, 0
diff --git a/test/Serialization/sil_partial_apply_ownership.sil b/test/Serialization/sil_partial_apply_ownership.sil
index 7c6216a..8175617 100644
--- a/test/Serialization/sil_partial_apply_ownership.sil
+++ b/test/Serialization/sil_partial_apply_ownership.sil
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
-// RUN: %target-build-swift -Xfrontend -assume-parsing-unqualified-ownership-sil -emit-module -Xllvm -verify-skip-convert-escape-to-noescape-attributes -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -o %t/sil_partial_apply_ownership.swiftmodule %s
-// RUN: %target-build-swift -Xfrontend -assume-parsing-unqualified-ownership-sil -Xllvm -verify-skip-convert-escape-to-noescape-attributes -emit-sil -I %t %s | %FileCheck %s
+// RUN: %target-build-swift -emit-module -Xllvm -verify-skip-convert-escape-to-noescape-attributes -Xfrontend -disable-diagnostic-passes -force-single-frontend-invocation -o %t/sil_partial_apply_ownership.swiftmodule %s
+// RUN: %target-build-swift -Xllvm -verify-skip-convert-escape-to-noescape-attributes -emit-sil -I %t %s | %FileCheck %s
 
 import Builtin
 
diff --git a/test/Serialization/transparent-std.swift b/test/Serialization/transparent-std.swift
index 5e5331e..a5870f1 100644
--- a/test/Serialization/transparent-std.swift
+++ b/test/Serialization/transparent-std.swift
@@ -2,7 +2,7 @@
 // RUN: %empty-directory(%t)
 // RUN: %target-swift-frontend -emit-module -parse-stdlib -o %t %S/Inputs/def_transparent_std.swift
 // RUN: llvm-bcanalyzer %t/def_transparent_std.swiftmodule | %FileCheck %s
-// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-sil -sil-debug-serialization -parse-stdlib -I %t %s | %FileCheck %s -check-prefix=SIL
+// RUN: %target-swift-frontend -emit-sil -sil-debug-serialization -parse-stdlib -I %t %s | %FileCheck %s -check-prefix=SIL
 
 // CHECK-NOT: UnknownCode
 
diff --git a/test/SourceKit/DocSupport/doc_clang_module.swift b/test/SourceKit/DocSupport/doc_clang_module.swift
index 1c40da7..d40aac8 100644
--- a/test/SourceKit/DocSupport/doc_clang_module.swift
+++ b/test/SourceKit/DocSupport/doc_clang_module.swift
@@ -1,8 +1,5 @@
 // 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/lit.local.cfg b/test/SourceKit/lit.local.cfg
index 2e93cd9..20ee8dd 100644
--- a/test/SourceKit/lit.local.cfg
+++ b/test/SourceKit/lit.local.cfg
@@ -4,6 +4,10 @@
 elif 'OS=linux-gnu' in config.available_features and 'LinuxDistribution=Ubuntu-14.04' in config.available_features:
     config.unsupported = True
 
+elif 'swift_evolve' in config.available_features:
+    # A lot of tests necessarily depend on standard library source order.
+    config.unsupported = True
+
 else:
     sed_clean = r"grep -v 'key.hash: \"0\"'"
     sed_clean += r" | sed -e 's/key.filepath: \".*[/\\\\]\\(.*\\)\\.swiftmodule\"/key.filepath: \\1.swiftmodule/g'"
diff --git a/test/api-digester/Inputs/stdlib-stable-abi.json b/test/api-digester/Inputs/stdlib-stable-abi.json
index 85021c0..9f19d8a 100644
--- a/test/api-digester/Inputs/stdlib-stable-abi.json
+++ b/test/api-digester/Inputs/stdlib-stable-abi.json
@@ -14654,25 +14654,6 @@
           ]
         },
         {
-          "kind": "Function",
-          "name": "_getBuiltinLogicValue",
-          "printedName": "_getBuiltinLogicValue()",
-          "children": [
-            {
-              "kind": "TypeNominal",
-              "name": "BuiltinInteger",
-              "printedName": "Builtin.Int1"
-            }
-          ],
-          "declKind": "Func",
-          "usr": "s:Sb21_getBuiltinLogicValueBi1_yF",
-          "moduleName": "Swift",
-          "declAttributes": [
-            "Transparent"
-          ],
-          "funcSelfKind": "NonMutating"
-        },
-        {
           "kind": "Var",
           "name": "description",
           "printedName": "description",
diff --git a/test/api-digester/Outputs/stability-stdlib-abi.swift.expected b/test/api-digester/Outputs/stability-stdlib-abi.swift.expected
index e69de29..e6df12d 100644
--- a/test/api-digester/Outputs/stability-stdlib-abi.swift.expected
+++ b/test/api-digester/Outputs/stability-stdlib-abi.swift.expected
@@ -0,0 +1,30 @@
+Func _SmallString.computeIsASCII() has been removed
+Func _SmallString.withMutableCapacity(_:) has been removed
+Struct _StringObject.Discriminator has been removed
+Var _SmallString.discriminator has been removed
+Var _StringObject.CountAndFlags._storage has declared type change from UInt to UInt64
+Var _StringObject.CountAndFlags.countMask has declared type change from UInt to UInt64
+Var _StringObject.CountAndFlags.countMask is now static
+Var _StringObject.CountAndFlags.flagsMask has declared type change from UInt to UInt64
+Var _StringObject.CountAndFlags.flagsMask is now static
+Var _StringObject.Nibbles.discriminatorShift has been removed
+Var _StringObject.discriminator has been removed
+Var _StringObject.objectRawBits has been renamed to Var _StringObject.discriminatedObjectRawBits
+Var _StringObject.undiscriminatedObjectRawBits has been removed
+
+Constructor _StringObject.CountAndFlags.init(count:) has been removed
+Constructor _StringObject.CountAndFlags.init(count:isASCII:) has been removed
+Func _StringObject.Nibbles.largeSharedMortal() has been removed
+Var _StringGuts.hasNativeStorage has been removed
+Var _StringGuts.isNFC has been removed
+Var _StringGuts.isNFCFastUTF8 has been removed
+Var _StringObject.hasNativeStorage has been removed
+Var _StringObject.isNFC has been removed
+Var _StringObject.largeFastIsNative has been removed
+
+Var _StringObject.largeFastIsShared has been removed
+Var _StringObject.largeIsCocoa has been removed
+Var _StringObject.objCBridgeableObject has been removed
+
+Var _StringObject._countAndFlags is no longer a stored property
+Var _StringObject._countAndFlagsBits is added to a non-resilient type
diff --git a/test/api-digester/stability-stdlib-abi.swift b/test/api-digester/stability-stdlib-abi.swift
index 9c69761..c6736df 100644
--- a/test/api-digester/stability-stdlib-abi.swift
+++ b/test/api-digester/stability-stdlib-abi.swift
@@ -7,8 +7,6 @@
 // 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
+// UNSUPPORTED: swift_evolve
diff --git a/test/attr/Inputs/dynamicReplacementA.swift b/test/attr/Inputs/dynamicReplacementA.swift
new file mode 100644
index 0000000..3572996
--- /dev/null
+++ b/test/attr/Inputs/dynamicReplacementA.swift
@@ -0,0 +1,2 @@
+public struct TheReplaceables {
+}
diff --git a/test/attr/Inputs/dynamicReplacementB.swift b/test/attr/Inputs/dynamicReplacementB.swift
new file mode 100644
index 0000000..7b2918b
--- /dev/null
+++ b/test/attr/Inputs/dynamicReplacementB.swift
@@ -0,0 +1,9 @@
+import A
+
+public extension TheReplaceables {
+  dynamic var property1: Int { return 0 }
+  dynamic var property2: Int { return 0 }
+
+  dynamic subscript (i: Int) -> Int { return 0 }
+  dynamic subscript (i: Int) -> String { return "" }
+}
diff --git a/test/attr/Inputs/dynamicReplacementC.swift b/test/attr/Inputs/dynamicReplacementC.swift
new file mode 100644
index 0000000..25b4a8f
--- /dev/null
+++ b/test/attr/Inputs/dynamicReplacementC.swift
@@ -0,0 +1,9 @@
+import A
+
+public extension TheReplaceables {
+  dynamic var property1: Int { return 0 }
+  dynamic var property2: String { return "" }
+
+  dynamic subscript (i: Int) -> Int { return 0 }
+  dynamic subscript (s: String) -> String { return "" }
+}
diff --git a/test/attr/attr_cdecl.swift b/test/attr/attr_cdecl.swift
index 9cbb200..85891cc 100644
--- a/test/attr/attr_cdecl.swift
+++ b/test/attr/attr_cdecl.swift
@@ -18,7 +18,11 @@
 
 struct SwiftStruct { var x, y: Int }
 enum SwiftEnum { case A, B }
+#if os(Windows) && arch(x86_64)
+@objc enum CEnum: Int32 { case A, B }
+#else
 @objc enum CEnum: Int { case A, B }
+#endif
 
 @_cdecl("swiftStruct")
 func swiftStruct(x: SwiftStruct) {} // expected-error{{cannot be represented}} expected-note{{Swift struct}}
diff --git a/test/attr/attr_implements_serial.swift b/test/attr/attr_implements_serial.swift
index 6dbe870..e388590 100644
--- a/test/attr/attr_implements_serial.swift
+++ b/test/attr/attr_implements_serial.swift
@@ -1,7 +1,7 @@
 // RUN: %empty-directory(%t)
 // RUN: echo 'client()' >%t/main.swift
 // RUN: %target-build-swift-dylib(%t/%target-library-name(AttrImplFP)) -module-name AttrImplFP -emit-module -emit-module-path %t/AttrImplFP.swiftmodule %S/attr_implements_fp.swift -Xfrontend -enable-operator-designated-types -Xfrontend -solver-enable-operator-designated-types
-// RUN: %target-build-swift -I %t -o %t/a.out %s %t/main.swift -L %t -Xlinker -rpath -Xlinker %t -lAttrImplFP
+// RUN: %target-build-swift -I %t -o %t/a.out %s %t/main.swift -L %t %target-rpath(%t) -lAttrImplFP
 // RUN: %target-codesign %t/a.out
 // RUN: %target-codesign %t/%target-library-name(AttrImplFP)
 // RUN: %target-run %t/a.out %t/%target-library-name(AttrImplFP) | %FileCheck %s
diff --git a/test/attr/attr_usableFromInline_protocol.swift b/test/attr/attr_usableFromInline_protocol.swift
index a940abb..c2459e1 100644
--- a/test/attr/attr_usableFromInline_protocol.swift
+++ b/test/attr/attr_usableFromInline_protocol.swift
@@ -7,8 +7,8 @@
 }
 
 @usableFromInline struct UFIAdopter<T> : PublicProtoWithReqs {}
-// expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
-// expected-error@-2 {{instance method 'foo()' must be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+// expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+// expected-error@-2 {{instance method 'foo()' must be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
 extension UFIAdopter {
   typealias Assoc = Int
   // expected-note@-1 {{'Assoc' declared here}}
@@ -18,9 +18,9 @@
 
 @usableFromInline struct UFIAdopterAllInOne<T> : PublicProtoWithReqs {
   typealias Assoc = Int
-  // expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+  // expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
   func foo() {}
-  // expected-error@-1 {{instance method 'foo()' must be declared '@usableFromInline' because because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
+  // expected-error@-1 {{instance method 'foo()' must be declared '@usableFromInline' because it matches a requirement in protocol 'PublicProtoWithReqs'}} {{none}}
 }
 
 internal struct InternalAdopter<T> : PublicProtoWithReqs {}
@@ -36,8 +36,8 @@
 }
 
 public struct PublicAdopter<T> : UFIProtoWithReqs {}
-// expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
-// expected-error@-2 {{instance method 'foo()' must be declared '@usableFromInline' because because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
+// expected-error@-1 {{type alias 'Assoc' must be declared '@usableFromInline' because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
+// expected-error@-2 {{instance method 'foo()' must be declared '@usableFromInline' because it matches a requirement in protocol 'UFIProtoWithReqs'}} {{none}}
 extension PublicAdopter {
   typealias Assoc = Int
   // expected-note@-1 {{'Assoc' declared here}}
diff --git a/test/attr/dynamicReplacement.swift b/test/attr/dynamicReplacement.swift
new file mode 100644
index 0000000..48aaf28
--- /dev/null
+++ b/test/attr/dynamicReplacement.swift
@@ -0,0 +1,40 @@
+// RUN: %empty-directory(%t)
+// RUN: %target-swift-frontend -emit-module -swift-version 5 -enable-implicit-dynamic %S/Inputs/dynamicReplacementA.swift -o %t -module-name A
+// RUN: %target-swift-frontend -emit-module -swift-version 5 -enable-implicit-dynamic -c %S/Inputs/dynamicReplacementB.swift -o %t -I %t -module-name B
+// RUN: %target-swift-frontend -emit-module -swift-version 5 -enable-implicit-dynamic -c %S/Inputs/dynamicReplacementC.swift -o %t -I %t -module-name C
+// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-implicit-dynamic  -I %t
+import A
+import B
+import C
+
+// rdar://problem/46737657: static properties
+struct StaticProperties {
+  dynamic var property: Int { return 1 }
+  dynamic static var property: Int { return 11 }
+}
+
+extension StaticProperties {
+  @_dynamicReplacement(for: property)
+  var replacement_property: Int { return 2 }
+}
+
+// Replacements involving different types.
+extension TheReplaceables {
+  @_dynamicReplacement(for: property1) // expected-error{{replaced accessor for 'property1' occurs in multiple places}}
+  var replace_property1: Int { return 0 }
+  
+  @_dynamicReplacement(for: property2)
+  var replace_property2_int: Int { return 1 }
+  
+  @_dynamicReplacement(for: property2)
+  var replace_property2_string: String { return "replaced" }
+
+  @_dynamicReplacement(for: subscript(_:)) // expected-error{{replaced accessor for 'subscript(_:)' occurs in multiple places}}
+  subscript (int_int i: Int) -> Int { return 0 }
+
+  @_dynamicReplacement(for: subscript(_:))
+  subscript (int_string i: Int) -> String { return "" }
+
+  @_dynamicReplacement(for: subscript(_:))
+  subscript (string_string i: String) -> String { return "" }
+}
diff --git a/test/benchmark/Benchmark_O.test.md b/test/benchmark/Benchmark_O.test.md
index ff2fe61..f55965d 100644
--- a/test/benchmark/Benchmark_O.test.md
+++ b/test/benchmark/Benchmark_O.test.md
@@ -163,7 +163,7 @@
 MEASUREENV: VCS {{[0-9]+}} - {{[0-9]+}} = {{[0-9]+}}
 RUNJUSTONCE-LABEL: 1,Ackermann
 RUNJUSTONCE-NOT: 1,Ackermann
-LOGFORMAT: ,{{[0-9]+}},{{[0-9]+}},,{{[0-9]+}},{{[0-9]+}}
+LOGFORMAT: ,{{[0-9]+}},{{[0-9]+}},,{{,|[0-9]+}},{{[0-9]+}}
 LOGVERBOSE-LABEL: Running AngryPhonebook
 LOGVERBOSE: Collecting 2 samples.
 ````
diff --git a/test/decl/enum/enumtest.swift b/test/decl/enum/enumtest.swift
index c04ae3f..553e42f 100644
--- a/test/decl/enum/enumtest.swift
+++ b/test/decl/enum/enumtest.swift
@@ -164,9 +164,9 @@
   // Dot syntax.
   _ = x2.origin.x
   _ = x1.size.area()
-  _ = (r : x1.size).r.area()
+  _ = (r : x1.size).r.area() // expected-error {{cannot create a single-element tuple with an element label}}
   _ = x1.size.area()
-  _ = (r : x1.size).r.area()
+  _ = (r : x1.size).r.area() // expected-error {{cannot create a single-element tuple with an element label}}
   
   _ = x1.area
 
@@ -326,3 +326,10 @@
   case baz((inout T) -> ()) // ok
   case quux((inout T, inout T) -> ()) // ok
 }
+
+// In the long term, these should be legal, but we don't support them right
+// now and we shouldn't pretend to.
+// rdar://46684504
+enum HasVariadic {
+  case variadic(x: Int...) // expected-error {{variadic enum cases are not supported}}
+}
diff --git a/test/decl/ext/generic.swift b/test/decl/ext/generic.swift
index 5b5c287..66327d3 100644
--- a/test/decl/ext/generic.swift
+++ b/test/decl/ext/generic.swift
@@ -30,7 +30,7 @@
 
 typealias GGG = X<Int, Double, String>
 
-extension GGG { } // expected-error{{constrained extension must be declared on the unspecialized generic type 'X' with constraints specified by a 'where' clause}}
+extension GGG { } // okay through a typealias
 
 // Lvalue check when the archetypes are not the same.
 struct LValueCheck<T> {
@@ -222,4 +222,4 @@
   static func newMember() -> NewGeneric {
     return NewGeneric()
   }
-}
\ No newline at end of file
+}
diff --git a/test/decl/ext/typealias.swift b/test/decl/ext/typealias.swift
new file mode 100644
index 0000000..c5917a0
--- /dev/null
+++ b/test/decl/ext/typealias.swift
@@ -0,0 +1,80 @@
+// RUN: %target-typecheck-verify-swift
+
+struct Foo<T> {
+  var maybeT: T? { return nil }
+}
+
+extension Foo {
+  struct Bar<U, V> {
+    var maybeT: T? { return nil }
+    var maybeU: U? { return nil }
+    var maybeV: V? { return nil }
+
+    struct Inner {
+      var maybeT: T? { return nil }
+      var maybeU: U? { return nil }
+      var maybeV: V? { return nil }
+    }
+  }
+}
+
+typealias FooInt = Foo<Int>
+
+extension FooInt {
+  func goodT() -> Int {
+    return maybeT!
+  }
+
+  func badT() -> Float {
+    return maybeT! // expected-error{{cannot convert return expression of type 'Int' to return type 'Float'}}
+  }
+}
+
+typealias FooIntBarFloatDouble = Foo<Int>.Bar<Float, Double>
+
+extension FooIntBarFloatDouble {
+  func goodT() -> Int {
+    return maybeT!
+  }
+  func goodU() -> Float {
+    return maybeU!
+  }
+  func goodV() -> Double {
+    return maybeV!
+  }
+
+  func badT() -> Float {
+    return maybeT! // expected-error{{cannot convert return expression of type 'Int' to return type 'Float'}}
+  }
+  func badU() -> Int {
+    return maybeU! // expected-error{{cannot convert return expression of type 'Float' to return type 'Int'}}
+  }
+  func badV() -> Int {
+    return maybeV! // expected-error{{cannot convert return expression of type 'Double' to return type 'Int'}}
+  }
+}
+
+typealias FooIntBarFloatDoubleInner = Foo<Int>.Bar<Float, Double>.Inner
+
+extension FooIntBarFloatDoubleInner {
+  func goodT() -> Int {
+    return maybeT!
+  }
+  func goodU() -> Float {
+    return maybeU!
+  }
+  func goodV() -> Double {
+    return maybeV!
+  }
+
+  func badT() -> Float {
+    return maybeT! // expected-error{{cannot convert return expression of type 'Int' to return type 'Float'}}
+  }
+  func badU() -> Int {
+    return maybeU! // expected-error{{cannot convert return expression of type 'Float' to return type 'Int'}}
+  }
+  func badV() -> Int {
+    return maybeV! // expected-error{{cannot convert return expression of type 'Double' to return type 'Int'}}
+  }
+}
+
diff --git a/test/decl/nested/type_in_type.swift b/test/decl/nested/type_in_type.swift
index 978408c..6543b11 100644
--- a/test/decl/nested/type_in_type.swift
+++ b/test/decl/nested/type_in_type.swift
@@ -298,9 +298,9 @@
   func takesAssocType(first: D, second: F) {}
 }
 
-typealias OuterGenericMidGeneric<T> = OuterGeneric<T>.MidGeneric
+typealias OuterGenericMidNonGeneric<T> = OuterGeneric<T>.MidNonGeneric
 
-extension OuterGenericMidGeneric {
+extension OuterGenericMidNonGeneric {
 
 }
 
diff --git a/test/decl/protocol/conforms/fixit_stub.swift b/test/decl/protocol/conforms/fixit_stub.swift
index f4b91be..176f0af 100644
--- a/test/decl/protocol/conforms/fixit_stub.swift
+++ b/test/decl/protocol/conforms/fixit_stub.swift
@@ -198,3 +198,11 @@
 class ProtocolHasSubscriptFunctionAdopter: ProtocolHasSubscriptFunction { // expected-error{{type 'ProtocolHasSubscriptFunctionAdopter' does not conform to protocol 'ProtocolHasSubscriptFunction'}}
 
 }
+
+protocol ProtocolHasConsumingRequirement {
+  __consuming func foo() // expected-note {{protocol requires function 'foo()' with type '() -> ()'; do you want to add a stub?}} {{81-81=\n    func foo() {\n        <#code#>\n    \}\n}}
+}
+
+struct ProtocolHasConsumingRequirementAdopter: ProtocolHasConsumingRequirement { // expected-error {{type 'ProtocolHasConsumingRequirementAdopter' does not conform to protocol 'ProtocolHasConsumingRequirement'}}
+
+}
diff --git a/test/decl/protocol/req/associated_type_ambiguity.swift b/test/decl/protocol/req/associated_type_ambiguity.swift
index 2b08b98..e0eded0 100644
--- a/test/decl/protocol/req/associated_type_ambiguity.swift
+++ b/test/decl/protocol/req/associated_type_ambiguity.swift
@@ -15,7 +15,7 @@
 }
 
 protocol P2 {
-  associatedtype T // expected-note 2 {{found this candidate}}
+  associatedtype T // expected-note {{found this candidate}}
 }
 
 // FIXME: This extension's generic signature is still minimized differently from
@@ -36,7 +36,7 @@
 // Same as above, but now we have two visible associated types with the same
 // name.
 protocol P3 {
-  associatedtype T // expected-note {{found this candidate}}
+  associatedtype T
 }
 
 // FIXME: This extension's generic signature is still minimized differently from
@@ -48,7 +48,7 @@
 }
 
 extension P2 where Self : P3 {
-  func takeT1(_: T) {} // expected-error {{'T' is ambiguous for type lookup in this context}}
+  func takeT1(_: T) {}
   func takeT2(_: Self.T) {}
 }
 
diff --git a/test/decl/typealias/generic.swift b/test/decl/typealias/generic.swift
index 1821572..6fa96bd 100644
--- a/test/decl/typealias/generic.swift
+++ b/test/decl/typealias/generic.swift
@@ -1,6 +1,6 @@
 // RUN: %target-typecheck-verify-swift
 
-struct MyType<TyA, TyB> {
+struct MyType<TyA, TyB> { // expected-note {{generic type 'MyType' declared here}}
   var a : TyA, b : TyB
 }
 
@@ -105,6 +105,9 @@
 _ = G(a: "foo", b: 42)
 _ = G<Int, String>(a: "foo", b: 42)
 
+// Generic typealias cannot have unbound generic type.
+typealias VeryBad1<T> = MyType // expected-error {{reference to generic type 'MyType' requires arguments in <...>}}
+typealias VeryBad2<T> = Swift.Array // expected-error {{reference to generic type 'Array' requires arguments in <...>}}
 
 struct MyTypeWithHashable<TyA, TyB : Hashable> {
 }
diff --git a/test/lit.cfg b/test/lit.cfg
index 285335f..1652b03 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -791,6 +791,7 @@
         "%s -parse-as-library -emit-library -o '\\1' "
         "-Xlinker -install_name -Xlinker @executable_path/$(basename '\\1')"
         % (config.target_build_swift))
+    config.target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
 
 elif run_os in ['windows-msvc']:
     lit_config.note('Testing Windows ' + config.variant_triple)
@@ -817,13 +818,15 @@
                                                       config.swift_test_options, \
                                                       config.swift_frontend_test_options))
 
-    config.target_codesign = ''
+    config.target_codesign = 'echo'
 
     subst_target_swift_frontend_mock_sdk = config.target_swift_frontend
     subst_target_swift_frontend_mock_sdk_after = ''
 
     config.target_build_swift_dylib =                                            \
-            ("%r -parse-as-library -emit-library -o '\\1'" % (config.target_build_swift))
+            SubstituteCaptures("%s -parse-as-library -emit-library -o \\1" % (config.target_build_swift))
+    config.target_add_rpath = r''
+
     config.target_clang =                                                        \
             ('clang++ -target %s %s' % (config.variant_triple, clang_mcp_opt))
     config.target_ld =                                                           \
@@ -885,6 +888,7 @@
     config.target_build_swift_dylib = (
         "%s -parse-as-library -emit-library -o '\\1'"
         % (config.target_build_swift))
+    config.target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
     config.target_swift_frontend = (
         '%s -frontend -target %s %s %s %s %s'
         % (config.swift, config.variant_triple, resource_dir_opt, mcp_opt,
@@ -941,6 +945,7 @@
     config.target_build_swift_dylib = (
         "%s -parse-as-library -emit-library -o '\\1'"
         % (config.target_build_swift))
+    config.target_add_rpath = r'-Xlinker -rpath -Xlinker \1'
     config.target_swift_frontend = (
         '%s -frontend -target %s -sdk %r %s %s %s %s'
         % (config.swift, config.variant_triple, config.variant_sdk,
@@ -1336,6 +1341,8 @@
 config.substitutions.insert(0, ('%target-library-name\(([^)]+)\)',
                                 SubstituteCaptures(r'%s\1%s' % (config.target_shared_library_prefix,
                                                                 config.target_shared_library_suffix))))
+config.substitutions.append(('%target-rpath\(([^)]+)\)',
+                             SubstituteCaptures(config.target_add_rpath)))
 
 config.substitutions.append(('%target-resilience-test', config.target_resilience_test))
 
diff --git a/test/multifile/multiconformanceimpls/main.swift b/test/multifile/multiconformanceimpls/main.swift
index 507c236..f4be408 100644
--- a/test/multifile/multiconformanceimpls/main.swift
+++ b/test/multifile/multiconformanceimpls/main.swift
@@ -5,7 +5,7 @@
 // RUN: %target-codesign %t/%target-library-name(B)
 // RUN: %target-build-swift-dylib(%t/%{target-shared-library-prefix}C%{target-shared-library-suffix}) %S/Inputs/C.swift -emit-module -emit-module-path %t/C.swiftmodule -module-name C -I%t -L%t -lA
 // RUN: %target-codesign %t/%target-library-name(C)
-// RUN: %target-build-swift %s -I %t -o %t/a.out -L %t -Xlinker -rpath -Xlinker %t -lA -lB -lC
+// RUN: %target-build-swift %s -I %t -o %t/a.out -L %t %target-rpath(%t) -lA -lB -lC
 // RUN: %target-codesign %t/a.out
 // RUN: %target-run %t/a.out %t/%target-library-name(A) %t/%target-library-name(B) %t/%target-library-name(C) |  %FileCheck %s
 
diff --git a/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/defaults.swift.expected b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/defaults.swift.expected
index 225e46a..c2b6ef7 100644
--- a/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/defaults.swift.expected
+++ b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/defaults.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing.swift.expected b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing.swift.expected
index 2cdc28d..97a23f0 100644
--- a/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing.swift.expected
+++ b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/<base>withTrailingClosure</base>(<callarg index=0>x</callarg><callcolon index=0>: </callcolon>2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing_only.swift.expected b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing_only.swift.expected
new file mode 100644
index 0000000..d027c00
--- /dev/null
+++ b/test/refactoring/SyntacticRename/FindRangeOutputs/callsites/trailing_only.swift.expected
@@ -0,0 +1,70 @@
+func /*defaults:def*/withDefaults(_ xx: Int = 4, y: Int = 2, x: Int = 1) {}
+
+// valid
+/*defaults:call*/withDefaults()
+/*defaults:call*/withDefaults(2)
+/*defaults:call*/withDefaults(y: 2)
+/*defaults:call*/withDefaults(2, x: 3)
+/*defaults:call*/withDefaults(y: 2, x: 3)
+/*defaults:call*/withDefaults(2, y: 1, x: 4)
+
+// false positives
+/*defaults:call*/withDefaults(y: 2, 3)
+/*defaults:call*/withDefaults(y: 2, 4, x: 3)
+
+// invalid
+/*defaults:call*/withDefaults(x: 2, y: 3)
+
+
+func /*trailing:def*/withTrailingClosure(x: Int, y: () -> Int) {}
+
+// valid
+/*trailing:call*/withTrailingClosure(x: 2, y: { return 1})
+/*trailing:call*/withTrailingClosure(x: 2) { return 1}
+
+// false positives
+/*trailing:call*/withTrailingClosure(x: 1, y: 2) { return 1}
+/*trailing:call*/withTrailingClosure(x: 1, y: 2) { return 1}
+/*trailing:call*/withTrailingClosure(x: 2)
+{ return 1}
+
+func /*trailing-only:def*/<base>trailingOnly</base>(<arglabel index=0>a</arglabel><param index=0></param>: () -> ()) {}
+/*trailing-only:call*/<base>trailingOnly</base>(<callarg index=0>a</callarg><callcolon index=0>: </callcolon>{})
+/*trailing-only:call*/<base>trailingOnly</base> {}
+
+
+func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
+
+// valid
+/*varargs:call*/withVarargs(x: 1, 2, 3, y: 2, 4)
+/*varargs:call*/withVarargs(y: 2, 4)
+
+// false positives
+/*varargs:call*/withVarargs(x: 1, y: 2, 4, 5)
+
+//invalid
+/*varargs:call*/withVarargs(2, y: 2)
+
+
+func /*varargs2:def*/withVarargs(x: Int, y: Int, _: Int...) {}
+
+// valid
+/*varargs2:call*/withVarargs(x: 1, y: 2, 4, 5)
+/*varargs2:call*/withVarargs(x: 1, y: 2)
+
+// false positive
+/*varargs2:call*/withVarargs(x: 1, 2, y: 2, 4)
+
+
+func /*mixed:def*/withAllOfTheAbove(x: Int = 2, _: Int..., z: Int = 2, c: () -> Int) {}
+
+// valid
+/*mixed:call*/withAllOfTheAbove(2){ return 1 }
+/*mixed:call*/withAllOfTheAbove(x: 1, 2, c: {return 1})
+/*mixed:call*/withAllOfTheAbove(x: 1, c: {return 1})
+/*mixed:call*/withAllOfTheAbove(1, z: 1) { return 1 }
+/*mixed:call*/withAllOfTheAbove(1, 2, c: {return 1})
+
+// false positives
+/*mixed:call*/withAllOfTheAbove(z: 1, 2, c: {return 1})
+
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/defaults.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/defaults.swift.expected
index b28fb3c..80b9f74 100644
--- a/test/refactoring/SyntacticRename/Outputs/callsites/defaults.swift.expected
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/defaults.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/mixed.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/mixed.swift.expected
index a3fd205..717bea3 100644
--- a/test/refactoring/SyntacticRename/Outputs/callsites/mixed.swift.expected
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/mixed.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/trailing.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/trailing.swift.expected
index 9f600cd..567c881 100644
--- a/test/refactoring/SyntacticRename/Outputs/callsites/trailing.swift.expected
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/trailing.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/betterName(a: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/trailing_only.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/trailing_only.swift.expected
new file mode 100644
index 0000000..bb9eda3
--- /dev/null
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/trailing_only.swift.expected
@@ -0,0 +1,70 @@
+func /*defaults:def*/withDefaults(_ xx: Int = 4, y: Int = 2, x: Int = 1) {}
+
+// valid
+/*defaults:call*/withDefaults()
+/*defaults:call*/withDefaults(2)
+/*defaults:call*/withDefaults(y: 2)
+/*defaults:call*/withDefaults(2, x: 3)
+/*defaults:call*/withDefaults(y: 2, x: 3)
+/*defaults:call*/withDefaults(2, y: 1, x: 4)
+
+// false positives
+/*defaults:call*/withDefaults(y: 2, 3)
+/*defaults:call*/withDefaults(y: 2, 4, x: 3)
+
+// invalid
+/*defaults:call*/withDefaults(x: 2, y: 3)
+
+
+func /*trailing:def*/withTrailingClosure(x: Int, y: () -> Int) {}
+
+// valid
+/*trailing:call*/withTrailingClosure(x: 2, y: { return 1})
+/*trailing:call*/withTrailingClosure(x: 2) { return 1}
+
+// false positives
+/*trailing:call*/withTrailingClosure(x: 1, y: 2) { return 1}
+/*trailing:call*/withTrailingClosure(x: 1, y: 2) { return 1}
+/*trailing:call*/withTrailingClosure(x: 2)
+{ return 1}
+
+func /*trailing-only:def*/betterName(b: () -> ()) {}
+/*trailing-only:call*/betterName(b: {})
+/*trailing-only:call*/betterName {}
+
+
+func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
+
+// valid
+/*varargs:call*/withVarargs(x: 1, 2, 3, y: 2, 4)
+/*varargs:call*/withVarargs(y: 2, 4)
+
+// false positives
+/*varargs:call*/withVarargs(x: 1, y: 2, 4, 5)
+
+//invalid
+/*varargs:call*/withVarargs(2, y: 2)
+
+
+func /*varargs2:def*/withVarargs(x: Int, y: Int, _: Int...) {}
+
+// valid
+/*varargs2:call*/withVarargs(x: 1, y: 2, 4, 5)
+/*varargs2:call*/withVarargs(x: 1, y: 2)
+
+// false positive
+/*varargs2:call*/withVarargs(x: 1, 2, y: 2, 4)
+
+
+func /*mixed:def*/withAllOfTheAbove(x: Int = 2, _: Int..., z: Int = 2, c: () -> Int) {}
+
+// valid
+/*mixed:call*/withAllOfTheAbove(2){ return 1 }
+/*mixed:call*/withAllOfTheAbove(x: 1, 2, c: {return 1})
+/*mixed:call*/withAllOfTheAbove(x: 1, c: {return 1})
+/*mixed:call*/withAllOfTheAbove(1, z: 1) { return 1 }
+/*mixed:call*/withAllOfTheAbove(1, 2, c: {return 1})
+
+// false positives
+/*mixed:call*/withAllOfTheAbove(z: 1, 2, c: {return 1})
+
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/varargs.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/varargs.swift.expected
index 7cfeb42..1a74dab 100644
--- a/test/refactoring/SyntacticRename/Outputs/callsites/varargs.swift.expected
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/varargs.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/betterName(a: Int..., b: Int, c: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/Outputs/callsites/varargs2.swift.expected b/test/refactoring/SyntacticRename/Outputs/callsites/varargs2.swift.expected
index 5c6d52d..2f58748 100644
--- a/test/refactoring/SyntacticRename/Outputs/callsites/varargs2.swift.expected
+++ b/test/refactoring/SyntacticRename/Outputs/callsites/varargs2.swift.expected
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
diff --git a/test/refactoring/SyntacticRename/callsites.swift b/test/refactoring/SyntacticRename/callsites.swift
index 3c0a2cb..bae528b 100644
--- a/test/refactoring/SyntacticRename/callsites.swift
+++ b/test/refactoring/SyntacticRename/callsites.swift
@@ -28,6 +28,10 @@
 /*trailing:call*/withTrailingClosure(x: 2)
 { return 1}
 
+func /*trailing-only:def*/trailingOnly(a: () -> ()) {}
+/*trailing-only:call*/trailingOnly(a: {})
+/*trailing-only:call*/trailingOnly {}
+
 
 func /*varargs:def*/withVarargs(x: Int..., y: Int, _: Int) {}
 
@@ -69,6 +73,8 @@
 // RUN: diff -u %S/Outputs/callsites/defaults.swift.expected %t.result/callsites_defaults.swift
 // RUN: %refactor -syntactic-rename -source-filename %s -pos="trailing" -is-function-like -old-name "withTrailingClosure(x:y:)" -new-name "betterName(a:b:)" >> %t.result/callsites_trailing.swift
 // RUN: diff -u %S/Outputs/callsites/trailing.swift.expected %t.result/callsites_trailing.swift
+// RUN: %refactor -syntactic-rename -source-filename %s -pos="trailing-only" -is-function-like -old-name "trailingOnly(a:)" -new-name "betterName(b:)" >> %t.result/callsites_trailing_only.swift
+// RUN: diff -u %S/Outputs/callsites/trailing_only.swift.expected %t.result/callsites_trailing_only.swift
 // RUN: %refactor -syntactic-rename -source-filename %s -pos="varargs" -is-function-like -old-name "withVarargs(x:y:_:)" -new-name "betterName(a:b:c:)" >> %t.result/callsites_varargs.swift
 // RUN: diff -u %S/Outputs/callsites/varargs.swift.expected %t.result/callsites_varargs.swift
 // RUN: %refactor -syntactic-rename -source-filename %s -pos="varargs2" -is-function-like -old-name "withVarargs(x:y:_:)" -new-name "betterName(a:b:c:)" >> %t.result/callsites_varargs2.swift
@@ -80,3 +86,5 @@
 // RUN: diff -u %S/FindRangeOutputs/callsites/defaults.swift.expected %t.ranges/callsites_defaults.swift
 // RUN: %refactor -find-rename-ranges -source-filename %s -pos="trailing" -is-function-like -old-name "withTrailingClosure(x:y:)" >> %t.ranges/callsites_trailing.swift
 // RUN: diff -u %S/FindRangeOutputs/callsites/trailing.swift.expected %t.ranges/callsites_trailing.swift
+// RUN: %refactor -find-rename-ranges -source-filename %s -pos="trailing-only" -is-function-like -old-name "trailingOnly(a:)" >> %t.ranges/callsites_trailing_only.swift
+// RUN: diff -u %S/FindRangeOutputs/callsites/trailing_only.swift.expected %t.ranges/callsites_trailing_only.swift
diff --git a/test/sil-func-extractor/basic.sil b/test/sil-func-extractor/basic.sil
index 789f2dc..d799456 100644
--- a/test/sil-func-extractor/basic.sil
+++ b/test/sil-func-extractor/basic.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-func-extractor -assume-parsing-unqualified-ownership-sil %s -func=use_before_init | %FileCheck %s
+// RUN: %target-sil-func-extractor %s -func=use_before_init | %FileCheck %s
 // RUN: %empty-directory(%t)
-// RUN: %target-sil-func-extractor -assume-parsing-unqualified-ownership-sil %s -func=use_before_init -emit-sib -o %t/out.sib -module-name main && %target-sil-opt %t/out.sib -module-name main | %FileCheck %s
+// RUN: %target-sil-func-extractor %s -func=use_before_init -emit-sib -o %t/out.sib -module-name main && %target-sil-opt %t/out.sib -module-name main | %FileCheck %s
 
 import Builtin
 import Swift
diff --git a/test/sil-func-extractor/multiple-functions.sil b/test/sil-func-extractor/multiple-functions.sil
index 39004ce..5da2f88 100644
--- a/test/sil-func-extractor/multiple-functions.sil
+++ b/test/sil-func-extractor/multiple-functions.sil
@@ -1,6 +1,6 @@
-// RUN: %target-sil-func-extractor -assume-parsing-unqualified-ownership-sil %s -func=f2 -func=f5 -func=f6 -func=f8 | %FileCheck %s
-// RUN: %target-sil-func-extractor -assume-parsing-unqualified-ownership-sil %s -invert -func=f2 -func=f5 -func=f6 -func=f8 | %FileCheck -check-prefix=INVERSE %s
-// RUN: %target-sil-func-extractor -assume-parsing-unqualified-ownership-sil %s -func=f2 -func=f5 -func-file=%S/functions_to_preserve | %FileCheck %s
+// RUN: %target-sil-func-extractor %s -func=f2 -func=f5 -func=f6 -func=f8 | %FileCheck %s
+// RUN: %target-sil-func-extractor %s -invert -func=f2 -func=f5 -func=f6 -func=f8 | %FileCheck -check-prefix=INVERSE %s
+// RUN: %target-sil-func-extractor %s -func=f2 -func=f5 -func-file=%S/functions_to_preserve | %FileCheck %s
 
 import Builtin
 
diff --git a/test/sil-nm/basic.sil b/test/sil-nm/basic.sil
index 852e1a6..7cab33b 100644
--- a/test/sil-nm/basic.sil
+++ b/test/sil-nm/basic.sil
@@ -1,9 +1,9 @@
-// RUN: %target-sil-nm -assume-parsing-unqualified-ownership-sil %s | %FileCheck -check-prefix=SIL-NM -check-prefix=CHECK %s
-// RUN: %target-sil-nm -demangle -assume-parsing-unqualified-ownership-sil %s | %FileCheck -check-prefix=DEMANGLE %s
+// RUN: %target-sil-nm %s | %FileCheck -check-prefix=SIL-NM -check-prefix=CHECK %s
+// RUN: %target-sil-nm -demangle %s | %FileCheck -check-prefix=DEMANGLE %s
 // RUN: %empty-directory(%t)
-// RUN: %target-sil-opt -module-name main -assume-parsing-unqualified-ownership-sil -emit-sib -o %t/out.sib %s
-// RUN: %target-sil-nm -module-name main -assume-parsing-unqualified-ownership-sil %t/out.sib | %FileCheck %s
-// RUN: %target-sil-nm -module-name main -demangle -assume-parsing-unqualified-ownership-sil %t/out.sib | %FileCheck -check-prefix=DEMANGLE %s
+// RUN: %target-sil-opt -module-name main -emit-sib -o %t/out.sib %s
+// RUN: %target-sil-nm -module-name main %t/out.sib | %FileCheck %s
+// RUN: %target-sil-nm -module-name main -demangle %t/out.sib | %FileCheck -check-prefix=DEMANGLE %s
 
 import Builtin
 
diff --git a/test/sil-opt/guaranteed-normal-args-negative.sil b/test/sil-opt/guaranteed-normal-args-negative.sil
index 3ef43c0..6884fb7 100644
--- a/test/sil-opt/guaranteed-normal-args-negative.sil
+++ b/test/sil-opt/guaranteed-normal-args-negative.sil
@@ -8,7 +8,7 @@
 
 import TestModule
 
-sil @callFoo : $@convention(thin) (@owned Foo) -> () {
+sil [ossa] @callFoo : $@convention(thin) (@owned Foo) -> () {
 bb0(%0 : @owned $Foo):
   %1 = class_method %0 : $Foo, #Foo.doSomething!1 : (Foo) -> (Foo) -> (), $@convention(method) (@guaranteed Foo, @owned Foo) -> ()
   destroy_value %0 : $Foo
diff --git a/test/sil-opt/guaranteed-normal-args-positive.sil b/test/sil-opt/guaranteed-normal-args-positive.sil
index 8cfa72c..7feccf1 100644
--- a/test/sil-opt/guaranteed-normal-args-positive.sil
+++ b/test/sil-opt/guaranteed-normal-args-positive.sil
@@ -8,7 +8,7 @@
 
 import TestModule
 
-sil @callFoo : $@convention(thin) (@owned Foo) -> () {
+sil [ossa] @callFoo : $@convention(thin) (@owned Foo) -> () {
 bb0(%0 : @guaranteed $Foo):
   %1 = class_method %0 : $Foo, #Foo.doSomething!1 : (Foo) -> (Foo) -> (), $@convention(method) (@guaranteed Foo, @guaranteed Foo) -> ()
   destroy_value %0 : $Foo
diff --git a/test/stdlib/simd.swift.gyb b/test/stdlib/simd.swift.gyb
index afadc16..84bedf3 100644
--- a/test/stdlib/simd.swift.gyb
+++ b/test/stdlib/simd.swift.gyb
@@ -313,5 +313,10 @@
 % end # for type
 }
 
+simdTestSuite.test("debug description") {
+  expectEqual("SIMD2<Float>(1.0, 2.5)",
+    SIMD2<Float>(1.0, 2.5).debugDescription)
+}
+
 runAllTests()
 
diff --git a/tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp b/tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
index 2d84e86..6f05905 100644
--- a/tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
+++ b/tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
@@ -698,13 +698,7 @@
   }
 
   void parse() {
-    auto &P = Parser->getParser();
-    bool Done = false;
-    while (!Done) {
-      P.parseTopLevel();
-      Done = P.Tok.is(tok::eof);
-    }
-    P.finalizeSyntaxTree();
+    Parser->parse();
   }
 
   SourceFile &getSourceFile() {
diff --git a/tools/driver/swift_format_main.cpp b/tools/driver/swift_format_main.cpp
index 0cf42f6..7ee178d 100644
--- a/tools/driver/swift_format_main.cpp
+++ b/tools/driver/swift_format_main.cpp
@@ -65,10 +65,7 @@
                                 BufferID, CompInv.getLangOptions(),
                                 CompInv.getModuleName()));
     Parser->getDiagnosticEngine().addConsumer(DiagConsumer);
-    auto &P = Parser->getParser();
-    for (bool Done = false; !Done; Done = P.Tok.is(tok::eof)) {
-      P.parseTopLevel();
-    }
+    Parser->parse();
   }
 
   std::pair<LineRange, std::string> reformat(LineRange Range,
diff --git a/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp b/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp
index 5627cf4..ecdc220 100644
--- a/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp
+++ b/tools/lldb-moduleimport-test/lldb-moduleimport-test.cpp
@@ -229,7 +229,7 @@
     if (Filename.empty())
       return true;
     if (!llvm::sys::fs::exists(llvm::Twine(Filename))) {
-      llvm::errs() << Filename << " does not exists, exiting.\n";
+      llvm::errs() << Filename << " does not exist, exiting.\n";
       return false;
     }
     if (!llvm::sys::fs::is_regular_file(llvm::Twine(Filename))) {
diff --git a/tools/sil-func-extractor/SILFunctionExtractor.cpp b/tools/sil-func-extractor/SILFunctionExtractor.cpp
index bc85bd2..c2d878b 100644
--- a/tools/sil-func-extractor/SILFunctionExtractor.cpp
+++ b/tools/sil-func-extractor/SILFunctionExtractor.cpp
@@ -111,11 +111,6 @@
                llvm::cl::init(false),
                llvm::cl::desc("Do not dump AST."));
 
-static llvm::cl::opt<bool> AssumeUnqualifiedOwnershipWhenParsing(
-    "assume-parsing-unqualified-ownership-sil", llvm::cl::Hidden,
-    llvm::cl::init(false),
-    llvm::cl::desc("Assume all parsed functions have unqualified ownership"));
-
 static llvm::cl::opt<bool>
 DisableSILLinking("disable-sil-linking",
                   llvm::cl::init(true),
@@ -265,10 +260,6 @@
     exit(-1);
   }
 
-  SILOptions &SILOpts = Invocation.getSILOptions();
-  SILOpts.AssumeUnqualifiedOwnershipWhenParsing =
-      AssumeUnqualifiedOwnershipWhenParsing;
-
   CompilerInstance CI;
   PrintingDiagnosticConsumer PrintDiags;
   CI.addDiagnosticConsumer(&PrintDiags);
diff --git a/tools/sil-llvm-gen/SILLLVMGen.cpp b/tools/sil-llvm-gen/SILLLVMGen.cpp
index b450a81..feb6483 100644
--- a/tools/sil-llvm-gen/SILLLVMGen.cpp
+++ b/tools/sil-llvm-gen/SILLLVMGen.cpp
@@ -88,11 +88,6 @@
 static llvm::cl::opt<bool>
     PerformWMO("wmo", llvm::cl::desc("Enable whole-module optimizations"));
 
-static llvm::cl::opt<bool> AssumeUnqualifiedOwnershipWhenParsing(
-    "assume-parsing-unqualified-ownership-sil", llvm::cl::Hidden,
-    llvm::cl::init(false),
-    llvm::cl::desc("Assume all parsed functions have unqualified ownership"));
-
 static llvm::cl::opt<IRGenOutputKind>
     OutputKind("output-kind", llvm::cl::desc("Type of output to produce"),
                llvm::cl::values(clEnumValN(IRGenOutputKind::LLVMAssembly,
@@ -157,11 +152,6 @@
   LangOpts.EnableObjCAttrRequiresFoundation = false;
   LangOpts.EnableObjCInterop = LangOpts.Target.isOSDarwin();
 
-  // Setup the SIL Options.
-  SILOptions &SILOpts = Invocation.getSILOptions();
-  SILOpts.AssumeUnqualifiedOwnershipWhenParsing =
-      AssumeUnqualifiedOwnershipWhenParsing;
-
   // Setup the IRGen Options.
   IRGenOptions &Opts = Invocation.getIRGenOptions();
   Opts.OutputKind = OutputKind;
diff --git a/tools/sil-nm/SILNM.cpp b/tools/sil-nm/SILNM.cpp
index d914f0c..3b1a6ed 100644
--- a/tools/sil-nm/SILNM.cpp
+++ b/tools/sil-nm/SILNM.cpp
@@ -80,11 +80,6 @@
 static llvm::cl::opt<std::string> Triple("target",
                                          llvm::cl::desc("target triple"));
 
-static llvm::cl::opt<bool> AssumeUnqualifiedOwnershipWhenParsing(
-    "assume-parsing-unqualified-ownership-sil", llvm::cl::Hidden,
-    llvm::cl::init(false),
-    llvm::cl::desc("Assume all parsed functions have unqualified ownership"));
-
 // This function isn't referenced outside its translation unit, but it
 // can't use the "static" keyword because its address is used for
 // getMainExecutable (since some platforms don't support taking the
@@ -179,10 +174,6 @@
     exit(-1);
   }
 
-  SILOptions &SILOpts = Invocation.getSILOptions();
-  SILOpts.AssumeUnqualifiedOwnershipWhenParsing =
-      AssumeUnqualifiedOwnershipWhenParsing;
-
   CompilerInstance CI;
   PrintingDiagnosticConsumer PrintDiags;
   CI.addDiagnosticConsumer(&PrintDiags);
diff --git a/tools/sil-opt/SILOpt.cpp b/tools/sil-opt/SILOpt.cpp
index 8d374ca..d48f505 100644
--- a/tools/sil-opt/SILOpt.cpp
+++ b/tools/sil-opt/SILOpt.cpp
@@ -208,11 +208,6 @@
 static llvm::cl::opt<bool>
 PerformWMO("wmo", llvm::cl::desc("Enable whole-module optimizations"));
 
-static llvm::cl::opt<bool>
-AssumeUnqualifiedOwnershipWhenParsing(
-    "assume-parsing-unqualified-ownership-sil", llvm::cl::Hidden, llvm::cl::init(false),
-    llvm::cl::desc("Assume all parsed functions have unqualified ownership"));
-
 static llvm::cl::opt<bool> DisableGuaranteedNormalArguments(
     "disable-guaranteed-normal-arguments", llvm::cl::Hidden,
     llvm::cl::init(false),
@@ -348,8 +343,6 @@
   if (OptimizationGroup != OptGroup::Diagnostics)
     SILOpts.OptMode = OptimizationMode::ForSpeed;
   SILOpts.EnableSILOwnership = EnableSILOwnershipOpt;
-  SILOpts.AssumeUnqualifiedOwnershipWhenParsing =
-    AssumeUnqualifiedOwnershipWhenParsing;
 
   SILOpts.VerifyExclusivity = VerifyExclusivity;
   if (EnforceExclusivity.getNumOccurrences() != 0) {
diff --git a/tools/swift-stdlib-tool/CMakeLists.txt b/tools/swift-stdlib-tool/CMakeLists.txt
index 0088163..b280077 100644
--- a/tools/swift-stdlib-tool/CMakeLists.txt
+++ b/tools/swift-stdlib-tool/CMakeLists.txt
@@ -1,10 +1,6 @@
 add_swift_host_tool(swift-stdlib-tool
-  swift-stdlib-tool.mm)
+  swift-stdlib-tool.mm
+  SWIFT_COMPONENT compiler)
 
 find_library(FOUNDATION NAMES Foundation)
 target_link_libraries(swift-stdlib-tool PRIVATE ${FOUNDATION})
-
-swift_install_in_component(compiler
-    TARGETS swift-stdlib-tool
-    RUNTIME DESTINATION "bin")
-
diff --git a/utils/WindowsSDKVFSOverlay.yaml.in b/utils/WindowsSDKVFSOverlay.yaml.in
index d44c2f9..e9e2a00 100644
--- a/utils/WindowsSDKVFSOverlay.yaml.in
+++ b/utils/WindowsSDKVFSOverlay.yaml.in
@@ -17,6 +17,9 @@
       - name: wtypesbase.h
         type: file
         external-contents: "@UniversalCRTSdkDir@/Include/@UCRTVersion@/shared/WTypesbase.h"
+      - name: ConcurrencySal.h
+        type: file
+        external-contents: "@UniversalCRTSdkDir@/Include/@UCRTVersion@/shared/concurrencysal.h"
   - name: "@UniversalCRTSdkDir@/Include/@UCRTVersion@/um"
     type: directory
     contents:
diff --git a/utils/build-presets.ini b/utils/build-presets.ini
index 512664e..248669f 100644
--- a/utils/build-presets.ini
+++ b/utils/build-presets.ini
@@ -806,6 +806,13 @@
 android-icu-i18n-include=%(arm_dir)s/icu/source/i18n
 android-icu-data=%(arm_dir)s/libicudataswift.so
 
+[preset: buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build,aarch64]
+mixin-preset=buildbot_linux_crosscompile_android,tools=RA,stdlib=RD,build
+
+dash-dash
+
+android-arch=aarch64
+
 # Ubuntu 18.04 preset for backwards compat and future customizations.
 [preset: buildbot_linux_1804]
 mixin-preset=buildbot_linux
diff --git a/utils/build-script-impl b/utils/build-script-impl
index 9ded899..c438257 100755
--- a/utils/build-script-impl
+++ b/utils/build-script-impl
@@ -3774,8 +3774,7 @@
           call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_DISABLE_REQUIRED_ARCLITE string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
           call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_LINK_OBJC_RUNTIME string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
           call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_DEVELOPMENT_TOOLCHAIN string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
-          call ${PLISTBUDDY_BIN} -c "Add DefaultBuildSettings dict" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
-          call ${PLISTBUDDY_BIN} -c "Add DefaultBuildSettings:SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
+          call ${PLISTBUDDY_BIN} -c "Add OverrideBuildSettings:SWIFT_USE_DEVELOPMENT_TOOLCHAIN_RUNTIME string 'YES'" "${DARWIN_TOOLCHAIN_INFO_PLIST}"
 
           call chmod a+r "${DARWIN_TOOLCHAIN_INFO_PLIST}"
 
diff --git a/utils/build_swift/argparse/types.py b/utils/build_swift/argparse/types.py
index 76ee6e2..7686c0d 100644
--- a/utils/build_swift/argparse/types.py
+++ b/utils/build_swift/argparse/types.py
@@ -115,7 +115,7 @@
         path = os.path.abspath(path)
 
         if self._assert_exists and not os.path.exists(path):
-            raise ArgumentTypeError('{} does not exists'.format(path))
+            raise ArgumentTypeError('{} does not exist'.format(path))
 
         if self._assert_executable and not PathType._is_executable(path):
             raise ArgumentTypeError('{} is not an executable'.format(path))
diff --git a/utils/update_checkout/update-checkout-config.json b/utils/update_checkout/update-checkout-config.json
index 384eea1..418a9b8 100644
--- a/utils/update_checkout/update-checkout-config.json
+++ b/utils/update_checkout/update-checkout-config.json
@@ -37,7 +37,11 @@
         "icu": {
             "remote": { "id": "unicode-org/icu" },
             "platforms": [ "Linux" ]
-        }
+        },
+        "libcxx": {
+            "remote": { "id": "apple/swift-libcxx" } },
+        "clang-tools-extra": {
+            "remote": { "id": "apple/swift-clang-tools-extra" } }
     },
     "default-branch-scheme": "master",
     "branch-schemes": {
@@ -60,7 +64,9 @@
                 "swift-integration-tests": "master",
                 "swift-xcode-playground-support": "master",
                 "ninja": "release",
-                "icu": "release-61-1"
+                "icu": "release-61-1",
+                "clang-tools-extra": "stable",
+                "libcxx": "stable"
             }
         },
         "next" : {
@@ -84,7 +90,9 @@
                 "swift-integration-tests": "master",
                 "swift-xcode-playground-support": "master",
                 "ninja": "release",
-                "icu": "release-61-1"
+                "icu": "release-61-1",
+                "clang-tools-extra": "upstream-with-swift",
+                "libcxx": "upstream-with-swift"
             }
         },
         "swift-3.0-branch" : {
@@ -211,7 +219,9 @@
                 "swift-integration-tests": "swift-5.0-branch",
                 "swift-xcode-playground-support": "swift-5.0-branch",
                 "ninja": "release",
-                "icu": "release-61-1"
+                "icu": "release-61-1",
+                "clang-tools-extra": "swift-5.0-branch",
+                "libcxx": "swift-5.0-branch"
             }
         }
     }
diff --git a/validation-test/Reflection/reflect_Character.swift b/validation-test/Reflection/reflect_Character.swift
index c402513..4ed4305 100644
--- a/validation-test/Reflection/reflect_Character.swift
+++ b/validation-test/Reflection/reflect_Character.swift
@@ -34,12 +34,10 @@
 // CHECK-64-NEXT:           (struct size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647 bitwise_takable=1
 // CHECK-64-NEXT:             (field name=_object offset=0
 // CHECK-64-NEXT:               (struct size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647 bitwise_takable=1
-// CHECK-64-NEXT:                 (field name=_countAndFlags offset=0
+// CHECK-64-NEXT:                 (field name=_countAndFlagsBits offset=0
 // CHECK-64-NEXT:                   (struct size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1
-// CHECK-64-NEXT:                     (field name=_storage offset=0
-// CHECK-64-NEXT:                       (struct size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1
-// CHECK-64-NEXT:                         (field name=_value offset=0
-// CHECK-64-NEXT:                           (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1))))))
+// CHECK-64-NEXT:                     (field name=_value offset=0
+// CHECK-64-NEXT:                       (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1))))
 // CHECK-64-NEXT:                 (field name=_object offset=8
 // CHECK-64-NEXT:                   (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=2147483647 bitwise_takable=1)))))))))))
 
diff --git a/validation-test/Reflection/reflect_multiple_types.swift b/validation-test/Reflection/reflect_multiple_types.swift
index bf4619a..687549a 100644
--- a/validation-test/Reflection/reflect_multiple_types.swift
+++ b/validation-test/Reflection/reflect_multiple_types.swift
@@ -132,12 +132,10 @@
 // CHECK-64-NEXT:             (struct size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647 bitwise_takable=1
 // CHECK-64-NEXT:               (field name=_object offset=0
 // CHECK-64-NEXT:                 (struct size=16 alignment=8 stride=16 num_extra_inhabitants=2147483647 bitwise_takable=1
-// CHECK-64-NEXT:                   (field name=_countAndFlags offset=0
+// CHECK-64-NEXT:                   (field name=_countAndFlagsBits offset=0
 // CHECK-64-NEXT:                     (struct size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1
-// CHECK-64-NEXT:                       (field name=_storage offset=0
-// CHECK-64-NEXT:                         (struct size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1
-// CHECK-64-NEXT:                           (field name=_value offset=0
-// CHECK-64-NEXT:                             (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1))))))
+// CHECK-64-NEXT:                       (field name=_value offset=0
+// CHECK-64-NEXT:                         (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=0 bitwise_takable=1))))
 // CHECK-64-NEXT:                   (field name=_object offset=8
 // CHECK-64-NEXT:                     (builtin size=8 alignment=8 stride=8 num_extra_inhabitants=2147483647 bitwise_takable=1))))))))))
 
diff --git a/validation-test/SIL/parse_stdlib.sil b/validation-test/SIL/parse_stdlib.sil
index ec9ad1d..439664a 100644
--- a/validation-test/SIL/parse_stdlib.sil
+++ b/validation-test/SIL/parse_stdlib.sil
@@ -1,5 +1,5 @@
 // RUN: rm -f %t.*
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=true -sil-disable-ast-dump %platform-module-dir/Swift.swiftmodule -module-name=Swift -o %t.sil
-// RUN: %target-sil-opt -assume-parsing-unqualified-ownership-sil -enable-sil-verify-all=true %t.sil > /dev/null
+// RUN: %target-sil-opt -enable-sil-verify-all=true -sil-disable-ast-dump %platform-module-dir/Swift.swiftmodule -module-name=Swift -o %t.sil
+// RUN: %target-sil-opt -enable-sil-verify-all=true %t.sil > /dev/null
 // REQUIRES: long_test
 // REQUIRES: nonexecutable_test
diff --git a/validation-test/Sema/type_checker_perf/fast/rdar21720888.swift.gyb b/validation-test/Sema/type_checker_perf/fast/rdar21720888.swift.gyb
index 080fa45..e92c370 100644
--- a/validation-test/Sema/type_checker_perf/fast/rdar21720888.swift.gyb
+++ b/validation-test/Sema/type_checker_perf/fast/rdar21720888.swift.gyb
@@ -4,6 +4,6 @@
 
 _ = [
 %for i in range(0, N):
-  (label: "string"),
+  (label: "string", another: 123),
 %end
 ]
diff --git a/validation-test/Sema/type_checker_perf/fast/rdar46687985.swift b/validation-test/Sema/type_checker_perf/fast/rdar46687985.swift
new file mode 100644
index 0000000..6b013ee
--- /dev/null
+++ b/validation-test/Sema/type_checker_perf/fast/rdar46687985.swift
@@ -0,0 +1,5 @@
+// RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1 -solver-enable-operator-designated-types
+
+func test(_ d: Double) -> Double {
+  return d + d - d - (d / 2) + (d / 2) + (d / 2.0)
+}
diff --git a/validation-test/Sema/type_checker_perf/fast/simd_add.gyb b/validation-test/Sema/type_checker_perf/fast/simd_add.gyb
index 9bf7d4f..8bd1cf8 100644
--- a/validation-test/Sema/type_checker_perf/fast/simd_add.gyb
+++ b/validation-test/Sema/type_checker_perf/fast/simd_add.gyb
@@ -2,8 +2,6 @@
 // REQUIRES: OS=macosx
 // REQUIRES: asserts
 
-import SIMDOperators
-
 func test(_ s: SIMD4<Float>,
 %for i in range(0, N):
   _ s${i}: SIMD4<Float>,
diff --git a/validation-test/Sema/type_checker_perf/slow/rdar26564101.swift b/validation-test/Sema/type_checker_perf/slow/rdar26564101.swift
index 3f40024..be04b97 100644
--- a/validation-test/Sema/type_checker_perf/slow/rdar26564101.swift
+++ b/validation-test/Sema/type_checker_perf/slow/rdar26564101.swift
@@ -1,7 +1,8 @@
 // RUN: %target-typecheck-verify-swift -solver-expression-time-threshold=1
 // REQUIRES: tools-release,no_asserts
+// REQUIRES: rdar46850561
 
 func rdar26564101(a: [Double], m: Double) -> Double {
   return Double(Array(0...a.count - 1).reduce(0) { $0 + $1 - m })
-  // expected-error@-1 {{reasonable time}}
+  // expected-error@-1 {{too complex}}
 }
diff --git a/validation-test/Sema/type_checker_perf/slow/sr139.swift b/validation-test/Sema/type_checker_perf/slow/sr139.swift
new file mode 100644
index 0000000..ea89255
--- /dev/null
+++ b/validation-test/Sema/type_checker_perf/slow/sr139.swift
@@ -0,0 +1,7 @@
+// RUN: %target-typecheck-verify-swift
+// RUN: %target-swift-frontend -typecheck %s -solver-enable-operator-designated-types
+
+// SR-139:
+// Infinite recursion parsing bitwise operators
+let x = UInt32(0x1FF)&0xFF << 24 | UInt32(0x1FF)&0xFF << 16 | UInt32(0x1FF)&0xFF << 8 | (UInt32(0x1FF)&0xFF);  // expected-error {{reasonable time}}
+
diff --git a/validation-test/Sema/wmo_verify_loaded.swift b/validation-test/Sema/wmo_verify_loaded.swift
index 01cc236..c8ccc5f 100644
--- a/validation-test/Sema/wmo_verify_loaded.swift
+++ b/validation-test/Sema/wmo_verify_loaded.swift
@@ -20,7 +20,7 @@
 
 // NSPasteboardType.init(rawValue:)
 // - just make sure it has a body.
-// CHECK-LABEL: sil shared [transparent] [serializable] @$sSo16NSPasteboardTypea8rawValueABSS_tcfC : $@convention(method) (@owned String, @thin NSPasteboard.PasteboardType.Type) -> @owned NSPasteboard.PasteboardType {
+// CHECK-LABEL: sil shared [transparent] [serializable] [ossa] @$sSo16NSPasteboardTypea8rawValueABSS_tcfC : $@convention(method) (@owned String, @thin NSPasteboard.PasteboardType.Type) -> @owned NSPasteboard.PasteboardType {
 // CHECK: bb0(%0 : @owned $String, %1 : $@thin NSPasteboard.PasteboardType.Type):
 // CHECK: return %{{.*}} : $NSPasteboard.PasteboardType
 // CHECK-LABEL: } // end sil function '$sSo16NSPasteboardTypea8rawValueABSS_tcfC'
diff --git a/validation-test/compiler_crashers_2_fixed/0186-rdar46497155.swift b/validation-test/compiler_crashers_2_fixed/0186-rdar46497155.swift
new file mode 100644
index 0000000..ed07326
--- /dev/null
+++ b/validation-test/compiler_crashers_2_fixed/0186-rdar46497155.swift
@@ -0,0 +1,32 @@
+// RUN: %target-typecheck-verify-swift
+
+protocol P {
+  func isEqual(_ other: P) -> Bool
+}
+
+struct A {
+  var value: P? = nil
+}
+
+struct B {
+  func foo() throws -> A {}
+}
+
+struct E {
+  func getB(_ flag: inout Bool) throws -> B {
+    return B()
+  }
+}
+
+func foo(arr: [E], other: P) -> Bool {
+  return arr.compactMap { i in
+    // expected-error@-1 {{unable to infer complex closure return type; add explicit type to disambiguate}} {{29-29=-> B? }}
+    var flag = false
+    return try? i.getB(&flag)
+  }.compactMap { u -> P? in
+    guard let a = try? u.foo() else { return nil }
+    return a.value!
+  }.contains {
+    $0.isEqual(other)
+  }
+}
diff --git a/validation-test/stdlib/Dictionary.swift b/validation-test/stdlib/Dictionary.swift
index afb5fb9..2555100 100644
--- a/validation-test/stdlib/Dictionary.swift
+++ b/validation-test/stdlib/Dictionary.swift
@@ -2383,6 +2383,9 @@
 }
 
 DictionaryTestSuite.test("BridgedFromObjC.Nonverbatim.ImmutableDictionaryIsCopied") {
+  //some bridged NSDictionary operations on non-standard NSDictionary subclasses
+  //autorelease keys and values. Make sure the leak checker isn't confused
+  autoreleasepool {
   let nsd: NSDictionary = CustomImmutableNSDictionary(_privateInit: ())
 
   CustomImmutableNSDictionary.timesCopyWithZoneWasCalled = 0
@@ -2406,6 +2409,7 @@
   _fixLifetime(nsd)
   _fixLifetime(d)
   _fixLifetime(bridgedBack)
+  }
 }
 
 
@@ -3243,9 +3247,9 @@
 }
 
 DictionaryTestSuite.test("BridgedFromObjC.Nonverbatim.Generate_ParallelArray") {
-autoreleasepoolIfUnoptimizedReturnAutoreleased {
-  // Add an autorelease pool because ParallelArrayDictionary autoreleases
-  // values in objectForKey.
+  //some bridged NSDictionary operations on non-standard NSDictionary subclasses
+  //autorelease keys and values. Make sure the leak checker isn't confused
+autoreleasepool {
 
   let d = getParallelArrayBridgedNonverbatimDictionary()
   let identity1 = d._rawIdentifier()
@@ -3469,6 +3473,150 @@
   expectTrue(v == 42 || v == 23)
 }
 
+DictionaryTestSuite.test("BridgedFromObjC.Verbatim.OptionalDowncastFailure") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  expectNotNil(nsd as? [NSString: NSNumber])
+  expectNotNil(nsd as? [NSString: NSObject])
+  expectNotNil(nsd as? [NSObject: NSNumber])
+  expectNil(nsd as? [NSNumber: NSObject])
+  expectNil(nsd as? [NSObject: NSString])
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Verbatim.ForcedDowncastFailure.Keys") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  let bridged = nsd as! [NSNumber: NSObject]
+  expectCrashLater()
+  // The forced downcast succeeds unconditionally; the cast is instead verified
+  // when we access individual elements.
+  _ = bridged.first
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Verbatim.ForcedDowncastFailure.Values") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+
+  let bridged = nsd as! [NSObject: NSString]
+  expectCrashLater()
+  // The forced downcast succeeds unconditionally; the cast is instead verified
+  // when we access individual elements.
+  _ = bridged.first
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Verbatim.ForcedDowncastFailure.Both") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  let bridged = nsd as! [NSNumber: NSString]
+  expectCrashLater()
+  // The forced downcast succeeds unconditionally; the cast is instead verified
+  // when we access individual elements.
+  _ = bridged.first
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Verbatim.ForcedDowncastFailure.Partial")
+  .code {
+  let nsd = NSMutableDictionary(
+    objects: (0..<10).map { "\($0)" as NSString },
+    forKeys: (0..<10).map { $0 as NSNumber })
+  nsd.setObject("cuckoo" as NSString, forKey: "cuckoo" as NSString)
+  let bridged = nsd as! [NSNumber: NSString]
+  // The forced downcast succeeds unconditionally; the cast is instead verified
+  // when we access individual elements.
+  for i in 0 ..< 10 {
+    expectEqual("\(i)" as NSString, bridged[i as NSNumber])
+  }
+  // The item with the unexpected key is only accessible when we iterate over
+  // the elements. There should be a trap when we get to it.
+  expectCrashLater()
+  for (key, value) in bridged {
+    _ = key
+    _ = value
+  }
+}
+
+DictionaryTestSuite.test("BridgedFromObjC.Verbatim.DowncastFailure.LeakTest") {
+  let nsd = NSMutableDictionary(
+    objects: (0..<100).map { TestObjCEquatableValueTy($0) },
+    forKeys: (0..<100).map { TestObjCKeyTy($0) })
+  expectNotNil(nsd as? [TestObjCKeyTy: TestObjCEquatableValueTy])
+  expectNotNil(nsd as? [TestObjCKeyTy: NSObject])
+  expectNotNil(nsd as? [NSObject: TestObjCEquatableValueTy])
+
+  // Inserting a single key-value pair of a different type should make all these
+  // downcasts fail.
+  nsd.setObject("cuckoo" as NSString, forKey: "cuckoo" as NSString)
+  expectNil(nsd as? [TestObjCKeyTy: TestObjCEquatableValueTy])
+  expectNil(nsd as? [TestObjCKeyTy: NSObject])
+  expectNil(nsd as? [NSObject: TestObjCEquatableValueTy])
+  // No crash test here -- we're relying on the leak tests in tearDown.
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Nonverbatim.OptionalDowncastFailure") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  expectNotNil(nsd as? [String: Int])
+  expectNotNil(nsd as? [String: NSObject])
+  expectNotNil(nsd as? [NSObject: Int])
+  expectNil(nsd as? [Int: NSObject])
+  expectNil(nsd as? [NSObject: String])
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Nonverbatim.ForcedDowncastFailure.Keys") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  expectCrashLater()
+  _ = nsd as! [Int: NSObject]
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Nonverbatim.ForcedDowncastFailure.Values") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  expectCrashLater()
+  _ = nsd as! [NSObject: String]
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Nonverbatim.ForcedDowncastFailure.Both") {
+  let nsd = NSDictionary(
+    objects: [1 as NSNumber, 2 as NSNumber, 3 as NSNumber],
+    forKeys: ["One" as NSString, "Two" as NSString, "Three" as NSString])
+  expectCrashLater()
+  _ = nsd as! [Int: String]
+}
+
+DictionaryTestSuite
+  .test("BridgedFromObjC.Nonverbatim.DowncastFailure.LeakTest") {
+  let nsd = NSMutableDictionary(
+    objects: (0..<100).map { TestObjCEquatableValueTy($0) },
+    forKeys: (0..<100).map { TestObjCKeyTy($0) })
+  expectNotNil(nsd as? [TestBridgedKeyTy: TestBridgedEquatableValueTy])
+  expectNotNil(nsd as? [TestBridgedKeyTy: NSObject])
+  expectNotNil(nsd as? [NSObject: TestBridgedEquatableValueTy])
+
+  // Inserting a single key-value pair of a different type should make all these
+  // downcasts fail.
+  nsd.setObject("cuckoo" as NSString, forKey: "cuckoo" as NSString)
+  expectNil(nsd as? [TestBridgedKeyTy: TestBridgedEquatableValueTy])
+  expectNil(nsd as? [TestBridgedKeyTy: NSObject])
+  expectNil(nsd as? [NSObject: TestBridgedEquatableValueTy])
+  // No crash test here -- we're relying on the leak tests in tearDown.
+}
+
 //===---
 // Dictionary -> NSDictionary bridging tests.
 //
@@ -5547,6 +5695,62 @@
   d.remove(at: i)
 }
 
+DictionaryTestSuite.test("BulkLoadingInitializer.Unique") {
+  for c in [0, 1, 2, 3, 5, 10, 25, 150] {
+    let d1 = Dictionary<TestKeyTy, TestEquatableValueTy>(
+      _unsafeUninitializedCapacity: c,
+      allowingDuplicates: false
+    ) { keys, values, count in
+      let k = keys.baseAddress!
+      let v = values.baseAddress!
+      for i in 0 ..< c {
+        (k + i).initialize(to: TestKeyTy(i))
+        (v + i).initialize(to: TestEquatableValueTy(i))
+        count += 1
+      }
+    }
+
+    let d2 = Dictionary(
+      uniqueKeysWithValues: (0..<c).map {
+        (TestKeyTy($0), TestEquatableValueTy($0))
+      })
+
+    for i in 0 ..< c {
+      expectEqual(TestEquatableValueTy(i), d1[TestKeyTy(i)])
+    }
+    expectEqual(d2, d1)
+  }
+}
+
+DictionaryTestSuite.test("BulkLoadingInitializer.Nonunique") {
+  for c in [0, 1, 2, 3, 5, 10, 25, 150] {
+    let d1 = Dictionary<TestKeyTy, TestEquatableValueTy>(
+      _unsafeUninitializedCapacity: c,
+      allowingDuplicates: true
+    ) { keys, values, count in
+      let k = keys.baseAddress!
+      let v = values.baseAddress!
+      for i in 0 ..< c {
+        (k + i).initialize(to: TestKeyTy(i / 2))
+        (v + i).initialize(to: TestEquatableValueTy(i / 2))
+        count += 1
+      }
+    }
+
+    let d2 = Dictionary(
+      (0 ..< c).map {
+        (TestKeyTy($0 / 2), TestEquatableValueTy($0 / 2))
+      },
+      uniquingKeysWith: { a, b in a })
+
+    expectEqual(d1.count, d2.count)
+    for i in 0 ..< c / 2 {
+      expectEqual(TestEquatableValueTy(i), d1[TestKeyTy(i)])
+    }
+    expectEqual(d2, d1)
+  }
+}
+
 DictionaryTestSuite.setUp {
 #if _runtime(_ObjC)
   // Exercise ARC's autoreleased return value optimization in Foundation.
diff --git a/validation-test/stdlib/Prototypes/PersistentVector.swift.gyb b/validation-test/stdlib/Prototypes/PersistentVector.swift.gyb
index d7cb1d1..632b6eb 100644
--- a/validation-test/stdlib/Prototypes/PersistentVector.swift.gyb
+++ b/validation-test/stdlib/Prototypes/PersistentVector.swift.gyb
@@ -1,6 +1,6 @@
 // RUN: %empty-directory(%t)
 // RUN: %gyb %s -o %t/PersistentVector.swift
-// RUN: %line-directive %t/PersistentVector.swift -- %target-build-swift -parse-stdlib %t/PersistentVector.swift -o %t/a.out
+// RUN: %line-directive %t/PersistentVector.swift -- %target-build-swift -parse-stdlib -Xfrontend -disable-access-control %t/PersistentVector.swift -o %t/a.out
 // RUN: %target-codesign %t/a.out
 // RUN: %line-directive %t/PersistentVector.swift -- %target-run %t/a.out
 // REQUIRES: executable_test