diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
index 194de518bcb..023c7f8887c 100644
--- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
+++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
@@ -102,3 +102,4 @@
 * Exception field serialization (`GetObjectData` and field-restoring constructor) is now gated behind `langversion:11` (`LanguageFeature.ExceptionFieldSerializationSupport`). With langversion ≤10, exception codegen is unchanged from pre-#19342 behavior. ([PR #19746](https://github.com/dotnet/fsharp/pull/19746))
 
 ### Breaking Changes
+* Optimizer: don't inline named functions in debug builds ([PR #19548](https://github.com/dotnet/fsharp/pull/19548)
\ No newline at end of file
diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs
index 94b9096fb1e..da94755cbdf 100644
--- a/src/Compiler/CodeGen/IlxGen.fs
+++ b/src/Compiler/CodeGen/IlxGen.fs
@@ -269,6 +269,8 @@ type IlxGenOptions =
 
         /// When set to true, the IlxGen will delay generation of method bodies and generated them later in parallel (parallelized across files)
         parallelIlxGenEnabled: bool
+
+        alwaysInline: bool
     }
 
 /// Compilation environment for compiling a fragment of an assembly
@@ -5750,8 +5752,13 @@ and GenTraitCall (cenv: cenv) cgbuf eenv (traitInfo: TraitConstraintInfo, argExp
 
     | None ->
 
-        // If witnesses are available, we should now always find trait witnesses in scope
-        assert not generateWitnesses
+        // When alwaysInline is true, all trait calls should be resolved via witnesses in scope.
+        // When alwaysInline is false, inline functions are kept as calls rather than inlined.
+        // Their witness arguments may contain TraitCall operations for constraints that were resolved
+        // without a witness (e.g., when the constraint is satisfied by a known concrete type).
+        // In such cases, generateWitnesses can be true (because other witnesses are in scope) but
+        // the specific trait's witness is not found. Fall through to the constraint solver to resolve it.
+        assert (not generateWitnesses || not cenv.options.alwaysInline)
 
         let exprOpt =
             CommitOperationResult(ConstraintSolver.CodegenWitnessExprForTraitConstraint cenv.tcVal g cenv.amap m traitInfo argExprs)
@@ -7200,7 +7207,19 @@ and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames
         let cloName =
             // Ensure that we have an g.CompilerGlobalState
             assert (g.CompilerGlobalState |> Option.isSome)
-            g.CompilerGlobalState.Value.StableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, expr.Range, uniq)
+            // The closure name counter is keyed by (basicName, fileIndex). When an expression is copied
+            // from another file (e.g. specializing an inline function body across files), its ranges
+            // still point at the original file, so its closures fall into a different counter bucket
+            // than closures minted for the current file. Since all these closures live under the same
+            // enclosing type, that can produce two closures with the same final name. Bucket the counter
+            // by the enclosing type's file while keeping expr.Range's StartLine for the displayed name.
+            let nameRange =
+                if expr.Range.FileIndex = eenv.cloc.Range.FileIndex then
+                    expr.Range
+                else
+                    Range.mkFileIndexRange eenv.cloc.Range.FileIndex expr.Range.Start expr.Range.End
+
+            g.CompilerGlobalState.Value.StableNameGenerator.GetUniqueCompilerGeneratedName(basenameSafeForUseAsTypename, nameRange, uniq)
 
         let ilCloTypeRef = NestedTypeRefForCompLoc eenv.cloc cloName
 
@@ -7258,6 +7277,21 @@ and GetIlxClosureFreeVars cenv m (thisVars: ValRef list) boxity eenv takenNames
 
     let cloFreeTyvars = cloFreeTyvars.FreeTypars |> Zset.elements
 
+    // When generating witnesses, witness types may reference type variables that appear
+    // only in SRTP constraints of the captured type variables (e.g. 'b in 'a : (member M: unit -> 'b)).
+    // Include those so they are available when generating witness field types.
+    let cloFreeTyvars =
+        if ComputeGenerateWitnesses g eenv then
+            let extra =
+                GetTraitWitnessInfosOfTypars g 0 cloFreeTyvars
+                |> List.collect (fun w ->
+                    (freeInType CollectTyparsNoCaching (GenWitnessTy g w)).FreeTypars
+                    |> Zset.elements)
+
+            (cloFreeTyvars @ extra) |> List.distinctBy (fun tp -> tp.Stamp)
+        else
+            cloFreeTyvars
+
     let eenvinner = eenv |> EnvForTypars cloFreeTyvars
 
     let ilCloTyInner =
diff --git a/src/Compiler/CodeGen/IlxGen.fsi b/src/Compiler/CodeGen/IlxGen.fsi
index cd9dd0f2ffb..74cbe72d3fe 100644
--- a/src/Compiler/CodeGen/IlxGen.fsi
+++ b/src/Compiler/CodeGen/IlxGen.fsi
@@ -61,6 +61,9 @@ type internal IlxGenOptions =
 
         /// When set to true, the IlxGen will delay generation of method bodies and generate them later in parallel (parallelized across files)
         parallelIlxGenEnabled: bool
+
+        /// Indicates if inline functions are being inlined or emitted as calls
+        alwaysInline: bool
     }
 
 /// The results of the ILX compilation of one fragment of an assembly
diff --git a/src/Compiler/Driver/CompilerConfig.fs b/src/Compiler/Driver/CompilerConfig.fs
index 18b43b75ce5..a1e7937b0d9 100644
--- a/src/Compiler/Driver/CompilerConfig.fs
+++ b/src/Compiler/Driver/CompilerConfig.fs
@@ -600,6 +600,8 @@ type TcConfigBuilder =
 
         mutable strictIndentation: bool option
 
+        mutable alwaysInline: bool option
+
         mutable exename: string option
 
         // If true - the compiler will copy FSharp.Core.dll along the produced binaries
@@ -853,6 +855,7 @@ type TcConfigBuilder =
             dumpSignatureData = false
             realsig = false
             strictIndentation = None
+            alwaysInline = None
             compilationMode = TcGlobals.CompilationMode.Unset
         }
 
@@ -1253,6 +1256,14 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
     member _.fsiMultiAssemblyEmit = data.fsiMultiAssemblyEmit
     member _.FxResolver = data.FxResolver
     member _.strictIndentation = data.strictIndentation
+
+    member _.alwaysInline =
+        data.alwaysInline
+        |> Option.defaultValue (
+            data.optSettings.LocalOptimizationsEnabled
+            || data.extraOptimizationIterations > 0
+        )
+
     member _.primaryAssembly = data.primaryAssembly
     member _.noFeedback = data.noFeedback
     member _.stackReserveSize = data.stackReserveSize
diff --git a/src/Compiler/Driver/CompilerConfig.fsi b/src/Compiler/Driver/CompilerConfig.fsi
index 17e035109ab..9f19b8e59ba 100644
--- a/src/Compiler/Driver/CompilerConfig.fsi
+++ b/src/Compiler/Driver/CompilerConfig.fsi
@@ -472,6 +472,8 @@ type TcConfigBuilder =
 
         mutable strictIndentation: bool option
 
+        mutable alwaysInline: bool option
+
         mutable exename: string option
 
         mutable copyFSharpCore: CopyFSharpCoreFlag
@@ -814,6 +816,8 @@ type TcConfig =
 
     member strictIndentation: bool option
 
+    member alwaysInline: bool
+
     member GetTargetFrameworkDirectories: unit -> string list
 
     /// Get the loaded sources that exist and issue a warning for the ones that don't
diff --git a/src/Compiler/Driver/CompilerOptions.fs b/src/Compiler/Driver/CompilerOptions.fs
index 98cec17265c..f54f36fa7f9 100644
--- a/src/Compiler/Driver/CompilerOptions.fs
+++ b/src/Compiler/Driver/CompilerOptions.fs
@@ -1207,6 +1207,14 @@ let languageFlags tcConfigB =
             None,
             Some(FSComp.SR.optsStrictIndentation (formatOptionSwitch (Option.defaultValue false tcConfigB.strictIndentation)))
         )
+
+        CompilerOption(
+            "always-inline",
+            tagNone,
+            OptionSwitch(fun switch -> tcConfigB.alwaysInline <- Some(switch = OptionSwitch.On)),
+            None,
+            Some(FSComp.SR.optsAlwaysInline ())
+        )
     ]
 
 // OptionBlock: Advanced user options
diff --git a/src/Compiler/Driver/OptimizeInputs.fs b/src/Compiler/Driver/OptimizeInputs.fs
index 78bca4bf979..d04ae06be01 100644
--- a/src/Compiler/Driver/OptimizeInputs.fs
+++ b/src/Compiler/Driver/OptimizeInputs.fs
@@ -327,6 +327,7 @@ let ApplyAllOptimizations
             // Only do abstractBigTargets in the first phase, and only when TLR is on.
             abstractBigTargets = tcConfig.doTLR
             reportingPhase = true
+            alwaysInline = tcConfig.alwaysInline
         }
 
     // Only do these two steps in the first phase.
@@ -578,6 +579,7 @@ let GenerateIlxCode
             isInteractiveItExpr = isInteractiveItExpr
             alwaysCallVirt = tcConfig.alwaysCallVirt
             parallelIlxGenEnabled = tcConfig.parallelIlxGen
+            alwaysInline = tcConfig.alwaysInline
         }
 
     ilxGenerator.GenerateCode(ilxGenOpts, optimizedImpls, topAttrs.assemblyAttrs, topAttrs.netModuleAttrs)
diff --git a/src/Compiler/FSComp.txt b/src/Compiler/FSComp.txt
index dc27f32bae9..17a35570556 100644
--- a/src/Compiler/FSComp.txt
+++ b/src/Compiler/FSComp.txt
@@ -1561,6 +1561,7 @@ optsSetLangVersion,"Specify language version such as 'latest' or 'preview'."
 optsDisableLanguageFeature,"Disable a specific language feature by name."
 optsSupportedLangVersions,"Supported language versions:"
 optsStrictIndentation,"Override indentation rules implied by the language version (%s by default)"
+optsAlwaysInline,"Always inline 'inline' functions"
 nativeResourceFormatError,"Stream does not begin with a null resource and is not in '.RES' format."
 nativeResourceHeaderMalformed,"Resource header beginning at offset %s is malformed."
 formatDashItem," - %s"
diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs
index 3a9856d7912..46eb2e068cc 100644
--- a/src/Compiler/Optimize/Optimizer.fs
+++ b/src/Compiler/Optimize/Optimizer.fs
@@ -23,6 +23,7 @@ open FSharp.Compiler.Text.LayoutRender
 open FSharp.Compiler.Text.TaggedText
 open FSharp.Compiler.TypedTree 
 open FSharp.Compiler.TypedTreeBasics
+open FSharp.Compiler.Xml
 open FSharp.Compiler.TypedTreeOps
 open FSharp.Compiler.TypedTreeOps.DebugPrint
 open FSharp.Compiler.TypedTreePickle
@@ -327,6 +328,8 @@ type OptimizationSettings =
       reportTotalSizes : bool
       
       processingMode : OptimizationProcessingMode
+
+      alwaysInline: bool
     }
 
     static member Defaults = 
@@ -344,6 +347,7 @@ type OptimizationSettings =
           reportHasEffect = false
           reportTotalSizes = false
           processingMode = OptimizationProcessingMode.Parallel
+          alwaysInline = false
         }
 
     /// Determines if JIT optimizations are enabled
@@ -429,6 +433,10 @@ type cenv =
       stackGuard: StackGuard
 
       realsig: bool
+
+      specializedInlineVals: HashMultiMap<Stamp, TType * Expr>
+
+      signatureHidingInfo: SignatureHidingInfo
     }
 
     override x.ToString() = "<cenv>"
@@ -443,8 +451,12 @@ type IncrementalOptimizationEnv =
     { /// An identifier to help with name generation
       latestBoundId: Ident option
 
-      /// The set of lambda IDs we've inlined to reach this point. Helps to prevent recursive inlining 
-      dontInline: Zset<Unique>  
+      /// Prevents recursive inlining/specialization. Maps lambda ID to a list of specialized types
+      /// currently being processed. An empty list means "block unconditionally" (used by normal
+      /// inlining and non-concrete debug specialization). A non-empty list means "block only these
+      /// specific type specializations" (used by concrete debug specialization, allowing different
+      /// type instantiations of the same function to proceed).
+      dontInline: Map<Stamp, TType list>
 
       /// Recursively bound vars. If an sub-expression that is a candidate for method splitting
       /// contains any of these variables then don't split it, for fear of mucking up tailcalls.
@@ -468,7 +480,7 @@ type IncrementalOptimizationEnv =
 
     static member Empty = 
         { latestBoundId = None 
-          dontInline = Zset.empty Int64.order
+          dontInline = Map.empty
           typarInfos = []
           functionVal = None 
           dontSplitVars = ValMap.Empty
@@ -497,8 +509,9 @@ let CheckInlineValueIsComplete (v: Val) res =
         errorR(Error(FSComp.SR.optValueMarkedInlineButIncomplete(v.DisplayName), v.Range))
         //System.Diagnostics.Debug.Assert(false, sprintf "Break for incomplete inline value %s" v.DisplayName)
 
-let check (vref: ValRef) (res: ValInfo) =
-    CheckInlineValueIsComplete vref.Deref res.ValExprInfo
+let check (cenv: cenv) (vref: ValRef) (res: ValInfo) =
+    if cenv.settings.alwaysInline then
+        CheckInlineValueIsComplete vref.Deref res.ValExprInfo
     (vref, res)
 
 //-------------------------------------------------------------------------
@@ -688,7 +701,7 @@ let GetInfoForVal cenv env m (vref: ValRef) =
 
 let GetInfoForValWithCheck cenv env m (vref: ValRef) =  
     let res = GetInfoForVal cenv env m vref
-    check vref res |> ignore
+    check cenv vref res |> ignore
     res
 
 let IsPartialExpr cenv env m x =
@@ -1322,7 +1335,7 @@ let CombineValueInfos einfos res =
 let CombineValueInfosUnknown einfos = CombineValueInfos einfos UnknownValue
 
 /// Hide information because of a signature
-let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi =
+let AbstractLazyModulInfoByHiding isAssemblyBoundary (cenv: cenv) mhi =
 
     // The freevars and FreeTyvars can indicate if the non-public (hidden) items have been used.
     // Under those checks, the further hidden* checks may be subsumed (meaning, not required anymore).
@@ -1348,15 +1361,16 @@ let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi =
             then detailR
             else ValValue (vref2, detailR)
 
-        // Check for escape in lambda 
-        | CurriedLambdaValue (_, _, _, expr, _) | ConstExprValue(_, expr) when            
+        // Check for escape in lambda
+        | CurriedLambdaValue (_, _, _, expr, _) | ConstExprValue(_, expr) when
             (let fvs = freeInExpr CollectAll expr
-             (isAssemblyBoundary && not (freeVarsAllPublic fvs)) || 
-             Zset.exists hiddenVal fvs.FreeLocals ||
-             Zset.exists hiddenTycon fvs.FreeTyvars.FreeTycons ||
              Zset.exists hiddenTyconRepr fvs.FreeLocalTyconReprs ||
              Zset.exists hiddenRecdField fvs.FreeRecdFields ||
-             Zset.exists hiddenUnionCase fvs.FreeUnionCases ) ->
+             Zset.exists hiddenUnionCase fvs.FreeUnionCases ||
+             (cenv.settings.alwaysInline &&
+              ((isAssemblyBoundary && not (freeVarsAllPublic fvs)) ||
+               Zset.exists hiddenVal fvs.FreeLocals ||
+               Zset.exists hiddenTycon fvs.FreeTyvars.FreeTycons))) ->
                 UnknownValue
 
         // Check for escape in constant 
@@ -1396,8 +1410,10 @@ let AbstractLazyModulInfoByHiding isAssemblyBoundary mhi =
          { ModuleOrNamespaceInfos = NameMap.map abstractLazyModulInfo ss.ModuleOrNamespaceInfos
            ValInfos = 
                ValInfos(ss.ValInfos.Entries 
-                         |> Seq.filter (fun (vref, _) -> not (hiddenVal vref.Deref))
-                         |> Seq.map (fun (vref, e) -> check (* "its implementation uses a binding hidden by a signature" m *) vref (abstractValInfo e) )) } 
+                         |> Seq.filter (fun (vref, _) ->
+                             not (hiddenVal vref.Deref) ||
+                             (not cenv.settings.alwaysInline && vref.Deref.ShouldInline))
+                         |> Seq.map (fun (vref, e) -> check cenv vref (abstractValInfo e) )) }
 
     and abstractLazyModulInfo (ss: LazyModuleInfo) = 
           ss.Force() |> abstractModulInfo |> notlazy
@@ -1416,7 +1432,7 @@ let AbstractOptimizationInfoToEssentials =
     abstractLazyModulInfo
 
 /// Hide information because of a "let ... in ..." or "let rec ... in ... "
-let AbstractExprInfoByVars (boundVars: Val list, boundTyVars) ivalue =
+let AbstractExprInfoByVars (cenv: cenv) (boundVars: Val list, boundTyVars) ivalue =
     // Module and member bindings can be skipped when checking abstraction, since abstraction of these values has already been done when 
     // we hit the end of the module and called AbstractLazyModulInfoByHiding. If we don't skip these then we end up quadratically retraversing  
     // the inferred optimization data, i.e. at each binding all the way up a sequences of 'lets' in a module. 
@@ -1476,7 +1492,7 @@ let AbstractExprInfoByVars (boundVars: Val list, boundTyVars) ivalue =
       let rec abstractModulInfo ss =
          { ModuleOrNamespaceInfos = ss.ModuleOrNamespaceInfos |> NameMap.map (InterruptibleLazy.force >> abstractModulInfo >> notlazy) 
            ValInfos = ss.ValInfos.Map (fun (vref, e) -> 
-               check vref (abstractValInfo e) ) }
+               check cenv vref (abstractValInfo e)) }
 
       abstractExprInfo ivalue
 
@@ -1516,9 +1532,9 @@ let RemapOptimizationInfo g tmenv =
     remapLazyModulInfo
 
 /// Hide information when a value is no longer visible
-let AbstractAndRemapModulInfo g (repackage, hidden) info =
+let AbstractAndRemapModulInfo g (cenv: cenv) (repackage, hidden) info =
     let mrpi = mkRepackageRemapping repackage
-    let info = info |> AbstractLazyModulInfoByHiding false hidden
+    let info = info |> AbstractLazyModulInfoByHiding false cenv hidden
     let info = info |> RemapOptimizationInfo g mrpi
     info
 
@@ -1689,6 +1705,7 @@ let TryEliminateBinding cenv _env bind e2 _m =
        not vspec1.IsCompilerGenerated then 
        None 
     elif vspec1.IsFixed then None 
+    elif vspec1.InlineInfo = ValInline.InlinedDefinition then None
     elif vspec1.LogicalName.StartsWithOrdinal stackVarPrefix ||
          vspec1.LogicalName.Contains suffixForVariablesThatMayNotBeEliminated then None
     else
@@ -2339,6 +2356,17 @@ let inline IsStateMachineExpr g overallExpr =
         isReturnsResumableCodeTy g valRef.TauType
     | _ -> false
 
+let shouldForceInlineMembersInDebug (g: TcGlobals) (tcref: EntityRef) =
+    match g.fslibForceInlineModules.TryGetValue tcref.LogicalName with
+    | true, modRef -> tyconRefEq g tcref modRef 
+    | _ -> false
+
+let shouldForceInlineInDebug (g: TcGlobals) (vref: ValRef) : bool =
+    ValHasWellKnownAttribute g WellKnownValAttributes.NoDynamicInvocationAttribute_True vref.Deref ||
+    ValHasWellKnownAttribute g WellKnownValAttributes.NoDynamicInvocationAttribute_False vref.Deref ||
+
+    vref.HasDeclaringEntity && shouldForceInlineMembersInDebug g vref.DeclaringEntity
+
 /// Optimize/analyze an expression
 let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr =
     cenv.stackGuard.Guard <| fun () ->
@@ -2851,7 +2879,7 @@ and OptimizeLetRec cenv env (binds, bodyExpr, m) =
         let fvs = List.fold (fun acc x -> unionFreeVars acc (fst x |> freeInBindingRhs CollectLocals)) fvs0 bindsR
         SplitValuesByIsUsedOrHasEffect cenv (fun () -> fvs.FreeLocals) bindsR
     // Trim out any optimization info that involves escaping values 
-    let evalueR = AbstractExprInfoByVars (vs, []) einfo.Info 
+    let evalueR = AbstractExprInfoByVars cenv (vs, []) einfo.Info
     // REVIEW: size of constructing new closures - should probably add #freevars + #recfixups here 
     let bodyExprR = Expr.LetRec (bindsRR, bodyExprR, m, Construct.NewFreeVarsCache()) 
     let info = CombineValueInfos (einfo :: bindinfos) evalueR 
@@ -2926,7 +2954,7 @@ and OptimizeLinearExpr cenv env expr contf =
               Info = UnknownValue }
         else 
             // On the way back up: Trim out any optimization info that involves escaping values on the way back up
-            let evalueR = AbstractExprInfoByVars ([bindR.Var], []) bodyInfo.Info 
+            let evalueR = AbstractExprInfoByVars cenv ([bindR.Var], []) bodyInfo.Info
 
             // Preserve the debug points for eliminated bindings that have debug points. 
             let bodyR =
@@ -3092,7 +3120,9 @@ and TryOptimizeVal cenv env (vOpt: ValRef option, shouldInline, inlineIfLambda,
     | ConstExprValue(_size, expr) ->
         Some (remarkExpr m (copyExpr g CloneAllAndMarkExprValsAsCompilerGenerated expr))
 
-    | CurriedLambdaValue (_, _, _, expr, _) when shouldInline || inlineIfLambda ->
+    | CurriedLambdaValue (_, _, _, expr, _) when
+            shouldInline && (cenv.settings.alwaysInline || Option.exists (shouldForceInlineInDebug cenv.g) vOpt) ||
+            inlineIfLambda && cenv.settings.alwaysInline ->
         let fvs = freeInExpr CollectLocals expr
         if fvs.UsesMethodLocalConstructs then
             // Discarding lambda for binding because uses protected members --- TBD: Should we warn or error here
@@ -3104,11 +3134,11 @@ and TryOptimizeVal cenv env (vOpt: ValRef option, shouldInline, inlineIfLambda,
     | TupleValue _ | UnionCaseValue _ | RecdValue _ when shouldInline ->
         failwith "tuple, union and record values cannot be marked 'inline'"
 
-    | UnknownValue when shouldInline ->
+    | UnknownValue when shouldInline && cenv.settings.alwaysInline ->
         warning(Error(FSComp.SR.optValueMarkedInlineHasUnexpectedValue(), m))
         None
 
-    | _ when shouldInline ->
+    | _ when shouldInline && cenv.settings.alwaysInline ->
         warning(Error(FSComp.SR.optValueMarkedInlineCouldNotBeInlined(), m))
         None
 
@@ -3154,12 +3184,14 @@ and OptimizeVal cenv env expr (v: ValRef, m) =
            e, AddValEqualityInfo g m v einfo 
 
     | None ->
-       if v.ShouldInline then
-            match valInfoForVal.ValExprInfo with
-            | UnknownValue -> error(Error(FSComp.SR.optFailedToInlineValue(v.DisplayName), m))
-            | _ -> warning(Error(FSComp.SR.optFailedToInlineValue(v.DisplayName), m))
-       if v.InlineIfLambda then 
-           warning(Error(FSComp.SR.optFailedToInlineSuggestedValue(v.DisplayName), m))
+       if cenv.settings.alwaysInline then
+           if v.ShouldInline then
+                match valInfoForVal.ValExprInfo with
+                | UnknownValue -> error(Error(FSComp.SR.optFailedToInlineValue(v.DisplayName), m))
+                | _ -> warning(Error(FSComp.SR.optFailedToInlineValue(v.DisplayName), m))
+
+           if v.InlineIfLambda then
+               warning(Error(FSComp.SR.optFailedToInlineSuggestedValue(v.DisplayName), m))
 
        expr, (AddValEqualityInfo g m v 
                     { Info=valInfoForVal.ValExprInfo 
@@ -3441,8 +3473,148 @@ and TryDevirtualizeApplication cenv env (f, tyargs, args, m) =
     | _ -> None
 
 /// Attempt to inline an application of a known value at callsites
-and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m) =
+and TryInlineApplication cenv env finfo (valExpr: Expr) (tyargs: TType list, args: Expr list, m) =
     let g = cenv.g
+
+    match cenv.settings.alwaysInline, stripExpr valExpr with
+    | false, Expr.Val(vref, _, _) when vref.ShouldInline && not (shouldForceInlineInDebug cenv.g vref) ->
+        let hasNoTraits =
+            let tps, _ = tryDestForallTy g vref.Type
+            GetTraitConstraintInfosOfTypars g tps |> List.isEmpty
+
+        // Direct-calling an SRTP callee is only safe when every tyarg is a bare typar: then the
+        // callee's SRTP constraints land on the caller's own typars and IlxGen rewrites the
+        // call to the $W variant inside the caller's $W compilation context. Non-typar tyargs
+        // (e.g. MyBuilder<'T>) require static resolution of the trait, which the callee's
+        // non-$W stub cannot do, so those must go through the specialization path.
+        let allTyargsAreBareTypars =
+            tyargs |> List.forall (isTyparTy g)
+
+        // When inside an inline function body being prepared for export (!cenv.optimizing),
+        // only emit a direct call if the callee is publicly accessible. Non-public vals
+        // (e.g. in internal modules, or hidden by .fsi) can't be called by consumers,
+        // so route those through the specialization path which inlines the body.
+        let isHiddenBySignature = cenv.signatureHidingInfo.HiddenVals.Contains vref.Deref
+        let canCallDirectly =
+            (cenv.optimizing || (vref.Accessibility.IsPublic && not isHiddenBySignature)) &&
+            (hasNoTraits || (allTyargsAreBareTypars && vref.ValReprInfo.IsSome))
+
+        let argsR = args |> List.map (OptimizeExpr cenv env >> fst)
+        let info = { TotalSize = 1; FunctionSize = 1; HasEffect = true; MightMakeCriticalTailcall = false; Info = UnknownValue }
+
+        if canCallDirectly then
+            Some(mkApps g ((exprForValRef m vref, vref.Type), [tyargs], argsR, m), info)
+        else
+
+        let origFinfo = GetInfoForValWithCheck cenv env m vref
+        match stripValue origFinfo.ValExprInfo with
+        | CurriedLambdaValue(origLambdaId, _, _, origLambda, origLambdaTy) ->
+            let f2R = CopyExprForInlining cenv true origLambda m
+            let specLambda = MakeApplicationAndBetaReduce g (f2R, origLambdaTy, [tyargs], [], m)
+            let specLambdaTy = tyOfExpr g specLambda
+
+            // Typars that flow in from the enclosing scope when tyargs are non-concrete.
+            // specLambdaTy is closed over the vref's typars after beta-reduction, so its free
+            // typars are exactly the ones carried in by tyargs.
+            let freeTypars =
+                (freeInType CollectTyparsNoCaching specLambdaTy).FreeTypars
+                |> Zset.elements
+
+            let allTyargsAreConcrete = List.isEmpty freeTypars
+
+            // Proceed with specialization only if this (stamp, type) pair isn't already being
+            // processed. For concrete type args, allow different type instantiations of the same
+            // function (e.g. sum<int, int->int> can call sum<int, int> in its body). For
+            // non-concrete type args, never specialize recursively.
+            let canSpecialize =
+                match Map.tryFind origLambdaId env.dontInline with
+                | Some tys ->
+                    allTyargsAreConcrete &&
+                    not tys.IsEmpty &&
+                    not (tys |> List.exists (typeEquiv g specLambdaTy))
+                | None -> true
+
+            if not canSpecialize then
+                None else
+
+            let specLambdaR =
+                if allTyargsAreConcrete then
+                    match cenv.specializedInlineVals.FindAll(origLambdaId) |> List.tryFind (fun (ty, _) -> typeEquiv g ty specLambdaTy) with
+                    | Some (_, body) -> copyExpr g CloneAll body
+                    | None ->
+
+                    let existingTypes = defaultArg (Map.tryFind origLambdaId env.dontInline) []
+                    let env = { env with dontInline = Map.add origLambdaId (specLambdaTy :: existingTypes) env.dontInline }
+                    let specLambdaR, _ = OptimizeExpr cenv env specLambda
+                    cenv.specializedInlineVals.Add(origLambdaId, (specLambdaTy, specLambdaR))
+                    specLambdaR
+                else
+                    let specLambdaR, _ = OptimizeExpr cenv { env with dontInline = Map.add origLambdaId [] env.dontInline } specLambda
+                    specLambdaR
+
+            // Abstract the specialized lambda over its free typars so IlxGen emits a static
+            // method with flattened arguments. The alternative closure form (valReprInfo = None)
+            // wraps args in a reference Tuple<>, which cannot hold byrefs and fails to load at
+            // runtime. When a free typar carries SRTP constraints the specialized body still
+            // needs runtime witnesses from the enclosing scope; those only flow through the
+            // closure path, so keep the closure compilation for that case.
+            let freeTyparsNeedWitnesses =
+                GetTraitWitnessInfosOfTypars g 0 freeTypars |> List.isEmpty |> not
+
+            let debugValName = $"<{vref.LogicalName}>__debug"
+
+            // The closure form wraps tupled args in a reference Tuple<> and cannot hold byrefs.
+            // When byrefs appear in the specialized call shape and the closure path is our only
+            // option (witnesses required), skip specialization entirely and let the outer pass
+            // emit a regular call - IlxGen handles $W witness rewriting inside inline callers.
+            let specArgsHaveByref =
+                let rec check ty =
+                    match tryDestFunTy g ty with
+                    | ValueSome(argTy, retTy) ->
+                        let argHasByref =
+                            if isRefTupleTy g argTy then
+                                destRefTupleTy g argTy |> List.exists (isByrefTy g)
+                            else
+                                isByrefTy g argTy
+                        argHasByref || check retTy
+                    | ValueNone -> false
+
+                check specLambdaTy
+
+            if freeTyparsNeedWitnesses && specArgsHaveByref then
+                None else
+
+            // Static method path (no witnesses needed): abstract over free typars so IlxGen emits
+            // a method with flattened arguments rather than a closure that wraps args in Tuple<>.
+            // Closure path (witnesses needed, no byref): keep the body as-is; witnesses from the
+            // enclosing scope flow through the closure, so no typar abstraction is needed.
+            let debugValTy, debugValBody, valReprInfo, typeInstForCall =
+                if not freeTyparsNeedWitnesses then
+                    let ty = mkForallTyIfNeeded freeTypars specLambdaTy
+                    let body = mkTypeLambda m freeTypars (specLambdaR, specLambdaTy)
+                    let argInfos, retInfo =
+                        match vref.ValReprInfo with
+                        | Some(ValReprInfo(_, argInfos, retInfo)) -> argInfos, retInfo
+                        | None ->
+                            let (ValReprInfo(_, a, r)) =
+                                InferValReprInfoOfExpr g AllowTypeDirectedDetupling.No specLambdaTy [] [] specLambdaR
+                            a, r
+                    let reprInfo = ValReprInfo(ValReprInfo.InferTyparInfo freeTypars, argInfos, retInfo)
+                    ty, body, Some reprInfo, [List.map mkTyparTy freeTypars]
+                else
+                    specLambdaTy, specLambdaR, None, []
+
+            let debugVal =
+                Construct.NewVal(debugValName, m, None, debugValTy, Immutable, true, valReprInfo, taccessPublic, ValNotInRecScope, None,
+                    NormalVal, [], ValInline.InlinedDefinition, XmlDoc.Empty, false, false, false, false, false, false, None,
+                    ParentNone)
+
+            let callExpr = mkApps g ((exprForVal m debugVal, debugValTy), typeInstForCall, argsR, m)
+            Some(mkCompGenLet m debugVal debugValBody callExpr, info)
+
+        | _ -> None
+    | _ ->
+
     // Considering inlining app 
     match finfo.Info with 
     | StripLambdaValue (lambdaId, arities, size, f2, f2ty) when
@@ -3451,7 +3623,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m)
         cenv.settings.InlineLambdas &&
         not finfo.HasEffect &&
         // Don't inline recursively! 
-        not (Zset.contains lambdaId env.dontInline) &&
+        not (Map.containsKey lambdaId env.dontInline) &&
         (// Check the number of argument groups is enough to saturate the lambdas of the target. 
          (if tyargs |> List.exists (fun t -> match t with TType_measure _ -> false | _ -> true) then 1 else 0) + args.Length = arities &&
           if size <= cenv.settings.lambdaInlineThreshold + args.Length then true
@@ -3523,7 +3695,7 @@ and TryInlineApplication cenv env finfo (tyargs: TType list, args: Expr list, m)
         // Inlining: beta reducing 
         let exprR = MakeApplicationAndBetaReduce g (f2R, f2ty, [tyargs], argsR, m)
         // Inlining: reoptimizing
-        Some(OptimizeExpr cenv {env with dontInline= Zset.add lambdaId env.dontInline} exprR)
+        Some(OptimizeExpr cenv {env with dontInline = Map.add lambdaId [] env.dontInline} exprR)
           
     | _ -> None
 
@@ -3641,7 +3813,7 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) =
         OptimizeExpr cenv env remade
     | Choice2Of2 (newf0, remake) -> 
 
-    match TryInlineApplication cenv env finfo (tyargs, args, m) with 
+    match TryInlineApplication cenv env finfo f0 (tyargs, args, m) with 
     | Some (res, info) ->
         // inlined
         (res |> remake), info
@@ -4037,7 +4209,7 @@ and OptimizeDecisionTreeTarget cenv env _m (TTarget(vs, expr, flags)) =
     let env = BindInternalValsToUnknown cenv vs env 
     let exprR, einfo = OptimizeExpr cenv env expr 
     let exprR, einfo = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (exprR, einfo) 
-    let evalueR = AbstractExprInfoByVars (vs, []) einfo.Info 
+    let evalueR = AbstractExprInfoByVars cenv (vs, []) einfo.Info
     TTarget(vs, exprR, flags), 
     { TotalSize=einfo.TotalSize 
       FunctionSize=einfo.FunctionSize
@@ -4255,17 +4427,23 @@ and OptimizeBindings cenv isRec env xs =
     
 and OptimizeModuleExprWithSig cenv env mty def  = 
         let g = cenv.g
-        // Optimize the module implementation
-        let (def, info), (_env, bindInfosColl) = OptimizeModuleContents cenv (env, []) def  
-        let bindInfosColl = List.concat bindInfosColl 
-        
+
         // Compute the elements truly hidden by the module signature.
         // The hidden set here must contain NOT MORE THAN the set of values made inaccessible by 
         // the application of the signature. If it contains extra elements we'll accidentally eliminate
         // bindings.
-         
+        // This only walks structural elements (Val/Entity declarations), not expressions,
+        // so it gives the same result before and after optimization.
         let _renaming, hidden as rpi = ComputeRemappingFromImplementationToSignature g def mty
 
+        // Make hiding info available during optimization so TryInlineApplication
+        // can avoid emitting direct calls to vals hidden by signature.
+        let cenv = { cenv with signatureHidingInfo = hidden }
+
+        // Optimize the module implementation
+        let (def, info), (_env, bindInfosColl) = OptimizeModuleContents cenv (env, []) def
+        let bindInfosColl = List.concat bindInfosColl
+
         let def = 
             if not cenv.settings.LocalOptimizationsEnabled then def else 
 
@@ -4328,7 +4506,7 @@ and OptimizeModuleExprWithSig cenv env mty def  =
             
             elimModuleDefn def 
 
-        let info = AbstractAndRemapModulInfo g rpi info
+        let info = AbstractAndRemapModulInfo g cenv rpi info
 
         def, info 
 
@@ -4401,14 +4579,14 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile =
             // This optimizes and builds minfo ignoring the signature
             let (defR, minfo), (_env, _bindInfosColl) = OptimizeModuleContents cenv (env, []) contents
             let hidden = ComputeImplementationHidingInfoAtAssemblyBoundary defR hidden
-            let minfo = AbstractLazyModulInfoByHiding false hidden minfo
+            let minfo = AbstractLazyModulInfoByHiding false cenv hidden minfo
             let env = BindValsInModuleOrNamespace cenv minfo env
             env, defR, minfo, hidden
         else
             // This optimizes and builds minfo w.r.t. the signature
             let mexprR, minfo = OptimizeModuleExprWithSig cenv env signature contents
             let hidden = ComputeSignatureHidingInfoAtAssemblyBoundary signature hidden
-            let minfoExternal = AbstractLazyModulInfoByHiding true hidden minfo
+            let minfoExternal = AbstractLazyModulInfoByHiding true cenv hidden minfo
             let env = BindValsInModuleOrNamespace cenv minfo env
             env, mexprR, minfoExternal, hidden
 
@@ -4430,6 +4608,8 @@ let OptimizeImplFile (settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncr
           casApplied=Dictionary<Stamp, bool>() 
           stackGuard = StackGuard("OptimizerStackGuardDepth")
           realsig = tcGlobals.realsig
+          specializedInlineVals = HashMultiMap(HashIdentity.Structural, true)
+          signatureHidingInfo = SignatureHidingInfo.Empty
         }
 
     let env, _, _, _ as results = OptimizeImplFileInternal cenv optEnv isIncrementalFragment hidden mimpls
diff --git a/src/Compiler/Optimize/Optimizer.fsi b/src/Compiler/Optimize/Optimizer.fsi
index 17912af7598..1458f5a41b0 100644
--- a/src/Compiler/Optimize/Optimizer.fsi
+++ b/src/Compiler/Optimize/Optimizer.fsi
@@ -51,6 +51,8 @@ type OptimizationSettings =
         reportTotalSizes: bool
 
         processingMode: OptimizationProcessingMode
+
+        alwaysInline: bool
     }
 
     member JitOptimizationsEnabled: bool
diff --git a/src/Compiler/Symbols/Symbols.fs b/src/Compiler/Symbols/Symbols.fs
index 2425aad5877..c5da5e4d322 100644
--- a/src/Compiler/Symbols/Symbols.fs
+++ b/src/Compiler/Symbols/Symbols.fs
@@ -1886,7 +1886,7 @@ type FSharpMemberOrFunctionOrValue(cenv, d:FSharpMemberOrValData, item) =
         match v.InlineInfo with 
         | ValInline.Always -> FSharpInlineAnnotation.AlwaysInline
         | ValInline.Optional -> FSharpInlineAnnotation.OptionalInline
-        | ValInline.Never -> FSharpInlineAnnotation.NeverInline
+        | ValInline.Never | ValInline.InlinedDefinition -> FSharpInlineAnnotation.NeverInline
 
     member _.IsMutable = 
         if isUnresolved() then false else 
diff --git a/src/Compiler/TypedTree/TcGlobals.fs b/src/Compiler/TypedTree/TcGlobals.fs
index 6dfbd42f98c..237ec492651 100644
--- a/src/Compiler/TypedTree/TcGlobals.fs
+++ b/src/Compiler/TypedTree/TcGlobals.fs
@@ -558,6 +558,7 @@ type TcGlobals(
   let fslib_MFOperatorsUnchecked_nleref        = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Unchecked"
   let fslib_MFOperatorsChecked_nleref        = mkNestedNonLocalEntityRef fslib_MFOperators_nleref "Checked"
   let fslib_MFExtraTopLevelOperators_nleref    = mkNestedNonLocalEntityRef fslib_MFCore_nleref "ExtraTopLevelOperators"
+  let fslib_MFAsyncBuilder_nleref              = mkNestedNonLocalEntityRef fslib_MFControl_nleref "AsyncBuilder"
   let fslib_MFNullableOperators_nleref         = mkNestedNonLocalEntityRef fslib_MFLinq_nleref "NullableOperators"
   let fslib_MFQueryRunExtensions_nleref              = mkNestedNonLocalEntityRef fslib_MFLinq_nleref "QueryRunExtensions"
   let fslib_MFQueryRunExtensionsLowPriority_nleref   = mkNestedNonLocalEntityRef fslib_MFQueryRunExtensions_nleref "LowPriority"
@@ -646,6 +647,19 @@ type TcGlobals(
 
                     yield nleref.LastItemMangledName, ERefNonLocal nleref  ]
 
+  let v_FSharpCoreForceInlineModules =
+     dict [ for nleref in [ fslib_MFIntrinsicFunctions_nleref
+                            fslib_MFIntrinsicOperators_nleref
+                            fslib_MFLanguagePrimitives_nleref
+                            fslib_MFOperators_nleref
+                            fslib_MFOperatorIntrinsics_nleref
+                            fslib_MFOperatorsChecked_nleref
+                            fslib_MFOperatorsUnchecked_nleref
+                            fslib_MFNativePtrModule_nleref
+                            fslib_MFAsyncBuilder_nleref  ] do
+
+                    yield nleref.LastItemMangledName, ERefNonLocal nleref  ]
+
   let tryDecodeTupleTy tupInfo l =
       match l with
       | [t1;t2;t3;t4;t5;t6;t7;markerTy] ->
@@ -1133,6 +1147,8 @@ type TcGlobals(
   // better the job we do of mapping from provided expressions back to FSharp.Core F# functions and values.
   member _.knownFSharpCoreModules = v_knownFSharpCoreModules
 
+  member _.fslibForceInlineModules = v_FSharpCoreForceInlineModules
+
   member _.compilingFSharpCore = compilingFSharpCore
 
   member _.useReflectionFreeCodeGen = useReflectionFreeCodeGen
diff --git a/src/Compiler/TypedTree/TcGlobals.fsi b/src/Compiler/TypedTree/TcGlobals.fsi
index e27bc1605a2..214ad0d17cd 100644
--- a/src/Compiler/TypedTree/TcGlobals.fsi
+++ b/src/Compiler/TypedTree/TcGlobals.fsi
@@ -698,6 +698,8 @@ type internal TcGlobals =
 
     member knownFSharpCoreModules: System.Collections.Generic.IDictionary<string, TypedTree.EntityRef>
 
+    member fslibForceInlineModules: System.Collections.Generic.IDictionary<string, TypedTree.EntityRef>
+
     member knownIntrinsics:
         System.Collections.Concurrent.ConcurrentDictionary<string * string option * string * int, TypedTree.ValRef>
 
diff --git a/src/Compiler/TypedTree/TypedTree.fs b/src/Compiler/TypedTree/TypedTree.fs
index dac2e23c10c..ce7ebc7db36 100644
--- a/src/Compiler/TypedTree/TypedTree.fs
+++ b/src/Compiler/TypedTree/TypedTree.fs
@@ -41,21 +41,15 @@ type StampMap<'T> = Map<Stamp, 'T>
 
 [<RequireQualifiedAccess>]
 type ValInline =
-
-    /// Indicates the value is inlined but the .NET IL code for the function still exists, e.g. to satisfy interfaces on objects, but that it is also always inlined 
     | Always
-
-    /// Indicates the value may optionally be inlined by the optimizer
     | Optional
-
-    /// Indicates the value must never be inlined by the optimizer
     | Never
+    | InlinedDefinition
 
-    /// Returns true if the implementation of a value should be inlined
     member x.ShouldInline = 
         match x with 
         | ValInline.Always -> true 
-        | ValInline.Optional | ValInline.Never -> false
+        | ValInline.Optional | ValInline.Never | ValInline.InlinedDefinition -> false
 
 /// A flag associated with values that indicates whether the recursive scope of the value is currently being processed, and 
 /// if the value has been generalized or not as yet.
@@ -110,6 +104,7 @@ type ValFlags(flags: int64) =
                      (if isCompGen then                                      0b00000000000000001000L 
                       else                                                   0b000000000000000000000L) |||
                      (match inlineInfo with
+                                        | ValInline.InlinedDefinition ->     0b00000000000000000000L
                                         | ValInline.Always ->                0b00000000000000010000L
                                         | ValInline.Optional ->              0b00000000000000100000L
                                         | ValInline.Never ->                 0b00000000000000110000L) |||
@@ -166,7 +161,7 @@ type ValFlags(flags: int64) =
 
     member x.InlineInfo = 
                                   match (flags       &&&                     0b00000000000000110000L) with 
-                                                             |               0b00000000000000000000L
+                                                             |               0b00000000000000000000L -> ValInline.InlinedDefinition
                                                              |               0b00000000000000010000L -> ValInline.Always
                                                              |               0b00000000000000100000L -> ValInline.Optional
                                                              |               0b00000000000000110000L -> ValInline.Never
@@ -248,7 +243,12 @@ type ValFlags(flags: int64) =
         // Clear the IsCompiledAsStaticPropertyWithoutField, only used to determine whether to use a true field for a value, and to eliminate the optimization info for observable bindings
         // Clear the HasBeenReferenced, only used to report "unreferenced variable" warnings and to help collect 'it' values in FSI.EXE
         // Clear the IsGeneratedEventVal, since there's no use in propagating specialname information for generated add/remove event vals
-                                                      (flags       &&&   ~~~0b010011001100000000000L) 
+        let bits =                                    (flags       &&&   ~~~0b010011001100000000000L)
+        // Pickle ValInline.InlinedDefinition as ValInline.Always.
+        if bits &&& 0b00000000000000110000L = 0L then
+            bits ||| 0b00000000000000010000L
+        else
+            bits
 
 /// Represents the kind of a type parameter
 [<RequireQualifiedAccess (* ; StructuredFormatDisplay("{DebugText}") *) >]
diff --git a/src/Compiler/TypedTree/TypedTree.fsi b/src/Compiler/TypedTree/TypedTree.fsi
index 7fbe446641a..e104625655f 100644
--- a/src/Compiler/TypedTree/TypedTree.fsi
+++ b/src/Compiler/TypedTree/TypedTree.fsi
@@ -41,6 +41,9 @@ type ValInline =
     /// Indicates the value must never be inlined by the optimizer
     | Never
 
+    /// Indicates a debug-only value produced from inlining an 'inline' function definition.
+    | InlinedDefinition
+
     /// Returns true if the implementation of a value must always be inlined
     member ShouldInline: bool
 
diff --git a/src/Compiler/xlf/FSComp.txt.cs.xlf b/src/Compiler/xlf/FSComp.txt.cs.xlf
index 84e5e3cc50c..457727125ab 100644
--- a/src/Compiler/xlf/FSComp.txt.cs.xlf
+++ b/src/Compiler/xlf/FSComp.txt.cs.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Vytiskněte odvozená rozhraní všech kompilovaných souborů do přidružených souborů podpisu.</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.de.xlf b/src/Compiler/xlf/FSComp.txt.de.xlf
index d6edecb4def..2460c343511 100644
--- a/src/Compiler/xlf/FSComp.txt.de.xlf
+++ b/src/Compiler/xlf/FSComp.txt.de.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Drucken der abgeleiteten Schnittstellen aller Dateien an zugehörige Signaturdateien</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.es.xlf b/src/Compiler/xlf/FSComp.txt.es.xlf
index 46573e801f1..1da1c9e12f1 100644
--- a/src/Compiler/xlf/FSComp.txt.es.xlf
+++ b/src/Compiler/xlf/FSComp.txt.es.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Imprimir las interfaces deducidas de todos los archivos de compilación en los archivos de signatura asociados</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.fr.xlf b/src/Compiler/xlf/FSComp.txt.fr.xlf
index 1acfc469b5b..e1242b0448d 100644
--- a/src/Compiler/xlf/FSComp.txt.fr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.fr.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Imprimer les interfaces inférées de tous les fichiers de compilation sur les fichiers de signature associés</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.it.xlf b/src/Compiler/xlf/FSComp.txt.it.xlf
index deaca46fad0..7a1aeafaedb 100644
--- a/src/Compiler/xlf/FSComp.txt.it.xlf
+++ b/src/Compiler/xlf/FSComp.txt.it.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Stampare le interfacce derivate di tutti i file di compilazione nei file di firma associati</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.ja.xlf b/src/Compiler/xlf/FSComp.txt.ja.xlf
index 10029fab134..e04c53d63f2 100644
--- a/src/Compiler/xlf/FSComp.txt.ja.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ja.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">すべてのコンパイル ファイルの推定されたインターフェイスを関連する署名ファイルに印刷します</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.ko.xlf b/src/Compiler/xlf/FSComp.txt.ko.xlf
index 1d7a19af957..764aa61d5e8 100644
--- a/src/Compiler/xlf/FSComp.txt.ko.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ko.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">모든 컴파일 파일의 유추된 인터페이스를 관련 서명 파일로 인쇄합니다.</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.pl.xlf b/src/Compiler/xlf/FSComp.txt.pl.xlf
index 170e6e37718..d916cff429f 100644
--- a/src/Compiler/xlf/FSComp.txt.pl.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pl.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Drukowanie wywnioskowanych interfejsów wszystkich plików kompilacji do skojarzonych plików sygnatur</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
index 87ef255a7e8..2ef5f424fc8 100644
--- a/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
+++ b/src/Compiler/xlf/FSComp.txt.pt-BR.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Imprimir as interfaces inferidas de todos os arquivos de compilação para os arquivos de assinatura associados</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.ru.xlf b/src/Compiler/xlf/FSComp.txt.ru.xlf
index 57f29e98517..93a92376495 100644
--- a/src/Compiler/xlf/FSComp.txt.ru.xlf
+++ b/src/Compiler/xlf/FSComp.txt.ru.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Печать определяемых интерфейсов всех файлов компиляции в связанные файлы подписей</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.tr.xlf b/src/Compiler/xlf/FSComp.txt.tr.xlf
index 08753e47a27..0822eaed918 100644
--- a/src/Compiler/xlf/FSComp.txt.tr.xlf
+++ b/src/Compiler/xlf/FSComp.txt.tr.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">Tüm derleme dosyalarının çıkarsanan arabirimlerini ilişkili imza dosyalarına yazdır</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
index e117ab0ec5d..0ac88278e85 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hans.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">将所有编译文件的推断接口打印到关联的签名文件</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
index 31c5596a098..1c02b2b6a7a 100644
--- a/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
+++ b/src/Compiler/xlf/FSComp.txt.zh-Hant.xlf
@@ -1022,6 +1022,11 @@
         <target state="translated">將所有編譯檔案的推斷介面列印至相關聯的簽章檔案</target>
         <note />
       </trans-unit>
+      <trans-unit id="optsAlwaysInline">
+        <source>Always inline 'inline' functions</source>
+        <target state="new">Always inline 'inline' functions</target>
+        <note />
+      </trans-unit>
       <trans-unit id="optsCheckNulls">
         <source>Enable nullness declarations and checks ({0} by default)</source>
         <target state="new">Enable nullness declarations and checks ({0} by default)</target>
diff --git a/src/FSharp.Build/Fsc.fs b/src/FSharp.Build/Fsc.fs
index 90793f3e430..173792f0711 100644
--- a/src/FSharp.Build/Fsc.fs
+++ b/src/FSharp.Build/Fsc.fs
@@ -58,6 +58,7 @@ type public Fsc() as this =
     let mutable preferredUILang: string | null = null
     let mutable publicSign: bool = false
     let mutable provideCommandLineArgs: bool = false
+    let mutable alwaysInline: bool option = None
     let mutable realsig: bool option = None
     let mutable references: ITaskItem[] = [||]
     let mutable referencePath: string | null = null
@@ -200,6 +201,9 @@ type public Fsc() as this =
         else
             builder.AppendSwitch("--optimize-")
 
+        // AlwaysInline
+        builder.AppendOptionalSwitch("--always-inline", alwaysInline)
+
         // realsig
         builder.AppendOptionalSwitch("--realsig", realsig)
 
@@ -560,6 +564,14 @@ type public Fsc() as this =
         with get () = publicSign
         and set (s) = publicSign <- s
 
+    // --always-inline[+-]
+    member _.AlwaysInline
+        with get () =
+            match alwaysInline with
+            | Some true -> true
+            | _ -> false
+        and set (b) = alwaysInline <- Some b
+
     // --realsig[+-]
     member _.RealSig
         with get () =
diff --git a/src/FSharp.Build/Microsoft.FSharp.Targets b/src/FSharp.Build/Microsoft.FSharp.Targets
index 8853320e587..fa40ced7a18 100644
--- a/src/FSharp.Build/Microsoft.FSharp.Targets
+++ b/src/FSharp.Build/Microsoft.FSharp.Targets
@@ -389,6 +389,7 @@ this file.
               PreferredUILang="$(PreferredUILang)"
               ProvideCommandLineArgs="$(ProvideCommandLineArgs)"
               PublicSign="$(PublicSign)"
+              AlwaysInline="$(AlwaysInline)"
               RealSig="$(RealSig)"
               References="@(ReferencePathWithRefAssemblies)"
               ReferencePath="$(ReferencePathWithRefAssemblies)"
diff --git a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/misc/compiler_help_output.bsl b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/misc/compiler_help_output.bsl
index 3cfd389dc8a..56df6419a54 100644
--- a/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/misc/compiler_help_output.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/CompilerOptions/fsc/misc/compiler_help_output.bsl
@@ -84,6 +84,7 @@ Copyright (c) Microsoft Corporation. All Rights Reserved.
 --checked[+|-]                           Generate overflow checks (off by default)
 --define:<string>                        Define conditional compilation symbols (Short form: -d)
 --strict-indentation[+|-]                Override indentation rules implied by the language version (off by default)
+--always-inline[+|-]                     Always inline 'inline' functions
 
 
                 - MISCELLANEOUS -
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs
new file mode 100644
index 00000000000..cb72a39b1f1
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall.fs
@@ -0,0 +1,1493 @@
+namespace EmittedIL
+
+open System.Diagnostics
+open System.Runtime.CompilerServices
+open Xunit
+open FSharp.Test.Compiler
+
+module DebugInlineAsCall =
+
+    let private baseline = SequencePointsBaseline(__SOURCE_DIRECTORY__)
+
+    [<MethodImpl(MethodImplOptions.NoInlining)>]
+    let private verifySequencePoints result =
+        baseline.verifyResult(StackTrace().GetFrame(1), result)
+
+    [<Fact>]
+    let ``Call 01 - Release`` () =
+        FSharp """
+let inline f (x: int) =
+    x + x
+
+let i = f 5
+"""
+        |> asExe
+        |> compile
+        |> verifyILContains ["ldc.i4.s   10"]
+        |> shouldSucceed
+
+    [<Fact>]
+    let ``Call 02 - Debug`` () =
+        FSharp """
+let inline f (x: int) =
+    x + x
+
+[<EntryPoint>]
+let main _ =
+    let i = f 5
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 03 - Two args`` () =
+        FSharp """
+
+let inline add a b =
+    a + b
+
+[<EntryPoint>]
+let main _ =
+    let i = add 1 2
+    if i = 3 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 04 - Function arg`` () =
+        FSharp """
+let inline apply (f: 'a -> 'b -> 'c) (x: 'a) (y: 'b) : 'c =
+    f x y
+
+[<EntryPoint>]
+let main _ =
+    let i = apply (+) 3 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 05 - Nested inline`` () =
+        FSharp """
+let inline double (x: int) =
+    x + x
+
+let inline quadruple (x: int) =
+    double (double x)
+
+[<EntryPoint>]
+let main _ =
+    let i = quadruple 3
+    if i = 12 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 06 - Multiple calls`` () =
+        FSharp """
+let inline double (x: int) =
+    x + x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 1 + double 2
+    if i = 6 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 07 - Local function`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline double (x: int) = x + x
+    let i = double 5
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 08 - Local generic function`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline apply (f: 'a -> 'b) (x: 'a) : 'b = f x
+    let i = apply (fun x -> x + 1) 5
+    if i = 6 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 09 - FSharp.Core not`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let b = not true
+    if b = false then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 10 - Different assembly`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline triple (x: int) = x + x + x
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+            |> withName "Lib"
+
+        FSharp """
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = triple 3
+    if i = 9 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 11 - Measure`` () =
+        FSharp """
+[<Measure>] type cm
+
+let inline scale (x: float<'u>) = x * 2.0
+
+[<EntryPoint>]
+let main _ =
+    let v = scale 5.0<cm>
+    if v = 10.0<cm> then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 12 - No inner optimization`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline f (x: int) =
+        let i = 5 + 10
+        x + i
+
+    let i = f 20
+    if i = 35 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 13`` () =
+        FSharp """
+[<NoDynamicInvocation>]
+let inline f x = x + 1
+
+let inline g x = f x
+
+g 1 |> ignore
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 14`` () =
+        FSharp """
+[<NoDynamicInvocation>]
+let inline f x = x + 1
+
+let inline g (x: ^T) (y: ^T) = f (x + y)
+
+g 1 2 |> ignore
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 15`` () =
+        FSharp """
+[<NoDynamicInvocation>]
+let inline f (x: ^T) = x
+
+let inline g (x: ^T) (y: ^T) = f (x + y)
+
+g 1 2 |> ignore
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Call 16 - Debug lib called from optimized app`` () =
+        let lib =
+            FSharp """
+module Module
+
+let inline double (x: int) = x + x
+
+let inline quadruple (x: int) = double (double x)
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+            |> withName "Lib"
+
+        lib
+            |> compile
+            |> verifyILContains ["call       int32 Module::double(int32)"]
+            |> shouldSucceed
+            |> ignore
+
+        FSharp """
+open Module
+
+[<EntryPoint>]
+let main (args: string[]) =
+    let i = quadruple args.Length
+    i
+"""
+        |> withOptimize
+        |> withReferences [lib]
+        |> asExe
+        |> compile
+        |> verifyILContains ["add"] |> shouldSucceed
+        |> verifyILNotPresent ["quadruple"; "double"]
+
+    [<Fact>]
+    let ``SRTP 01`` () =
+        FSharp """
+let inline add (x: ^T) (y: ^T) =
+    x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = add 3 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 02 - Local`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline add (x: ^T) (y: ^T) = x + y
+    let i = add 3 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 03 - Different type arguments`` () =
+        FSharp """
+let inline getLength (x: ^T) =
+    (^T : (member Length : int) x)
+
+[<EntryPoint>]
+let main _ =
+    let i = getLength "hello"
+    let j = getLength [1; 2; 3]
+    if i = 5 && j = 3 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 04 - Multiple calls`` () =
+        FSharp """
+let inline add (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = add 1 2 + add 3 4
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 05 - Different assembly`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline add (x: ^T) (y: ^T) = x + y
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = add 3 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 06 - Different assembly`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline add (x: ^T) (y: ^T) = x + y
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open MyLib
+
+let inline double (x: ^T) = add x x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 5
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 07 - Nested - Same project`` () =
+        FSharp """
+let inline add (x: ^T) (y: ^T) = x + y
+
+let inline double (x: ^T) = add x x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 5
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 08 - Nested - Different type arguments`` () =
+        FSharp """
+let inline add (x: ^T) (y: ^T) = x + y
+
+let inline addBoth (x: ^A) (y: ^B) =
+    let a = add x x
+    let b = add y y
+    (a, b)
+
+[<EntryPoint>]
+let main _ =
+    let (a, b) = addBoth 2 3.0
+    if a = 4 && b = 6.0 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 09 - Witness`` () =
+        FSharp """
+let check s (b1: 'a) (b2: 'a) = if b1 = b2 then () else failwith s
+
+let inline add (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    check "int" (add 3 4) 7
+    check "float" (add 1.0 2.0) 3.0
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 10 - Witness`` () =
+        FSharp """
+type MyNum =
+    { Value: float }
+    static member FromFloat (_: MyNum) = fun (x: float) -> { Value = x }
+
+type T =
+    static member inline Invoke(x: float) : 'Num =
+        let inline call (a: ^a) = (^a: (static member FromFloat : _ -> _) a)
+        call Unchecked.defaultof<'Num> x
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(3.14)
+    if result.Value = 3.14 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 11 - Witness`` () =
+        FSharp """
+type MyNum =
+    { Value: float }
+    static member FromFloat (_: MyNum, _: T) = fun (x: float) -> { Value = x }
+
+and T =
+    { Dummy: int }
+    static member inline Invoke(x: float) : 'Num =
+        let inline call2 (a: ^a, b: ^b) = ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+        let inline call (a: 'a) = fun (x: 'x) -> call2 (a, Unchecked.defaultof<'r>) x : 'r
+        call Unchecked.defaultof<T> x
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(2.71)
+    if result.Value = 2.71 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 12 - Witness - Struct with partially resolved type args`` () =
+        FSharp """
+[<Struct>]
+type S =
+    member _.M() = ()
+
+type T() =
+    member _.N() = ()
+
+let inline f (a: ^A when ^A: (member M: unit -> unit)) (_b: ^B when ^B: (member N: unit -> unit)) =
+    (^A: (member M: unit -> unit) a)
+
+let inline g b = f (S()) b
+
+[<EntryPoint>]
+let main _ =
+    g (T())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 13 - Witness - Struct with ResumableCode and partially resolved type args`` () =
+        FSharp """
+open Microsoft.FSharp.Core.CompilerServices
+
+[<Struct>]
+type S = member this.Foo() = ()
+
+type D = member _.Bar() = true
+
+let inline f (x: ^A) =
+    ResumableCode< ^B, _>(fun sm ->
+        (^A: (member Foo: unit -> unit) x)
+        (^B: (member Bar: unit -> bool) sm.Data)
+    )
+
+let inline g () = f (S())
+
+[<EntryPoint>]
+let main _ =
+    let _ : ResumableCode<D, _> = g ()
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 14 - StateMachine with unresolved trait from composed inline function`` () =
+        FSharp """
+open Microsoft.FSharp.Core.CompilerServices
+open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers
+open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
+
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline f<'A, 'R, 'B when 'A: (member M: int -> 'R) and 'B: (member M: 'R -> unit)> (_a: 'A) : 'B = Unchecked.defaultof<_>
+
+let inline g (_: S<'T>) =
+    if __useResumableCode then
+        __stateMachine<S<'T>, int>
+            (MoveNextMethodImpl<_>(fun _ -> ()))
+            (SetStateMachineMethodImpl<_>(fun _ _ -> ()))
+            (AfterCode<_, _>(fun _ -> 0))
+    else 0
+
+let inline h a = g (f a)
+
+[<EntryPoint>]
+let main _ =
+    let _ = h (S<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 15 - Composed inline with linked constraints`` () =
+        FSharp """
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline f<'A, 'R, 'B when 'A: (member M: int -> 'R) and 'B: (member M: 'R -> unit)> (_a: 'A) : 'B = Unchecked.defaultof<_>
+
+let inline g (_: S<'T>) = 42
+
+let inline h a = g (f a)
+
+[<EntryPoint>]
+let main _ =
+    let i = h (S<int>())
+    if i = 42 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 16 - Same line`` () =
+        let additionalSource = FsSourceWithFileName "Program.fs" """
+module Program
+
+open Module
+
+let inline foo (a: 'a) = U.F(a, 0); fun () -> ()
+
+[<EntryPoint>]
+let main _ =
+    let _ = foo (T())
+    0
+"""
+        FSharpWithFileName "Module.fs" """
+module Module
+
+type T() = member _.M() = ()
+
+type U = static member inline F<'a, 'b when 'a: (member M: unit -> unit)>(_a: 'a, _b: 'b) = ()
+"""
+        |> withAdditionalSourceFile additionalSource
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 17 - Same line`` () =
+        let library =
+            FSharp """
+module Module
+
+let inline add<'a, 'b, 'c when 'a: (static member (+): 'a * 'a -> 'b)> (x: 'a) (y: 'a) =
+    x + y
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open Module
+
+let inline foo x y = add x y |> ignore; fun () -> ()
+
+[<EntryPoint>]
+let main _ =
+    let _ = foo 1 2
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 18 - Type abbreviation with constraint`` () =
+        let additionalSource = FsSourceWithFileName "Program.fs" """
+module Program
+
+open Module
+
+type T() = member _.M() = 42
+
+let inline foo (a: 'a) = C.F(a); fun () -> ()
+
+[<EntryPoint>]
+let main _ =
+    let _ = foo (T())
+    0
+"""
+        FSharpWithFileName "Module.fs" """
+module Module
+
+type C<'a, 'b when 'a: (member M: unit -> 'b)> = 'a
+
+type C = static member inline F<'a, 'b, 'c when C<'a, 'b>>(_a: 'a) = ()
+"""
+        |> withAdditionalSourceFile additionalSource
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 19 - byref`` () =
+        FSharp """
+let inline f<'T, 'U when 'T: (member M: byref<'U> -> unit)> (x: byref<'T>, y: byref<'U>) =
+    x.M(&y)
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    f(&s, &v)
+    if v = 42 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 20 - byref`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline f<'T, 'U when 'T: (member M: byref<'U> -> unit)> (x: byref<'T>, y: byref<'U>) =
+    x.M(&y)
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open MyLib
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    f(&s, &v)
+    if v = 42 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 21 - byref`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline f<'T, 'U when 'T: (member M: byref<'U> -> unit)> (x: byref<'T>, y: byref<'U>) =
+    x.M(&y)
+
+let inline g<'T, 'U when 'T: (member M: byref<'U> -> unit)> (x: byref<'T>, y: byref<'U>) =
+    f(&x, &y)
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open MyLib
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    g(&s, &v)
+    if v = 42 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 22 - Recursive inline with different type arg`` () =
+        FSharp """
+type T = T with
+    static member ($) (T, _:int) = (+)
+    static member ($) (T, _:decimal) = (+)
+
+let inline sum (i:'a) (x:'a) :'r = (T $ Unchecked.defaultof<'r>) i x
+
+type T with
+    static member inline ($) (T, _:'t -> 'rest) = fun (a:'t) x -> sum (x + a)
+
+[<EntryPoint>]
+let main _ =
+    let y:int = sum 2 3 4
+    if y = 9 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 23 - Cross-file specialization with nested closures at same line`` () =
+        // Two specializations in wrap's body each contain nested closures whose ranges are in the
+        // other file. Without bucketing the closure-name counter by the enclosing type's file, the
+        // two nested closures end up with identical names ('wrap@12-1') and ilwrite rejects them
+        // with FS2014 duplicate entry in type index table.
+        let additionalSource = FsSourceWithFileName "Program.fs" """
+module Program
+open Module
+
+let inline wrap source =
+    let mutable state = false
+    monad' {
+        match state with
+        | true -> return false
+        | _ ->
+            let! _ = source
+            state <- true
+            return true }
+"""
+        FSharpWithFileName "Module.fs" """
+module Module
+type Bind =
+    static member inline Invoke (s: 'M) (b: 'T -> 'U) =
+        ((^M or ^U) : (static member (>>=) : _*_ -> _) s, b)
+
+type Return =
+    static member Return (_: 'T list, _: Return) : 'T -> 'T list = Unchecked.defaultof<_>
+    static member inline Invoke (x: 'T) =
+        (^A : (static member Return : 'T -> ^A) x)
+
+type MonadBuilder () =
+    member inline _.Return x = Return.Invoke x
+    member inline _.Bind (p, r) = Bind.Invoke p r
+let monad' = MonadBuilder ()
+"""
+        |> withAdditionalSourceFile additionalSource
+        |> withDebug
+        |> withNoOptimize
+        |> asLibrary
+        |> compile
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 24 - byref with free typar at callsite`` () =
+        FSharp """
+type MyBuilder<'T>() =
+    member _.M(a: byref<int>, b: byref<int>) = ()
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder, a: byref<'A>) =
+    builder.M(&a, &a)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 25 - byref with free typar at callsite - large tuple`` () =
+        // F# represents tuples with 8+ elements as nested System.Tuple. When building a closure
+        // for such a call the compiler would otherwise pack args into a reference Tuple shape
+        // that cannot contain byrefs. The debug-call path must flatten to a method regardless
+        // of arity.
+        FSharp """
+type MyBuilder<'T>() =
+    member _.M(a1: byref<int>, a2: byref<int>, a3: byref<int>,
+               a4: byref<int>, a5: byref<int>, a6: byref<int>,
+               a7: byref<int>, a8: byref<int>) =
+        a1 <- 1
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> * byref<'A> * byref<'A>
+                            * byref<'A> * byref<'A> * byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder,
+     a1: byref<'A>, a2: byref<'A>, a3: byref<'A>, a4: byref<'A>,
+     a5: byref<'A>, a6: byref<'A>, a7: byref<'A>, a8: byref<'A>) =
+    builder.M(&a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x, &x, &x, &x, &x, &x, &x, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 26 - byref with free typar at callsite - three tupled args`` () =
+        FSharp """
+type MyBuilder<'T>() =
+    member _.M(a: byref<int>, b: byref<int>) = ()
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder, a: byref<'A>, b: byref<'A>) =
+    builder.M(&a, &b)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 27 - non-typar tyarg to SRTP callee - non-inline caller`` () =
+        // Non-typar tyargs (MyBuilder<'T>) cannot satisfy the callee's SRTP via witness
+        // propagation; they must go through the specialization path so the trait resolves
+        // statically to MyBuilder<T>.M.
+        FSharp """
+type MyBuilder<'T>() =
+    member _.M() = ()
+
+let inline callMember<'Builder when 'Builder: (member M: unit -> unit)> (builder: 'Builder) =
+    builder.M()
+
+let runDynamic (builder: MyBuilder<'T>) =
+    callMember builder
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 28 - non-typar tyarg to SRTP callee - inline caller`` () =
+        // Same pattern as SRTP 27 but the caller is itself inline. The non-$W variant of the
+        // inline caller would otherwise contain a direct call to the SRTP callee's non-$W
+        // stub and throw at runtime when invoked from non-inline code.
+        FSharp """
+type MyBuilder<'T>() =
+    member _.M() = ()
+
+let inline callMember<'Builder when 'Builder: (member M: unit -> unit)> (builder: 'Builder) =
+    builder.M()
+
+let inline outerInline<'T> (builder: MyBuilder<'T>) =
+    callMember builder
+
+[<EntryPoint>]
+let main _ =
+    outerInline (MyBuilder<int>())
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``SRTP 29 - byref callee under SRTP witnesses, nested in delegate bodies`` () =
+        // The specialized callee shape has byref in a tupled-arg position and the enclosing
+        // scope needs a trait witness. Neither a byref-bearing closure (invalid System.Tuple
+        // instantiation) nor a non-$W stub method works here, so the optimizer must leave the
+        // call as-is and let IlxGen's $W rewriting pick up the witness from the inline caller.
+        FSharp """
+type Aw(value: int) =
+    member _.GetResult() = value
+
+type Code<'T> = delegate of byref<'T> -> unit
+
+let inline bindDynamic<'TResult1, 'TOverall, 'Awaiter
+    when 'Awaiter: (member GetResult: unit -> 'TResult1)>
+    (d: byref<'TOverall>, awaiter: 'Awaiter, continuation: 'TResult1 -> Code<'TOverall>) =
+    (continuation (awaiter.GetResult())).Invoke(&d)
+
+let inline wrap<'T1, 'T2, 'Awaiter1, 'Awaiter2
+    when 'Awaiter1: (member GetResult: unit -> 'T1)
+    and 'Awaiter2: (member GetResult: unit -> 'T2)>
+    (left: 'Awaiter1) (right: 'Awaiter2) : Code<'T1 * 'T2> =
+    Code<'T1 * 'T2>(fun d ->
+        bindDynamic (&d, left, fun leftR ->
+            Code<'T1 * 'T2>(fun d2 ->
+                bindDynamic (&d2, right, fun rightR ->
+                    Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))))
+
+[<EntryPoint>]
+let main _ =
+    let code = wrap (Aw(1)) (Aw(2))
+    let mutable result = (0, 0)
+    code.Invoke(&result)
+    printfn "Result = %A" result
+    0
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Member 01 - Non-generic`` () =
+        FSharp """
+type T() =
+    member inline _.Double(x: int) = x + x
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Double(5)
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Member 02 - Generic`` () =
+        FSharp """
+type T() =
+    member inline _.Apply(f: 'a -> 'b, x: 'a) : 'b = f x
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Apply((fun x -> x + 1), 5)
+    if i = 6 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Member 03 - SRTP`` () =
+        FSharp """
+type T() =
+    member inline _.Add(x: ^T, y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Add(3, 4)
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Operator 01 - Top-level`` () =
+        FSharp """
+let inline (++) (x: int) (y: int) = x + y + 1
+
+[<EntryPoint>]
+let main _ =
+    let i = 3 ++ 4
+    if i = 8 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Operator 02 - Top-level SRTP`` () =
+        FSharp """
+let inline (++) (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = 3 ++ 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Operator 03 - Local`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline (++) (x: int) (y: int) = x + y + 1
+    let i = 3 ++ 4
+    if i = 8 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Operator 04 - Local SRTP`` () =
+        FSharp """
+[<EntryPoint>]
+let main _ =
+    let inline (++) (x: ^T) (y: ^T) = x + y
+    let i = 3 ++ 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 01`` () =
+        FSharp """
+module Module
+
+let inline internal fInternal () = ()
+let inline f () = fInternal ()
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asLibrary
+        |> compile
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 02`` () =
+        FSharp """
+module Module
+
+type T() =
+    member inline internal this.InternalMethod() =
+        ()
+
+    member inline this.Method() =
+        this.InternalMethod()
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asLibrary
+        |> compile
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 03`` () =
+        let library =
+            FSharp """
+module Lib
+
+type T() =
+    member inline internal _.F(x) = x
+    member inline this.G(x) = this.F(x)
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+module App
+let r = Lib.T().G(1)
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> compile
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 04`` () =
+        let library =
+            FSharp """
+module MyLib
+
+let inline internal addInternal (x: ^T) (y: ^T) = x + y
+let inline addPublic (x: ^T) (y: ^T) = addInternal x y
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = addPublic 3 4
+    if i = 7 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 05`` () =
+        let library =
+            FSharp """
+module Module
+
+type MyNum =
+    { Value: float }
+    static member FromFloat (_: MyNum) = fun (x: float) -> { Value = x }
+
+type T =
+    static member inline internal InvokeInternal(x: float) : 'Num =
+        let inline call (a: ^a) = (^a: (static member FromFloat : _ -> _) a)
+        call Unchecked.defaultof<'Num> x
+
+    static member inline Invoke(x: float) : 'Num =
+        T.InvokeInternal<'Num>(x)
+"""
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+
+        FSharp """
+open Module
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(3.14)
+    if result.Value = 3.14 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 06`` () =
+        let impl =
+            FsSource """
+module Lib
+
+module internal Impl =
+    let inline implFn (x: int) =
+        x * x
+
+let inline publicFn (x: int) =
+    Impl.implFn x + 1
+"""
+        let fsi = Fsi """
+module Lib
+
+val inline publicFn: x: int -> int
+"""
+        let library =
+            fsi
+            |> withAdditionalSourceFile impl
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+            |> withName "Lib"
+
+        FSharp """
+open Lib
+
+[<EntryPoint>]
+let main _ =
+    let i = publicFn 3
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Accessibility 07`` () =
+        let impl =
+            FsSource """
+module Lib
+
+module Impl =
+    let inline implFn (x: int) =
+        x * x
+
+let inline publicFn (x: int) =
+    Impl.implFn x + 1
+"""
+        let fsi = Fsi """
+module Lib
+
+val inline publicFn: x: int -> int
+"""
+        let library =
+            fsi
+            |> withAdditionalSourceFile impl
+            |> withDebug
+            |> withNoOptimize
+            |> asLibrary
+            |> withName "Lib"
+
+        FSharp """
+open Lib
+
+[<EntryPoint>]
+let main _ =
+    let i = publicFn 3
+    if i = 10 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> withReferences [library]
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Resumable 01`` () =
+        FSharp """
+open System.Threading.Tasks
+
+[<EntryPoint>]
+let main _ =
+    let t = task { return 1 }
+    if t.Result = 1 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Resumable 02`` () =
+        FSharp """
+open System.Threading.Tasks
+
+[<EntryPoint>]
+let main _ =
+    let t = task {
+        let! x = Task.FromResult(1)
+        let! y = Task.FromResult(2)
+        return x + y
+    }
+    if t.Result = 3 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``Resumable 03`` () =
+        FSharp """
+open Microsoft.FSharp.Core.CompilerServices
+open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers
+open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
+
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline g (_: S<'T>) =
+    if __useResumableCode then
+        __stateMachine<S<'T>, int>
+            (MoveNextMethodImpl<_>(fun _ -> ()))
+            (SetStateMachineMethodImpl<_>(fun _ _ -> ()))
+            (AfterCode<_, _>(fun _ -> 42))
+    else 42
+
+[<EntryPoint>]
+let main _ =
+    let r = g (S<int>())
+    if r = 42 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``InlineIfLambda 01 - Debug`` () =
+        FSharp """
+let inline apply ([<InlineIfLambda>] f: int -> int) (x: int) : int =
+    f x
+
+[<EntryPoint>]
+let main _ =
+    let result = apply (fun i -> i + 1) 5
+    if result = 6 then 0 else 1
+"""
+        |> withDebug
+        |> withNoOptimize
+        |> asExe
+        |> compileAndRun
+        |> verifySequencePoints
+
+    [<Fact>]
+    let ``InlineIfLambda 02 - Release`` () =
+        FSharp """
+let inline apply ([<InlineIfLambda>] f: int -> int) (x: int) : int =
+    f x
+
+[<EntryPoint>]
+let main _ =
+    let result = apply (fun i -> i + 1) 5
+    if result = 6 then 0 else 1
+"""
+        |> asExe
+        |> compile
+        |> shouldSucceed
+        |> verifyILNotPresent ["call       int32 Test::apply(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,int32>,"]
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 01.bsl
new file mode 100644
index 00000000000..1fa823125e9
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 01.bsl	
@@ -0,0 +1,19 @@
+module Module
+
+let inline internal fInternal () = ()
+let inline f () = fInternal ()
+--------------------------------------------------------------------------------
+
+Module::fInternal
+  (4,36-4,38)  ()
+    IL_0000:  ret
+
+Module::f
+  (5,19-5,31)  fInternal ()
+    IL_0000:  tail.
+    IL_0002:  call Module::<fInternal>__debug@5
+    IL_0007:  ret
+
+Module::<fInternal>__debug@5
+  (4,36-4,38)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 02.bsl
new file mode 100644
index 00000000000..88d59aeeaff
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 02.bsl	
@@ -0,0 +1,32 @@
+module Module
+
+type T() =
+    member inline internal this.InternalMethod() =
+        ()
+
+    member inline this.Method() =
+        this.InternalMethod()
+--------------------------------------------------------------------------------
+
+T::.ctor
+  (4,6-4,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::InternalMethod
+  (6,9-6,11)  ()
+    IL_0000:  ret
+
+T::Method
+  (9,9-9,30)  this.InternalMethod()
+    IL_0000:  ldarg.0
+    IL_0001:  tail.
+    IL_0003:  call T::<InternalMethod>__debug@9
+    IL_0008:  ret
+
+T::<InternalMethod>__debug@9
+  (6,9-6,11)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 03.bsl
new file mode 100644
index 00000000000..7f0e4705c22
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 03.bsl	
@@ -0,0 +1,19 @@
+module App
+let r = Lib.T().G(1)
+--------------------------------------------------------------------------------
+
+App::.cctor
+  <hidden>
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld $App::init@
+    IL_0006:  ldsfld $App::init@
+    IL_000b:  pop
+    IL_000c:  ret
+
+App::staticInitialization@
+  (3,1-3,21)  let r = Lib.T().G(1)
+    IL_0000:  newobj T::.ctor
+    IL_0005:  ldc.i4.1
+    IL_0006:  callvirt T::G
+    IL_000b:  stsfld App::r@3
+    IL_0010:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 04.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 04.bsl
new file mode 100644
index 00000000000..6323b95c156
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 04.bsl	
@@ -0,0 +1,32 @@
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = addPublic 3 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,26)  let i = addPublic 3 4
+    IL_0000:  ldc.i4.3
+    IL_0001:  ldc.i4.4
+    IL_0002:  call Test::<addPublic>__debug@6
+    IL_0007:  stloc.0
+
+  (7,5-7,18)  if i = 7 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.7
+    IL_000b:  bne.un.s IL_000f
+
+  (7,19-7,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,26-7,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 05.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 05.bsl
new file mode 100644
index 00000000000..09e16269b69
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 05.bsl	
@@ -0,0 +1,33 @@
+open Module
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(3.14)
+    if result.Value = 3.14 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,39)  let result = T.Invoke<MyNum>(3.14)
+    IL_0000:  ldc.r8 3.140000
+    IL_0009:  call Test::<Invoke>__debug@6
+    IL_000e:  stloc.0
+
+  (7,5-7,32)  if result.Value = 3.14 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.0
+    IL_0011:  call MyNum::get_Value
+    IL_0016:  ldc.r8 3.140000
+    IL_001f:  ceq
+    IL_0021:  brfalse.s IL_0025
+
+  (7,33-7,34)  0
+    IL_0023:  ldc.i4.0
+    IL_0024:  ret
+
+  (7,40-7,41)  1
+    IL_0025:  ldc.i4.1
+    IL_0026:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 06.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 06.bsl
new file mode 100644
index 00000000000..100c928b217
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 06.bsl	
@@ -0,0 +1,31 @@
+open Lib
+
+[<EntryPoint>]
+let main _ =
+    let i = publicFn 3
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,23)  let i = publicFn 3
+    IL_0000:  ldc.i4.3
+    IL_0001:  call Lib::publicFn
+    IL_0006:  stloc.0
+
+  (7,5-7,19)  if i = 10 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 10
+    IL_000b:  bne.un.s IL_000f
+
+  (7,20-7,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,27-7,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 07.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 07.bsl
new file mode 100644
index 00000000000..100c928b217
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Accessibility 07.bsl	
@@ -0,0 +1,31 @@
+open Lib
+
+[<EntryPoint>]
+let main _ =
+    let i = publicFn 3
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,23)  let i = publicFn 3
+    IL_0000:  ldc.i4.3
+    IL_0001:  call Lib::publicFn
+    IL_0006:  stloc.0
+
+  (7,5-7,19)  if i = 10 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 10
+    IL_000b:  bne.un.s IL_000f
+
+  (7,20-7,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,27-7,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 02 - Debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 02 - Debug.bsl
new file mode 100644
index 00000000000..0176dd451ca
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 02 - Debug.bsl	
@@ -0,0 +1,39 @@
+let inline f (x: int) =
+    x + x
+
+[<EntryPoint>]
+let main _ =
+    let i = f 5
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::f
+  (3,5-3,10)  x + x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::main
+  (7,5-7,16)  let i = f 5
+    IL_0000:  ldc.i4.5
+    IL_0001:  call Test::f
+    IL_0006:  stloc.0
+
+  (8,5-8,19)  if i = 10 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 10
+    IL_000b:  bne.un.s IL_000f
+
+  (8,20-8,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (8,27-8,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 03 - Two args.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 03 - Two args.bsl
new file mode 100644
index 00000000000..300e07b47c7
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 03 - Two args.bsl	
@@ -0,0 +1,65 @@
+let inline add a b =
+    a + b
+
+[<EntryPoint>]
+let main _ =
+    let i = add 1 2
+    if i = 3 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::add
+  (4,5-4,10)  a + b
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (4,5-4,10)  a + b
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::main
+  (8,5-8,20)  let i = add 1 2
+    IL_0000:  ldc.i4.1
+    IL_0001:  ldc.i4.2
+    IL_0002:  call Test::<add>__debug@8
+    IL_0007:  stloc.0
+
+  (9,5-9,18)  if i = 3 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.3
+    IL_000b:  bne.un.s IL_000f
+
+  (9,19-9,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (9,26-9,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<add>__debug@8
+  (4,5-4,10)  a + b
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 04 - Function arg.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 04 - Function arg.bsl
new file mode 100644
index 00000000000..6cf20660816
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 04 - Function arg.bsl	
@@ -0,0 +1,43 @@
+let inline apply (f: 'a -> 'b -> 'c) (x: 'a) (y: 'b) : 'c =
+    f x y
+
+[<EntryPoint>]
+let main _ =
+    let i = apply (+) 3 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::apply
+  (3,5-3,10)  f x y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  tail.
+    IL_0005:  call InvokeFast
+    IL_000a:  ret
+
+Test::main
+  (7,5-7,26)  let i = apply (+) 3 4
+    IL_0000:  ldsfld i@7::@_instance
+    IL_0005:  ldc.i4.3
+    IL_0006:  ldc.i4.4
+    IL_0007:  call Test::apply
+    IL_000c:  stloc.0
+
+  (8,5-8,18)  if i = 7 then
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.0
+    IL_000f:  ldc.i4.7
+    IL_0010:  bne.un.s IL_0014
+
+  (8,19-8,20)  0
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  (8,26-8,27)  1
+    IL_0014:  ldc.i4.1
+    IL_0015:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 05 - Nested inline.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 05 - Nested inline.bsl
new file mode 100644
index 00000000000..d1cc7aa8c98
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 05 - Nested inline.bsl	
@@ -0,0 +1,49 @@
+let inline double (x: int) =
+    x + x
+
+let inline quadruple (x: int) =
+    double (double x)
+
+[<EntryPoint>]
+let main _ =
+    let i = quadruple 3
+    if i = 12 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::double
+  (3,5-3,10)  x + x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::quadruple
+  (6,5-6,22)  double (double x)
+    IL_0000:  ldarg.0
+    IL_0001:  call Test::double
+    IL_0006:  call Test::double
+    IL_000b:  ret
+
+Test::main
+  (10,5-10,24)  let i = quadruple 3
+    IL_0000:  ldc.i4.3
+    IL_0001:  call Test::quadruple
+    IL_0006:  stloc.0
+
+  (11,5-11,19)  if i = 12 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 12
+    IL_000b:  bne.un.s IL_000f
+
+  (11,20-11,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (11,27-11,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 06 - Multiple calls.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 06 - Multiple calls.bsl
new file mode 100644
index 00000000000..f11ea30ed7d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 06 - Multiple calls.bsl	
@@ -0,0 +1,42 @@
+let inline double (x: int) =
+    x + x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 1 + double 2
+    if i = 6 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::double
+  (3,5-3,10)  x + x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::main
+  (7,5-7,32)  let i = double 1 + double 2
+    IL_0000:  ldc.i4.1
+    IL_0001:  call Test::double
+    IL_0006:  ldc.i4.2
+    IL_0007:  call Test::double
+    IL_000c:  add
+    IL_000d:  stloc.0
+
+  (8,5-8,18)  if i = 6 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.0
+    IL_0010:  ldc.i4.6
+    IL_0011:  bne.un.s IL_0015
+
+  (8,19-8,20)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (8,26-8,27)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 07 - Local function.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 07 - Local function.bsl
new file mode 100644
index 00000000000..d1b498a5991
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 07 - Local function.bsl	
@@ -0,0 +1,42 @@
+[<EntryPoint>]
+let main _ =
+    let inline double (x: int) = x + x
+    let i = double 5
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld double@4::@_instance
+    IL_0005:  stloc.0
+
+  (5,5-5,21)  let i = double 5
+    IL_0006:  ldloc.0
+    IL_0007:  ldc.i4.5
+    IL_0008:  callvirt Invoke
+    IL_000d:  stloc.1
+
+  (6,5-6,19)  if i = 10 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.1
+    IL_0010:  ldc.i4.s 10
+    IL_0012:  bne.un.s IL_0016
+
+  (6,20-6,21)  0
+    IL_0014:  ldc.i4.0
+    IL_0015:  ret
+
+  (6,27-6,28)  1
+    IL_0016:  ldc.i4.1
+    IL_0017:  ret
+
+  <hidden>
+
+double@4::Invoke
+  (4,34-4,39)  x + x
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 08 - Local generic function.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 08 - Local generic function.bsl
new file mode 100644
index 00000000000..7378cbb67b9
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 08 - Local generic function.bsl	
@@ -0,0 +1,65 @@
+[<EntryPoint>]
+let main _ =
+    let inline apply (f: 'a -> 'b) (x: 'a) : 'b = f x
+    let i = apply (fun x -> x + 1) 5
+    if i = 6 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld apply@4::@_instance
+    IL_0005:  stloc.0
+
+  (5,5-5,37)  let i = apply (fun x -> x + 1) 5
+    IL_0006:  ldloc.0
+    IL_0007:  ldsfld i@5::@_instance
+    IL_000c:  ldc.i4.5
+    IL_000d:  stloc.2
+    IL_000e:  stloc.3
+    IL_000f:  callvirt FSharpTypeFunc::Specialize
+    IL_0014:  unbox.any FSharpTypeFunc
+    IL_0019:  callvirt FSharpTypeFunc::Specialize
+    IL_001e:  unbox.any 0x1b000003
+    IL_0023:  ldloc.3
+    IL_0024:  ldloc.2
+    IL_0025:  call InvokeFast
+    IL_002a:  stloc.1
+
+  (6,5-6,18)  if i = 6 then
+    IL_002b:  nop
+
+  <hidden>
+    IL_002c:  ldloc.1
+    IL_002d:  ldc.i4.6
+    IL_002e:  bne.un.s IL_0032
+
+  (6,19-6,20)  0
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
+
+  (6,26-6,27)  1
+    IL_0032:  ldc.i4.1
+    IL_0033:  ret
+
+  <hidden>
+
+apply@4TT::Invoke
+  (4,51-4,54)  f x
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld self1@
+    IL_0006:  stloc.1
+    IL_0007:  ldloc.1
+    IL_0008:  ldfld self0@
+    IL_000d:  stloc.0
+    IL_000e:  ldarg.1
+    IL_000f:  ldarg.2
+    IL_0010:  tail.
+    IL_0012:  callvirt Invoke
+    IL_0017:  ret
+
+i@5::Invoke
+  (5,29-5,34)  x + 1
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 09 - FSharp.Core not.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 09 - FSharp.Core not.bsl
new file mode 100644
index 00000000000..f88e43d45c4
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 09 - FSharp.Core not.bsl	
@@ -0,0 +1,37 @@
+[<EntryPoint>]
+let main _ =
+    let b = not true
+    if b = false then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (4,5-4,21)  let b = not true
+    IL_0000:  nop
+
+  <hidden>
+    IL_0001:  ldc.i4.1
+    IL_0002:  ldc.i4.0
+    IL_0003:  ceq
+
+  <hidden>
+    IL_0005:  nop
+
+  <hidden>
+    IL_0006:  stloc.0
+
+  (5,5-5,22)  if b = false then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  brtrue.s IL_000d
+
+  (5,23-5,24)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+  (5,30-5,31)  1
+    IL_000d:  ldc.i4.1
+    IL_000e:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 10 - Different assembly.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 10 - Different assembly.bsl
new file mode 100644
index 00000000000..80a8ac75d9f
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 10 - Different assembly.bsl	
@@ -0,0 +1,31 @@
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = triple 3
+    if i = 9 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,21)  let i = triple 3
+    IL_0000:  ldc.i4.3
+    IL_0001:  call MyLib::triple
+    IL_0006:  stloc.0
+
+  (7,5-7,18)  if i = 9 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 9
+    IL_000b:  bne.un.s IL_000f
+
+  (7,19-7,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,26-7,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 11 - Measure.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 11 - Measure.bsl
new file mode 100644
index 00000000000..5831665a2b6
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 11 - Measure.bsl	
@@ -0,0 +1,41 @@
+[<Measure>] type cm
+
+let inline scale (x: float<'u>) = x * 2.0
+
+[<EntryPoint>]
+let main _ =
+    let v = scale 5.0<cm>
+    if v = 10.0<cm> then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::scale
+  (4,35-4,42)  x * 2.0
+    IL_0000:  ldarg.0
+    IL_0001:  ldc.r8 2.000000
+    IL_000a:  mul
+    IL_000b:  ret
+
+Test::main
+  (8,5-8,26)  let v = scale 5.0<cm>
+    IL_0000:  ldc.r8 5.000000
+    IL_0009:  call Test::scale
+    IL_000e:  stloc.0
+
+  (9,5-9,25)  if v = 10.0<cm> then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.0
+    IL_0011:  ldc.r8 10.000000
+    IL_001a:  ceq
+    IL_001c:  brfalse.s IL_0020
+
+  (9,26-9,27)  0
+    IL_001e:  ldc.i4.0
+    IL_001f:  ret
+
+  (9,33-9,34)  1
+    IL_0020:  ldc.i4.1
+    IL_0021:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 12 - No inner optimization.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 12 - No inner optimization.bsl
new file mode 100644
index 00000000000..5591e088837
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 12 - No inner optimization.bsl	
@@ -0,0 +1,51 @@
+[<EntryPoint>]
+let main _ =
+    let inline f (x: int) =
+        let i = 5 + 10
+        x + i
+
+    let i = f 20
+    if i = 35 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld f@5::@_instance
+    IL_0005:  stloc.0
+
+  (8,5-8,17)  let i = f 20
+    IL_0006:  ldloc.0
+    IL_0007:  ldc.i4.s 20
+    IL_0009:  callvirt Invoke
+    IL_000e:  stloc.1
+
+  (9,5-9,19)  if i = 35 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.1
+    IL_0011:  ldc.i4.s 35
+    IL_0013:  bne.un.s IL_0017
+
+  (9,20-9,21)  0
+    IL_0015:  ldc.i4.0
+    IL_0016:  ret
+
+  (9,27-9,28)  1
+    IL_0017:  ldc.i4.1
+    IL_0018:  ret
+
+  <hidden>
+
+f@5::Invoke
+  (5,9-5,23)  let i = 5 + 10
+    IL_0000:  ldc.i4.5
+    IL_0001:  ldc.i4.s 10
+    IL_0003:  add
+    IL_0004:  stloc.0
+
+  (6,9-6,14)  x + i
+    IL_0005:  ldarg.1
+    IL_0006:  ldloc.0
+    IL_0007:  add
+    IL_0008:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 13.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 13.bsl
new file mode 100644
index 00000000000..3d284f8936a
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 13.bsl	
@@ -0,0 +1,33 @@
+[<NoDynamicInvocation>]
+let inline f x = x + 1
+
+let inline g x = f x
+
+g 1 |> ignore
+--------------------------------------------------------------------------------
+
+Test::g
+  (5,18-5,21)  f x
+    IL_0000:  ldarg.0
+    IL_0001:  ldc.i4.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::.cctor
+  <hidden>
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld $Test::init@
+    IL_0006:  ldsfld $Test::init@
+    IL_000b:  pop
+    IL_000c:  ret
+
+Test::staticInitialization@
+  (7,1-7,4)  g 1
+    IL_0000:  ldc.i4.1
+    IL_0001:  call Test::g
+    IL_0006:  stloc.0
+
+  (7,8-7,14)  ignore
+    IL_0007:  ldloc.0
+    IL_0008:  stloc.1
+    IL_0009:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 14.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 14.bsl
new file mode 100644
index 00000000000..38f4791daf0
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 14.bsl	
@@ -0,0 +1,63 @@
+[<NoDynamicInvocation>]
+let inline f x = x + 1
+
+let inline g (x: ^T) (y: ^T) = f (x + y)
+
+g 1 2 |> ignore
+--------------------------------------------------------------------------------
+
+Test::g
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  call LanguagePrimitives::AdditionDynamic
+    IL_000b:  ldc.i4.1
+    IL_000c:  add
+    IL_000d:  ret
+
+Test::g$W
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  call InvokeFast
+    IL_000c:  ldc.i4.1
+    IL_000d:  add
+    IL_000e:  ret
+
+Test::<g>__debug@7
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ldc.i4.1
+    IL_0004:  add
+    IL_0005:  ret
+
+Test::.cctor
+  <hidden>
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld $Test::init@
+    IL_0006:  ldsfld $Test::init@
+    IL_000b:  pop
+    IL_000c:  ret
+
+Test::staticInitialization@
+  (7,1-7,6)  g 1 2
+    IL_0000:  ldc.i4.1
+    IL_0001:  ldc.i4.2
+    IL_0002:  call Test::<g>__debug@7
+    IL_0007:  stloc.0
+
+  (7,10-7,16)  ignore
+    IL_0008:  ldloc.0
+    IL_0009:  stloc.1
+    IL_000a:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 15.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 15.bsl
new file mode 100644
index 00000000000..3b60f224c31
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Call 15.bsl	
@@ -0,0 +1,59 @@
+[<NoDynamicInvocation>]
+let inline f (x: ^T) = x
+
+let inline g (x: ^T) (y: ^T) = f (x + y)
+
+g 1 2 |> ignore
+--------------------------------------------------------------------------------
+
+Test::g
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::g$W
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::<g>__debug@7
+  (5,32-5,41)  f (x + y)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::.cctor
+  <hidden>
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld $Test::init@
+    IL_0006:  ldsfld $Test::init@
+    IL_000b:  pop
+    IL_000c:  ret
+
+Test::staticInitialization@
+  (7,1-7,6)  g 1 2
+    IL_0000:  ldc.i4.1
+    IL_0001:  ldc.i4.2
+    IL_0002:  call Test::<g>__debug@7
+    IL_0007:  stloc.0
+
+  (7,10-7,16)  ignore
+    IL_0008:  ldloc.0
+    IL_0009:  stloc.1
+    IL_000a:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/InlineIfLambda 01 - Debug.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/InlineIfLambda 01 - Debug.bsl
new file mode 100644
index 00000000000..7724b4ed974
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/InlineIfLambda 01 - Debug.bsl	
@@ -0,0 +1,48 @@
+let inline apply ([<InlineIfLambda>] f: int -> int) (x: int) : int =
+    f x
+
+[<EntryPoint>]
+let main _ =
+    let result = apply (fun i -> i + 1) 5
+    if result = 6 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::apply
+  (3,5-3,8)  f x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  tail.
+    IL_0004:  callvirt Invoke
+    IL_0009:  ret
+
+Test::main
+  (7,5-7,42)  let result = apply (fun i -> i + 1) 5
+    IL_0000:  ldsfld result@7::@_instance
+    IL_0005:  ldc.i4.5
+    IL_0006:  call Test::apply
+    IL_000b:  stloc.0
+
+  (8,5-8,23)  if result = 6 then
+    IL_000c:  nop
+
+  <hidden>
+    IL_000d:  ldloc.0
+    IL_000e:  ldc.i4.6
+    IL_000f:  bne.un.s IL_0013
+
+  (8,24-8,25)  0
+    IL_0011:  ldc.i4.0
+    IL_0012:  ret
+
+  (8,31-8,32)  1
+    IL_0013:  ldc.i4.1
+    IL_0014:  ret
+
+  <hidden>
+
+result@7::Invoke
+  (7,34-7,39)  i + 1
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 01 - Non-generic.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 01 - Non-generic.bsl
new file mode 100644
index 00000000000..f2be84c9b7d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 01 - Non-generic.bsl	
@@ -0,0 +1,53 @@
+type T() =
+    member inline _.Double(x: int) = x + x
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Double(5)
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (7,5-7,16)  let t = T()
+    IL_0000:  newobj T::.ctor
+    IL_0005:  stloc.0
+
+  (8,5-8,24)  let i = t.Double(5)
+    IL_0006:  ldloc.0
+    IL_0007:  ldc.i4.5
+    IL_0008:  callvirt T::Double
+    IL_000d:  stloc.1
+
+  (9,5-9,19)  if i = 10 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.1
+    IL_0010:  ldc.i4.s 10
+    IL_0012:  bne.un.s IL_0016
+
+  (9,20-9,21)  0
+    IL_0014:  ldc.i4.0
+    IL_0015:  ret
+
+  (9,27-9,28)  1
+    IL_0016:  ldc.i4.1
+    IL_0017:  ret
+
+  <hidden>
+
+T::.ctor
+  (2,6-2,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::Double
+  (3,38-3,43)  x + x
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 02 - Generic.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 02 - Generic.bsl
new file mode 100644
index 00000000000..8530cae624e
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 02 - Generic.bsl	
@@ -0,0 +1,62 @@
+type T() =
+    member inline _.Apply(f: 'a -> 'b, x: 'a) : 'b = f x
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Apply((fun x -> x + 1), 5)
+    if i = 6 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (7,5-7,16)  let t = T()
+    IL_0000:  newobj T::.ctor
+    IL_0005:  stloc.0
+
+  (8,5-8,41)  let i = t.Apply((fun x -> x + 1), 5)
+    IL_0006:  ldloc.0
+    IL_0007:  ldsfld i@8::@_instance
+    IL_000c:  ldc.i4.5
+    IL_000d:  callvirt T::Apply
+    IL_0012:  stloc.1
+
+  (9,5-9,18)  if i = 6 then
+    IL_0013:  nop
+
+  <hidden>
+    IL_0014:  ldloc.1
+    IL_0015:  ldc.i4.6
+    IL_0016:  bne.un.s IL_001a
+
+  (9,19-9,20)  0
+    IL_0018:  ldc.i4.0
+    IL_0019:  ret
+
+  (9,26-9,27)  1
+    IL_001a:  ldc.i4.1
+    IL_001b:  ret
+
+  <hidden>
+
+T::.ctor
+  (2,6-2,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::Apply
+  (3,54-3,57)  f x
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  tail.
+    IL_0004:  callvirt Invoke
+    IL_0009:  ret
+
+i@8::Invoke
+  (8,31-8,36)  x + 1
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 03 - SRTP.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 03 - SRTP.bsl
new file mode 100644
index 00000000000..4e1742636ae
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Member 03 - SRTP.bsl	
@@ -0,0 +1,79 @@
+type T() =
+    member inline _.Add(x: ^T, y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let t = T()
+    let i = t.Add(3, 4)
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (7,5-7,16)  let t = T()
+    IL_0000:  newobj T::.ctor
+    IL_0005:  stloc.0
+
+  (8,5-8,24)  let i = t.Add(3, 4)
+    IL_0006:  ldloc.0
+    IL_0007:  ldc.i4.3
+    IL_0008:  ldc.i4.4
+    IL_0009:  call Test::<Add>__debug@8
+    IL_000e:  stloc.1
+
+  (9,5-9,18)  if i = 7 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.1
+    IL_0011:  ldc.i4.7
+    IL_0012:  bne.un.s IL_0016
+
+  (9,19-9,20)  0
+    IL_0014:  ldc.i4.0
+    IL_0015:  ret
+
+  (9,26-9,27)  1
+    IL_0016:  ldc.i4.1
+    IL_0017:  ret
+
+  <hidden>
+
+Test::<Add>__debug@8
+  (3,41-3,46)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  add
+    IL_0003:  ret
+
+T::.ctor
+  (2,6-2,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::Add
+  (3,41-3,46)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+T::Add$W
+  (3,41-3,46)  x + y
+    IL_0000:  ldarg.2
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.3
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.1
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 01 - Top-level.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 01 - Top-level.bsl
new file mode 100644
index 00000000000..70782531000
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 01 - Top-level.bsl	
@@ -0,0 +1,41 @@
+let inline (++) (x: int) (y: int) = x + y + 1
+
+[<EntryPoint>]
+let main _ =
+    let i = 3 ++ 4
+    if i = 8 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::op_PlusPlus
+  (2,37-2,46)  x + y + 1
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ldc.i4.1
+    IL_0004:  add
+    IL_0005:  ret
+
+Test::main
+  (6,5-6,19)  let i = 3 ++ 4
+    IL_0000:  ldc.i4.3
+    IL_0001:  ldc.i4.4
+    IL_0002:  call Test::op_PlusPlus
+    IL_0007:  stloc.0
+
+  (7,5-7,18)  if i = 8 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.8
+    IL_000b:  bne.un.s IL_000f
+
+  (7,19-7,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,26-7,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 02 - Top-level SRTP.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 02 - Top-level SRTP.bsl
new file mode 100644
index 00000000000..78406a7020d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 02 - Top-level SRTP.bsl	
@@ -0,0 +1,64 @@
+let inline (++) (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = 3 ++ 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::op_PlusPlus
+  (2,35-2,40)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::op_PlusPlus$W
+  (2,35-2,40)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::main
+  (6,5-6,19)  let i = 3 ++ 4
+    IL_0000:  ldc.i4.3
+    IL_0001:  ldc.i4.4
+    IL_0002:  call Test::<op_PlusPlus>__debug@6
+    IL_0007:  stloc.0
+
+  (7,5-7,18)  if i = 7 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.7
+    IL_000b:  bne.un.s IL_000f
+
+  (7,19-7,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,26-7,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<op_PlusPlus>__debug@6
+  (2,35-2,40)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 03 - Local.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 03 - Local.bsl
new file mode 100644
index 00000000000..06bafb14a38
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 03 - Local.bsl	
@@ -0,0 +1,45 @@
+[<EntryPoint>]
+let main _ =
+    let inline (++) (x: int) (y: int) = x + y + 1
+    let i = 3 ++ 4
+    if i = 8 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld op_PlusPlus@4::@_instance
+    IL_0005:  stloc.0
+
+  (5,5-5,19)  let i = 3 ++ 4
+    IL_0006:  ldloc.0
+    IL_0007:  ldc.i4.3
+    IL_0008:  ldc.i4.4
+    IL_0009:  call InvokeFast
+    IL_000e:  stloc.1
+
+  (6,5-6,18)  if i = 8 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.1
+    IL_0011:  ldc.i4.8
+    IL_0012:  bne.un.s IL_0016
+
+  (6,19-6,20)  0
+    IL_0014:  ldc.i4.0
+    IL_0015:  ret
+
+  (6,26-6,27)  1
+    IL_0016:  ldc.i4.1
+    IL_0017:  ret
+
+  <hidden>
+
+op_PlusPlus@4::Invoke
+  (4,41-4,50)  x + y + 1
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  add
+    IL_0003:  ldc.i4.1
+    IL_0004:  add
+    IL_0005:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 04 - Local SRTP.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 04 - Local SRTP.bsl
new file mode 100644
index 00000000000..cb636d2569f
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Operator 04 - Local SRTP.bsl	
@@ -0,0 +1,54 @@
+[<EntryPoint>]
+let main _ =
+    let inline (++) (x: ^T) (y: ^T) = x + y
+    let i = 3 ++ 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld op_PlusPlus@4::@_instance
+    IL_0005:  stloc.0
+
+  (5,5-5,19)  let i = 3 ++ 4
+    IL_0006:  ldc.i4.3
+    IL_0007:  ldc.i4.4
+    IL_0008:  call Test::<op_PlusPlus>__debug@5
+    IL_000d:  stloc.1
+
+  (6,5-6,18)  if i = 7 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.1
+    IL_0010:  ldc.i4.7
+    IL_0011:  bne.un.s IL_0015
+
+  (6,19-6,20)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (6,26-6,27)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
+
+Test::<op_PlusPlus>__debug@5
+  (4,39-4,44)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+op_PlusPlus@4-1::Invoke
+  (4,39-4,44)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 01.bsl
new file mode 100644
index 00000000000..6d93d7df14a
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 01.bsl	
@@ -0,0 +1,47 @@
+open System.Threading.Tasks
+
+[<EntryPoint>]
+let main _ =
+    let t = task { return 1 }
+    if t.Result = 1 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,13-6,17)  task
+    IL_0000:  call TaskBuilderModule::get_task
+    IL_0005:  stloc.1
+    IL_0006:  ldloc.1
+    IL_0007:  ldloc.1
+    IL_0008:  ldloc.1
+    IL_0009:  newobj t@6::.ctor
+    IL_000e:  callvirt TaskBuilderBase::Delay
+    IL_0013:  callvirt TaskBuilder::Run
+    IL_0018:  stloc.0
+
+  (7,5-7,25)  if t.Result = 1 then
+    IL_0019:  nop
+
+  <hidden>
+    IL_001a:  ldloc.0
+    IL_001b:  callvirt get_Result
+    IL_0020:  ldc.i4.1
+    IL_0021:  bne.un.s IL_0025
+
+  (7,26-7,27)  0
+    IL_0023:  ldc.i4.0
+    IL_0024:  ret
+
+  (7,33-7,34)  1
+    IL_0025:  ldc.i4.1
+    IL_0026:  ret
+
+  <hidden>
+
+t@6::Invoke
+  (6,20-6,28)  return 1
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld t@6::builder@
+    IL_0006:  ldc.i4.1
+    IL_0007:  tail.
+    IL_0009:  callvirt TaskBuilderBase::Return
+    IL_000e:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 02.bsl
new file mode 100644
index 00000000000..7f214a9866b
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 02.bsl	
@@ -0,0 +1,89 @@
+open System.Threading.Tasks
+
+[<EntryPoint>]
+let main _ =
+    let t = task {
+        let! x = Task.FromResult(1)
+        let! y = Task.FromResult(2)
+        return x + y
+    }
+    if t.Result = 3 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,13-6,17)  task
+    IL_0000:  call TaskBuilderModule::get_task
+    IL_0005:  stloc.1
+    IL_0006:  ldloc.1
+    IL_0007:  ldloc.1
+    IL_0008:  ldloc.1
+    IL_0009:  newobj t@9::.ctor
+    IL_000e:  callvirt TaskBuilderBase::Delay
+    IL_0013:  callvirt TaskBuilder::Run
+    IL_0018:  stloc.0
+
+  (11,5-11,25)  if t.Result = 3 then
+    IL_0019:  nop
+
+  <hidden>
+    IL_001a:  ldloc.0
+    IL_001b:  callvirt get_Result
+    IL_0020:  ldc.i4.3
+    IL_0021:  bne.un.s IL_0025
+
+  (11,26-11,27)  0
+    IL_0023:  ldc.i4.0
+    IL_0024:  ret
+
+  (11,33-11,34)  1
+    IL_0025:  ldc.i4.1
+    IL_0026:  ret
+
+  <hidden>
+
+t@9-2::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+
+  (9,9-9,21)  return x + y
+    IL_0002:  ldarg.0
+    IL_0003:  ldfld t@9-2::builder@
+    IL_0008:  ldarg.0
+    IL_0009:  ldfld t@9-2::x
+    IL_000e:  ldloc.0
+    IL_000f:  add
+    IL_0010:  tail.
+    IL_0012:  callvirt TaskBuilderBase::Return
+    IL_0017:  ret
+
+t@8-1::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+
+  (8,9-8,36)  let! y = Task.FromResult(2)
+    IL_0002:  ldarg.0
+    IL_0003:  ldfld t@8-1::builder@
+    IL_0008:  ldc.i4.2
+    IL_0009:  call Task::FromResult
+    IL_000e:  ldarg.0
+    IL_000f:  ldfld t@8-1::builder@
+    IL_0014:  ldloc.0
+    IL_0015:  newobj t@9-2::.ctor
+    IL_001a:  tail.
+    IL_001c:  call HighPriority::TaskBuilderBase.Bind
+    IL_0021:  ret
+
+t@9::Invoke
+  (7,9-7,36)  let! x = Task.FromResult(1)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld t@9::builder@
+    IL_0006:  ldc.i4.1
+    IL_0007:  call Task::FromResult
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld t@9::builder@
+    IL_0012:  newobj t@8-1::.ctor
+    IL_0017:  tail.
+    IL_0019:  call HighPriority::TaskBuilderBase.Bind
+    IL_001e:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 03.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 03.bsl
new file mode 100644
index 00000000000..d1cedc9cccd
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/Resumable 03.bsl	
@@ -0,0 +1,104 @@
+open Microsoft.FSharp.Core.CompilerServices
+open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers
+open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
+
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline g (_: S<'T>) =
+    if __useResumableCode then
+        __stateMachine<S<'T>, int>
+            (MoveNextMethodImpl<_>(fun _ -> ()))
+            (SetStateMachineMethodImpl<_>(fun _ _ -> ()))
+            (AfterCode<_, _>(fun _ -> 42))
+    else 42
+
+[<EntryPoint>]
+let main _ =
+    let r = g (S<int>())
+    if r = 42 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::g
+  (15,10-15,12)  42
+    IL_0000:  ldc.i4.s 42
+    IL_0002:  ret
+
+Test::main
+  (19,5-19,25)  let r = g (S<int>())
+    IL_0000:  ldloc.1
+    IL_0001:  call Test::g
+    IL_0006:  stloc.0
+
+  (20,5-20,19)  if r = 42 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 42
+    IL_000b:  bne.un.s IL_000f
+
+  (20,20-20,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (20,27-20,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000003
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000003
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S`1::M
+  (7,34-7,36)  ()
+    IL_0000:  ret
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000003
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000003
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 01.bsl
new file mode 100644
index 00000000000..e953b45dbb0
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 01.bsl	
@@ -0,0 +1,65 @@
+let inline add (x: ^T) (y: ^T) =
+    x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = add 3 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::add
+  (3,5-3,10)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (3,5-3,10)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::main
+  (7,5-7,20)  let i = add 3 4
+    IL_0000:  ldc.i4.3
+    IL_0001:  ldc.i4.4
+    IL_0002:  call Test::<add>__debug@7
+    IL_0007:  stloc.0
+
+  (8,5-8,18)  if i = 7 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.7
+    IL_000b:  bne.un.s IL_000f
+
+  (8,19-8,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (8,26-8,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<add>__debug@7
+  (3,5-3,10)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 02 - Local.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 02 - Local.bsl
new file mode 100644
index 00000000000..3dd07ec2ec6
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 02 - Local.bsl	
@@ -0,0 +1,54 @@
+[<EntryPoint>]
+let main _ =
+    let inline add (x: ^T) (y: ^T) = x + y
+    let i = add 3 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  <hidden>
+    IL_0000:  ldsfld add@4::@_instance
+    IL_0005:  stloc.0
+
+  (5,5-5,20)  let i = add 3 4
+    IL_0006:  ldc.i4.3
+    IL_0007:  ldc.i4.4
+    IL_0008:  call Test::<add>__debug@5
+    IL_000d:  stloc.1
+
+  (6,5-6,18)  if i = 7 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.1
+    IL_0010:  ldc.i4.7
+    IL_0011:  bne.un.s IL_0015
+
+  (6,19-6,20)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (6,26-6,27)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
+
+Test::<add>__debug@5
+  (4,38-4,43)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+add@4-1::Invoke
+  (4,38-4,43)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 03 - Different type arguments.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 03 - Different type arguments.bsl
new file mode 100644
index 00000000000..b7d7c732611
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 03 - Different type arguments.bsl	
@@ -0,0 +1,89 @@
+let inline getLength (x: ^T) =
+    (^T : (member Length : int) x)
+
+[<EntryPoint>]
+let main _ =
+    let i = getLength "hello"
+    let j = getLength [1; 2; 3]
+    if i = 5 && j = 3 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::getLength
+  (3,5-3,35)  (^T : (member Length : int) x)
+    IL_0000:  ldstr "Dynamic invocation of get_Length is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::getLength$W
+  (3,5-3,35)  (^T : (member Length : int) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  tail.
+    IL_0004:  callvirt Invoke
+    IL_0009:  ret
+
+Test::main
+  (7,5-7,30)  let i = getLength "hello"
+    IL_0000:  ldstr "hello"
+    IL_0005:  call Test::<getLength>__debug@7
+    IL_000a:  stloc.0
+
+  (8,5-8,32)  let j = getLength [1; 2; 3]
+    IL_000b:  ldc.i4.1
+    IL_000c:  ldc.i4.2
+    IL_000d:  ldc.i4.3
+    IL_000e:  call get_Empty
+    IL_0013:  call Cons
+    IL_0018:  call Cons
+    IL_001d:  call Cons
+    IL_0022:  call Test::<getLength>__debug@8-1
+    IL_0027:  stloc.1
+
+  (9,5-9,27)  if i = 5 && j = 3 then
+    IL_0028:  nop
+
+  (9,8-9,13)  i = 5
+    IL_0029:  ldloc.0
+    IL_002a:  ldc.i4.5
+    IL_002b:  bne.un.s IL_0034
+
+  (9,17-9,22)  j = 3
+    IL_002d:  ldloc.1
+    IL_002e:  ldc.i4.3
+    IL_002f:  ceq
+
+  <hidden>
+    IL_0031:  nop
+    IL_0032:  br.s IL_0036
+
+  <hidden>
+    IL_0034:  ldc.i4.0
+
+  <hidden>
+    IL_0035:  nop
+
+  <hidden>
+    IL_0036:  brfalse.s IL_003a
+
+  (9,28-9,29)  0
+    IL_0038:  ldc.i4.0
+    IL_0039:  ret
+
+  (9,35-9,36)  1
+    IL_003a:  ldc.i4.1
+    IL_003b:  ret
+
+  <hidden>
+
+Test::<getLength>__debug@7
+  (3,5-3,35)  (^T : (member Length : int) x)
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt String::get_Length
+    IL_0006:  ret
+
+Test::<getLength>__debug@8-1
+  (3,5-3,35)  (^T : (member Length : int) x)
+    IL_0000:  ldarg.0
+    IL_0001:  tail.
+    IL_0003:  callvirt get_Length
+    IL_0008:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 04 - Multiple calls.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 04 - Multiple calls.bsl
new file mode 100644
index 00000000000..ef37c98dc7d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 04 - Multiple calls.bsl	
@@ -0,0 +1,75 @@
+let inline add (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    let i = add 1 2 + add 3 4
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::add
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::main
+  (6,5-6,30)  let i = add 1 2 + add 3 4
+    IL_0000:  ldc.i4.1
+    IL_0001:  ldc.i4.2
+    IL_0002:  call Test::<add>__debug@6
+    IL_0007:  ldc.i4.3
+    IL_0008:  ldc.i4.4
+    IL_0009:  call Test::<add>__debug@6-1
+    IL_000e:  add
+    IL_000f:  stloc.0
+
+  (7,5-7,19)  if i = 10 then
+    IL_0010:  nop
+
+  <hidden>
+    IL_0011:  ldloc.0
+    IL_0012:  ldc.i4.s 10
+    IL_0014:  bne.un.s IL_0018
+
+  (7,20-7,21)  0
+    IL_0016:  ldc.i4.0
+    IL_0017:  ret
+
+  (7,27-7,28)  1
+    IL_0018:  ldc.i4.1
+    IL_0019:  ret
+
+  <hidden>
+
+Test::<add>__debug@6
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::<add>__debug@6-1
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 05 - Different assembly.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 05 - Different assembly.bsl
new file mode 100644
index 00000000000..142a39bff0d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 05 - Different assembly.bsl	
@@ -0,0 +1,32 @@
+open MyLib
+
+[<EntryPoint>]
+let main _ =
+    let i = add 3 4
+    if i = 7 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (6,5-6,20)  let i = add 3 4
+    IL_0000:  ldc.i4.3
+    IL_0001:  ldc.i4.4
+    IL_0002:  call Test::<add>__debug@6
+    IL_0007:  stloc.0
+
+  (7,5-7,18)  if i = 7 then
+    IL_0008:  nop
+
+  <hidden>
+    IL_0009:  ldloc.0
+    IL_000a:  ldc.i4.7
+    IL_000b:  bne.un.s IL_000f
+
+  (7,19-7,20)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (7,26-7,27)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 06 - Different assembly.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 06 - Different assembly.bsl
new file mode 100644
index 00000000000..559eed89421
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 06 - Different assembly.bsl	
@@ -0,0 +1,58 @@
+open MyLib
+
+let inline double (x: ^T) = add x x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 5
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::double
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  tail.
+    IL_0004:  call MyLib::add
+    IL_0009:  ret
+
+Test::double$W
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.1
+    IL_0003:  tail.
+    IL_0005:  call MyLib::add$W
+    IL_000a:  ret
+
+Test::main
+  (8,5-8,21)  let i = double 5
+    IL_0000:  ldc.i4.5
+    IL_0001:  call Test::<double>__debug@8
+    IL_0006:  stloc.0
+
+  (9,5-9,19)  if i = 10 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 10
+    IL_000b:  bne.un.s IL_000f
+
+  (9,20-9,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (9,27-9,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<double>__debug@8
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  tail.
+    IL_0004:  call Test::<add>__debug@4
+    IL_0009:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 07 - Nested - Same project.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 07 - Nested - Same project.bsl
new file mode 100644
index 00000000000..31a92f1c67f
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 07 - Nested - Same project.bsl	
@@ -0,0 +1,90 @@
+let inline add (x: ^T) (y: ^T) = x + y
+
+let inline double (x: ^T) = add x x
+
+[<EntryPoint>]
+let main _ =
+    let i = double 5
+    if i = 10 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::add
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::double
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  tail.
+    IL_0004:  call Test::add
+    IL_0009:  ret
+
+Test::double$W
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.1
+    IL_0003:  tail.
+    IL_0005:  call Test::add$W
+    IL_000a:  ret
+
+Test::main
+  (8,5-8,21)  let i = double 5
+    IL_0000:  ldc.i4.5
+    IL_0001:  call Test::<double>__debug@8
+    IL_0006:  stloc.0
+
+  (9,5-9,19)  if i = 10 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 10
+    IL_000b:  bne.un.s IL_000f
+
+  (9,20-9,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (9,27-9,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<add>__debug@4
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::<double>__debug@8
+  (4,29-4,36)  add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  tail.
+    IL_0004:  call Test::<add>__debug@4
+    IL_0009:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 08 - Nested - Different type arguments.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 08 - Nested - Different type arguments.bsl
new file mode 100644
index 00000000000..3f08de7ee86
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 08 - Nested - Different type arguments.bsl	
@@ -0,0 +1,159 @@
+let inline add (x: ^T) (y: ^T) = x + y
+
+let inline addBoth (x: ^A) (y: ^B) =
+    let a = add x x
+    let b = add y y
+    (a, b)
+
+[<EntryPoint>]
+let main _ =
+    let (a, b) = addBoth 2 3.0
+    if a = 4 && b = 6.0 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::add
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::addBoth
+  (5,5-5,20)  let a = add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  call Test::add
+    IL_0007:  stloc.0
+
+  (6,5-6,20)  let b = add y y
+    IL_0008:  ldarg.1
+    IL_0009:  ldarg.1
+    IL_000a:  call Test::add
+    IL_000f:  stloc.1
+
+  (7,6-7,10)  a, b
+    IL_0010:  ldloc.0
+    IL_0011:  ldloc.1
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+Test::addBoth$W
+  (5,5-5,20)  let a = add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.2
+    IL_0002:  ldarg.2
+    IL_0003:  call Test::add$W
+    IL_0008:  stloc.0
+
+  (6,5-6,20)  let b = add y y
+    IL_0009:  ldarg.1
+    IL_000a:  ldarg.3
+    IL_000b:  ldarg.3
+    IL_000c:  call Test::add$W
+    IL_0011:  stloc.1
+
+  (7,6-7,10)  a, b
+    IL_0012:  ldloc.0
+    IL_0013:  ldloc.1
+    IL_0014:  newobj .ctor
+    IL_0019:  ret
+
+Test::main
+  (11,5-11,31)  let (a, b) = addBoth 2 3.0
+    IL_0000:  ldc.i4.2
+    IL_0001:  ldc.r8 3.000000
+    IL_000a:  call Test::<addBoth>__debug@11
+    IL_000f:  stloc.0
+    IL_0010:  ldloc.0
+    IL_0011:  call get_Item2
+    IL_0016:  stloc.1
+    IL_0017:  ldloc.0
+    IL_0018:  call get_Item1
+    IL_001d:  stloc.2
+
+  (12,5-12,29)  if a = 4 && b = 6.0 then
+    IL_001e:  nop
+
+  (12,8-12,13)  a = 4
+    IL_001f:  ldloc.2
+    IL_0020:  ldc.i4.4
+    IL_0021:  bne.un.s IL_0032
+
+  (12,17-12,24)  b = 6.0
+    IL_0023:  ldloc.1
+    IL_0024:  ldc.r8 6.000000
+    IL_002d:  ceq
+
+  <hidden>
+    IL_002f:  nop
+    IL_0030:  br.s IL_0034
+
+  <hidden>
+    IL_0032:  ldc.i4.0
+
+  <hidden>
+    IL_0033:  nop
+
+  <hidden>
+    IL_0034:  brfalse.s IL_0038
+
+  (12,30-12,31)  0
+    IL_0036:  ldc.i4.0
+    IL_0037:  ret
+
+  (12,37-12,38)  1
+    IL_0038:  ldc.i4.1
+    IL_0039:  ret
+
+  <hidden>
+
+Test::<add>__debug@5
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::<add>__debug@6-1
+  (2,34-2,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::<addBoth>__debug@11
+  (5,5-5,20)  let a = add x x
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.0
+    IL_0002:  call Test::<add>__debug@5
+    IL_0007:  stloc.0
+
+  (6,5-6,20)  let b = add y y
+    IL_0008:  ldarg.1
+    IL_0009:  ldarg.1
+    IL_000a:  call Test::<add>__debug@6-1
+    IL_000f:  stloc.1
+
+  (7,6-7,10)  a, b
+    IL_0010:  ldloc.0
+    IL_0011:  ldloc.1
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 09 - Witness.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 09 - Witness.bsl
new file mode 100644
index 00000000000..1a45eb6461d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 09 - Witness.bsl	
@@ -0,0 +1,98 @@
+let check s (b1: 'a) (b2: 'a) = if b1 = b2 then () else failwith s
+
+let inline add (x: ^T) (y: ^T) = x + y
+
+[<EntryPoint>]
+let main _ =
+    check "int" (add 3 4) 7
+    check "float" (add 1.0 2.0) 3.0
+    0
+--------------------------------------------------------------------------------
+
+Test::check
+  (2,33-2,48)  if b1 = b2 then
+    IL_0000:  nop
+
+  <hidden>
+    IL_0001:  ldarg.1
+    IL_0002:  stloc.0
+    IL_0003:  ldarg.2
+    IL_0004:  stloc.1
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  call HashCompare::GenericEqualityIntrinsic
+    IL_000c:  brfalse.s IL_000f
+
+  (2,49-2,51)  ()
+    IL_000e:  ret
+
+  (2,57-2,67)  failwith s
+    IL_000f:  ldarg.0
+    IL_0010:  stloc.2
+    IL_0011:  ldloc.2
+    IL_0012:  call Operators::Failure
+    IL_0017:  throw
+
+  <hidden>
+
+Test::add
+  (4,34-4,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.1
+    IL_0004:  ldloc.0
+    IL_0005:  ldloc.1
+    IL_0006:  tail.
+    IL_0008:  call LanguagePrimitives::AdditionDynamic
+    IL_000d:  ret
+
+Test::add$W
+  (4,34-4,39)  x + y
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.2
+    IL_0003:  stloc.1
+    IL_0004:  ldarg.0
+    IL_0005:  ldloc.0
+    IL_0006:  ldloc.1
+    IL_0007:  tail.
+    IL_0009:  call InvokeFast
+    IL_000e:  ret
+
+Test::main
+  (8,5-8,28)  check "int" (add 3 4) 7
+    IL_0000:  ldstr "int"
+    IL_0005:  ldc.i4.3
+    IL_0006:  ldc.i4.4
+    IL_0007:  call Test::<add>__debug@8
+    IL_000c:  ldc.i4.7
+    IL_000d:  call Test::check
+    IL_0012:  nop
+
+  (9,5-9,36)  check "float" (add 1.0 2.0) 3.0
+    IL_0013:  ldstr "float"
+    IL_0018:  ldc.r8 1.000000
+    IL_0021:  ldc.r8 2.000000
+    IL_002a:  call Test::<add>__debug@9-1
+    IL_002f:  ldc.r8 3.000000
+    IL_0038:  call Test::check
+    IL_003d:  nop
+
+  (10,5-10,6)  0
+    IL_003e:  ldc.i4.0
+    IL_003f:  ret
+
+Test::<add>__debug@8
+  (4,34-4,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
+
+Test::<add>__debug@9-1
+  (4,34-4,39)  x + y
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 10 - Witness.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 10 - Witness.bsl
new file mode 100644
index 00000000000..cd292b50852
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 10 - Witness.bsl	
@@ -0,0 +1,468 @@
+type MyNum =
+    { Value: float }
+    static member FromFloat (_: MyNum) = fun (x: float) -> { Value = x }
+
+type T =
+    static member inline Invoke(x: float) : 'Num =
+        let inline call (a: ^a) = (^a: (static member FromFloat : _ -> _) a)
+        call Unchecked.defaultof<'Num> x
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(3.14)
+    if result.Value = 3.14 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (13,5-13,39)  let result = T.Invoke<MyNum>(3.14)
+    IL_0000:  ldc.r8 3.140000
+    IL_0009:  call Test::<Invoke>__debug@13
+    IL_000e:  stloc.0
+
+  (14,5-14,32)  if result.Value = 3.14 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.0
+    IL_0011:  ldfld MyNum::Value@
+    IL_0016:  ldc.r8 3.140000
+    IL_001f:  ceq
+    IL_0021:  brfalse.s IL_0025
+
+  (14,33-14,34)  0
+    IL_0023:  ldc.i4.0
+    IL_0024:  ret
+
+  (14,40-14,41)  1
+    IL_0025:  ldc.i4.1
+    IL_0026:  ret
+
+  <hidden>
+
+Test::<Invoke>__debug@13
+  <hidden>
+    IL_0000:  ldsfld call@8-4::@_instance
+    IL_0005:  stloc.0
+
+  (9,9-9,41)  call Unchecked.defaultof<'Num> x
+    IL_0006:  ldsfld result@8::@_instance
+    IL_000b:  stloc.1
+    IL_000c:  ldloc.1
+    IL_000d:  ldnull
+    IL_000e:  ldarg.0
+    IL_000f:  tail.
+    IL_0011:  call InvokeFast
+    IL_0016:  ret
+
+MyNum::CompareTo
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_003f
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_003d
+
+  <hidden>
+    IL_0006:  call LanguagePrimitives::get_GenericComparer
+    IL_000b:  stloc.0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld MyNum::Value@
+    IL_0012:  stloc.1
+    IL_0013:  ldarg.1
+    IL_0014:  ldfld MyNum::Value@
+    IL_0019:  stloc.2
+
+  <hidden>
+    IL_001a:  ldloc.1
+    IL_001b:  ldloc.2
+    IL_001c:  clt
+    IL_001e:  brfalse.s IL_0022
+
+  <hidden>
+    IL_0020:  ldc.i4.m1
+    IL_0021:  ret
+
+  <hidden>
+    IL_0022:  ldloc.1
+    IL_0023:  ldloc.2
+    IL_0024:  cgt
+    IL_0026:  brfalse.s IL_002a
+
+  <hidden>
+    IL_0028:  ldc.i4.1
+    IL_0029:  ret
+
+  <hidden>
+    IL_002a:  ldloc.1
+    IL_002b:  ldloc.2
+    IL_002c:  ceq
+    IL_002e:  brfalse.s IL_0032
+
+  <hidden>
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
+
+  <hidden>
+    IL_0032:  ldloc.0
+    IL_0033:  ldloc.1
+    IL_0034:  ldloc.2
+    IL_0035:  tail.
+    IL_0037:  call HashCompare::GenericComparisonWithComparerIntrinsic
+    IL_003c:  ret
+
+  <hidden>
+    IL_003d:  ldc.i4.1
+    IL_003e:  ret
+
+  <hidden>
+    IL_003f:  ldarg.1
+    IL_0040:  brfalse.s IL_0044
+
+  <hidden>
+    IL_0042:  ldc.i4.m1
+    IL_0043:  ret
+
+  <hidden>
+    IL_0044:  ldc.i4.0
+    IL_0045:  ret
+
+  <hidden>
+
+MyNum::CompareTo
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  unbox.any MyNum
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  stloc.1
+
+  <hidden>
+    IL_0009:  ldarg.0
+    IL_000a:  brfalse.s IL_004e
+
+  <hidden>
+    IL_000c:  ldarg.1
+    IL_000d:  unbox.any MyNum
+    IL_0012:  brfalse.s IL_004c
+
+  <hidden>
+    IL_0014:  ldarg.2
+    IL_0015:  stloc.2
+    IL_0016:  ldarg.0
+    IL_0017:  ldfld MyNum::Value@
+    IL_001c:  stloc.3
+    IL_001d:  ldloc.1
+    IL_001e:  ldfld MyNum::Value@
+    IL_0023:  stloc.s 4
+
+  <hidden>
+    IL_0025:  ldloc.3
+    IL_0026:  ldloc.s 4
+    IL_0028:  clt
+    IL_002a:  brfalse.s IL_002e
+
+  <hidden>
+    IL_002c:  ldc.i4.m1
+    IL_002d:  ret
+
+  <hidden>
+    IL_002e:  ldloc.3
+    IL_002f:  ldloc.s 4
+    IL_0031:  cgt
+    IL_0033:  brfalse.s IL_0037
+
+  <hidden>
+    IL_0035:  ldc.i4.1
+    IL_0036:  ret
+
+  <hidden>
+    IL_0037:  ldloc.3
+    IL_0038:  ldloc.s 4
+    IL_003a:  ceq
+    IL_003c:  brfalse.s IL_0040
+
+  <hidden>
+    IL_003e:  ldc.i4.0
+    IL_003f:  ret
+
+  <hidden>
+    IL_0040:  ldloc.2
+    IL_0041:  ldloc.3
+    IL_0042:  ldloc.s 4
+    IL_0044:  tail.
+    IL_0046:  call HashCompare::GenericComparisonWithComparerIntrinsic
+    IL_004b:  ret
+
+  <hidden>
+    IL_004c:  ldc.i4.1
+    IL_004d:  ret
+
+  <hidden>
+    IL_004e:  ldarg.1
+    IL_004f:  unbox.any MyNum
+    IL_0054:  brfalse.s IL_0058
+
+  <hidden>
+    IL_0056:  ldc.i4.m1
+    IL_0057:  ret
+
+  <hidden>
+    IL_0058:  ldc.i4.0
+    IL_0059:  ret
+
+  <hidden>
+
+MyNum::GetHashCode
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0022
+
+  <hidden>
+    IL_0003:  ldc.i4.0
+    IL_0004:  stloc.0
+    IL_0005:  ldc.i4 -1640531527
+    IL_000a:  ldarg.1
+    IL_000b:  ldarg.0
+    IL_000c:  ldfld MyNum::Value@
+    IL_0011:  call HashCompare::GenericHashWithComparerIntrinsic
+    IL_0016:  ldloc.0
+    IL_0017:  ldc.i4.6
+    IL_0018:  shl
+    IL_0019:  ldloc.0
+    IL_001a:  ldc.i4.2
+    IL_001b:  shr
+    IL_001c:  add
+    IL_001d:  add
+    IL_001e:  add
+    IL_001f:  stloc.0
+    IL_0020:  ldloc.0
+    IL_0021:  ret
+
+  <hidden>
+    IL_0022:  ldc.i4.0
+    IL_0023:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_001b
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0019
+
+  <hidden>
+    IL_0006:  ldarg.1
+    IL_0007:  stloc.0
+    IL_0008:  ldarg.2
+    IL_0009:  stloc.1
+    IL_000a:  ldarg.0
+    IL_000b:  ldfld MyNum::Value@
+    IL_0010:  ldloc.0
+    IL_0011:  ldfld MyNum::Value@
+    IL_0016:  ceq
+    IL_0018:  ret
+
+  <hidden>
+    IL_0019:  ldc.i4.0
+    IL_001a:  ret
+
+  <hidden>
+    IL_001b:  ldarg.1
+    IL_001c:  ldnull
+    IL_001d:  cgt.un
+    IL_001f:  ldc.i4.0
+    IL_0020:  ceq
+    IL_0022:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst MyNum
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0013
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  ldarg.2
+    IL_000d:  callvirt MyNum::Equals
+    IL_0012:  ret
+
+  <hidden>
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_002c
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_002a
+
+  <hidden>
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld MyNum::Value@
+    IL_000c:  stloc.0
+    IL_000d:  ldarg.1
+    IL_000e:  ldfld MyNum::Value@
+    IL_0013:  stloc.1
+
+  <hidden>
+    IL_0014:  ldloc.0
+    IL_0015:  ldloc.1
+    IL_0016:  ceq
+    IL_0018:  brfalse.s IL_001c
+
+  <hidden>
+    IL_001a:  ldc.i4.1
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldloc.0
+    IL_001d:  ldloc.0
+    IL_001e:  beq.s IL_0028
+
+  <hidden>
+    IL_0020:  ldloc.1
+    IL_0021:  ldloc.1
+    IL_0022:  ceq
+    IL_0024:  ldc.i4.0
+    IL_0025:  ceq
+    IL_0027:  ret
+
+  <hidden>
+    IL_0028:  ldc.i4.0
+    IL_0029:  ret
+
+  <hidden>
+    IL_002a:  ldc.i4.0
+    IL_002b:  ret
+
+  <hidden>
+    IL_002c:  ldarg.1
+    IL_002d:  ldnull
+    IL_002e:  cgt.un
+    IL_0030:  ldc.i4.0
+    IL_0031:  ceq
+    IL_0033:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst MyNum
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0012
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  callvirt MyNum::Equals
+    IL_0011:  ret
+
+  <hidden>
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  <hidden>
+
+FromFloat@4::Invoke
+  (4,60-4,73)  { Value = x }
+    IL_0000:  ldarg.1
+    IL_0001:  newobj MyNum::.ctor
+    IL_0006:  ret
+
+T::Invoke
+  <hidden>
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+
+  (9,9-9,41)  call Unchecked.defaultof<'Num> x
+    IL_0006:  ldsfld @_instance
+    IL_000b:  stloc.1
+    IL_000c:  ldloc.1
+    IL_000d:  ldloca.s 2
+    IL_000f:  initobj 0x1b00000d
+    IL_0015:  ldloc.2
+    IL_0016:  ldarg.0
+    IL_0017:  tail.
+    IL_0019:  call InvokeFast
+    IL_001e:  ret
+
+T::Invoke$W
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+
+  (9,9-9,41)  call Unchecked.defaultof<'Num> x
+    IL_0007:  ldarg.0
+    IL_0008:  newobj .ctor
+    IL_000d:  stloc.1
+    IL_000e:  ldloc.1
+    IL_000f:  ldloca.s 2
+    IL_0011:  initobj 0x1b00000d
+    IL_0017:  ldloc.2
+    IL_0018:  ldarg.1
+    IL_0019:  tail.
+    IL_001b:  call InvokeFast
+    IL_0020:  ret
+
+call@8-1::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Invoke@8::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+call@8-3::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld fromFloat0
+    IL_0006:  ldarg.1
+    IL_0007:  tail.
+    IL_0009:  callvirt Invoke
+    IL_000e:  ret
+
+Invoke@8-1::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld fromFloat
+    IL_0006:  ldarg.1
+    IL_0007:  tail.
+    IL_0009:  callvirt Invoke
+    IL_000e:  ret
+
+call@8-5::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+result@8::Invoke
+  (8,35-8,77)  (^a: (static member FromFloat : _ -> _) a)
+    IL_0000:  ldarg.1
+    IL_0001:  call MyNum::FromFloat
+    IL_0006:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 11 - Witness.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 11 - Witness.bsl
new file mode 100644
index 00000000000..d88eb054eb6
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 11 - Witness.bsl	
@@ -0,0 +1,905 @@
+type MyNum =
+    { Value: float }
+    static member FromFloat (_: MyNum, _: T) = fun (x: float) -> { Value = x }
+
+and T =
+    { Dummy: int }
+    static member inline Invoke(x: float) : 'Num =
+        let inline call2 (a: ^a, b: ^b) = ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+        let inline call (a: 'a) = fun (x: 'x) -> call2 (a, Unchecked.defaultof<'r>) x : 'r
+        call Unchecked.defaultof<T> x
+
+[<EntryPoint>]
+let main _ =
+    let result = T.Invoke<MyNum>(2.71)
+    if result.Value = 2.71 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (15,5-15,39)  let result = T.Invoke<MyNum>(2.71)
+    IL_0000:  ldc.r8 2.710000
+    IL_0009:  call Test::<Invoke>__debug@15
+    IL_000e:  stloc.0
+
+  (16,5-16,32)  if result.Value = 2.71 then
+    IL_000f:  nop
+
+  <hidden>
+    IL_0010:  ldloc.0
+    IL_0011:  ldfld MyNum::Value@
+    IL_0016:  ldc.r8 2.710000
+    IL_001f:  ceq
+    IL_0021:  brfalse.s IL_0025
+
+  (16,33-16,34)  0
+    IL_0023:  ldc.i4.0
+    IL_0024:  ret
+
+  (16,40-16,41)  1
+    IL_0025:  ldc.i4.1
+    IL_0026:  ret
+
+  <hidden>
+
+Test::<Invoke>__debug@15
+  <hidden>
+    IL_0000:  ldsfld call2@9-4::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldsfld call@10-6::@_instance
+    IL_000b:  stloc.1
+
+  (11,9-11,38)  call Unchecked.defaultof<T> x
+    IL_000c:  ldsfld result@10::@_instance
+    IL_0011:  stloc.2
+    IL_0012:  ldloc.2
+    IL_0013:  ldnull
+    IL_0014:  ldarg.0
+    IL_0015:  tail.
+    IL_0017:  call InvokeFast
+    IL_001c:  ret
+
+MyNum::CompareTo
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_003f
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_003d
+
+  <hidden>
+    IL_0006:  call LanguagePrimitives::get_GenericComparer
+    IL_000b:  stloc.0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld MyNum::Value@
+    IL_0012:  stloc.1
+    IL_0013:  ldarg.1
+    IL_0014:  ldfld MyNum::Value@
+    IL_0019:  stloc.2
+
+  <hidden>
+    IL_001a:  ldloc.1
+    IL_001b:  ldloc.2
+    IL_001c:  clt
+    IL_001e:  brfalse.s IL_0022
+
+  <hidden>
+    IL_0020:  ldc.i4.m1
+    IL_0021:  ret
+
+  <hidden>
+    IL_0022:  ldloc.1
+    IL_0023:  ldloc.2
+    IL_0024:  cgt
+    IL_0026:  brfalse.s IL_002a
+
+  <hidden>
+    IL_0028:  ldc.i4.1
+    IL_0029:  ret
+
+  <hidden>
+    IL_002a:  ldloc.1
+    IL_002b:  ldloc.2
+    IL_002c:  ceq
+    IL_002e:  brfalse.s IL_0032
+
+  <hidden>
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
+
+  <hidden>
+    IL_0032:  ldloc.0
+    IL_0033:  ldloc.1
+    IL_0034:  ldloc.2
+    IL_0035:  tail.
+    IL_0037:  call HashCompare::GenericComparisonWithComparerIntrinsic
+    IL_003c:  ret
+
+  <hidden>
+    IL_003d:  ldc.i4.1
+    IL_003e:  ret
+
+  <hidden>
+    IL_003f:  ldarg.1
+    IL_0040:  brfalse.s IL_0044
+
+  <hidden>
+    IL_0042:  ldc.i4.m1
+    IL_0043:  ret
+
+  <hidden>
+    IL_0044:  ldc.i4.0
+    IL_0045:  ret
+
+  <hidden>
+
+MyNum::CompareTo
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  unbox.any MyNum
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  stloc.1
+
+  <hidden>
+    IL_0009:  ldarg.0
+    IL_000a:  brfalse.s IL_004e
+
+  <hidden>
+    IL_000c:  ldarg.1
+    IL_000d:  unbox.any MyNum
+    IL_0012:  brfalse.s IL_004c
+
+  <hidden>
+    IL_0014:  ldarg.2
+    IL_0015:  stloc.2
+    IL_0016:  ldarg.0
+    IL_0017:  ldfld MyNum::Value@
+    IL_001c:  stloc.3
+    IL_001d:  ldloc.1
+    IL_001e:  ldfld MyNum::Value@
+    IL_0023:  stloc.s 4
+
+  <hidden>
+    IL_0025:  ldloc.3
+    IL_0026:  ldloc.s 4
+    IL_0028:  clt
+    IL_002a:  brfalse.s IL_002e
+
+  <hidden>
+    IL_002c:  ldc.i4.m1
+    IL_002d:  ret
+
+  <hidden>
+    IL_002e:  ldloc.3
+    IL_002f:  ldloc.s 4
+    IL_0031:  cgt
+    IL_0033:  brfalse.s IL_0037
+
+  <hidden>
+    IL_0035:  ldc.i4.1
+    IL_0036:  ret
+
+  <hidden>
+    IL_0037:  ldloc.3
+    IL_0038:  ldloc.s 4
+    IL_003a:  ceq
+    IL_003c:  brfalse.s IL_0040
+
+  <hidden>
+    IL_003e:  ldc.i4.0
+    IL_003f:  ret
+
+  <hidden>
+    IL_0040:  ldloc.2
+    IL_0041:  ldloc.3
+    IL_0042:  ldloc.s 4
+    IL_0044:  tail.
+    IL_0046:  call HashCompare::GenericComparisonWithComparerIntrinsic
+    IL_004b:  ret
+
+  <hidden>
+    IL_004c:  ldc.i4.1
+    IL_004d:  ret
+
+  <hidden>
+    IL_004e:  ldarg.1
+    IL_004f:  unbox.any MyNum
+    IL_0054:  brfalse.s IL_0058
+
+  <hidden>
+    IL_0056:  ldc.i4.m1
+    IL_0057:  ret
+
+  <hidden>
+    IL_0058:  ldc.i4.0
+    IL_0059:  ret
+
+  <hidden>
+
+MyNum::GetHashCode
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0022
+
+  <hidden>
+    IL_0003:  ldc.i4.0
+    IL_0004:  stloc.0
+    IL_0005:  ldc.i4 -1640531527
+    IL_000a:  ldarg.1
+    IL_000b:  ldarg.0
+    IL_000c:  ldfld MyNum::Value@
+    IL_0011:  call HashCompare::GenericHashWithComparerIntrinsic
+    IL_0016:  ldloc.0
+    IL_0017:  ldc.i4.6
+    IL_0018:  shl
+    IL_0019:  ldloc.0
+    IL_001a:  ldc.i4.2
+    IL_001b:  shr
+    IL_001c:  add
+    IL_001d:  add
+    IL_001e:  add
+    IL_001f:  stloc.0
+    IL_0020:  ldloc.0
+    IL_0021:  ret
+
+  <hidden>
+    IL_0022:  ldc.i4.0
+    IL_0023:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_001b
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0019
+
+  <hidden>
+    IL_0006:  ldarg.1
+    IL_0007:  stloc.0
+    IL_0008:  ldarg.2
+    IL_0009:  stloc.1
+    IL_000a:  ldarg.0
+    IL_000b:  ldfld MyNum::Value@
+    IL_0010:  ldloc.0
+    IL_0011:  ldfld MyNum::Value@
+    IL_0016:  ceq
+    IL_0018:  ret
+
+  <hidden>
+    IL_0019:  ldc.i4.0
+    IL_001a:  ret
+
+  <hidden>
+    IL_001b:  ldarg.1
+    IL_001c:  ldnull
+    IL_001d:  cgt.un
+    IL_001f:  ldc.i4.0
+    IL_0020:  ceq
+    IL_0022:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst MyNum
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0013
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  ldarg.2
+    IL_000d:  callvirt MyNum::Equals
+    IL_0012:  ret
+
+  <hidden>
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_002c
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_002a
+
+  <hidden>
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld MyNum::Value@
+    IL_000c:  stloc.0
+    IL_000d:  ldarg.1
+    IL_000e:  ldfld MyNum::Value@
+    IL_0013:  stloc.1
+
+  <hidden>
+    IL_0014:  ldloc.0
+    IL_0015:  ldloc.1
+    IL_0016:  ceq
+    IL_0018:  brfalse.s IL_001c
+
+  <hidden>
+    IL_001a:  ldc.i4.1
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldloc.0
+    IL_001d:  ldloc.0
+    IL_001e:  beq.s IL_0028
+
+  <hidden>
+    IL_0020:  ldloc.1
+    IL_0021:  ldloc.1
+    IL_0022:  ceq
+    IL_0024:  ldc.i4.0
+    IL_0025:  ceq
+    IL_0027:  ret
+
+  <hidden>
+    IL_0028:  ldc.i4.0
+    IL_0029:  ret
+
+  <hidden>
+    IL_002a:  ldc.i4.0
+    IL_002b:  ret
+
+  <hidden>
+    IL_002c:  ldarg.1
+    IL_002d:  ldnull
+    IL_002e:  cgt.un
+    IL_0030:  ldc.i4.0
+    IL_0031:  ceq
+    IL_0033:  ret
+
+  <hidden>
+
+MyNum::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst MyNum
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0012
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  callvirt MyNum::Equals
+    IL_0011:  ret
+
+  <hidden>
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  <hidden>
+
+FromFloat@4::Invoke
+  (4,66-4,79)  { Value = x }
+    IL_0000:  ldarg.1
+    IL_0001:  newobj MyNum::.ctor
+    IL_0006:  ret
+
+T::CompareTo
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0026
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0024
+
+  <hidden>
+    IL_0006:  call LanguagePrimitives::get_GenericComparer
+    IL_000b:  stloc.0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld T::Dummy@
+    IL_0012:  stloc.1
+    IL_0013:  ldarg.1
+    IL_0014:  ldfld T::Dummy@
+    IL_0019:  stloc.2
+    IL_001a:  ldloc.1
+    IL_001b:  ldloc.2
+    IL_001c:  cgt
+    IL_001e:  ldloc.1
+    IL_001f:  ldloc.2
+    IL_0020:  clt
+    IL_0022:  sub
+    IL_0023:  ret
+
+  <hidden>
+    IL_0024:  ldc.i4.1
+    IL_0025:  ret
+
+  <hidden>
+    IL_0026:  ldarg.1
+    IL_0027:  brfalse.s IL_002b
+
+  <hidden>
+    IL_0029:  ldc.i4.m1
+    IL_002a:  ret
+
+  <hidden>
+    IL_002b:  ldc.i4.0
+    IL_002c:  ret
+
+  <hidden>
+
+T::CompareTo
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  unbox.any T
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  stloc.1
+
+  <hidden>
+    IL_0009:  ldarg.0
+    IL_000a:  brfalse.s IL_0033
+
+  <hidden>
+    IL_000c:  ldarg.1
+    IL_000d:  unbox.any T
+    IL_0012:  brfalse.s IL_0031
+
+  <hidden>
+    IL_0014:  ldarg.2
+    IL_0015:  stloc.2
+    IL_0016:  ldarg.0
+    IL_0017:  ldfld T::Dummy@
+    IL_001c:  stloc.3
+    IL_001d:  ldloc.1
+    IL_001e:  ldfld T::Dummy@
+    IL_0023:  stloc.s 4
+    IL_0025:  ldloc.3
+    IL_0026:  ldloc.s 4
+    IL_0028:  cgt
+    IL_002a:  ldloc.3
+    IL_002b:  ldloc.s 4
+    IL_002d:  clt
+    IL_002f:  sub
+    IL_0030:  ret
+
+  <hidden>
+    IL_0031:  ldc.i4.1
+    IL_0032:  ret
+
+  <hidden>
+    IL_0033:  ldarg.1
+    IL_0034:  unbox.any T
+    IL_0039:  brfalse.s IL_003d
+
+  <hidden>
+    IL_003b:  ldc.i4.m1
+    IL_003c:  ret
+
+  <hidden>
+    IL_003d:  ldc.i4.0
+    IL_003e:  ret
+
+  <hidden>
+
+T::GetHashCode
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_001e
+
+  <hidden>
+    IL_0003:  ldc.i4.0
+    IL_0004:  stloc.0
+    IL_0005:  ldc.i4 -1640531527
+    IL_000a:  ldarg.1
+    IL_000b:  stloc.1
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld T::Dummy@
+    IL_0012:  ldloc.0
+    IL_0013:  ldc.i4.6
+    IL_0014:  shl
+    IL_0015:  ldloc.0
+    IL_0016:  ldc.i4.2
+    IL_0017:  shr
+    IL_0018:  add
+    IL_0019:  add
+    IL_001a:  add
+    IL_001b:  stloc.0
+    IL_001c:  ldloc.0
+    IL_001d:  ret
+
+  <hidden>
+    IL_001e:  ldc.i4.0
+    IL_001f:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_001b
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0019
+
+  <hidden>
+    IL_0006:  ldarg.1
+    IL_0007:  stloc.0
+    IL_0008:  ldarg.2
+    IL_0009:  stloc.1
+    IL_000a:  ldarg.0
+    IL_000b:  ldfld T::Dummy@
+    IL_0010:  ldloc.0
+    IL_0011:  ldfld T::Dummy@
+    IL_0016:  ceq
+    IL_0018:  ret
+
+  <hidden>
+    IL_0019:  ldc.i4.0
+    IL_001a:  ret
+
+  <hidden>
+    IL_001b:  ldarg.1
+    IL_001c:  ldnull
+    IL_001d:  cgt.un
+    IL_001f:  ldc.i4.0
+    IL_0020:  ceq
+    IL_0022:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst T
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0013
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  ldarg.2
+    IL_000d:  callvirt T::Equals
+    IL_0012:  ret
+
+  <hidden>
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  <hidden>
+
+T::Invoke
+  <hidden>
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldsfld @_instance
+    IL_000b:  stloc.1
+
+  (11,9-11,38)  call Unchecked.defaultof<T> x
+    IL_000c:  ldsfld @_instance
+    IL_0011:  stloc.2
+    IL_0012:  ldloc.2
+    IL_0013:  ldnull
+    IL_0014:  ldarg.0
+    IL_0015:  tail.
+    IL_0017:  call InvokeFast
+    IL_001c:  ret
+
+T::Invoke$W
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  newobj .ctor
+    IL_000d:  stloc.1
+
+  (11,9-11,38)  call Unchecked.defaultof<T> x
+    IL_000e:  ldarg.0
+    IL_000f:  newobj .ctor
+    IL_0014:  stloc.2
+    IL_0015:  ldloc.2
+    IL_0016:  ldnull
+    IL_0017:  ldarg.1
+    IL_0018:  tail.
+    IL_001a:  call InvokeFast
+    IL_001f:  ret
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0017
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0015
+
+  <hidden>
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld T::Dummy@
+    IL_000c:  ldarg.1
+    IL_000d:  ldfld T::Dummy@
+    IL_0012:  ceq
+    IL_0014:  ret
+
+  <hidden>
+    IL_0015:  ldc.i4.0
+    IL_0016:  ret
+
+  <hidden>
+    IL_0017:  ldarg.1
+    IL_0018:  ldnull
+    IL_0019:  cgt.un
+    IL_001b:  ldc.i4.0
+    IL_001c:  ceq
+    IL_001e:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst T
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0012
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  callvirt T::Equals
+    IL_0011:  ret
+
+  <hidden>
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  <hidden>
+
+call2@9-1::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+
+call@9-2::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+
+call@10-1::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  ldloca.s 1
+    IL_000a:  initobj 0x1b000023
+    IL_0010:  ldloc.1
+    IL_0011:  newobj .ctor
+    IL_0016:  ldarg.2
+    IL_0017:  tail.
+    IL_0019:  call InvokeFast
+    IL_001e:  ret
+
+Invoke@9-1::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+
+Invoke@10::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  ldloca.s 1
+    IL_000a:  initobj 0x1b00002a
+    IL_0010:  ldloc.1
+    IL_0011:  newobj .ctor
+    IL_0016:  ldarg.2
+    IL_0017:  tail.
+    IL_0019:  call InvokeFast
+    IL_001e:  ret
+
+call2@9-3::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldarg.0
+    IL_000f:  ldfld fromFloat0
+    IL_0014:  ldloc.1
+    IL_0015:  ldloc.0
+    IL_0016:  tail.
+    IL_0018:  call InvokeFast
+    IL_001d:  ret
+
+call@9-5::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldarg.0
+    IL_000f:  ldfld fromFloat0
+    IL_0014:  ldloc.1
+    IL_0015:  ldloc.0
+    IL_0016:  tail.
+    IL_0018:  call InvokeFast
+    IL_001d:  ret
+
+call@10-4::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld fromFloat
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld fromFloat0
+    IL_000c:  newobj .ctor
+    IL_0011:  stloc.0
+    IL_0012:  ldloc.0
+    IL_0013:  ldarg.1
+    IL_0014:  ldloca.s 1
+    IL_0016:  initobj 0x1b000033
+    IL_001c:  ldloc.1
+    IL_001d:  newobj .ctor
+    IL_0022:  ldarg.2
+    IL_0023:  tail.
+    IL_0025:  call InvokeFast
+    IL_002a:  ret
+
+Invoke@9-3::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldarg.0
+    IL_000f:  ldfld fromFloat
+    IL_0014:  ldloc.1
+    IL_0015:  ldloc.0
+    IL_0016:  tail.
+    IL_0018:  call InvokeFast
+    IL_001d:  ret
+
+Invoke@10-2::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld fromFloat
+    IL_0006:  newobj .ctor
+    IL_000b:  stloc.0
+    IL_000c:  ldloc.0
+    IL_000d:  ldarg.1
+    IL_000e:  ldloca.s 1
+    IL_0010:  initobj 0x1b00002a
+    IL_0016:  ldloc.1
+    IL_0017:  newobj .ctor
+    IL_001c:  ldarg.2
+    IL_001d:  tail.
+    IL_001f:  call InvokeFast
+    IL_0024:  ret
+
+call2@9-5::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+
+call@9-8::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldstr "Dynamic invocation of FromFloat is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+
+call@10-7::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  ldloc.1
+    IL_0009:  newobj .ctor
+    IL_000e:  ldarg.2
+    IL_000f:  tail.
+    IL_0011:  call InvokeFast
+    IL_0016:  ret
+
+result@9-1::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (9,43-9,103)  ((^a or ^b) : (static member FromFloat : _ * _ -> _) (b, a))
+    IL_000e:  ldloc.1
+    IL_000f:  ldloc.0
+    IL_0010:  tail.
+    IL_0012:  call MyNum::FromFloat
+    IL_0017:  ret
+
+result@10::Invoke
+  (10,50-10,86)  call2 (a, Unchecked.defaultof<'r>) x
+    IL_0000:  ldsfld result@9-1::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  ldnull
+    IL_0009:  newobj .ctor
+    IL_000e:  ldarg.2
+    IL_000f:  tail.
+    IL_0011:  call InvokeFast
+    IL_0016:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 12 - Witness - Struct with partially resolved type args.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 12 - Witness - Struct with partially resolved type args.bsl
new file mode 100644
index 00000000000..5900af5806c
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 12 - Witness - Struct with partially resolved type args.bsl	
@@ -0,0 +1,166 @@
+[<Struct>]
+type S =
+    member _.M() = ()
+
+type T() =
+    member _.N() = ()
+
+let inline f (a: ^A when ^A: (member M: unit -> unit)) (_b: ^B when ^B: (member N: unit -> unit)) =
+    (^A: (member M: unit -> unit) a)
+
+let inline g b = f (S()) b
+
+[<EntryPoint>]
+let main _ =
+    g (T())
+    0
+--------------------------------------------------------------------------------
+
+Test::f
+  (10,5-10,37)  (^A: (member M: unit -> unit) a)
+    IL_0000:  ldstr "Dynamic invocation of M is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::f$W
+  (10,5-10,37)  (^A: (member M: unit -> unit) a)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.2
+    IL_0002:  callvirt Invoke
+    IL_0007:  pop
+    IL_0008:  ret
+
+Test::g
+  (12,18-12,27)  f (S()) b
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.1
+    IL_0008:  ldarg.0
+    IL_0009:  call InvokeFast
+    IL_000e:  pop
+    IL_000f:  ret
+
+Test::g$W
+  (12,18-12,27)  f (S()) b
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.1
+    IL_0009:  ldarg.1
+    IL_000a:  call InvokeFast
+    IL_000f:  pop
+    IL_0010:  ret
+
+Test::main
+  (16,5-16,12)  g (T())
+    IL_0000:  newobj T::.ctor
+    IL_0005:  call Test::<g>__debug@16
+    IL_000a:  nop
+
+  (17,5-17,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<g>__debug@16
+  (12,18-12,27)  f (S()) b
+    IL_0000:  ldsfld main@9::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.1
+    IL_0008:  ldarg.0
+    IL_0009:  call InvokeFast
+    IL_000e:  pop
+    IL_000f:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call S::Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S::M
+  (4,20-4,22)  ()
+    IL_0000:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call S::Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
+
+T::.ctor
+  (6,6-6,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::N
+  (7,20-7,22)  ()
+    IL_0000:  ret
+
+g@9::Invoke
+  (10,5-10,37)  (^A: (member M: unit -> unit) a)
+    IL_0000:  ldarga.s 1
+    IL_0002:  call S::M
+    IL_0007:  nop
+    IL_0008:  ldnull
+    IL_0009:  ret
+
+g@9-1::Invoke
+  (10,5-10,37)  (^A: (member M: unit -> unit) a)
+    IL_0000:  ldarga.s 1
+    IL_0002:  call S::M
+    IL_0007:  nop
+    IL_0008:  ldnull
+    IL_0009:  ret
+
+main@9::Invoke
+  (10,5-10,37)  (^A: (member M: unit -> unit) a)
+    IL_0000:  ldarga.s 1
+    IL_0002:  call S::M
+    IL_0007:  nop
+    IL_0008:  ldnull
+    IL_0009:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 13 - Witness - Struct with ResumableCode and partially resolved type args.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 13 - Witness - Struct with ResumableCode and partially resolved type args.bsl
new file mode 100644
index 00000000000..5d890dead08
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 13 - Witness - Struct with ResumableCode and partially resolved type args.bsl	
@@ -0,0 +1,240 @@
+open Microsoft.FSharp.Core.CompilerServices
+
+[<Struct>]
+type S = member this.Foo() = ()
+
+type D = member _.Bar() = true
+
+let inline f (x: ^A) =
+    ResumableCode< ^B, _>(fun sm ->
+        (^A: (member Foo: unit -> unit) x)
+        (^B: (member Bar: unit -> bool) sm.Data)
+    )
+
+let inline g () = f (S())
+
+[<EntryPoint>]
+let main _ =
+    let _ : ResumableCode<D, _> = g ()
+    0
+--------------------------------------------------------------------------------
+
+Test::f
+  (10,26-13,6)  (fun sm -> (^A: (member Foo: unit -> unit) x) (^B: (member Bar: unit -> bool) sm.Data) )
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  ldftn Invoke
+    IL_000c:  newobj .ctor
+    IL_0011:  ret
+
+Test::f$W
+  (10,26-13,6)  (fun sm -> (^A: (member Foo: unit -> unit) x) (^B: (member Bar: unit -> bool) sm.Data) )
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  newobj .ctor
+    IL_0008:  ldftn Invoke
+    IL_000e:  newobj .ctor
+    IL_0013:  ret
+
+Test::g
+  (15,19-15,26)  f (S())
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.1
+    IL_0008:  tail.
+    IL_000a:  callvirt Invoke
+    IL_000f:  ret
+
+Test::g$W
+  (15,19-15,26)  f (S())
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.1
+    IL_0009:  tail.
+    IL_000b:  callvirt Invoke
+    IL_0010:  ret
+
+Test::main
+  (19,35-19,39)  g ()
+    IL_0000:  call Test::<g>__debug@19
+    IL_0005:  pop
+
+  (20,5-20,6)  0
+    IL_0006:  ldc.i4.0
+    IL_0007:  ret
+
+Test::<g>__debug@19
+  (15,19-15,26)  f (S())
+    IL_0000:  ldsfld main@9::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.1
+    IL_0008:  tail.
+    IL_000a:  callvirt Invoke
+    IL_000f:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call S::Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S::Foo
+  (5,30-5,32)  ()
+    IL_0000:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call S::Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
+
+D::Bar
+  (7,27-7,31)  true
+    IL_0000:  ldc.i4.1
+    IL_0001:  ret
+
+f@10::Invoke
+  (11,9-11,43)  (^A: (member Foo: unit -> unit) x)
+    IL_0000:  ldc.i4.0
+    IL_0001:  brfalse.s IL_000b
+    IL_0003:  ldnull
+    IL_0004:  unbox.any Unit
+    IL_0009:  br.s IL_0016
+    IL_000b:  ldstr "Dynamic invocation of Foo is not supported"
+    IL_0010:  newobj NotSupportedException::.ctor
+    IL_0015:  throw
+    IL_0016:  pop
+
+  (12,9-12,49)  (^B: (member Bar: unit -> bool) sm.Data)
+    IL_0017:  ldstr "Dynamic invocation of Bar is not supported"
+    IL_001c:  newobj NotSupportedException::.ctor
+    IL_0021:  throw
+
+f@10-1::Invoke
+  (11,9-11,43)  (^A: (member Foo: unit -> unit) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld foo
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld x
+    IL_000c:  callvirt Invoke
+    IL_0011:  pop
+
+  (12,9-12,49)  (^B: (member Bar: unit -> bool) sm.Data)
+    IL_0012:  ldarg.0
+    IL_0013:  ldfld bar
+    IL_0018:  ldarg.1
+    IL_0019:  ldfld Data
+    IL_001e:  tail.
+    IL_0020:  callvirt Invoke
+    IL_0025:  ret
+
+g@10-1::Invoke
+  (11,9-11,43)  (^A: (member Foo: unit -> unit) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldflda x
+    IL_0006:  call S::Foo
+    IL_000b:  nop
+
+  (12,9-12,49)  (^B: (member Bar: unit -> bool) sm.Data)
+    IL_000c:  ldstr "Dynamic invocation of Bar is not supported"
+    IL_0011:  newobj NotSupportedException::.ctor
+    IL_0016:  throw
+
+g@9::Invoke
+  (10,26-13,6)  (fun sm -> (^A: (member Foo: unit -> unit) x) (^B: (member Bar: unit -> bool) sm.Data) )
+    IL_0000:  ldarg.1
+    IL_0001:  newobj .ctor
+    IL_0006:  ldftn Invoke
+    IL_000c:  newobj .ctor
+    IL_0011:  ret
+
+g@10-3::Invoke
+  (11,9-11,43)  (^A: (member Foo: unit -> unit) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldflda x
+    IL_0006:  call S::Foo
+    IL_000b:  nop
+
+  (12,9-12,49)  (^B: (member Bar: unit -> bool) sm.Data)
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld bar
+    IL_0012:  ldarg.1
+    IL_0013:  ldfld Data
+    IL_0018:  tail.
+    IL_001a:  callvirt Invoke
+    IL_001f:  ret
+
+g@9-2::Invoke
+  (10,26-13,6)  (fun sm -> (^A: (member Foo: unit -> unit) x) (^B: (member Bar: unit -> bool) sm.Data) )
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld bar
+    IL_0006:  ldarg.1
+    IL_0007:  newobj .ctor
+    IL_000c:  ldftn Invoke
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+main@10-1::Invoke
+  (11,9-11,43)  (^A: (member Foo: unit -> unit) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldflda main@10-1::x
+    IL_0006:  call S::Foo
+    IL_000b:  nop
+
+  (12,9-12,49)  (^B: (member Bar: unit -> bool) sm.Data)
+    IL_000c:  ldarg.1
+    IL_000d:  ldfld Data
+    IL_0012:  callvirt D::Bar
+    IL_0017:  ret
+
+main@9::Invoke
+  (10,26-13,6)  (fun sm -> (^A: (member Foo: unit -> unit) x) (^B: (member Bar: unit -> bool) sm.Data) )
+    IL_0000:  ldarg.1
+    IL_0001:  newobj main@10-1::.ctor
+    IL_0006:  ldftn main@10-1::Invoke
+    IL_000c:  newobj .ctor
+    IL_0011:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 14 - StateMachine with unresolved trait from composed inline function.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 14 - StateMachine with unresolved trait from composed inline function.bsl
new file mode 100644
index 00000000000..f8128878afe
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 14 - StateMachine with unresolved trait from composed inline function.bsl	
@@ -0,0 +1,153 @@
+open Microsoft.FSharp.Core.CompilerServices
+open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers
+open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators
+
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline f<'A, 'R, 'B when 'A: (member M: int -> 'R) and 'B: (member M: 'R -> unit)> (_a: 'A) : 'B = Unchecked.defaultof<_>
+
+let inline g (_: S<'T>) =
+    if __useResumableCode then
+        __stateMachine<S<'T>, int>
+            (MoveNextMethodImpl<_>(fun _ -> ()))
+            (SetStateMachineMethodImpl<_>(fun _ _ -> ()))
+            (AfterCode<_, _>(fun _ -> 0))
+    else 0
+
+let inline h a = g (f a)
+
+[<EntryPoint>]
+let main _ =
+    let _ = h (S<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::f
+  (9,104-9,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+Test::f$W
+  (9,104-9,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+Test::g
+  (17,10-17,11)  0
+    IL_0000:  ldc.i4.0
+    IL_0001:  ret
+
+Test::h
+  (19,18-19,25)  g (f a)
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  tail.
+    IL_000f:  call Test::g
+    IL_0014:  ret
+
+Test::h$W
+  (19,18-19,25)  g (f a)
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldarg.1
+    IL_0009:  callvirt Invoke
+    IL_000e:  tail.
+    IL_0010:  call Test::g
+    IL_0015:  ret
+
+Test::main
+  (23,13-23,25)  h (S<int>())
+    IL_0000:  ldloc.0
+    IL_0001:  call Test::<h>__debug@23
+    IL_0006:  pop
+
+  (24,5-24,6)  0
+    IL_0007:  ldc.i4.0
+    IL_0008:  ret
+
+Test::<h>__debug@23
+  (19,18-19,25)  g (f a)
+    IL_0000:  ldsfld main@9::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  tail.
+    IL_000f:  call Test::g
+    IL_0014:  ret
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000008
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000008
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S`1::M
+  (7,34-7,36)  ()
+    IL_0000:  ret
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000008
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000008
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
+
+h@9::Invoke
+  (9,104-9,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+h@9-1::Invoke
+  (9,104-9,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+main@9::Invoke
+  (9,104-9,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 15 - Composed inline with linked constraints.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 15 - Composed inline with linked constraints.bsl
new file mode 100644
index 00000000000..2f3741890be
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 15 - Composed inline with linked constraints.bsl	
@@ -0,0 +1,154 @@
+[<Struct>]
+type S<'T> = member _.M(_: 'T) = ()
+
+let inline f<'A, 'R, 'B when 'A: (member M: int -> 'R) and 'B: (member M: 'R -> unit)> (_a: 'A) : 'B = Unchecked.defaultof<_>
+
+let inline g (_: S<'T>) = 42
+
+let inline h a = g (f a)
+
+[<EntryPoint>]
+let main _ =
+    let i = h (S<int>())
+    if i = 42 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::f
+  (5,104-5,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+Test::f$W
+  (5,104-5,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+Test::g
+  (7,27-7,29)  42
+    IL_0000:  ldc.i4.s 42
+    IL_0002:  ret
+
+Test::h
+  (9,18-9,25)  g (f a)
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  call Test::g
+    IL_0012:  ret
+
+Test::h$W
+  (9,18-9,25)  g (f a)
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldarg.1
+    IL_0009:  callvirt Invoke
+    IL_000e:  call Test::g
+    IL_0013:  ret
+
+Test::main
+  (13,5-13,25)  let i = h (S<int>())
+    IL_0000:  ldloc.1
+    IL_0001:  call Test::<h>__debug@13
+    IL_0006:  stloc.0
+
+  (14,5-14,19)  if i = 42 then
+    IL_0007:  nop
+
+  <hidden>
+    IL_0008:  ldloc.0
+    IL_0009:  ldc.i4.s 42
+    IL_000b:  bne.un.s IL_000f
+
+  (14,20-14,21)  0
+    IL_000d:  ldc.i4.0
+    IL_000e:  ret
+
+  (14,27-14,28)  1
+    IL_000f:  ldc.i4.1
+    IL_0010:  ret
+
+  <hidden>
+
+Test::<h>__debug@13
+  (9,18-9,25)  g (f a)
+    IL_0000:  ldsfld i@5::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  call Test::g
+    IL_0012:  ret
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000008
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000008
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S`1::M
+  (3,34-3,36)  ()
+    IL_0000:  ret
+
+S`1::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst 0x1b000008
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any 0x1b000008
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
+
+h@5::Invoke
+  (5,104-5,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+h@5-1::Invoke
+  (5,104-5,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
+
+i@5::Invoke
+  (5,104-5,123)  Unchecked.defaultof
+    IL_0000:  ldloc.0
+    IL_0001:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 16 - Same line.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 16 - Same line.bsl
new file mode 100644
index 00000000000..4d311a1ae1d
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 16 - Same line.bsl	
@@ -0,0 +1,131 @@
+module Module
+
+type T() = member _.M() = ()
+
+type U = static member inline F<'a, 'b when 'a: (member M: unit -> unit)>(_a: 'a, _b: 'b) = ()
+--------------------------------------------------------------------------------
+
+Program::foo
+  (6,26-6,35)  line F<'a
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  ldc.i4.0
+    IL_0009:  newobj .ctor
+    IL_000e:  callvirt Invoke
+    IL_0013:  pop
+    IL_0014:  ldsfld @_instance
+    IL_0019:  ret
+
+Program::foo$W
+  (6,26-6,35)  line F<'a
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldarg.1
+    IL_0009:  ldc.i4.0
+    IL_000a:  newobj .ctor
+    IL_000f:  callvirt Invoke
+    IL_0014:  pop
+    IL_0015:  ldarg.0
+    IL_0016:  newobj .ctor
+    IL_001b:  ret
+
+Program::main
+  (10,13-10,22)  
+    IL_0000:  newobj T::.ctor
+    IL_0005:  call Program::<foo>__debug@10
+    IL_000a:  pop
+
+  (11,5-11,6)  
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Program::<foo>__debug@10
+  (6,26-6,35)  line F<'a
+    IL_0000:  ldsfld main@6::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  ldc.i4.0
+    IL_0009:  newobj .ctor
+    IL_000e:  callvirt Invoke
+    IL_0013:  pop
+    IL_0014:  ldsfld main@6-1::@_instance
+    IL_0019:  ret
+
+foo@6::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (6,93-6,95)  ()
+    IL_000e:  ldnull
+    IL_000f:  ret
+
+foo@6-1::Invoke
+  (6,47-6,49)  :
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+foo@6-2::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (6,93-6,95)  ()
+    IL_000e:  ldnull
+    IL_000f:  ret
+
+foo@6-3::Invoke
+  (6,47-6,49)  :
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+main@6::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  call get_Item1
+    IL_0006:  stloc.0
+    IL_0007:  ldarg.1
+    IL_0008:  call get_Item2
+    IL_000d:  stloc.1
+
+  (6,93-6,95)  ()
+    IL_000e:  ldnull
+    IL_000f:  ret
+
+main@6-1::Invoke
+  (6,47-6,49)  :
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+T::.ctor
+  (4,6-4,7)  T
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::M
+  (4,27-4,29)  ()
+    IL_0000:  ret
+
+U::F
+  (6,93-6,95)  ()
+    IL_0000:  ret
+
+U::F$W
+  (6,93-6,95)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 17 - Same line.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 17 - Same line.bsl
new file mode 100644
index 00000000000..4e457511e23
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 17 - Same line.bsl	
@@ -0,0 +1,84 @@
+open Module
+
+let inline foo x y = add x y |> ignore; fun () -> ()
+
+[<EntryPoint>]
+let main _ =
+    let _ = foo 1 2
+    0
+--------------------------------------------------------------------------------
+
+Test::foo
+  (4,22-4,29)  add x y
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.1
+    IL_0006:  ldloc.1
+    IL_0007:  ldarg.0
+    IL_0008:  ldarg.1
+    IL_0009:  call InvokeFast
+    IL_000e:  stloc.0
+
+  (4,33-4,39)  ignore
+    IL_000f:  ldloc.0
+    IL_0010:  stloc.2
+    IL_0011:  ldsfld foo@4::@_instance
+    IL_0016:  ret
+
+Test::foo$W
+  (4,22-4,29)  add x y
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.1
+    IL_0007:  ldloc.1
+    IL_0008:  ldarg.1
+    IL_0009:  ldarg.2
+    IL_000a:  call InvokeFast
+    IL_000f:  stloc.0
+
+  (4,33-4,39)  ignore
+    IL_0010:  ldloc.0
+    IL_0011:  stloc.2
+    IL_0012:  ldsfld foo@4-1::@_instance
+    IL_0017:  ret
+
+Test::main
+  (8,13-8,20)  foo 1 2
+    IL_0000:  ldc.i4.1
+    IL_0001:  ldc.i4.2
+    IL_0002:  call Test::<foo>__debug@8
+    IL_0007:  pop
+
+  (9,5-9,6)  0
+    IL_0008:  ldc.i4.0
+    IL_0009:  ret
+
+Test::<foo>__debug@8
+  (4,22-4,29)  add x y
+    IL_0000:  ldsfld Pipe #1 input at line 4@1-2::@_instance
+    IL_0005:  stloc.1
+    IL_0006:  ldloc.1
+    IL_0007:  ldarg.0
+    IL_0008:  ldarg.1
+    IL_0009:  call InvokeFast
+    IL_000e:  stloc.0
+
+  (4,33-4,39)  ignore
+    IL_000f:  ldloc.0
+    IL_0010:  stloc.2
+    IL_0011:  ldsfld main@4::@_instance
+    IL_0016:  ret
+
+foo@4::Invoke
+  (4,51-4,53)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+foo@4-1::Invoke
+  (4,51-4,53)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+main@4::Invoke
+  (4,51-4,53)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 18 - Type abbreviation with constraint.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 18 - Type abbreviation with constraint.bsl
new file mode 100644
index 00000000000..8f89e4d8e32
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 18 - Type abbreviation with constraint.bsl	
@@ -0,0 +1,102 @@
+module Module
+
+type C<'a, 'b when 'a: (member M: unit -> 'b)> = 'a
+
+type C = static member inline F<'a, 'b, 'c when C<'a, 'b>>(_a: 'a) = ()
+--------------------------------------------------------------------------------
+
+Program::foo
+  (8,26-8,32)  
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  pop
+    IL_000e:  ldsfld @_instance
+    IL_0013:  ret
+
+Program::foo$W
+  (8,26-8,32)  
+    IL_0000:  ldarg.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldarg.1
+    IL_0009:  callvirt Invoke
+    IL_000e:  pop
+    IL_000f:  ldarg.0
+    IL_0010:  newobj .ctor
+    IL_0015:  ret
+
+Program::main
+  (12,13-12,22)  
+    IL_0000:  newobj T::.ctor
+    IL_0005:  call Program::<foo>__debug@12
+    IL_000a:  pop
+
+  (13,5-13,6)  
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Program::<foo>__debug@12
+  (8,26-8,32)  
+    IL_0000:  ldsfld main@6::@_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.0
+    IL_0008:  callvirt Invoke
+    IL_000d:  pop
+    IL_000e:  ldsfld main@8-1::@_instance
+    IL_0013:  ret
+
+T::.ctor
+  (6,6-6,7)  C
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+T::M
+  (6,27-6,29)  in
+    IL_0000:  ldc.i4.s 42
+    IL_0002:  ret
+
+foo@6::Invoke
+  (6,70-6,72)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+foo@8-1::Invoke
+  (8,44-8,46)  
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+foo@6-2::Invoke
+  (6,70-6,72)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+foo@8-3::Invoke
+  (8,44-8,46)  
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+main@6::Invoke
+  (6,70-6,72)  ()
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+main@8-1::Invoke
+  (8,44-8,46)  
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+C::F
+  (6,70-6,72)  ()
+    IL_0000:  ret
+
+C::F$W
+  (6,70-6,72)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 19 - byref.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 19 - byref.bsl
new file mode 100644
index 00000000000..e06f12fa1b9
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 19 - byref.bsl	
@@ -0,0 +1,128 @@
+let inline f<'T, 'U when 'T: (member M: byref<'U> -> unit)> (x: byref<'T>, y: byref<'U>) =
+    x.M(&y)
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    f(&s, &v)
+    if v = 42 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::f
+  (3,5-3,8)  x.M
+    IL_0000:  ldstr "Dynamic invocation of M is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::f$W
+  (3,5-3,8)  x.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldobj 0x1b000003
+    IL_0007:  ldarg.2
+    IL_0008:  call InvokeFast
+    IL_000d:  pop
+    IL_000e:  ret
+
+Test::main
+  (11,5-11,24)  let mutable s = S()
+    IL_0000:  nop
+
+  (12,5-12,22)  let mutable v = 0
+    IL_0001:  ldc.i4.0
+    IL_0002:  stloc.1
+
+  (13,5-13,14)  f(&s, &v)
+    IL_0003:  ldloca.s 0
+    IL_0005:  ldloca.s 1
+    IL_0007:  call Test::<f>__debug@13
+    IL_000c:  nop
+
+  (14,5-14,19)  if v = 42 then
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.1
+    IL_000f:  ldc.i4.s 42
+    IL_0011:  bne.un.s IL_0015
+
+  (14,20-14,21)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (14,27-14,28)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
+
+Test::<f>__debug@13
+  (3,5-3,8)  x.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  call S::M
+    IL_0007:  nop
+    IL_0008:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call S::Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S::M
+  (7,33-7,40)  x <- 42
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.s 42
+    IL_0003:  stobj Int32
+    IL_0008:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call S::Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 20 - byref.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 20 - byref.bsl
new file mode 100644
index 00000000000..148376400ee
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 20 - byref.bsl	
@@ -0,0 +1,103 @@
+open MyLib
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    f(&s, &v)
+    if v = 42 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (10,5-10,24)  let mutable s = S()
+    IL_0000:  nop
+
+  (11,5-11,22)  let mutable v = 0
+    IL_0001:  ldc.i4.0
+    IL_0002:  stloc.1
+
+  (12,5-12,14)  f(&s, &v)
+    IL_0003:  ldloca.s 0
+    IL_0005:  ldloca.s 1
+    IL_0007:  call Test::<f>__debug@12
+    IL_000c:  nop
+
+  (13,5-13,19)  if v = 42 then
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.1
+    IL_000f:  ldc.i4.s 42
+    IL_0011:  bne.un.s IL_0015
+
+  (13,20-13,21)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (13,27-13,28)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call S::Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S::M
+  (6,33-6,40)  x <- 42
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.s 42
+    IL_0003:  stobj Int32
+    IL_0008:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call S::Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 21 - byref.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 21 - byref.bsl
new file mode 100644
index 00000000000..593cbf84c79
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 21 - byref.bsl	
@@ -0,0 +1,103 @@
+open MyLib
+
+[<Struct>]
+type S =
+    member _.M(x: byref<int>) = x <- 42
+
+[<EntryPoint>]
+let main _ =
+    let mutable s = S()
+    let mutable v = 0
+    g(&s, &v)
+    if v = 42 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::main
+  (10,5-10,24)  let mutable s = S()
+    IL_0000:  nop
+
+  (11,5-11,22)  let mutable v = 0
+    IL_0001:  ldc.i4.0
+    IL_0002:  stloc.1
+
+  (12,5-12,14)  g(&s, &v)
+    IL_0003:  ldloca.s 0
+    IL_0005:  ldloca.s 1
+    IL_0007:  call Test::<g>__debug@12
+    IL_000c:  nop
+
+  (13,5-13,19)  if v = 42 then
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.1
+    IL_000f:  ldc.i4.s 42
+    IL_0011:  bne.un.s IL_0015
+
+  (13,20-13,21)  0
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  (13,27-13,28)  1
+    IL_0015:  ldc.i4.1
+    IL_0016:  ret
+
+  <hidden>
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001d
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  ldarg.2
+    IL_0017:  call S::Equals
+    IL_001c:  ret
+
+  <hidden>
+    IL_001d:  ldc.i4.0
+    IL_001e:  ret
+
+  <hidden>
+
+S::M
+  (6,33-6,40)  x <- 42
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.s 42
+    IL_0003:  stobj Int32
+    IL_0008:  ret
+
+S::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  isinst S
+    IL_0008:  ldnull
+    IL_0009:  cgt.un
+    IL_000b:  brfalse.s IL_001c
+
+  <hidden>
+    IL_000d:  ldarg.1
+    IL_000e:  unbox.any S
+    IL_0013:  stloc.1
+    IL_0014:  ldarg.0
+    IL_0015:  ldloc.1
+    IL_0016:  call S::Equals
+    IL_001b:  ret
+
+  <hidden>
+    IL_001c:  ldc.i4.0
+    IL_001d:  ret
+
+  <hidden>
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 22 - Recursive inline with different type arg.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 22 - Recursive inline with different type arg.bsl
new file mode 100644
index 00000000000..255f6894713
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 22 - Recursive inline with different type arg.bsl	
@@ -0,0 +1,336 @@
+type T = T with
+    static member ($) (T, _:int) = (+)
+    static member ($) (T, _:decimal) = (+)
+
+let inline sum (i:'a) (x:'a) :'r = (T $ Unchecked.defaultof<'r>) i x
+
+type T with
+    static member inline ($) (T, _:'t -> 'rest) = fun (a:'t) x -> sum (x + a)
+
+[<EntryPoint>]
+let main _ =
+    let y:int = sum 2 3 4
+    if y = 9 then 0 else 1
+--------------------------------------------------------------------------------
+
+Test::sum
+  (6,36-6,69)  (T $ Unchecked.defaultof<'r>) i x
+    IL_0000:  ldc.i4.0
+    IL_0001:  brfalse.s IL_000b
+    IL_0003:  ldnull
+    IL_0004:  unbox.any 0x1b000008
+    IL_0009:  br.s IL_0016
+    IL_000b:  ldstr "Dynamic invocation of op_Dollar is not supported"
+    IL_0010:  newobj NotSupportedException::.ctor
+    IL_0015:  throw
+    IL_0016:  ldarg.0
+    IL_0017:  ldarg.1
+    IL_0018:  tail.
+    IL_001a:  call InvokeFast
+    IL_001f:  ret
+
+Test::sum$W
+  (6,36-6,69)  (T $ Unchecked.defaultof<'r>) i x
+    IL_0000:  ldarg.0
+    IL_0001:  call T::get_T
+    IL_0006:  ldloc.0
+    IL_0007:  call InvokeFast
+    IL_000c:  ldarg.1
+    IL_000d:  ldarg.2
+    IL_000e:  tail.
+    IL_0010:  call InvokeFast
+    IL_0015:  ret
+
+Test::main
+  (13,5-13,26)  let y:int = sum 2 3 4
+    IL_0000:  ldc.i4.2
+    IL_0001:  ldc.i4.3
+    IL_0002:  call Test::<sum>__debug@13
+    IL_0007:  ldc.i4.4
+    IL_0008:  callvirt Invoke
+    IL_000d:  stloc.0
+
+  (14,5-14,18)  if y = 9 then
+    IL_000e:  nop
+
+  <hidden>
+    IL_000f:  ldloc.0
+    IL_0010:  ldc.i4.s 9
+    IL_0012:  bne.un.s IL_0016
+
+  (14,19-14,20)  0
+    IL_0014:  ldc.i4.0
+    IL_0015:  ret
+
+  (14,26-14,27)  1
+    IL_0016:  ldc.i4.1
+    IL_0017:  ret
+
+  <hidden>
+
+Test::<sum>__debug@9-1
+  (6,36-6,69)  (T $ Unchecked.defaultof<'r>) i x
+    IL_0000:  call T::get_T
+    IL_0005:  ldc.i4.0
+    IL_0006:  call T::op_Dollar
+    IL_000b:  ldarg.0
+    IL_000c:  ldarg.1
+    IL_000d:  tail.
+    IL_000f:  call InvokeFast
+    IL_0014:  ret
+
+Test::<sum>__debug@13
+  (6,36-6,69)  (T $ Unchecked.defaultof<'r>) i x
+    IL_0000:  call T::get_T
+    IL_0005:  ldnull
+    IL_0006:  call Test::<op_Dollar>__debug@6
+    IL_000b:  ldarg.0
+    IL_000c:  ldarg.1
+    IL_000d:  tail.
+    IL_000f:  call InvokeFast
+    IL_0014:  ret
+
+T::CompareTo
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_000a
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_0008
+
+  <hidden>
+    IL_0006:  ldc.i4.0
+    IL_0007:  ret
+
+  <hidden>
+    IL_0008:  ldc.i4.1
+    IL_0009:  ret
+
+  <hidden>
+    IL_000a:  ldarg.1
+    IL_000b:  brfalse.s IL_000f
+
+  <hidden>
+    IL_000d:  ldc.i4.m1
+    IL_000e:  ret
+
+  <hidden>
+    IL_000f:  ldc.i4.0
+    IL_0010:  ret
+
+  <hidden>
+
+T::CompareTo
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  unbox.any T
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldarg.0
+    IL_0008:  brfalse.s IL_0016
+
+  <hidden>
+    IL_000a:  ldarg.1
+    IL_000b:  unbox.any T
+    IL_0010:  brfalse.s IL_0014
+
+  <hidden>
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  <hidden>
+    IL_0014:  ldc.i4.1
+    IL_0015:  ret
+
+  <hidden>
+    IL_0016:  ldarg.1
+    IL_0017:  unbox.any T
+    IL_001c:  brfalse.s IL_0020
+
+  <hidden>
+    IL_001e:  ldc.i4.m1
+    IL_001f:  ret
+
+  <hidden>
+    IL_0020:  ldc.i4.0
+    IL_0021:  ret
+
+  <hidden>
+
+T::GetHashCode
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0009
+
+  <hidden>
+    IL_0003:  ldc.i4.0
+    IL_0004:  stloc.0
+    IL_0005:  ldarg.0
+    IL_0006:  pop
+    IL_0007:  ldc.i4.0
+    IL_0008:  ret
+
+  <hidden>
+    IL_0009:  ldc.i4.0
+    IL_000a:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_000c
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  brfalse.s IL_000a
+
+  <hidden>
+    IL_0006:  ldarg.1
+    IL_0007:  stloc.0
+    IL_0008:  ldc.i4.1
+    IL_0009:  ret
+
+  <hidden>
+    IL_000a:  ldc.i4.0
+    IL_000b:  ret
+
+  <hidden>
+    IL_000c:  ldarg.1
+    IL_000d:  ldnull
+    IL_000e:  cgt.un
+    IL_0010:  ldc.i4.0
+    IL_0011:  ceq
+    IL_0013:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst T
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0013
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  ldarg.2
+    IL_000d:  callvirt T::Equals
+    IL_0012:  ret
+
+  <hidden>
+    IL_0013:  ldc.i4.0
+    IL_0014:  ret
+
+  <hidden>
+
+T::op_Dollar
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+
+  (3,37-3,38)  +
+    IL_0002:  ldsfld op_Dollar@3::@_instance
+    IL_0007:  ret
+
+T::op_Dollar
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+
+  (4,41-4,42)  +
+    IL_0002:  ldsfld op_Dollar@4-1::@_instance
+    IL_0007:  ret
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.0
+    IL_0001:  brfalse.s IL_0008
+
+  <hidden>
+    IL_0003:  ldarg.1
+    IL_0004:  ldnull
+    IL_0005:  cgt.un
+    IL_0007:  ret
+
+  <hidden>
+    IL_0008:  ldarg.1
+    IL_0009:  ldnull
+    IL_000a:  cgt.un
+    IL_000c:  ldc.i4.0
+    IL_000d:  ceq
+    IL_000f:  ret
+
+  <hidden>
+
+T::Equals
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  isinst T
+    IL_0006:  stloc.0
+
+  <hidden>
+    IL_0007:  ldloc.0
+    IL_0008:  brfalse.s IL_0012
+
+  <hidden>
+    IL_000a:  ldarg.0
+    IL_000b:  ldloc.0
+    IL_000c:  callvirt T::Equals
+    IL_0011:  ret
+
+  <hidden>
+    IL_0012:  ldc.i4.0
+    IL_0013:  ret
+
+  <hidden>
+
+op_Dollar@9-2::Invoke
+  (9,67-9,78)  sum (x + a)
+    IL_0000:  ldarg.2
+    IL_0001:  stloc.1
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.2
+    IL_0004:  ldloc.1
+    IL_0005:  ldloc.2
+    IL_0006:  call LanguagePrimitives::AdditionDynamic
+    IL_000b:  stloc.0
+    IL_000c:  ldloc.0
+    IL_000d:  newobj .ctor
+    IL_0012:  ret
+
+op_Dollar@9-4::Invoke
+  (9,67-9,78)  sum (x + a)
+    IL_0000:  ldarg.2
+    IL_0001:  stloc.1
+    IL_0002:  ldarg.1
+    IL_0003:  stloc.2
+    IL_0004:  ldarg.0
+    IL_0005:  ldfld op_Addition
+    IL_000a:  ldloc.1
+    IL_000b:  ldloc.2
+    IL_000c:  call InvokeFast
+    IL_0011:  stloc.0
+    IL_0012:  ldarg.0
+    IL_0013:  ldfld op_Addition
+    IL_0018:  ldarg.0
+    IL_0019:  ldfld op_Dollar
+    IL_001e:  ldloc.0
+    IL_001f:  newobj .ctor
+    IL_0024:  ret
+
+y@9::Invoke
+  (9,67-9,78)  sum (x + a)
+    IL_0000:  ldarg.2
+    IL_0001:  ldarg.1
+    IL_0002:  add
+    IL_0003:  stloc.0
+    IL_0004:  ldloc.0
+    IL_0005:  newobj y@9-1::.ctor
+    IL_000a:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 23 - Cross-file specialization with nested closures at same line.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 23 - Cross-file specialization with nested closures at same line.bsl
new file mode 100644
index 00000000000..919b38cce81
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 23 - Cross-file specialization with nested closures at same line.bsl	
@@ -0,0 +1,310 @@
+module Module
+type Bind =
+    static member inline Invoke (s: 'M) (b: 'T -> 'U) =
+        ((^M or ^U) : (static member (>>=) : _*_ -> _) s, b)
+
+type Return =
+    static member Return (_: 'T list, _: Return) : 'T -> 'T list = Unchecked.defaultof<_>
+    static member inline Invoke (x: 'T) =
+        (^A : (static member Return : 'T -> ^A) x)
+
+type MonadBuilder () =
+    member inline _.Return x = Return.Invoke x
+    member inline _.Bind (p, r) = Bind.Invoke p r
+let monad' = MonadBuilder ()
+--------------------------------------------------------------------------------
+
+Program::wrap
+  (6,5-6,30)  
+    IL_0000:  ldc.i4.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+
+  (7,5-7,11)  Retur
+    IL_0007:  call Module::get_monad'
+    IL_000c:  stloc.1
+
+  (8,9-8,25)  ic member Return
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.0
+    IL_000f:  call get_contents
+    IL_0014:  brfalse.s IL_0027
+
+  (9,19-9,31)  inline Invok
+    IL_0016:  ldsfld @_instance
+    IL_001b:  stloc.2
+    IL_001c:  ldloc.2
+    IL_001d:  ldloc.1
+    IL_001e:  ldc.i4.0
+    IL_001f:  tail.
+    IL_0021:  call InvokeFast
+    IL_0026:  ret
+
+  (11,13-11,28)  
+    IL_0027:  ldloc.1
+    IL_0028:  ldarg.0
+    IL_0029:  ldloc.1
+    IL_002a:  ldloc.0
+    IL_002b:  newobj .ctor
+    IL_0030:  callvirt MonadBuilder::Bind
+    IL_0035:  ret
+
+  <hidden>
+
+Program::wrap$W
+  (6,5-6,30)  
+    IL_0000:  ldc.i4.0
+    IL_0001:  newobj .ctor
+    IL_0006:  stloc.0
+
+  (7,5-7,11)  Retur
+    IL_0007:  call Module::get_monad'
+    IL_000c:  stloc.1
+
+  (8,9-8,25)  ic member Return
+    IL_000d:  nop
+
+  <hidden>
+    IL_000e:  ldloc.0
+    IL_000f:  call get_contents
+    IL_0014:  brfalse.s IL_0028
+
+  (9,19-9,31)  inline Invok
+    IL_0016:  ldarg.1
+    IL_0017:  newobj .ctor
+    IL_001c:  stloc.2
+    IL_001d:  ldloc.2
+    IL_001e:  ldloc.1
+    IL_001f:  ldc.i4.0
+    IL_0020:  tail.
+    IL_0022:  call InvokeFast
+    IL_0027:  ret
+
+  (11,13-11,28)  
+    IL_0028:  ldarg.2
+    IL_0029:  ldloc.1
+    IL_002a:  ldarg.3
+    IL_002b:  ldarg.0
+    IL_002c:  ldarg.1
+    IL_002d:  ldarg.2
+    IL_002e:  ldloc.0
+    IL_002f:  ldloc.1
+    IL_0030:  newobj .ctor
+    IL_0035:  callvirt MonadBuilder::Bind$W
+    IL_003a:  ret
+
+  <hidden>
+
+wrap@9-1::Invoke
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldstr "Dynamic invocation of Return is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+wrap@13::Invoke
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.2
+    IL_0008:  tail.
+    IL_000a:  callvirt Invoke
+    IL_000f:  ret
+
+wrap@9-4::Invoke
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldstr "Dynamic invocation of Return is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+wrap@13-3::Invoke
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldsfld @_instance
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldarg.2
+    IL_0008:  tail.
+    IL_000a:  callvirt Invoke
+    IL_000f:  ret
+
+wrap@12-2::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+
+  (12,13-12,26)  ilder () =
+    IL_0002:  ldarg.0
+    IL_0003:  ldfld state
+    IL_0008:  ldc.i4.1
+    IL_0009:  call set_contents
+
+  (13,13-13,24)  nline _.Ret
+    IL_000e:  ldsfld @_instance
+    IL_0013:  stloc.1
+    IL_0014:  ldloc.1
+    IL_0015:  ldarg.0
+    IL_0016:  ldfld builder@
+    IL_001b:  ldc.i4.1
+    IL_001c:  tail.
+    IL_001e:  call InvokeFast
+    IL_0023:  ret
+
+wrap@9-6::Invoke
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld return
+    IL_0006:  ldarg.1
+    IL_0007:  tail.
+    IL_0009:  callvirt Invoke
+    IL_000e:  ret
+
+wrap@13-5::Invoke
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld return
+    IL_0006:  newobj .ctor
+    IL_000b:  stloc.0
+    IL_000c:  ldloc.0
+    IL_000d:  ldarg.2
+    IL_000e:  tail.
+    IL_0010:  callvirt Invoke
+    IL_0015:  ret
+
+wrap@9-9::Invoke
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld return
+    IL_0006:  ldarg.1
+    IL_0007:  tail.
+    IL_0009:  callvirt Invoke
+    IL_000e:  ret
+
+wrap@13-8::Invoke
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld return
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld return0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld op_GreaterGreaterEquals
+    IL_0012:  newobj .ctor
+    IL_0017:  stloc.0
+    IL_0018:  ldloc.0
+    IL_0019:  ldarg.2
+    IL_001a:  tail.
+    IL_001c:  callvirt Invoke
+    IL_0021:  ret
+
+wrap@12-7::Invoke
+  <hidden>
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+
+  (12,13-12,26)  ilder () =
+    IL_0002:  ldarg.0
+    IL_0003:  ldfld state
+    IL_0008:  ldc.i4.1
+    IL_0009:  call set_contents
+
+  (13,13-13,24)  nline _.Ret
+    IL_000e:  ldarg.0
+    IL_000f:  ldfld return
+    IL_0014:  ldarg.0
+    IL_0015:  ldfld return0
+    IL_001a:  ldarg.0
+    IL_001b:  ldfld op_GreaterGreaterEquals
+    IL_0020:  newobj .ctor
+    IL_0025:  stloc.1
+    IL_0026:  ldloc.1
+    IL_0027:  ldarg.0
+    IL_0028:  ldfld builder@
+    IL_002d:  ldc.i4.1
+    IL_002e:  tail.
+    IL_0030:  call InvokeFast
+    IL_0035:  ret
+
+Module::.cctor
+  <hidden>
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld $Module::init@
+    IL_0006:  ldsfld $Module::init@
+    IL_000b:  pop
+    IL_000c:  ret
+
+Module::staticInitialization@
+  (15,1-15,29)  let monad' = MonadBuilder ()
+    IL_0000:  newobj MonadBuilder::.ctor
+    IL_0005:  stsfld Module::monad'@15
+    IL_000a:  ret
+
+Bind::Invoke
+  (5,9-5,61)  ((^M or ^U) : (static member (>>=) : _*_ -> _) s, b)
+    IL_0000:  ldstr "Dynamic invocation of op_GreaterGreaterEquals is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Bind::Invoke$W
+  (5,9-5,61)  ((^M or ^U) : (static member (>>=) : _*_ -> _) s, b)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  tail.
+    IL_0005:  call InvokeFast
+    IL_000a:  ret
+
+Return::Return
+  (8,68-8,87)  Unchecked.defaultof
+    IL_0000:  ldnull
+    IL_0001:  ret
+
+Return::Invoke
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldstr "Dynamic invocation of Return is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Return::Invoke$W
+  (10,9-10,51)  (^A : (static member Return : 'T -> ^A) x)
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  tail.
+    IL_0004:  callvirt Invoke
+    IL_0009:  ret
+
+MonadBuilder::.ctor
+  (12,6-12,18)  MonadBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MonadBuilder::Return
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldarg.1
+    IL_0001:  call Return::Invoke
+    IL_0006:  ret
+
+MonadBuilder::Return$W
+  (13,32-13,47)  Return.Invoke x
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  call Return::Invoke$W
+    IL_0007:  ret
+
+MonadBuilder::Bind
+  (14,35-14,50)  Bind.Invoke p r
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  call Bind::Invoke
+    IL_0007:  ret
+
+MonadBuilder::Bind$W
+  (14,35-14,50)  Bind.Invoke p r
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.2
+    IL_0002:  ldarg.3
+    IL_0003:  call Bind::Invoke$W
+    IL_0008:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 24 - byref with free typar at callsite.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 24 - byref with free typar at callsite.bsl
new file mode 100644
index 00000000000..593363ccf5e
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 24 - byref with free typar at callsite.bsl	
@@ -0,0 +1,76 @@
+type MyBuilder<'T>() =
+    member _.M(a: byref<int>, b: byref<int>) = ()
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder, a: byref<'A>) =
+    builder.M(&a, &a)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::callMember
+  (8,5-8,14)  builder.M
+    IL_0000:  ldstr "Dynamic invocation of M is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::callMember$W
+  (8,5-8,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  ldarg.2
+    IL_0004:  call InvokeFast
+    IL_0009:  pop
+    IL_000a:  ret
+
+Test::runDynamic
+  (11,5-11,22)  let mutable x = 0
+    IL_0000:  ldc.i4.0
+    IL_0001:  stloc.0
+
+  (12,5-12,29)  callMember (builder, &x)
+    IL_0002:  ldarg.0
+    IL_0003:  ldloca.s 0
+    IL_0005:  call Test::<callMember>__debug@12
+    IL_000a:  nop
+    IL_000b:  ret
+
+Test::main
+  (16,5-16,34)  runDynamic (MyBuilder<int>())
+    IL_0000:  newobj .ctor
+    IL_0005:  call Test::runDynamic
+    IL_000a:  nop
+
+  (17,5-17,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<callMember>__debug@12
+  (8,5-8,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.1
+    IL_0003:  callvirt M
+    IL_0008:  nop
+    IL_0009:  ret
+
+MyBuilder`1::.ctor
+  (2,6-2,15)  MyBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MyBuilder`1::M
+  (3,48-3,50)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 25 - byref with free typar at callsite - large tuple.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 25 - byref with free typar at callsite - large tuple.bsl
new file mode 100644
index 00000000000..e5d51e420d2
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 25 - byref with free typar at callsite - large tuple.bsl	
@@ -0,0 +1,113 @@
+type MyBuilder<'T>() =
+    member _.M(a1: byref<int>, a2: byref<int>, a3: byref<int>,
+               a4: byref<int>, a5: byref<int>, a6: byref<int>,
+               a7: byref<int>, a8: byref<int>) =
+        a1 <- 1
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> * byref<'A> * byref<'A>
+                            * byref<'A> * byref<'A> * byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder,
+     a1: byref<'A>, a2: byref<'A>, a3: byref<'A>, a4: byref<'A>,
+     a5: byref<'A>, a6: byref<'A>, a7: byref<'A>, a8: byref<'A>) =
+    builder.M(&a1, &a2, &a3, &a4, &a5, &a6, &a7, &a8)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x, &x, &x, &x, &x, &x, &x, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::callMember
+  (14,5-14,14)  builder.M
+    IL_0000:  ldstr "Dynamic invocation of M is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::callMember$W
+  (14,5-14,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  ldarg.3
+    IL_0004:  ldarg.s 4
+    IL_0006:  ldarg.s 5
+    IL_0008:  ldarg.s 6
+    IL_000a:  ldarg.s 7
+    IL_000c:  ldarg.s 8
+    IL_000e:  ldarg.s 9
+    IL_0010:  stloc.0
+    IL_0011:  stloc.1
+    IL_0012:  stloc.2
+    IL_0013:  stloc.3
+    IL_0014:  call InvokeFast
+    IL_0019:  ldloc.3
+    IL_001a:  ldloc.2
+    IL_001b:  ldloc.1
+    IL_001c:  ldloc.0
+    IL_001d:  call InvokeFast
+    IL_0022:  pop
+    IL_0023:  ret
+
+Test::runDynamic
+  (17,5-17,22)  let mutable x = 0
+    IL_0000:  ldc.i4.0
+    IL_0001:  stloc.0
+
+  (18,5-18,57)  callMember (builder, &x, &x, &x, &x, &x, &x, &x, &x)
+    IL_0002:  ldarg.0
+    IL_0003:  ldloca.s 0
+    IL_0005:  ldloca.s 0
+    IL_0007:  ldloca.s 0
+    IL_0009:  ldloca.s 0
+    IL_000b:  ldloca.s 0
+    IL_000d:  ldloca.s 0
+    IL_000f:  ldloca.s 0
+    IL_0011:  ldloca.s 0
+    IL_0013:  call Test::<callMember>__debug@18
+    IL_0018:  nop
+    IL_0019:  ret
+
+Test::main
+  (22,5-22,34)  runDynamic (MyBuilder<int>())
+    IL_0000:  newobj .ctor
+    IL_0005:  call Test::runDynamic
+    IL_000a:  nop
+
+  (23,5-23,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<callMember>__debug@18
+  (14,5-14,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  ldarg.3
+    IL_0004:  ldarg.s 4
+    IL_0006:  ldarg.s 5
+    IL_0008:  ldarg.s 6
+    IL_000a:  ldarg.s 7
+    IL_000c:  ldarg.s 8
+    IL_000e:  callvirt M
+    IL_0013:  nop
+    IL_0014:  ret
+
+MyBuilder`1::.ctor
+  (2,6-2,15)  MyBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MyBuilder`1::M
+  (6,9-6,16)  a1 <- 1
+    IL_0000:  ldarg.1
+    IL_0001:  ldc.i4.1
+    IL_0002:  stobj Int32
+    IL_0007:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 26 - byref with free typar at callsite - three tupled args.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 26 - byref with free typar at callsite - three tupled args.bsl
new file mode 100644
index 00000000000..02945c5c6ef
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 26 - byref with free typar at callsite - three tupled args.bsl	
@@ -0,0 +1,77 @@
+type MyBuilder<'T>() =
+    member _.M(a: byref<int>, b: byref<int>) = ()
+
+let inline callMember<'Builder, 'A
+    when 'Builder: (member M: byref<'A> * byref<'A> -> unit)>
+    (builder: 'Builder, a: byref<'A>, b: byref<'A>) =
+    builder.M(&a, &b)
+
+let runDynamic (builder: MyBuilder<'T>) =
+    let mutable x = 0
+    callMember (builder, &x, &x)
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::callMember
+  (8,5-8,14)  builder.M
+    IL_0000:  ldstr "Dynamic invocation of M is not supported"
+    IL_0005:  newobj NotSupportedException::.ctor
+    IL_000a:  throw
+
+Test::callMember$W
+  (8,5-8,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  ldarg.3
+    IL_0004:  call InvokeFast
+    IL_0009:  pop
+    IL_000a:  ret
+
+Test::runDynamic
+  (11,5-11,22)  let mutable x = 0
+    IL_0000:  ldc.i4.0
+    IL_0001:  stloc.0
+
+  (12,5-12,33)  callMember (builder, &x, &x)
+    IL_0002:  ldarg.0
+    IL_0003:  ldloca.s 0
+    IL_0005:  ldloca.s 0
+    IL_0007:  call Test::<callMember>__debug@12
+    IL_000c:  nop
+    IL_000d:  ret
+
+Test::main
+  (16,5-16,34)  runDynamic (MyBuilder<int>())
+    IL_0000:  newobj .ctor
+    IL_0005:  call Test::runDynamic
+    IL_000a:  nop
+
+  (17,5-17,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<callMember>__debug@12
+  (8,5-8,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  callvirt M
+    IL_0008:  nop
+    IL_0009:  ret
+
+MyBuilder`1::.ctor
+  (2,6-2,15)  MyBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MyBuilder`1::M
+  (3,48-3,50)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 27 - non-typar tyarg to SRTP callee - non-inline caller.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 27 - non-typar tyarg to SRTP callee - non-inline caller.bsl
new file mode 100644
index 00000000000..164cb663588
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 27 - non-typar tyarg to SRTP callee - non-inline caller.bsl	
@@ -0,0 +1,70 @@
+type MyBuilder<'T>() =
+    member _.M() = ()
+
+let inline callMember<'Builder when 'Builder: (member M: unit -> unit)> (builder: 'Builder) =
+    builder.M()
+
+let runDynamic (builder: MyBuilder<'T>) =
+    callMember builder
+
+[<EntryPoint>]
+let main _ =
+    runDynamic (MyBuilder<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::callMember
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldstr "Dynamic invocation of M is not supported"
+    IL_0007:  newobj NotSupportedException::.ctor
+    IL_000c:  throw
+
+Test::callMember$W
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.0
+    IL_0003:  ldloc.0
+    IL_0004:  callvirt Invoke
+    IL_0009:  pop
+    IL_000a:  ret
+
+Test::runDynamic
+  (9,5-9,23)  callMember builder
+    IL_0000:  ldarg.0
+    IL_0001:  tail.
+    IL_0003:  call Test::<callMember>__debug@9
+    IL_0008:  ret
+
+Test::main
+  (13,5-13,34)  runDynamic (MyBuilder<int>())
+    IL_0000:  newobj .ctor
+    IL_0005:  call Test::runDynamic
+    IL_000a:  nop
+
+  (14,5-14,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<callMember>__debug@9
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  callvirt M
+    IL_0008:  nop
+    IL_0009:  ret
+
+MyBuilder`1::.ctor
+  (2,6-2,15)  MyBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MyBuilder`1::M
+  (3,20-3,22)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 28 - non-typar tyarg to SRTP callee - inline caller.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 28 - non-typar tyarg to SRTP callee - inline caller.bsl
new file mode 100644
index 00000000000..105bc4268d2
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 28 - non-typar tyarg to SRTP callee - inline caller.bsl	
@@ -0,0 +1,70 @@
+type MyBuilder<'T>() =
+    member _.M() = ()
+
+let inline callMember<'Builder when 'Builder: (member M: unit -> unit)> (builder: 'Builder) =
+    builder.M()
+
+let inline outerInline<'T> (builder: MyBuilder<'T>) =
+    callMember builder
+
+[<EntryPoint>]
+let main _ =
+    outerInline (MyBuilder<int>())
+    0
+--------------------------------------------------------------------------------
+
+Test::callMember
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldstr "Dynamic invocation of M is not supported"
+    IL_0007:  newobj NotSupportedException::.ctor
+    IL_000c:  throw
+
+Test::callMember$W
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.1
+    IL_0001:  stloc.0
+    IL_0002:  ldarg.0
+    IL_0003:  ldloc.0
+    IL_0004:  callvirt Invoke
+    IL_0009:  pop
+    IL_000a:  ret
+
+Test::outerInline
+  (9,5-9,23)  callMember builder
+    IL_0000:  ldarg.0
+    IL_0001:  tail.
+    IL_0003:  call Test::<callMember>__debug@9
+    IL_0008:  ret
+
+Test::main
+  (13,5-13,35)  outerInline (MyBuilder<int>())
+    IL_0000:  newobj .ctor
+    IL_0005:  call Test::outerInline
+    IL_000a:  nop
+
+  (14,5-14,6)  0
+    IL_000b:  ldc.i4.0
+    IL_000c:  ret
+
+Test::<callMember>__debug@9
+  (6,5-6,14)  builder.M
+    IL_0000:  ldarg.0
+    IL_0001:  stloc.0
+    IL_0002:  ldloc.0
+    IL_0003:  callvirt M
+    IL_0008:  nop
+    IL_0009:  ret
+
+MyBuilder`1::.ctor
+  (2,6-2,15)  MyBuilder
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ret
+
+MyBuilder`1::M
+  (3,20-3,22)  ()
+    IL_0000:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 29 - byref callee under SRTP witnesses, nested in delegate bodies.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 29 - byref callee under SRTP witnesses, nested in delegate bodies.bsl
new file mode 100644
index 00000000000..9e51e92bfc8
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/DebugInlineAsCall/SRTP 29 - byref callee under SRTP witnesses, nested in delegate bodies.bsl	
@@ -0,0 +1,363 @@
+type Aw(value: int) =
+    member _.GetResult() = value
+
+type Code<'T> = delegate of byref<'T> -> unit
+
+let inline bindDynamic<'TResult1, 'TOverall, 'Awaiter
+    when 'Awaiter: (member GetResult: unit -> 'TResult1)>
+    (d: byref<'TOverall>, awaiter: 'Awaiter, continuation: 'TResult1 -> Code<'TOverall>) =
+    (continuation (awaiter.GetResult())).Invoke(&d)
+
+let inline wrap<'T1, 'T2, 'Awaiter1, 'Awaiter2
+    when 'Awaiter1: (member GetResult: unit -> 'T1)
+    and 'Awaiter2: (member GetResult: unit -> 'T2)>
+    (left: 'Awaiter1) (right: 'Awaiter2) : Code<'T1 * 'T2> =
+    Code<'T1 * 'T2>(fun d ->
+        bindDynamic (&d, left, fun leftR ->
+            Code<'T1 * 'T2>(fun d2 ->
+                bindDynamic (&d2, right, fun rightR ->
+                    Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))))
+
+[<EntryPoint>]
+let main _ =
+    let code = wrap (Aw(1)) (Aw(2))
+    let mutable result = (0, 0)
+    code.Invoke(&result)
+    printfn "Result = %A" result
+    0
+--------------------------------------------------------------------------------
+
+Test::bindDynamic
+  (10,5-10,52)  (continuation (awaiter.GetResult())).Invoke(&d)
+    IL_0000:  ldarg.2
+    IL_0001:  ldarg.1
+    IL_0002:  stloc.0
+    IL_0003:  ldc.i4.0
+    IL_0004:  brfalse.s IL_000e
+    IL_0006:  ldnull
+    IL_0007:  unbox.any 0x1b000004
+    IL_000c:  br.s IL_0019
+    IL_000e:  ldstr "Dynamic invocation of GetResult is not supported"
+    IL_0013:  newobj NotSupportedException::.ctor
+    IL_0018:  throw
+    IL_0019:  callvirt Invoke
+    IL_001e:  ldarg.0
+    IL_001f:  callvirt Invoke
+    IL_0024:  nop
+    IL_0025:  ret
+
+Test::bindDynamic$W
+  (10,5-10,52)  (continuation (awaiter.GetResult())).Invoke(&d)
+    IL_0000:  ldarg.3
+    IL_0001:  ldarg.2
+    IL_0002:  stloc.0
+    IL_0003:  ldarg.0
+    IL_0004:  ldloc.0
+    IL_0005:  callvirt Invoke
+    IL_000a:  callvirt Invoke
+    IL_000f:  ldarg.1
+    IL_0010:  callvirt Invoke
+    IL_0015:  nop
+    IL_0016:  ret
+
+Test::wrap
+  (16,20-20,73)  (fun d -> bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  newobj .ctor
+    IL_0007:  ldftn Invoke
+    IL_000d:  newobj .ctor
+    IL_0012:  ret
+
+Test::wrap$W
+  (16,20-20,73)  (fun d -> bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  ldarg.2
+    IL_0003:  ldarg.3
+    IL_0004:  newobj .ctor
+    IL_0009:  ldftn Invoke
+    IL_000f:  newobj .ctor
+    IL_0014:  ret
+
+Test::main
+  (24,5-24,36)  let code = wrap (Aw(1)) (Aw(2))
+    IL_0000:  ldc.i4.1
+    IL_0001:  newobj Aw::.ctor
+    IL_0006:  ldc.i4.2
+    IL_0007:  newobj Aw::.ctor
+    IL_000c:  call Test::<wrap>__debug@24
+    IL_0011:  stloc.0
+
+  (25,5-25,32)  let mutable result = (0, 0)
+    IL_0012:  ldc.i4.0
+    IL_0013:  ldc.i4.0
+    IL_0014:  newobj .ctor
+    IL_0019:  stloc.1
+
+  (26,5-26,25)  code.Invoke(&result)
+    IL_001a:  ldloc.0
+    IL_001b:  ldloca.s 1
+    IL_001d:  callvirt Invoke
+    IL_0022:  nop
+
+  (27,5-27,33)  printfn "Result = %A" result
+    IL_0023:  ldstr "Result = %A"
+    IL_0028:  newobj .ctor
+    IL_002d:  call ExtraTopLevelOperators::PrintFormatLine
+    IL_0032:  stloc.2
+    IL_0033:  ldloc.1
+    IL_0034:  stloc.3
+    IL_0035:  ldloc.3
+    IL_0036:  call get_Item1
+    IL_003b:  stloc.s 4
+    IL_003d:  ldloc.3
+    IL_003e:  call get_Item2
+    IL_0043:  stloc.s 5
+    IL_0045:  ldloc.2
+    IL_0046:  ldloc.s 4
+    IL_0048:  ldloc.s 5
+    IL_004a:  newobj .ctor
+    IL_004f:  callvirt Invoke
+    IL_0054:  pop
+
+  (28,5-28,6)  0
+    IL_0055:  ldc.i4.0
+    IL_0056:  ret
+
+Test::<bindDynamic>__debug@17
+  (10,5-10,52)  (continuation (awaiter.GetResult())).Invoke(&d)
+    IL_0000:  ldarg.2
+    IL_0001:  ldarg.1
+    IL_0002:  stloc.0
+    IL_0003:  ldloc.0
+    IL_0004:  callvirt Aw::GetResult
+    IL_0009:  callvirt Invoke
+    IL_000e:  ldarg.0
+    IL_000f:  callvirt Invoke
+    IL_0014:  nop
+    IL_0015:  ret
+
+Test::<bindDynamic>__debug@19-1
+  (10,5-10,52)  (continuation (awaiter.GetResult())).Invoke(&d)
+    IL_0000:  ldarg.2
+    IL_0001:  ldarg.1
+    IL_0002:  stloc.0
+    IL_0003:  ldloc.0
+    IL_0004:  callvirt Aw::GetResult
+    IL_0009:  callvirt Invoke
+    IL_000e:  ldarg.0
+    IL_000f:  callvirt Invoke
+    IL_0014:  nop
+    IL_0015:  ret
+
+Test::<wrap>__debug@24
+  (16,20-20,73)  (fun d -> bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldarg.1
+    IL_0002:  newobj code@16::.ctor
+    IL_0007:  ldftn code@16::Invoke
+    IL_000d:  newobj .ctor
+    IL_0012:  ret
+
+Aw::.ctor
+  (2,6-2,8)  Aw
+    IL_0000:  ldarg.0
+    IL_0001:  callvirt Object::.ctor
+    IL_0006:  ldarg.0
+    IL_0007:  pop
+    IL_0008:  ldarg.0
+    IL_0009:  ldarg.1
+    IL_000a:  stfld Aw::value
+    IL_000f:  ret
+
+Aw::GetResult
+  (3,28-3,33)  value
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld Aw::value
+    IL_0006:  ret
+
+wrap@20-4::Invoke
+  (20,47-20,68)  d3 <- (leftR, rightR)
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld leftR
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld rightR
+    IL_000d:  newobj .ctor
+    IL_0012:  stobj 0x1b000010
+    IL_0017:  ret
+
+wrap@19-3::Invoke
+  (20,36-20,69)  (fun d3 -> d3 <- (leftR, rightR))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld leftR
+    IL_0006:  ldarg.1
+    IL_0007:  newobj .ctor
+    IL_000c:  ldftn Invoke
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+wrap@18-2::Invoke
+  (19,17-20,70)  bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld right
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld leftR
+    IL_000d:  newobj .ctor
+    IL_0012:  call Test::bindDynamic
+    IL_0017:  nop
+    IL_0018:  ret
+
+wrap@17-1::Invoke
+  (18,28-20,71)  (fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld right
+    IL_0006:  ldarg.1
+    IL_0007:  newobj .ctor
+    IL_000c:  ldftn Invoke
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+wrap@16::Invoke
+  (17,9-20,72)  bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))))
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld left
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld right
+    IL_000d:  newobj .ctor
+    IL_0012:  call Test::bindDynamic
+    IL_0017:  nop
+    IL_0018:  ret
+
+wrap@20-9::Invoke
+  (20,47-20,68)  d3 <- (leftR, rightR)
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld leftR
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld rightR
+    IL_000d:  newobj .ctor
+    IL_0012:  stobj 0x1b000010
+    IL_0017:  ret
+
+wrap@19-8::Invoke
+  (20,36-20,69)  (fun d3 -> d3 <- (leftR, rightR))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld getResult
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld getResult0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld leftR
+    IL_0012:  ldarg.1
+    IL_0013:  newobj .ctor
+    IL_0018:  ldftn Invoke
+    IL_001e:  newobj .ctor
+    IL_0023:  ret
+
+wrap@18-7::Invoke
+  (19,17-20,70)  bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld getResult0
+    IL_0006:  ldarg.1
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld right
+    IL_000d:  ldarg.0
+    IL_000e:  ldfld getResult
+    IL_0013:  ldarg.0
+    IL_0014:  ldfld getResult0
+    IL_0019:  ldarg.0
+    IL_001a:  ldfld leftR
+    IL_001f:  newobj .ctor
+    IL_0024:  call Test::bindDynamic$W
+    IL_0029:  nop
+    IL_002a:  ret
+
+wrap@17-6::Invoke
+  (18,28-20,71)  (fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld getResult
+    IL_0006:  ldarg.0
+    IL_0007:  ldfld getResult0
+    IL_000c:  ldarg.0
+    IL_000d:  ldfld right
+    IL_0012:  ldarg.1
+    IL_0013:  newobj .ctor
+    IL_0018:  ldftn Invoke
+    IL_001e:  newobj .ctor
+    IL_0023:  ret
+
+wrap@16-5::Invoke
+  (17,9-20,72)  bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld getResult
+    IL_0006:  ldarg.1
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld left
+    IL_000d:  ldarg.0
+    IL_000e:  ldfld getResult
+    IL_0013:  ldarg.0
+    IL_0014:  ldfld getResult0
+    IL_0019:  ldarg.0
+    IL_001a:  ldfld right
+    IL_001f:  newobj .ctor
+    IL_0024:  call Test::bindDynamic$W
+    IL_0029:  nop
+    IL_002a:  ret
+
+code@20-4::Invoke
+  (20,47-20,68)  d3 <- (leftR, rightR)
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld code@20-4::leftR
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld code@20-4::rightR
+    IL_000d:  newobj .ctor
+    IL_0012:  stobj 0x1b00000b
+    IL_0017:  ret
+
+code@19-3::Invoke
+  (20,36-20,69)  (fun d3 -> d3 <- (leftR, rightR))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld code@19-3::leftR
+    IL_0006:  ldarg.1
+    IL_0007:  newobj code@20-4::.ctor
+    IL_000c:  ldftn code@20-4::Invoke
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+code@18-2::Invoke
+  (19,17-20,70)  bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld code@18-2::right
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld code@18-2::leftR
+    IL_000d:  newobj code@19-3::.ctor
+    IL_0012:  call Test::<bindDynamic>__debug@19-1
+    IL_0017:  nop
+    IL_0018:  ret
+
+code@17-1::Invoke
+  (18,28-20,71)  (fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR))))
+    IL_0000:  ldarg.0
+    IL_0001:  ldfld code@17-1::right
+    IL_0006:  ldarg.1
+    IL_0007:  newobj code@18-2::.ctor
+    IL_000c:  ldftn code@18-2::Invoke
+    IL_0012:  newobj .ctor
+    IL_0017:  ret
+
+code@16::Invoke
+  (17,9-20,72)  bindDynamic (&d, left, fun leftR -> Code<'T1 * 'T2>(fun d2 -> bindDynamic (&d2, right, fun rightR -> Code<'T1 * 'T2>(fun d3 -> d3 <- (leftR, rightR)))))
+    IL_0000:  ldarg.1
+    IL_0001:  ldarg.0
+    IL_0002:  ldfld code@16::left
+    IL_0007:  ldarg.0
+    IL_0008:  ldfld code@16::right
+    IL_000d:  newobj code@17-1::.ctor
+    IL_0012:  call Test::<bindDynamic>__debug@17
+    IL_0017:  nop
+    IL_0018:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
index 1e2b6f38e6e..c6dff60aed2 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
@@ -38,6 +38,40 @@
        extends [runtime]System.Object
 {
   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit clo@20
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
+  {
+    .field static assembly initonly class assembly/clo@20 @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
+      IL_0006:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldnull
+      IL_0001:  ret
+    } 
+
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void assembly/clo@20::.ctor()
+      IL_0005:  stsfld     class assembly/clo@20 assembly/clo@20::@_instance
+      IL_000a:  ret
+    } 
+
+  } 
+
   .method public specialname static object get_o() cil managed
   {
     
@@ -69,35 +103,42 @@
     .maxstack  4
     .locals init (object V_0,
              object V_1,
-             bool V_2)
+             class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_2,
+             bool V_3)
     IL_0000:  newobj     instance void [runtime]System.Object::.ctor()
     IL_0005:  dup
     IL_0006:  stsfld     object '<StartupCode$assembly>'.$assembly::o@19
     IL_000b:  stloc.0
     IL_000c:  call       object assembly::get_o()
     IL_0011:  stloc.1
-    IL_0012:  ldc.i4.0
-    IL_0013:  stloc.2
+    IL_0012:  ldsfld     class assembly/clo@20 assembly/clo@20::@_instance
+    IL_0017:  stloc.2
+    IL_0018:  ldc.i4.0
+    IL_0019:  stloc.3
     .try
     {
-      IL_0014:  ldloc.1
-      IL_0015:  ldloca.s   V_2
-      IL_0017:  call       void [netstandard]System.Threading.Monitor::Enter(object,
+      IL_001a:  ldloc.1
+      IL_001b:  ldloca.s   V_3
+      IL_001d:  call       void [netstandard]System.Threading.Monitor::Enter(object,
                                                                              bool&)
-      IL_001c:  leave.s    IL_0029
+      IL_0022:  ldloc.2
+      IL_0023:  ldnull
+      IL_0024:  callvirt   instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
+      IL_0029:  pop
+      IL_002a:  leave.s    IL_0037
 
     }  
     finally
     {
-      IL_001e:  ldloc.2
-      IL_001f:  brfalse.s  IL_0028
+      IL_002c:  ldloc.3
+      IL_002d:  brfalse.s  IL_0036
 
-      IL_0021:  ldloc.1
-      IL_0022:  call       void [netstandard]System.Threading.Monitor::Exit(object)
-      IL_0027:  endfinally
-      IL_0028:  endfinally
+      IL_002f:  ldloc.1
+      IL_0030:  call       void [netstandard]System.Threading.Monitor::Exit(object)
+      IL_0035:  endfinally
+      IL_0036:  endfinally
     }  
-    IL_0029:  ret
+    IL_0037:  ret
   } 
 
 } 
@@ -106,4 +147,3 @@
 
 
 
-
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.il.net472.bsl
index 804af13e153..1a3d83b9c45 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.il.net472.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOff.il.net472.bsl
@@ -8,7 +8,7 @@
 .assembly extern netstandard
 {
   .publickeytoken = (CC 7B 13 FF CD 2D DD 51 )                         
-  .ver 2:0:0:0
+  .ver 2:1:0:0
 }
 .assembly assembly
 {
@@ -21,16 +21,6 @@
 
   .hash algorithm 0x00008004
   .ver 0:0:0:0
-}
-.mresource public FSharpSignatureCompressedData.assembly
-{
-  
-  
-}
-.mresource public FSharpOptimizationCompressedData.assembly
-{
-  
-  
 }
 .module assembly.exe
 
@@ -48,6 +38,40 @@
        extends [runtime]System.Object
 {
   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit clo@20
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
+  {
+    .field static assembly initonly class assembly/clo@20 @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
+      IL_0006:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldnull
+      IL_0001:  ret
+    } 
+
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void assembly/clo@20::.ctor()
+      IL_0005:  stsfld     class assembly/clo@20 assembly/clo@20::@_instance
+      IL_000a:  ret
+    } 
+
+  } 
+
   .method public specialname static object get_o() cil managed
   {
     
@@ -79,35 +103,42 @@
     .maxstack  4
     .locals init (object V_0,
              object V_1,
-             bool V_2)
+             class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_2,
+             bool V_3)
     IL_0000:  newobj     instance void [runtime]System.Object::.ctor()
     IL_0005:  dup
     IL_0006:  stsfld     object '<StartupCode$assembly>'.$assembly::o@19
     IL_000b:  stloc.0
     IL_000c:  call       object assembly::get_o()
     IL_0011:  stloc.1
-    IL_0012:  ldc.i4.0
-    IL_0013:  stloc.2
+    IL_0012:  ldsfld     class assembly/clo@20 assembly/clo@20::@_instance
+    IL_0017:  stloc.2
+    IL_0018:  ldc.i4.0
+    IL_0019:  stloc.3
     .try
     {
-      IL_0014:  ldloc.1
-      IL_0015:  ldloca.s   V_2
-      IL_0017:  call       void [netstandard]System.Threading.Monitor::Enter(object,
+      IL_001a:  ldloc.1
+      IL_001b:  ldloca.s   V_3
+      IL_001d:  call       void [netstandard]System.Threading.Monitor::Enter(object,
                                                                              bool&)
-      IL_001c:  leave.s    IL_0029
+      IL_0022:  ldloc.2
+      IL_0023:  ldnull
+      IL_0024:  callvirt   instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
+      IL_0029:  pop
+      IL_002a:  leave.s    IL_0037
 
     }  
     finally
     {
-      IL_001e:  ldloc.2
-      IL_001f:  brfalse.s  IL_0028
+      IL_002c:  ldloc.3
+      IL_002d:  brfalse.s  IL_0036
 
-      IL_0021:  ldloc.1
-      IL_0022:  call       void [netstandard]System.Threading.Monitor::Exit(object)
-      IL_0027:  endfinally
-      IL_0028:  endfinally
+      IL_002f:  ldloc.1
+      IL_0030:  call       void [netstandard]System.Threading.Monitor::Exit(object)
+      IL_0035:  endfinally
+      IL_0036:  endfinally
     }  
-    IL_0029:  ret
+    IL_0037:  ret
   } 
 
 } 
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
index f108d21da06..4bda3dfab02 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
@@ -38,6 +38,40 @@
        extends [runtime]System.Object
 {
   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit clo@20
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
+  {
+    .field static assembly initonly class assembly/clo@20 @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
+      IL_0006:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldnull
+      IL_0001:  ret
+    } 
+
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void assembly/clo@20::.ctor()
+      IL_0005:  stsfld     class assembly/clo@20 assembly/clo@20::@_instance
+      IL_000a:  ret
+    } 
+
+  } 
+
   .field static assembly object o@19
   .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
   .method public specialname static object get_o() cil managed
@@ -64,33 +98,40 @@
     
     .maxstack  4
     .locals init (object V_0,
-             bool V_1)
+             class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1,
+             bool V_2)
     IL_0000:  newobj     instance void [runtime]System.Object::.ctor()
     IL_0005:  stsfld     object assembly::o@19
     IL_000a:  call       object assembly::get_o()
     IL_000f:  stloc.0
-    IL_0010:  ldc.i4.0
-    IL_0011:  stloc.1
+    IL_0010:  ldsfld     class assembly/clo@20 assembly/clo@20::@_instance
+    IL_0015:  stloc.1
+    IL_0016:  ldc.i4.0
+    IL_0017:  stloc.2
     .try
     {
-      IL_0012:  ldloc.0
-      IL_0013:  ldloca.s   V_1
-      IL_0015:  call       void [netstandard]System.Threading.Monitor::Enter(object,
+      IL_0018:  ldloc.0
+      IL_0019:  ldloca.s   V_2
+      IL_001b:  call       void [netstandard]System.Threading.Monitor::Enter(object,
                                                                              bool&)
-      IL_001a:  leave.s    IL_0027
+      IL_0020:  ldloc.1
+      IL_0021:  ldnull
+      IL_0022:  callvirt   instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
+      IL_0027:  pop
+      IL_0028:  leave.s    IL_0035
 
     }  
     finally
     {
-      IL_001c:  ldloc.1
-      IL_001d:  brfalse.s  IL_0026
+      IL_002a:  ldloc.2
+      IL_002b:  brfalse.s  IL_0034
 
-      IL_001f:  ldloc.0
-      IL_0020:  call       void [netstandard]System.Threading.Monitor::Exit(object)
-      IL_0025:  endfinally
-      IL_0026:  endfinally
+      IL_002d:  ldloc.0
+      IL_002e:  call       void [netstandard]System.Threading.Monitor::Exit(object)
+      IL_0033:  endfinally
+      IL_0034:  endfinally
     }  
-    IL_0027:  ret
+    IL_0035:  ret
   } 
 
   .property object o()
@@ -122,4 +163,3 @@
 
 
 
-
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.il.net472.bsl
index 2e8764d5c4e..683e5e3ae72 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.il.net472.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/Lock01.fs.RealInternalSignatureOn.il.net472.bsl
@@ -8,7 +8,7 @@
 .assembly extern netstandard
 {
   .publickeytoken = (CC 7B 13 FF CD 2D DD 51 )                         
-  .ver 2:0:0:0
+  .ver 2:1:0:0
 }
 .assembly assembly
 {
@@ -21,16 +21,6 @@
 
   .hash algorithm 0x00008004
   .ver 0:0:0:0
-}
-.mresource public FSharpSignatureCompressedData.assembly
-{
-  
-  
-}
-.mresource public FSharpOptimizationCompressedData.assembly
-{
-  
-  
 }
 .module assembly.exe
 
@@ -48,6 +38,40 @@
        extends [runtime]System.Object
 {
   .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit clo@20
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
+  {
+    .field static assembly initonly class assembly/clo@20 @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
+      IL_0006:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldnull
+      IL_0001:  ret
+    } 
+
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void assembly/clo@20::.ctor()
+      IL_0005:  stsfld     class assembly/clo@20 assembly/clo@20::@_instance
+      IL_000a:  ret
+    } 
+
+  } 
+
   .field static assembly object o@19
   .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
   .method public specialname static object get_o() cil managed
@@ -74,33 +98,40 @@
     
     .maxstack  4
     .locals init (object V_0,
-             bool V_1)
+             class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_1,
+             bool V_2)
     IL_0000:  newobj     instance void [runtime]System.Object::.ctor()
     IL_0005:  stsfld     object assembly::o@19
     IL_000a:  call       object assembly::get_o()
     IL_000f:  stloc.0
-    IL_0010:  ldc.i4.0
-    IL_0011:  stloc.1
+    IL_0010:  ldsfld     class assembly/clo@20 assembly/clo@20::@_instance
+    IL_0015:  stloc.1
+    IL_0016:  ldc.i4.0
+    IL_0017:  stloc.2
     .try
     {
-      IL_0012:  ldloc.0
-      IL_0013:  ldloca.s   V_1
-      IL_0015:  call       void [netstandard]System.Threading.Monitor::Enter(object,
+      IL_0018:  ldloc.0
+      IL_0019:  ldloca.s   V_2
+      IL_001b:  call       void [netstandard]System.Threading.Monitor::Enter(object,
                                                                              bool&)
-      IL_001a:  leave.s    IL_0027
+      IL_0020:  ldloc.1
+      IL_0021:  ldnull
+      IL_0022:  callvirt   instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0)
+      IL_0027:  pop
+      IL_0028:  leave.s    IL_0035
 
     }  
     finally
     {
-      IL_001c:  ldloc.1
-      IL_001d:  brfalse.s  IL_0026
+      IL_002a:  ldloc.2
+      IL_002b:  brfalse.s  IL_0034
 
-      IL_001f:  ldloc.0
-      IL_0020:  call       void [netstandard]System.Threading.Monitor::Exit(object)
-      IL_0025:  endfinally
-      IL_0026:  endfinally
+      IL_002d:  ldloc.0
+      IL_002e:  call       void [netstandard]System.Threading.Monitor::Exit(object)
+      IL_0033:  endfinally
+      IL_0034:  endfinally
     }  
-    IL_0027:  ret
+    IL_0035:  ret
   } 
 
   .property object o()
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
index 0168c04c588..5090f0e752e 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOff.OptimizeOff.il.bsl
@@ -67,7 +67,7 @@
     .entrypoint
     
     .maxstack  8
-    IL_0000:  call       void assembly::g()
+    IL_0000:  call       void assembly::f()
     IL_0005:  nop
     IL_0006:  ret
   } 
@@ -78,4 +78,3 @@
 
 
 
-
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
index 170b3c6df09..7d67a6cf637 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Misc/MethodImplNoInline02.fs.RealInternalSignatureOn.OptimizeOff.il.bsl
@@ -68,7 +68,7 @@
   {
     
     .maxstack  8
-    IL_0000:  call       void assembly::g()
+    IL_0000:  call       void assembly::f()
     IL_0005:  nop
     IL_0006:  ret
   } 
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl
index bd0897c4258..3c93a93bb7c 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - ActivePattern 01.bsl	
@@ -34,72 +34,73 @@ f@7::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_0071
+    IL_001c:  br.s IL_0073
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_0064
+    IL_001f:  br.s IL_0066
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_0092
+    IL_0022:  br.s IL_0094
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (7,9-7,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldarg.0
-    IL_0027:  ldfld f@7::l
-    IL_002c:  callvirt GetEnumerator
-    IL_0031:  stfld f@7::enum
-    IL_0036:  ldarg.0
-    IL_0037:  ldc.i4.1
-    IL_0038:  stfld f@7::pc
-    IL_003d:  br.s IL_0064
-    IL_003f:  ldarg.0
-    IL_0040:  ldfld f@7::enum
-    IL_0045:  callvirt get_Current
-    IL_004a:  stloc.0
-    IL_004b:  ldloc.0
-    IL_004c:  call Module::|Id|
-    IL_0051:  stloc.1
-    IL_0052:  ldloc.1
-    IL_0053:  stloc.2
+    IL_0027:  ldarg.0
+    IL_0028:  ldarg.0
+    IL_0029:  ldfld f@7::l
+    IL_002e:  callvirt GetEnumerator
+    IL_0033:  stfld f@7::enum
+    IL_0038:  ldarg.0
+    IL_0039:  ldc.i4.1
+    IL_003a:  stfld f@7::pc
+    IL_003f:  br.s IL_0066
+    IL_0041:  ldarg.0
+    IL_0042:  ldfld f@7::enum
+    IL_0047:  callvirt get_Current
+    IL_004c:  stloc.0
+    IL_004d:  ldloc.0
+    IL_004e:  call Module::|Id|
+    IL_0053:  stloc.1
+    IL_0054:  ldloc.1
+    IL_0055:  stloc.2
 
   (8,13-8,20)  yield i
-    IL_0054:  ldarg.0
-    IL_0055:  ldc.i4.2
-    IL_0056:  stfld f@7::pc
-    IL_005b:  ldarg.0
-    IL_005c:  ldloc.2
-    IL_005d:  stfld f@7::current
-    IL_0062:  ldc.i4.1
-    IL_0063:  ret
+    IL_0056:  ldarg.0
+    IL_0057:  ldc.i4.2
+    IL_0058:  stfld f@7::pc
+    IL_005d:  ldarg.0
+    IL_005e:  ldloc.2
+    IL_005f:  stfld f@7::current
+    IL_0064:  ldc.i4.1
+    IL_0065:  ret
 
   (7,18-7,20)  in
-    IL_0064:  ldarg.0
-    IL_0065:  ldfld f@7::enum
-    IL_006a:  callvirt IEnumerator::MoveNext
-    IL_006f:  brtrue.s IL_003f
-    IL_0071:  ldarg.0
-    IL_0072:  ldc.i4.3
-    IL_0073:  stfld f@7::pc
-    IL_0078:  ldarg.0
-    IL_0079:  ldfld f@7::enum
-    IL_007e:  call IntrinsicFunctions::Dispose
-    IL_0083:  nop
-    IL_0084:  ldarg.0
-    IL_0085:  ldnull
-    IL_0086:  stfld f@7::enum
-    IL_008b:  ldarg.0
-    IL_008c:  ldc.i4.3
-    IL_008d:  stfld f@7::pc
-    IL_0092:  ldarg.0
-    IL_0093:  ldc.i4.0
-    IL_0094:  stfld f@7::current
-    IL_0099:  ldc.i4.0
-    IL_009a:  ret
+    IL_0066:  ldarg.0
+    IL_0067:  ldfld f@7::enum
+    IL_006c:  callvirt IEnumerator::MoveNext
+    IL_0071:  brtrue.s IL_0041
+    IL_0073:  ldarg.0
+    IL_0074:  ldc.i4.3
+    IL_0075:  stfld f@7::pc
+    IL_007a:  ldarg.0
+    IL_007b:  ldfld f@7::enum
+    IL_0080:  call IntrinsicFunctions::Dispose
+    IL_0085:  nop
+    IL_0086:  ldarg.0
+    IL_0087:  ldnull
+    IL_0088:  stfld f@7::enum
+    IL_008d:  ldarg.0
+    IL_008e:  ldc.i4.3
+    IL_008f:  stfld f@7::pc
+    IL_0094:  ldarg.0
+    IL_0095:  ldc.i4.0
+    IL_0096:  stfld f@7::current
+    IL_009b:  ldc.i4.0
+    IL_009c:  ret
 
 f@7::Close
   <hidden>
@@ -112,10 +113,12 @@ f@7::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld f@7::pc
     IL_001d:  switch (4 targets)
@@ -123,60 +126,65 @@ f@7::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld f@7::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld f@7::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld f@7::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld f@7::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld f@7::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldc.i4.0
-    IL_005f:  stfld f@7::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld f@7::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldc.i4.0
+    IL_0061:  stfld f@7::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
+
+  <hidden>
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007b:  ldloc.0
+    IL_007c:  throw
+
+  <hidden>
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 f@7::get_CheckClose
   <hidden>
@@ -187,25 +195,28 @@ f@7::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl
index 095775bd513..3a5e7a5d6e9 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Arrow 01.bsl	
@@ -26,69 +26,70 @@ f@5::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_006a
+    IL_001c:  br.s IL_006c
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_005d
+    IL_001f:  br.s IL_005f
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_008b
+    IL_0022:  br.s IL_008d
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (5,9-5,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldarg.0
-    IL_0027:  ldfld f@5::l
-    IL_002c:  callvirt GetEnumerator
-    IL_0031:  stfld f@5::enum
-    IL_0036:  ldarg.0
-    IL_0037:  ldc.i4.1
-    IL_0038:  stfld f@5::pc
-    IL_003d:  br.s IL_005d
-    IL_003f:  ldarg.0
-    IL_0040:  ldfld f@5::enum
-    IL_0045:  callvirt get_Current
-    IL_004a:  stloc.0
-    IL_004b:  ldarg.0
-    IL_004c:  ldc.i4.2
-    IL_004d:  stfld f@5::pc
-    IL_0052:  ldarg.0
-    IL_0053:  stloc.1
+    IL_0027:  ldarg.0
+    IL_0028:  ldarg.0
+    IL_0029:  ldfld f@5::l
+    IL_002e:  callvirt GetEnumerator
+    IL_0033:  stfld f@5::enum
+    IL_0038:  ldarg.0
+    IL_0039:  ldc.i4.1
+    IL_003a:  stfld f@5::pc
+    IL_003f:  br.s IL_005f
+    IL_0041:  ldarg.0
+    IL_0042:  ldfld f@5::enum
+    IL_0047:  callvirt get_Current
+    IL_004c:  stloc.0
+    IL_004d:  ldarg.0
+    IL_004e:  ldc.i4.2
+    IL_004f:  stfld f@5::pc
+    IL_0054:  ldarg.0
+    IL_0055:  stloc.1
 
   (5,23-5,24)  n
-    IL_0054:  ldloc.1
-    IL_0055:  ldloc.0
-    IL_0056:  stfld f@5::current
-    IL_005b:  ldc.i4.1
-    IL_005c:  ret
+    IL_0056:  ldloc.1
+    IL_0057:  ldloc.0
+    IL_0058:  stfld f@5::current
+    IL_005d:  ldc.i4.1
+    IL_005e:  ret
 
   (5,15-5,17)  in
-    IL_005d:  ldarg.0
-    IL_005e:  ldfld f@5::enum
-    IL_0063:  callvirt IEnumerator::MoveNext
-    IL_0068:  brtrue.s IL_003f
-    IL_006a:  ldarg.0
-    IL_006b:  ldc.i4.3
-    IL_006c:  stfld f@5::pc
-    IL_0071:  ldarg.0
-    IL_0072:  ldfld f@5::enum
-    IL_0077:  call IntrinsicFunctions::Dispose
-    IL_007c:  nop
-    IL_007d:  ldarg.0
-    IL_007e:  ldnull
-    IL_007f:  stfld f@5::enum
-    IL_0084:  ldarg.0
-    IL_0085:  ldc.i4.3
-    IL_0086:  stfld f@5::pc
-    IL_008b:  ldarg.0
-    IL_008c:  ldc.i4.0
-    IL_008d:  stfld f@5::current
-    IL_0092:  ldc.i4.0
-    IL_0093:  ret
+    IL_005f:  ldarg.0
+    IL_0060:  ldfld f@5::enum
+    IL_0065:  callvirt IEnumerator::MoveNext
+    IL_006a:  brtrue.s IL_0041
+    IL_006c:  ldarg.0
+    IL_006d:  ldc.i4.3
+    IL_006e:  stfld f@5::pc
+    IL_0073:  ldarg.0
+    IL_0074:  ldfld f@5::enum
+    IL_0079:  call IntrinsicFunctions::Dispose
+    IL_007e:  nop
+    IL_007f:  ldarg.0
+    IL_0080:  ldnull
+    IL_0081:  stfld f@5::enum
+    IL_0086:  ldarg.0
+    IL_0087:  ldc.i4.3
+    IL_0088:  stfld f@5::pc
+    IL_008d:  ldarg.0
+    IL_008e:  ldc.i4.0
+    IL_008f:  stfld f@5::current
+    IL_0094:  ldc.i4.0
+    IL_0095:  ret
 
 f@5::Close
   <hidden>
@@ -101,10 +102,12 @@ f@5::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld f@5::pc
     IL_001d:  switch (4 targets)
@@ -112,60 +115,65 @@ f@5::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
+
+  <hidden>
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld f@5::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld f@5::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
+
+  <hidden>
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld f@5::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldc.i4.0
+    IL_0061:  stfld f@5::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld f@5::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld f@5::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld f@5::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldc.i4.0
-    IL_005f:  stfld f@5::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_007b:  ldloc.0
+    IL_007c:  throw
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 f@5::get_CheckClose
   <hidden>
@@ -176,25 +184,28 @@ f@5::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl
index 9ff027a7378..4ce3e3a9683 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 01.bsl	
@@ -27,69 +27,70 @@ f@5::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_006a
+    IL_001c:  br.s IL_006c
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_005d
+    IL_001f:  br.s IL_005f
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_008b
+    IL_0022:  br.s IL_008d
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (5,9-5,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldarg.0
-    IL_0027:  ldfld f@5::l
-    IL_002c:  callvirt GetEnumerator
-    IL_0031:  stfld f@5::enum
-    IL_0036:  ldarg.0
-    IL_0037:  ldc.i4.1
-    IL_0038:  stfld f@5::pc
-    IL_003d:  br.s IL_005d
-    IL_003f:  ldarg.0
-    IL_0040:  ldfld f@5::enum
-    IL_0045:  callvirt get_Current
-    IL_004a:  stloc.0
-    IL_004b:  ldarg.0
-    IL_004c:  ldc.i4.2
-    IL_004d:  stfld f@5::pc
-    IL_0052:  ldarg.0
-    IL_0053:  stloc.1
+    IL_0027:  ldarg.0
+    IL_0028:  ldarg.0
+    IL_0029:  ldfld f@5::l
+    IL_002e:  callvirt GetEnumerator
+    IL_0033:  stfld f@5::enum
+    IL_0038:  ldarg.0
+    IL_0039:  ldc.i4.1
+    IL_003a:  stfld f@5::pc
+    IL_003f:  br.s IL_005f
+    IL_0041:  ldarg.0
+    IL_0042:  ldfld f@5::enum
+    IL_0047:  callvirt get_Current
+    IL_004c:  stloc.0
+    IL_004d:  ldarg.0
+    IL_004e:  ldc.i4.2
+    IL_004f:  stfld f@5::pc
+    IL_0054:  ldarg.0
+    IL_0055:  stloc.1
 
   (6,13-6,20)  yield n
-    IL_0054:  ldloc.1
-    IL_0055:  ldloc.0
-    IL_0056:  stfld f@5::current
-    IL_005b:  ldc.i4.1
-    IL_005c:  ret
+    IL_0056:  ldloc.1
+    IL_0057:  ldloc.0
+    IL_0058:  stfld f@5::current
+    IL_005d:  ldc.i4.1
+    IL_005e:  ret
 
   (5,15-5,17)  in
-    IL_005d:  ldarg.0
-    IL_005e:  ldfld f@5::enum
-    IL_0063:  callvirt IEnumerator::MoveNext
-    IL_0068:  brtrue.s IL_003f
-    IL_006a:  ldarg.0
-    IL_006b:  ldc.i4.3
-    IL_006c:  stfld f@5::pc
-    IL_0071:  ldarg.0
-    IL_0072:  ldfld f@5::enum
-    IL_0077:  call IntrinsicFunctions::Dispose
-    IL_007c:  nop
-    IL_007d:  ldarg.0
-    IL_007e:  ldnull
-    IL_007f:  stfld f@5::enum
-    IL_0084:  ldarg.0
-    IL_0085:  ldc.i4.3
-    IL_0086:  stfld f@5::pc
-    IL_008b:  ldarg.0
-    IL_008c:  ldnull
-    IL_008d:  stfld f@5::current
-    IL_0092:  ldc.i4.0
-    IL_0093:  ret
+    IL_005f:  ldarg.0
+    IL_0060:  ldfld f@5::enum
+    IL_0065:  callvirt IEnumerator::MoveNext
+    IL_006a:  brtrue.s IL_0041
+    IL_006c:  ldarg.0
+    IL_006d:  ldc.i4.3
+    IL_006e:  stfld f@5::pc
+    IL_0073:  ldarg.0
+    IL_0074:  ldfld f@5::enum
+    IL_0079:  call IntrinsicFunctions::Dispose
+    IL_007e:  nop
+    IL_007f:  ldarg.0
+    IL_0080:  ldnull
+    IL_0081:  stfld f@5::enum
+    IL_0086:  ldarg.0
+    IL_0087:  ldc.i4.3
+    IL_0088:  stfld f@5::pc
+    IL_008d:  ldarg.0
+    IL_008e:  ldnull
+    IL_008f:  stfld f@5::current
+    IL_0094:  ldc.i4.0
+    IL_0095:  ret
 
 f@5::Close
   <hidden>
@@ -102,10 +103,12 @@ f@5::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld f@5::pc
     IL_001d:  switch (4 targets)
@@ -113,60 +116,65 @@ f@5::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
+
+  <hidden>
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld f@5::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld f@5::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
+
+  <hidden>
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld f@5::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldnull
+    IL_0061:  stfld f@5::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld f@5::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld f@5::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld f@5::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldnull
-    IL_005f:  stfld f@5::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_007b:  ldloc.0
+    IL_007c:  throw
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 f@5::get_CheckClose
   <hidden>
@@ -177,25 +185,28 @@ f@5::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl
index 1ccd9ab00d2..6cb87be324d 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Tuple 02.bsl	
@@ -27,73 +27,74 @@ f@5::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_0076
+    IL_001c:  br.s IL_0078
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_0069
+    IL_001f:  br.s IL_006b
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_0097
+    IL_0022:  br.s IL_0099
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (5,9-5,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldarg.0
-    IL_0027:  ldfld f@5::l
-    IL_002c:  callvirt GetEnumerator
-    IL_0031:  stfld f@5::enum
-    IL_0036:  ldarg.0
-    IL_0037:  ldc.i4.1
-    IL_0038:  stfld f@5::pc
-    IL_003d:  br.s IL_0069
-    IL_003f:  ldarg.0
-    IL_0040:  ldfld f@5::enum
-    IL_0045:  callvirt get_Current
-    IL_004a:  stloc.0
-    IL_004b:  ldloc.0
-    IL_004c:  call get_Item2
-    IL_0051:  stloc.1
-    IL_0052:  ldloc.0
-    IL_0053:  call get_Item1
-    IL_0058:  stloc.2
+    IL_0027:  ldarg.0
+    IL_0028:  ldarg.0
+    IL_0029:  ldfld f@5::l
+    IL_002e:  callvirt GetEnumerator
+    IL_0033:  stfld f@5::enum
+    IL_0038:  ldarg.0
+    IL_0039:  ldc.i4.1
+    IL_003a:  stfld f@5::pc
+    IL_003f:  br.s IL_006b
+    IL_0041:  ldarg.0
+    IL_0042:  ldfld f@5::enum
+    IL_0047:  callvirt get_Current
+    IL_004c:  stloc.0
+    IL_004d:  ldloc.0
+    IL_004e:  call get_Item2
+    IL_0053:  stloc.1
+    IL_0054:  ldloc.0
+    IL_0055:  call get_Item1
+    IL_005a:  stloc.2
 
   (6,13-6,20)  yield i
-    IL_0059:  ldarg.0
-    IL_005a:  ldc.i4.2
-    IL_005b:  stfld f@5::pc
-    IL_0060:  ldarg.0
-    IL_0061:  ldloc.2
-    IL_0062:  stfld f@5::current
-    IL_0067:  ldc.i4.1
-    IL_0068:  ret
+    IL_005b:  ldarg.0
+    IL_005c:  ldc.i4.2
+    IL_005d:  stfld f@5::pc
+    IL_0062:  ldarg.0
+    IL_0063:  ldloc.2
+    IL_0064:  stfld f@5::current
+    IL_0069:  ldc.i4.1
+    IL_006a:  ret
 
   (5,19-5,21)  in
-    IL_0069:  ldarg.0
-    IL_006a:  ldfld f@5::enum
-    IL_006f:  callvirt IEnumerator::MoveNext
-    IL_0074:  brtrue.s IL_003f
-    IL_0076:  ldarg.0
-    IL_0077:  ldc.i4.3
-    IL_0078:  stfld f@5::pc
-    IL_007d:  ldarg.0
-    IL_007e:  ldfld f@5::enum
-    IL_0083:  call IntrinsicFunctions::Dispose
-    IL_0088:  nop
-    IL_0089:  ldarg.0
-    IL_008a:  ldnull
-    IL_008b:  stfld f@5::enum
-    IL_0090:  ldarg.0
-    IL_0091:  ldc.i4.3
-    IL_0092:  stfld f@5::pc
-    IL_0097:  ldarg.0
-    IL_0098:  ldc.i4.0
-    IL_0099:  stfld f@5::current
-    IL_009e:  ldc.i4.0
-    IL_009f:  ret
+    IL_006b:  ldarg.0
+    IL_006c:  ldfld f@5::enum
+    IL_0071:  callvirt IEnumerator::MoveNext
+    IL_0076:  brtrue.s IL_0041
+    IL_0078:  ldarg.0
+    IL_0079:  ldc.i4.3
+    IL_007a:  stfld f@5::pc
+    IL_007f:  ldarg.0
+    IL_0080:  ldfld f@5::enum
+    IL_0085:  call IntrinsicFunctions::Dispose
+    IL_008a:  nop
+    IL_008b:  ldarg.0
+    IL_008c:  ldnull
+    IL_008d:  stfld f@5::enum
+    IL_0092:  ldarg.0
+    IL_0093:  ldc.i4.3
+    IL_0094:  stfld f@5::pc
+    IL_0099:  ldarg.0
+    IL_009a:  ldc.i4.0
+    IL_009b:  stfld f@5::current
+    IL_00a0:  ldc.i4.0
+    IL_00a1:  ret
 
 f@5::Close
   <hidden>
@@ -106,10 +107,12 @@ f@5::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld f@5::pc
     IL_001d:  switch (4 targets)
@@ -117,60 +120,65 @@ f@5::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
+
+  <hidden>
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld f@5::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld f@5::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld f@5::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld f@5::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld f@5::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldc.i4.0
+    IL_0061:  stfld f@5::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld f@5::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldc.i4.0
-    IL_005f:  stfld f@5::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007b:  ldloc.0
+    IL_007c:  throw
+
+  <hidden>
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 f@5::get_CheckClose
   <hidden>
@@ -181,25 +189,28 @@ f@5::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl
index d05797f5edb..b7ef93a82eb 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 01.bsl	
@@ -35,71 +35,72 @@ a@5::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_006d
+    IL_001c:  br.s IL_006f
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_0060
+    IL_001f:  br.s IL_0062
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_008e
+    IL_0022:  br.s IL_0090
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (5,9-5,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldc.i4.1
-    IL_0027:  ldc.i4.1
-    IL_0028:  ldc.i4.s 10
-    IL_002a:  call OperatorIntrinsics::RangeInt32
-    IL_002f:  callvirt GetEnumerator
-    IL_0034:  stfld a@5::enum
-    IL_0039:  ldarg.0
-    IL_003a:  ldc.i4.1
-    IL_003b:  stfld a@5::pc
-    IL_0040:  br.s IL_0060
-    IL_0042:  ldarg.0
-    IL_0043:  ldfld a@5::enum
-    IL_0048:  callvirt get_Current
-    IL_004d:  stloc.0
-    IL_004e:  ldarg.0
-    IL_004f:  ldc.i4.2
-    IL_0050:  stfld a@5::pc
-    IL_0055:  ldarg.0
-    IL_0056:  stloc.1
+    IL_0027:  ldarg.0
+    IL_0028:  ldc.i4.1
+    IL_0029:  ldc.i4.1
+    IL_002a:  ldc.i4.s 10
+    IL_002c:  call OperatorIntrinsics::RangeInt32
+    IL_0031:  callvirt GetEnumerator
+    IL_0036:  stfld a@5::enum
+    IL_003b:  ldarg.0
+    IL_003c:  ldc.i4.1
+    IL_003d:  stfld a@5::pc
+    IL_0042:  br.s IL_0062
+    IL_0044:  ldarg.0
+    IL_0045:  ldfld a@5::enum
+    IL_004a:  callvirt get_Current
+    IL_004f:  stloc.0
+    IL_0050:  ldarg.0
+    IL_0051:  ldc.i4.2
+    IL_0052:  stfld a@5::pc
+    IL_0057:  ldarg.0
+    IL_0058:  stloc.1
 
   (6,13-6,20)  yield n
-    IL_0057:  ldloc.1
-    IL_0058:  ldloc.0
-    IL_0059:  stfld a@5::current
-    IL_005e:  ldc.i4.1
-    IL_005f:  ret
+    IL_0059:  ldloc.1
+    IL_005a:  ldloc.0
+    IL_005b:  stfld a@5::current
+    IL_0060:  ldc.i4.1
+    IL_0061:  ret
 
   (5,15-5,17)  in
-    IL_0060:  ldarg.0
-    IL_0061:  ldfld a@5::enum
-    IL_0066:  callvirt IEnumerator::MoveNext
-    IL_006b:  brtrue.s IL_0042
-    IL_006d:  ldarg.0
-    IL_006e:  ldc.i4.3
-    IL_006f:  stfld a@5::pc
-    IL_0074:  ldarg.0
-    IL_0075:  ldfld a@5::enum
-    IL_007a:  call IntrinsicFunctions::Dispose
-    IL_007f:  nop
-    IL_0080:  ldarg.0
-    IL_0081:  ldnull
-    IL_0082:  stfld a@5::enum
-    IL_0087:  ldarg.0
-    IL_0088:  ldc.i4.3
-    IL_0089:  stfld a@5::pc
-    IL_008e:  ldarg.0
-    IL_008f:  ldc.i4.0
-    IL_0090:  stfld a@5::current
-    IL_0095:  ldc.i4.0
-    IL_0096:  ret
+    IL_0062:  ldarg.0
+    IL_0063:  ldfld a@5::enum
+    IL_0068:  callvirt IEnumerator::MoveNext
+    IL_006d:  brtrue.s IL_0044
+    IL_006f:  ldarg.0
+    IL_0070:  ldc.i4.3
+    IL_0071:  stfld a@5::pc
+    IL_0076:  ldarg.0
+    IL_0077:  ldfld a@5::enum
+    IL_007c:  call IntrinsicFunctions::Dispose
+    IL_0081:  nop
+    IL_0082:  ldarg.0
+    IL_0083:  ldnull
+    IL_0084:  stfld a@5::enum
+    IL_0089:  ldarg.0
+    IL_008a:  ldc.i4.3
+    IL_008b:  stfld a@5::pc
+    IL_0090:  ldarg.0
+    IL_0091:  ldc.i4.0
+    IL_0092:  stfld a@5::current
+    IL_0097:  ldc.i4.0
+    IL_0098:  ret
 
 a@5::Close
   <hidden>
@@ -112,10 +113,12 @@ a@5::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld a@5::pc
     IL_001d:  switch (4 targets)
@@ -123,60 +126,65 @@ a@5::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
+
+  <hidden>
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld a@5::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld a@5::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld a@5::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld a@5::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld a@5::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldc.i4.0
+    IL_0061:  stfld a@5::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld a@5::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldc.i4.0
-    IL_005f:  stfld a@5::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007b:  ldloc.0
+    IL_007c:  throw
+
+  <hidden>
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 a@5::get_CheckClose
   <hidden>
@@ -187,25 +195,28 @@ a@5::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl
index 47d036281ae..90a532dfae6 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl	
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/ForEach/Seq - Comprehensions - Value 02.bsl	
@@ -27,69 +27,70 @@ f@5::GenerateNext
 
   <hidden>
     IL_001b:  nop
-    IL_001c:  br.s IL_006a
+    IL_001c:  br.s IL_006c
 
   <hidden>
     IL_001e:  nop
-    IL_001f:  br.s IL_005d
+    IL_001f:  br.s IL_005f
 
   <hidden>
     IL_0021:  nop
-    IL_0022:  br.s IL_008b
+    IL_0022:  br.s IL_008d
 
   <hidden>
     IL_0024:  nop
+    IL_0025:  br.s IL_0027
 
   (5,9-5,12)  for
-    IL_0025:  ldarg.0
-    IL_0026:  ldarg.0
-    IL_0027:  ldfld f@5::l
-    IL_002c:  callvirt GetEnumerator
-    IL_0031:  stfld f@5::enum
-    IL_0036:  ldarg.0
-    IL_0037:  ldc.i4.1
-    IL_0038:  stfld f@5::pc
-    IL_003d:  br.s IL_005d
-    IL_003f:  ldarg.0
-    IL_0040:  ldfld f@5::enum
-    IL_0045:  callvirt get_Current
-    IL_004a:  stloc.0
-    IL_004b:  ldarg.0
-    IL_004c:  ldc.i4.2
-    IL_004d:  stfld f@5::pc
-    IL_0052:  ldarg.0
-    IL_0053:  stloc.1
+    IL_0027:  ldarg.0
+    IL_0028:  ldarg.0
+    IL_0029:  ldfld f@5::l
+    IL_002e:  callvirt GetEnumerator
+    IL_0033:  stfld f@5::enum
+    IL_0038:  ldarg.0
+    IL_0039:  ldc.i4.1
+    IL_003a:  stfld f@5::pc
+    IL_003f:  br.s IL_005f
+    IL_0041:  ldarg.0
+    IL_0042:  ldfld f@5::enum
+    IL_0047:  callvirt get_Current
+    IL_004c:  stloc.0
+    IL_004d:  ldarg.0
+    IL_004e:  ldc.i4.2
+    IL_004f:  stfld f@5::pc
+    IL_0054:  ldarg.0
+    IL_0055:  stloc.1
 
   (6,13-6,20)  yield n
-    IL_0054:  ldloc.1
-    IL_0055:  ldloc.0
-    IL_0056:  stfld f@5::current
-    IL_005b:  ldc.i4.1
-    IL_005c:  ret
+    IL_0056:  ldloc.1
+    IL_0057:  ldloc.0
+    IL_0058:  stfld f@5::current
+    IL_005d:  ldc.i4.1
+    IL_005e:  ret
 
   (5,15-5,17)  in
-    IL_005d:  ldarg.0
-    IL_005e:  ldfld f@5::enum
-    IL_0063:  callvirt IEnumerator::MoveNext
-    IL_0068:  brtrue.s IL_003f
-    IL_006a:  ldarg.0
-    IL_006b:  ldc.i4.3
-    IL_006c:  stfld f@5::pc
-    IL_0071:  ldarg.0
-    IL_0072:  ldfld f@5::enum
-    IL_0077:  call IntrinsicFunctions::Dispose
-    IL_007c:  nop
-    IL_007d:  ldarg.0
-    IL_007e:  ldnull
-    IL_007f:  stfld f@5::enum
-    IL_0084:  ldarg.0
-    IL_0085:  ldc.i4.3
-    IL_0086:  stfld f@5::pc
-    IL_008b:  ldarg.0
-    IL_008c:  ldc.i4.0
-    IL_008d:  stfld f@5::current
-    IL_0092:  ldc.i4.0
-    IL_0093:  ret
+    IL_005f:  ldarg.0
+    IL_0060:  ldfld f@5::enum
+    IL_0065:  callvirt IEnumerator::MoveNext
+    IL_006a:  brtrue.s IL_0041
+    IL_006c:  ldarg.0
+    IL_006d:  ldc.i4.3
+    IL_006e:  stfld f@5::pc
+    IL_0073:  ldarg.0
+    IL_0074:  ldfld f@5::enum
+    IL_0079:  call IntrinsicFunctions::Dispose
+    IL_007e:  nop
+    IL_007f:  ldarg.0
+    IL_0080:  ldnull
+    IL_0081:  stfld f@5::enum
+    IL_0086:  ldarg.0
+    IL_0087:  ldc.i4.3
+    IL_0088:  stfld f@5::pc
+    IL_008d:  ldarg.0
+    IL_008e:  ldc.i4.0
+    IL_008f:  stfld f@5::current
+    IL_0094:  ldc.i4.0
+    IL_0095:  ret
 
 f@5::Close
   <hidden>
@@ -102,10 +103,12 @@ f@5::Close
 
   <hidden>
     IL_0013:  nop
-    IL_0014:  br.s IL_0076
+    IL_0014:  br.s IL_0078
 
   <hidden>
     IL_0016:  nop
+
+  <hidden>
     IL_0017:  ldarg.0
     IL_0018:  ldfld f@5::pc
     IL_001d:  switch (4 targets)
@@ -113,60 +116,65 @@ f@5::Close
 
   <hidden>
     IL_0034:  nop
-    IL_0035:  br.s IL_0056
+    IL_0035:  br.s IL_0058
 
   <hidden>
     IL_0037:  nop
-    IL_0038:  br.s IL_0042
+    IL_0038:  br.s IL_0044
 
   <hidden>
     IL_003a:  nop
-    IL_003b:  br.s IL_0041
+    IL_003b:  br.s IL_0043
 
   <hidden>
     IL_003d:  nop
-    IL_003e:  br.s IL_0056
+    IL_003e:  br.s IL_0058
 
   <hidden>
     IL_0040:  nop
+    IL_0041:  br.s IL_0043
+
+  <hidden>
+    IL_0043:  nop
+    IL_0044:  ldarg.0
+    IL_0045:  ldc.i4.3
+    IL_0046:  stfld f@5::pc
+    IL_004b:  ldarg.0
+    IL_004c:  ldfld f@5::enum
+    IL_0051:  call IntrinsicFunctions::Dispose
+    IL_0056:  nop
+
+  <hidden>
+    IL_0057:  nop
+    IL_0058:  ldarg.0
+    IL_0059:  ldc.i4.3
+    IL_005a:  stfld f@5::pc
+    IL_005f:  ldarg.0
+    IL_0060:  ldc.i4.0
+    IL_0061:  stfld f@5::current
+    IL_0066:  leave.s IL_0072
+    IL_0068:  castclass Exception
+    IL_006d:  stloc.1
+    IL_006e:  ldloc.1
+    IL_006f:  stloc.0
+    IL_0070:  leave.s IL_0072
 
   <hidden>
-    IL_0041:  nop
-    IL_0042:  ldarg.0
-    IL_0043:  ldc.i4.3
-    IL_0044:  stfld f@5::pc
-    IL_0049:  ldarg.0
-    IL_004a:  ldfld f@5::enum
-    IL_004f:  call IntrinsicFunctions::Dispose
-    IL_0054:  nop
+    IL_0072:  nop
+    IL_0073:  br IL_0000
 
   <hidden>
-    IL_0055:  nop
-    IL_0056:  ldarg.0
-    IL_0057:  ldc.i4.3
-    IL_0058:  stfld f@5::pc
-    IL_005d:  ldarg.0
-    IL_005e:  ldc.i4.0
-    IL_005f:  stfld f@5::current
-    IL_0064:  leave.s IL_0070
-    IL_0066:  castclass Exception
-    IL_006b:  stloc.1
-    IL_006c:  ldloc.1
-    IL_006d:  stloc.0
-    IL_006e:  leave.s IL_0070
+    IL_0078:  ldloc.0
+    IL_0079:  brfalse.s IL_007d
 
   <hidden>
-    IL_0070:  nop
-    IL_0071:  br IL_0000
-    IL_0076:  ldloc.0
-    IL_0077:  brfalse.s IL_007b
+    IL_007b:  ldloc.0
+    IL_007c:  throw
 
   <hidden>
-    IL_0079:  ldloc.0
-    IL_007a:  throw
+    IL_007d:  ret
 
   <hidden>
-    IL_007b:  ret
 
 f@5::get_CheckClose
   <hidden>
@@ -177,25 +185,28 @@ f@5::get_CheckClose
 
   <hidden>
     IL_001d:  nop
-    IL_001e:  br.s IL_002e
+    IL_001e:  br.s IL_0030
 
   <hidden>
     IL_0020:  nop
-    IL_0021:  br.s IL_002c
+    IL_0021:  br.s IL_002e
 
   <hidden>
     IL_0023:  nop
-    IL_0024:  br.s IL_002a
+    IL_0024:  br.s IL_002c
 
   <hidden>
     IL_0026:  nop
-    IL_0027:  br.s IL_002e
+    IL_0027:  br.s IL_0030
 
   <hidden>
     IL_0029:  nop
-    IL_002a:  ldc.i4.1
-    IL_002b:  ret
+    IL_002a:  br.s IL_002c
+
+  <hidden>
     IL_002c:  ldc.i4.1
     IL_002d:  ret
-    IL_002e:  ldc.i4.0
+    IL_002e:  ldc.i4.1
     IL_002f:  ret
+    IL_0030:  ldc.i4.0
+    IL_0031:  ret
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsBaseline.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsBaseline.fs
new file mode 100644
index 00000000000..077ba99c78f
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsBaseline.fs
@@ -0,0 +1,39 @@
+namespace EmittedIL
+
+open System.Diagnostics
+open System.IO
+open System.Runtime.CompilerServices
+open System.Runtime.InteropServices
+open FSharp.Test.Compiler
+
+/// Snapshots sequence points and IL into `<baselineDirectory>/<test module>/<test name>.bsl`.
+type SequencePointsBaseline(baselineDirectory: string) =
+    member private _.path(moduleName, name) =
+        Path.Combine(baselineDirectory, moduleName, name + ".bsl")
+
+    member this.verify(source: string, [<CallerMemberName; Optional; DefaultParameterValue("")>] name: string) =
+        let moduleName = StackTrace().GetFrame(1).GetMethod().DeclaringType.Name
+        let source = source.Trim()
+        FSharp source
+        |> asLibrary
+        |> withPortablePdb
+        |> withNoOptimize
+        |> compile
+        |> shouldSucceed
+        |> verifySequencePointsBaseline source (this.path(moduleName, name))
+        |> ignore
+
+    /// `frame` is the test method. Source is recovered from the result so its line numbers
+    /// match the emitted sequence points.
+    member this.verifyResult(frame: StackFrame, result: CompilationResult) =
+        let m = frame.GetMethod()
+        let source =
+            match result with
+            | CompilationResult.Success r
+            | CompilationResult.Failure r ->
+                match r.Compilation with
+                | FS fs -> fs.Source.GetSourceText |> Option.defaultWith (fun () -> fs.Source.LoadSourceText())
+                | _ -> failwith "Expected an F# compilation"
+        result
+        |> shouldSucceed
+        |> verifySequencePointsBaseline source (this.path(m.DeclaringType.Name, m.Name))
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs
index f1319f5e5ff..2353713b8f7 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/SequencePoints/SequencePointsTests.fs
@@ -1,30 +1,14 @@
 module EmittedIL.SequencePointsTests
 
-open System.Diagnostics
-open System.IO
-open System.Runtime.CompilerServices
-open System.Runtime.InteropServices
 open Xunit
 open FSharp.Test.Compiler
 
-[<AbstractClass; Sealed>]
-type private Baseline =
-    static member verify(source: string, [<CallerMemberName; Optional; DefaultParameterValue("")>] name: string) =
-        let source = source.Trim()
-        let moduleName = StackTrace().GetFrame(1).GetMethod().DeclaringType.Name
-        FSharp source
-        |> asLibrary
-        |> withPortablePdb
-        |> withNoOptimize
-        |> compile
-        |> shouldSucceed
-        |> verifySequencePointsBaseline source (Path.Combine(__SOURCE_DIRECTORY__, moduleName, name + ".bsl"))
-        |> ignore
+let private baseline = SequencePointsBaseline(__SOURCE_DIRECTORY__)
 
 module Function =
     [<Fact>]
     let ``Body - Unit 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -33,7 +17,7 @@ let f () =
 
     [<Fact>]
     let ``Body - LetThenValue 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -43,7 +27,7 @@ let f () =
 
     [<Fact>]
     let ``Body - SequentialUnits 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -53,7 +37,7 @@ let f () =
 
     [<Fact>]
     let ``Body - ErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -62,7 +46,7 @@ let f () =
 
     [<Fact>]
     let ``Body - Erased call 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -72,7 +56,7 @@ let f () =
 
     [<Fact>]
     let ``Body - Erased call 03`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -83,7 +67,7 @@ let f () =
 
     [<Fact>]
     let ``Body - Erased call 04`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -94,7 +78,7 @@ let f () =
 
     [<Fact>]
     let ``Body - Erased call 05`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -105,7 +89,7 @@ let f () =
 
     [<Fact>]
     let ``Body - Erased call 06`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -116,7 +100,7 @@ let f () =
 
     [<Fact>]
     let ``Body - ErasedThenKeptCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -126,7 +110,7 @@ let f () =
 
     [<Fact>]
     let ``Body - KeptThenErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f () =
@@ -137,7 +121,7 @@ let f () =
 module ForEach =
     [<Fact>]
     let ``List - Simple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -147,7 +131,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - SingleStatement 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -157,7 +141,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - MultipleStatements 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -168,7 +152,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - ErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -178,7 +162,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - ErasedThenKeptCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -189,7 +173,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - KeptThenErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -200,7 +184,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - ParenUnit 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -210,7 +194,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - SequentialUnits 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -221,7 +205,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Body - LetUnit 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -232,7 +216,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Pattern - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -242,7 +226,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``List - Pattern - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -254,7 +238,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Comprehensions - Value 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let a =
@@ -266,7 +250,7 @@ let a =
 
     [<Fact>]
     let ``List - Comprehensions - Value 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -278,7 +262,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Comprehensions - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -290,7 +274,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``List - Comprehensions - Tuple 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -302,7 +286,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``List - Comprehensions - Arrow 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -313,7 +297,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``List - Comprehensions - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -327,7 +311,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Array - Simple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int[]) =
@@ -337,7 +321,7 @@ let f (l: int[]) =
 
     [<Fact>]
     let ``Array - Body - SingleStatement 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int[]) =
@@ -347,7 +331,7 @@ let f (l: int[]) =
 
     [<Fact>]
     let ``Array - Body - MultipleStatements 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int[]) =
@@ -358,7 +342,7 @@ let f (l: int[]) =
 
     [<Fact>]
     let ``Array - Pattern - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int)[]) =
@@ -368,7 +352,7 @@ let f (l: (int * int)[]) =
 
     [<Fact>]
     let ``Array - Pattern - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -380,7 +364,7 @@ let f (l: int[]) =
 
     [<Fact>]
     let ``Array - Comprehensions - Value 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let a =
@@ -392,7 +376,7 @@ let a =
 
     [<Fact>]
     let ``Array - Comprehensions - Value 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -404,7 +388,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Array - Comprehensions - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -416,7 +400,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``Array - Comprehensions - Tuple 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -428,7 +412,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``Array - Comprehensions - Arrow 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -439,7 +423,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Array - Comprehensions - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -453,7 +437,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Seq - Simple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int seq) =
@@ -463,7 +447,7 @@ let f (l: int seq) =
 
     [<Fact>]
     let ``Seq - Body - SingleStatement 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int seq) =
@@ -473,7 +457,7 @@ let f (l: int seq) =
 
     [<Fact>]
     let ``Seq - Body - MultipleStatements 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int seq) =
@@ -484,7 +468,7 @@ let f (l: int seq) =
 
     [<Fact>]
     let ``Seq - Pattern - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) seq) =
@@ -494,7 +478,7 @@ let f (l: (int * int) seq) =
 
     [<Fact>]
     let ``Seq - Pattern - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -506,7 +490,7 @@ let f (l: int seq) =
 
     [<Fact>]
     let ``Seq - Comprehensions - Value 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let a =
@@ -518,7 +502,7 @@ let a =
 
     [<Fact>]
     let ``Seq - Comprehensions - Value 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -530,7 +514,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Seq - Comprehensions - Tuple 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -542,7 +526,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``Seq - Comprehensions - Tuple 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: (int * int) list) =
@@ -554,7 +538,7 @@ let f (l: (int * int) list) =
 
     [<Fact>]
     let ``Seq - Comprehensions - Arrow 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: int list) =
@@ -565,7 +549,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``Seq - Comprehensions - ActivePattern 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let (|Id|) (x: int) = x
@@ -579,7 +563,7 @@ let f (l: int list) =
 
     [<Fact>]
     let ``String - Body - SingleStatement 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (l: string) =
@@ -590,7 +574,7 @@ let f (l: string) =
 module If =
     [<Fact>]
     let ``If 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -602,7 +586,7 @@ let g () =
 
     [<Fact>]
     let ``If 02 - Bind`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -615,7 +599,7 @@ let g () =
 
     [<Fact>]
     let ``If 03 - Set`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -627,7 +611,7 @@ let g (arr: int[]) =
 
     [<Fact>]
     let ``If 04`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -639,7 +623,7 @@ let g () =
 
     [<Fact>]
     let ``If 05`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -654,7 +638,7 @@ let g () =
 module Match =
     [<Fact>]
     let ``Match 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -668,7 +652,7 @@ let g () =
 
     [<Fact>]
     let ``Match 02 - Bind`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let f (x: int) =
@@ -685,7 +669,7 @@ let g () =
 module Binding =
     [<Fact>]
     let ``Module - Unit 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i = ()
@@ -693,7 +677,7 @@ let i = ()
 
     [<Fact>]
     let ``Module - SequentialUnits 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i = ()
@@ -702,7 +686,7 @@ let j = ()
 
     [<Fact>]
     let ``Module - ErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i = System.Diagnostics.Debug.Write ""
@@ -710,7 +694,7 @@ let i = System.Diagnostics.Debug.Write ""
 
     [<Fact>]
     let ``Module - Erased call 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -720,7 +704,7 @@ let i =
 
     [<Fact>]
     let ``Module - Erased call 03`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -731,7 +715,7 @@ let i =
 
     [<Fact>]
     let ``Module - Erased call 04`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -742,7 +726,7 @@ let i =
 
     [<Fact>]
     let ``Module - Erased call 05`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -753,7 +737,7 @@ let i =
 
     [<Fact>]
     let ``Module - Erased call 06`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -764,7 +748,7 @@ let i =
 
     [<Fact>]
     let ``Local - Unit 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 do
@@ -774,7 +758,7 @@ do
 
     [<Fact>]
     let ``Local - SequentialUnits 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 do
@@ -785,7 +769,7 @@ do
 
     [<Fact>]
     let ``Local - ErasedCall 01`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 do
@@ -795,7 +779,7 @@ do
 
     [<Fact>]
     let ``Local - Erased call 02`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -805,7 +789,7 @@ let i =
 
     [<Fact>]
     let ``Local - Erased call 03`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -816,7 +800,7 @@ let i =
 
     [<Fact>]
     let ``Local - Erased call 04`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -827,7 +811,7 @@ let i =
 
     [<Fact>]
     let ``Local - Erased call 05`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
@@ -838,7 +822,7 @@ let i =
 
     [<Fact>]
     let ``Local - Erased call 06`` () =
-        Baseline.verify """
+        baseline.verify """
 module Module
 
 let i =
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.net472.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.net472.bsl
index 1db5018d510..b9f30b1ca2e 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.net472.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.net472.bsl
@@ -16,16 +16,6 @@
 
   .hash algorithm 0x00008004
   .ver 0:0:0:0
-}
-.mresource public FSharpSignatureCompressedData.assembly
-{
-  
-  
-}
-.mresource public FSharpOptimizationCompressedData.assembly
-{
-  
-  
 }
 .module assembly.exe
 
@@ -47,8 +37,7 @@
          extends [runtime]System.Object
   {
     .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) 
-    .method public specialname rtspecialname 
-            instance void  .ctor() cil managed
+    .method public specialname rtspecialname instance void  .ctor() cil managed
     {
       
       .maxstack  8
@@ -65,8 +54,7 @@
          extends [runtime]System.Object
   {
     .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) 
-    .method public specialname rtspecialname 
-            instance void  .ctor() cil managed
+    .method public specialname rtspecialname instance void  .ctor() cil managed
     {
       
       .maxstack  8
@@ -77,9 +65,7 @@
       IL_0008:  ret
     } 
 
-    .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> 
-            F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> x1,
-              class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> x2) cil managed
+    .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> x1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> x2) cil managed
     {
       .param [1]
       .custom instance void [FSharp.Core]Microsoft.FSharp.Core.OptionalArgumentAttribute::.ctor() = ( 01 00 00 00 ) 
@@ -188,416 +174,52 @@
 
   } 
 
-  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> 
-          test() cil managed
+  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  ldnull
-    IL_0001:  stloc.0
-    IL_0002:  ldnull
-    IL_0003:  stloc.1
-    IL_0004:  ldc.i4.0
-    IL_0005:  stloc.2
-    IL_0006:  ldloc.0
-    IL_0007:  stloc.s    V_4
-    IL_0009:  ldloc.s    V_4
-    IL_000b:  brfalse.s  IL_000f
-
-    IL_000d:  br.s       IL_0013
-
-    IL_000f:  ldloc.2
-    IL_0010:  nop
-    IL_0011:  br.s       IL_001b
-
-    IL_0013:  ldloc.s    V_4
-    IL_0015:  stloc.s    V_5
-    IL_0017:  ldloc.2
-    IL_0018:  ldc.i4.1
-    IL_0019:  add
-    IL_001a:  nop
-    IL_001b:  stloc.3
-    IL_001c:  ldloc.1
-    IL_001d:  stloc.s    V_7
-    IL_001f:  ldloc.s    V_7
-    IL_0021:  brfalse.s  IL_0025
-
-    IL_0023:  br.s       IL_0029
-
-    IL_0025:  ldloc.3
-    IL_0026:  nop
-    IL_0027:  br.s       IL_0031
-
-    IL_0029:  ldloc.s    V_7
-    IL_002b:  stloc.s    V_8
-    IL_002d:  ldloc.3
-    IL_002e:  ldc.i4.1
-    IL_002f:  add
-    IL_0030:  nop
-    IL_0031:  stloc.s    V_6
-    IL_0033:  ldloc.s    V_6
-    IL_0035:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_003a:  stloc.s    V_9
-    IL_003c:  ldloc.0
-    IL_003d:  stloc.s    V_10
-    IL_003f:  ldloc.s    V_10
-    IL_0041:  brfalse.s  IL_0045
-
-    IL_0043:  br.s       IL_0048
-
-    IL_0045:  nop
-    IL_0046:  br.s       IL_005b
-
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  stloc.s    V_11
-    IL_004c:  ldloc.s    V_9
-    IL_004e:  ldloc.s    V_11
-    IL_0050:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0055:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_005a:  nop
-    IL_005b:  ldloc.1
-    IL_005c:  stloc.s    V_12
-    IL_005e:  ldloc.s    V_12
-    IL_0060:  brfalse.s  IL_0064
-
-    IL_0062:  br.s       IL_0067
-
-    IL_0064:  nop
-    IL_0065:  br.s       IL_007a
-
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  stloc.s    V_13
-    IL_006b:  ldloc.s    V_9
-    IL_006d:  ldloc.s    V_13
-    IL_006f:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0074:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0079:  nop
-    IL_007a:  ldloc.s    V_9
-    IL_007c:  ret
+    IL_0001:  ldnull
+    IL_0002:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                     class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0007:  ret
   } 
 
-  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> 
-          test2() cil managed
+  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test2() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  newobj     instance void assembly/A::.ctor()
     IL_0005:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000a:  stloc.0
-    IL_000b:  ldnull
-    IL_000c:  stloc.1
-    IL_000d:  ldc.i4.0
-    IL_000e:  stloc.2
-    IL_000f:  ldloc.0
-    IL_0010:  stloc.s    V_4
-    IL_0012:  ldloc.s    V_4
-    IL_0014:  brfalse.s  IL_0018
-
-    IL_0016:  br.s       IL_001c
-
-    IL_0018:  ldloc.2
-    IL_0019:  nop
-    IL_001a:  br.s       IL_0024
-
-    IL_001c:  ldloc.s    V_4
-    IL_001e:  stloc.s    V_5
-    IL_0020:  ldloc.2
-    IL_0021:  ldc.i4.1
-    IL_0022:  add
-    IL_0023:  nop
-    IL_0024:  stloc.3
-    IL_0025:  ldloc.1
-    IL_0026:  stloc.s    V_7
-    IL_0028:  ldloc.s    V_7
-    IL_002a:  brfalse.s  IL_002e
-
-    IL_002c:  br.s       IL_0032
-
-    IL_002e:  ldloc.3
-    IL_002f:  nop
-    IL_0030:  br.s       IL_003a
-
-    IL_0032:  ldloc.s    V_7
-    IL_0034:  stloc.s    V_8
-    IL_0036:  ldloc.3
-    IL_0037:  ldc.i4.1
-    IL_0038:  add
-    IL_0039:  nop
-    IL_003a:  stloc.s    V_6
-    IL_003c:  ldloc.s    V_6
-    IL_003e:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_0043:  stloc.s    V_9
-    IL_0045:  ldloc.0
-    IL_0046:  stloc.s    V_10
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  brfalse.s  IL_004e
-
-    IL_004c:  br.s       IL_0051
-
-    IL_004e:  nop
-    IL_004f:  br.s       IL_0064
-
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  stloc.s    V_11
-    IL_0055:  ldloc.s    V_9
-    IL_0057:  ldloc.s    V_11
-    IL_0059:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_005e:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0063:  nop
-    IL_0064:  ldloc.1
-    IL_0065:  stloc.s    V_12
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  brfalse.s  IL_006d
-
-    IL_006b:  br.s       IL_0070
-
-    IL_006d:  nop
-    IL_006e:  br.s       IL_0083
-
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  stloc.s    V_13
-    IL_0074:  ldloc.s    V_9
-    IL_0076:  ldloc.s    V_13
-    IL_0078:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_007d:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0082:  nop
-    IL_0083:  ldloc.s    V_9
-    IL_0085:  ret
+    IL_000a:  ldnull
+    IL_000b:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                     class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0010:  ret
   } 
 
-  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> 
-          test3() cil managed
+  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test3() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  ldnull
-    IL_0001:  stloc.0
-    IL_0002:  newobj     instance void assembly/A::.ctor()
-    IL_0007:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000c:  stloc.1
-    IL_000d:  ldc.i4.0
-    IL_000e:  stloc.2
-    IL_000f:  ldloc.0
-    IL_0010:  stloc.s    V_4
-    IL_0012:  ldloc.s    V_4
-    IL_0014:  brfalse.s  IL_0018
-
-    IL_0016:  br.s       IL_001c
-
-    IL_0018:  ldloc.2
-    IL_0019:  nop
-    IL_001a:  br.s       IL_0024
-
-    IL_001c:  ldloc.s    V_4
-    IL_001e:  stloc.s    V_5
-    IL_0020:  ldloc.2
-    IL_0021:  ldc.i4.1
-    IL_0022:  add
-    IL_0023:  nop
-    IL_0024:  stloc.3
-    IL_0025:  ldloc.1
-    IL_0026:  stloc.s    V_7
-    IL_0028:  ldloc.s    V_7
-    IL_002a:  brfalse.s  IL_002e
-
-    IL_002c:  br.s       IL_0032
-
-    IL_002e:  ldloc.3
-    IL_002f:  nop
-    IL_0030:  br.s       IL_003a
-
-    IL_0032:  ldloc.s    V_7
-    IL_0034:  stloc.s    V_8
-    IL_0036:  ldloc.3
-    IL_0037:  ldc.i4.1
-    IL_0038:  add
-    IL_0039:  nop
-    IL_003a:  stloc.s    V_6
-    IL_003c:  ldloc.s    V_6
-    IL_003e:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_0043:  stloc.s    V_9
-    IL_0045:  ldloc.0
-    IL_0046:  stloc.s    V_10
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  brfalse.s  IL_004e
-
-    IL_004c:  br.s       IL_0051
-
-    IL_004e:  nop
-    IL_004f:  br.s       IL_0064
-
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  stloc.s    V_11
-    IL_0055:  ldloc.s    V_9
-    IL_0057:  ldloc.s    V_11
-    IL_0059:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_005e:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0063:  nop
-    IL_0064:  ldloc.1
-    IL_0065:  stloc.s    V_12
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  brfalse.s  IL_006d
-
-    IL_006b:  br.s       IL_0070
-
-    IL_006d:  nop
-    IL_006e:  br.s       IL_0083
-
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  stloc.s    V_13
-    IL_0074:  ldloc.s    V_9
-    IL_0076:  ldloc.s    V_13
-    IL_0078:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_007d:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0082:  nop
-    IL_0083:  ldloc.s    V_9
-    IL_0085:  ret
+    IL_0001:  newobj     instance void assembly/A::.ctor()
+    IL_0006:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
+    IL_000b:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                     class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0010:  ret
   } 
 
-  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> 
-          test4() cil managed
+  .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test4() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  newobj     instance void assembly/A::.ctor()
     IL_0005:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000a:  stloc.0
-    IL_000b:  newobj     instance void assembly/A::.ctor()
-    IL_0010:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_0015:  stloc.1
-    IL_0016:  ldc.i4.0
-    IL_0017:  stloc.2
-    IL_0018:  ldloc.0
-    IL_0019:  stloc.s    V_4
-    IL_001b:  ldloc.s    V_4
-    IL_001d:  brfalse.s  IL_0021
-
-    IL_001f:  br.s       IL_0025
-
-    IL_0021:  ldloc.2
-    IL_0022:  nop
-    IL_0023:  br.s       IL_002d
-
-    IL_0025:  ldloc.s    V_4
-    IL_0027:  stloc.s    V_5
-    IL_0029:  ldloc.2
-    IL_002a:  ldc.i4.1
-    IL_002b:  add
-    IL_002c:  nop
-    IL_002d:  stloc.3
-    IL_002e:  ldloc.1
-    IL_002f:  stloc.s    V_7
-    IL_0031:  ldloc.s    V_7
-    IL_0033:  brfalse.s  IL_0037
-
-    IL_0035:  br.s       IL_003b
-
-    IL_0037:  ldloc.3
-    IL_0038:  nop
-    IL_0039:  br.s       IL_0043
-
-    IL_003b:  ldloc.s    V_7
-    IL_003d:  stloc.s    V_8
-    IL_003f:  ldloc.3
-    IL_0040:  ldc.i4.1
-    IL_0041:  add
-    IL_0042:  nop
-    IL_0043:  stloc.s    V_6
-    IL_0045:  ldloc.s    V_6
-    IL_0047:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_004c:  stloc.s    V_9
-    IL_004e:  ldloc.0
-    IL_004f:  stloc.s    V_10
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  brfalse.s  IL_0057
-
-    IL_0055:  br.s       IL_005a
-
-    IL_0057:  nop
-    IL_0058:  br.s       IL_006d
-
-    IL_005a:  ldloc.s    V_10
-    IL_005c:  stloc.s    V_11
-    IL_005e:  ldloc.s    V_9
-    IL_0060:  ldloc.s    V_11
-    IL_0062:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0067:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_006c:  nop
-    IL_006d:  ldloc.1
-    IL_006e:  stloc.s    V_12
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  brfalse.s  IL_0076
-
-    IL_0074:  br.s       IL_0079
-
-    IL_0076:  nop
-    IL_0077:  br.s       IL_008c
-
-    IL_0079:  ldloc.s    V_12
-    IL_007b:  stloc.s    V_13
-    IL_007d:  ldloc.s    V_9
-    IL_007f:  ldloc.s    V_13
-    IL_0081:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0086:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_008b:  nop
-    IL_008c:  ldloc.s    V_9
-    IL_008e:  ret
+    IL_000a:  newobj     instance void assembly/A::.ctor()
+    IL_000f:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
+    IL_0014:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                     class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0019:  ret
   } 
 
 } 
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.netcore.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.netcore.bsl
index bfce2457d09..85086b6d488 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.netcore.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/Tuples/OptionalArg01.fs.OptimizeOff.il.netcore.bsl
@@ -177,409 +177,49 @@
   .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  ldnull
-    IL_0001:  stloc.0
-    IL_0002:  ldnull
-    IL_0003:  stloc.1
-    IL_0004:  ldc.i4.0
-    IL_0005:  stloc.2
-    IL_0006:  ldloc.0
-    IL_0007:  stloc.s    V_4
-    IL_0009:  ldloc.s    V_4
-    IL_000b:  brfalse.s  IL_000f
-
-    IL_000d:  br.s       IL_0013
-
-    IL_000f:  ldloc.2
-    IL_0010:  nop
-    IL_0011:  br.s       IL_001b
-
-    IL_0013:  ldloc.s    V_4
-    IL_0015:  stloc.s    V_5
-    IL_0017:  ldloc.2
-    IL_0018:  ldc.i4.1
-    IL_0019:  add
-    IL_001a:  nop
-    IL_001b:  stloc.3
-    IL_001c:  ldloc.1
-    IL_001d:  stloc.s    V_7
-    IL_001f:  ldloc.s    V_7
-    IL_0021:  brfalse.s  IL_0025
-
-    IL_0023:  br.s       IL_0029
-
-    IL_0025:  ldloc.3
-    IL_0026:  nop
-    IL_0027:  br.s       IL_0031
-
-    IL_0029:  ldloc.s    V_7
-    IL_002b:  stloc.s    V_8
-    IL_002d:  ldloc.3
-    IL_002e:  ldc.i4.1
-    IL_002f:  add
-    IL_0030:  nop
-    IL_0031:  stloc.s    V_6
-    IL_0033:  ldloc.s    V_6
-    IL_0035:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_003a:  stloc.s    V_9
-    IL_003c:  ldloc.0
-    IL_003d:  stloc.s    V_10
-    IL_003f:  ldloc.s    V_10
-    IL_0041:  brfalse.s  IL_0045
-
-    IL_0043:  br.s       IL_0048
-
-    IL_0045:  nop
-    IL_0046:  br.s       IL_005b
-
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  stloc.s    V_11
-    IL_004c:  ldloc.s    V_9
-    IL_004e:  ldloc.s    V_11
-    IL_0050:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0055:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_005a:  nop
-    IL_005b:  ldloc.1
-    IL_005c:  stloc.s    V_12
-    IL_005e:  ldloc.s    V_12
-    IL_0060:  brfalse.s  IL_0064
-
-    IL_0062:  br.s       IL_0067
-
-    IL_0064:  nop
-    IL_0065:  br.s       IL_007a
-
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  stloc.s    V_13
-    IL_006b:  ldloc.s    V_9
-    IL_006d:  ldloc.s    V_13
-    IL_006f:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0074:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0079:  nop
-    IL_007a:  ldloc.s    V_9
-    IL_007c:  ret
+    IL_0001:  ldnull
+    IL_0002:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                               class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0007:  ret
   } 
 
   .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test2() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  newobj     instance void assembly/A::.ctor()
     IL_0005:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000a:  stloc.0
-    IL_000b:  ldnull
-    IL_000c:  stloc.1
-    IL_000d:  ldc.i4.0
-    IL_000e:  stloc.2
-    IL_000f:  ldloc.0
-    IL_0010:  stloc.s    V_4
-    IL_0012:  ldloc.s    V_4
-    IL_0014:  brfalse.s  IL_0018
-
-    IL_0016:  br.s       IL_001c
-
-    IL_0018:  ldloc.2
-    IL_0019:  nop
-    IL_001a:  br.s       IL_0024
-
-    IL_001c:  ldloc.s    V_4
-    IL_001e:  stloc.s    V_5
-    IL_0020:  ldloc.2
-    IL_0021:  ldc.i4.1
-    IL_0022:  add
-    IL_0023:  nop
-    IL_0024:  stloc.3
-    IL_0025:  ldloc.1
-    IL_0026:  stloc.s    V_7
-    IL_0028:  ldloc.s    V_7
-    IL_002a:  brfalse.s  IL_002e
-
-    IL_002c:  br.s       IL_0032
-
-    IL_002e:  ldloc.3
-    IL_002f:  nop
-    IL_0030:  br.s       IL_003a
-
-    IL_0032:  ldloc.s    V_7
-    IL_0034:  stloc.s    V_8
-    IL_0036:  ldloc.3
-    IL_0037:  ldc.i4.1
-    IL_0038:  add
-    IL_0039:  nop
-    IL_003a:  stloc.s    V_6
-    IL_003c:  ldloc.s    V_6
-    IL_003e:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_0043:  stloc.s    V_9
-    IL_0045:  ldloc.0
-    IL_0046:  stloc.s    V_10
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  brfalse.s  IL_004e
-
-    IL_004c:  br.s       IL_0051
-
-    IL_004e:  nop
-    IL_004f:  br.s       IL_0064
-
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  stloc.s    V_11
-    IL_0055:  ldloc.s    V_9
-    IL_0057:  ldloc.s    V_11
-    IL_0059:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_005e:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0063:  nop
-    IL_0064:  ldloc.1
-    IL_0065:  stloc.s    V_12
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  brfalse.s  IL_006d
-
-    IL_006b:  br.s       IL_0070
-
-    IL_006d:  nop
-    IL_006e:  br.s       IL_0083
-
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  stloc.s    V_13
-    IL_0074:  ldloc.s    V_9
-    IL_0076:  ldloc.s    V_13
-    IL_0078:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_007d:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0082:  nop
-    IL_0083:  ldloc.s    V_9
-    IL_0085:  ret
+    IL_000a:  ldnull
+    IL_000b:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                               class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0010:  ret
   } 
 
   .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test3() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  ldnull
-    IL_0001:  stloc.0
-    IL_0002:  newobj     instance void assembly/A::.ctor()
-    IL_0007:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000c:  stloc.1
-    IL_000d:  ldc.i4.0
-    IL_000e:  stloc.2
-    IL_000f:  ldloc.0
-    IL_0010:  stloc.s    V_4
-    IL_0012:  ldloc.s    V_4
-    IL_0014:  brfalse.s  IL_0018
-
-    IL_0016:  br.s       IL_001c
-
-    IL_0018:  ldloc.2
-    IL_0019:  nop
-    IL_001a:  br.s       IL_0024
-
-    IL_001c:  ldloc.s    V_4
-    IL_001e:  stloc.s    V_5
-    IL_0020:  ldloc.2
-    IL_0021:  ldc.i4.1
-    IL_0022:  add
-    IL_0023:  nop
-    IL_0024:  stloc.3
-    IL_0025:  ldloc.1
-    IL_0026:  stloc.s    V_7
-    IL_0028:  ldloc.s    V_7
-    IL_002a:  brfalse.s  IL_002e
-
-    IL_002c:  br.s       IL_0032
-
-    IL_002e:  ldloc.3
-    IL_002f:  nop
-    IL_0030:  br.s       IL_003a
-
-    IL_0032:  ldloc.s    V_7
-    IL_0034:  stloc.s    V_8
-    IL_0036:  ldloc.3
-    IL_0037:  ldc.i4.1
-    IL_0038:  add
-    IL_0039:  nop
-    IL_003a:  stloc.s    V_6
-    IL_003c:  ldloc.s    V_6
-    IL_003e:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_0043:  stloc.s    V_9
-    IL_0045:  ldloc.0
-    IL_0046:  stloc.s    V_10
-    IL_0048:  ldloc.s    V_10
-    IL_004a:  brfalse.s  IL_004e
-
-    IL_004c:  br.s       IL_0051
-
-    IL_004e:  nop
-    IL_004f:  br.s       IL_0064
-
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  stloc.s    V_11
-    IL_0055:  ldloc.s    V_9
-    IL_0057:  ldloc.s    V_11
-    IL_0059:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_005e:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0063:  nop
-    IL_0064:  ldloc.1
-    IL_0065:  stloc.s    V_12
-    IL_0067:  ldloc.s    V_12
-    IL_0069:  brfalse.s  IL_006d
-
-    IL_006b:  br.s       IL_0070
-
-    IL_006d:  nop
-    IL_006e:  br.s       IL_0083
-
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  stloc.s    V_13
-    IL_0074:  ldloc.s    V_9
-    IL_0076:  ldloc.s    V_13
-    IL_0078:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_007d:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_0082:  nop
-    IL_0083:  ldloc.s    V_9
-    IL_0085:  ret
+    IL_0001:  newobj     instance void assembly/A::.ctor()
+    IL_0006:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
+    IL_000b:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                               class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0010:  ret
   } 
 
   .method public static class [runtime]System.Collections.Generic.List`1<class assembly/A> test4() cil managed
   {
     
-    .maxstack  4
-    .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_0,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_1,
-             int32 V_2,
-             int32 V_3,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_4,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_5,
-             int32 V_6,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_7,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_8,
-             class [runtime]System.Collections.Generic.List`1<class assembly/A> V_9,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_10,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_11,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_12,
-             class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A> V_13)
+    .maxstack  8
     IL_0000:  newobj     instance void assembly/A::.ctor()
     IL_0005:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_000a:  stloc.0
-    IL_000b:  newobj     instance void assembly/A::.ctor()
-    IL_0010:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
-    IL_0015:  stloc.1
-    IL_0016:  ldc.i4.0
-    IL_0017:  stloc.2
-    IL_0018:  ldloc.0
-    IL_0019:  stloc.s    V_4
-    IL_001b:  ldloc.s    V_4
-    IL_001d:  brfalse.s  IL_0021
-
-    IL_001f:  br.s       IL_0025
-
-    IL_0021:  ldloc.2
-    IL_0022:  nop
-    IL_0023:  br.s       IL_002d
-
-    IL_0025:  ldloc.s    V_4
-    IL_0027:  stloc.s    V_5
-    IL_0029:  ldloc.2
-    IL_002a:  ldc.i4.1
-    IL_002b:  add
-    IL_002c:  nop
-    IL_002d:  stloc.3
-    IL_002e:  ldloc.1
-    IL_002f:  stloc.s    V_7
-    IL_0031:  ldloc.s    V_7
-    IL_0033:  brfalse.s  IL_0037
-
-    IL_0035:  br.s       IL_003b
-
-    IL_0037:  ldloc.3
-    IL_0038:  nop
-    IL_0039:  br.s       IL_0043
-
-    IL_003b:  ldloc.s    V_7
-    IL_003d:  stloc.s    V_8
-    IL_003f:  ldloc.3
-    IL_0040:  ldc.i4.1
-    IL_0041:  add
-    IL_0042:  nop
-    IL_0043:  stloc.s    V_6
-    IL_0045:  ldloc.s    V_6
-    IL_0047:  newobj     instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::.ctor(int32)
-    IL_004c:  stloc.s    V_9
-    IL_004e:  ldloc.0
-    IL_004f:  stloc.s    V_10
-    IL_0051:  ldloc.s    V_10
-    IL_0053:  brfalse.s  IL_0057
-
-    IL_0055:  br.s       IL_005a
-
-    IL_0057:  nop
-    IL_0058:  br.s       IL_006d
-
-    IL_005a:  ldloc.s    V_10
-    IL_005c:  stloc.s    V_11
-    IL_005e:  ldloc.s    V_9
-    IL_0060:  ldloc.s    V_11
-    IL_0062:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0067:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_006c:  nop
-    IL_006d:  ldloc.1
-    IL_006e:  stloc.s    V_12
-    IL_0070:  ldloc.s    V_12
-    IL_0072:  brfalse.s  IL_0076
-
-    IL_0074:  br.s       IL_0079
-
-    IL_0076:  nop
-    IL_0077:  br.s       IL_008c
-
-    IL_0079:  ldloc.s    V_12
-    IL_007b:  stloc.s    V_13
-    IL_007d:  ldloc.s    V_9
-    IL_007f:  ldloc.s    V_13
-    IL_0081:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::get_Value()
-    IL_0086:  callvirt   instance void class [runtime]System.Collections.Generic.List`1<class assembly/A>::Add(!0)
-    IL_008b:  nop
-    IL_008c:  ldloc.s    V_9
-    IL_008e:  ret
+    IL_000a:  newobj     instance void assembly/A::.ctor()
+    IL_000f:  call       class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<!0> class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>::Some(!0)
+    IL_0014:  call       class [runtime]System.Collections.Generic.List`1<class assembly/A> assembly/C::F(class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>,
+                                                                                                                               class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1<class assembly/A>)
+    IL_0019:  ret
   } 
 
 } 
diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
index 3fc031a525f..bad8dee28f9 100644
--- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
+++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj
@@ -228,6 +228,7 @@
     <Compile Include="Conformance\TypeForwarding\NestedTests.fs" />
     <Compile Include="Conformance\TypesAndTypeConstraints\TypesAndTypeConstraints.fs" />
     <Compile Include="Conformance\MultiTargeting.fs" />
+    <Compile Include="EmittedIL\SequencePoints\SequencePointsBaseline.fs" />
     <Compile Include="EmittedIL\SequencePoints\SequencePointsTests.fs" />
     <Compile Include="EmittedIL\CompilerGeneratedAttributeOnAccessors.fs" />
     <Compile Include="EmittedIL\VeryLargeClasses.fs" />
@@ -236,6 +237,7 @@
     <Compile Include="EmittedIL\Enums.fs" />
     <Compile Include="EmittedIL\Literals.fs" />
     <Compile Include="EmittedIL\NoCompilerInlining.fs" />
+    <Compile Include="EmittedIL\DebugInlineAsCall.fs" />
     <Compile Include="EmittedIL\RealInternalSignature\ModuleVisibility.fs" />
     <Compile Include="EmittedIL\RealInternalSignature\ModuleInitialization.fs" />
     <Compile Include="EmittedIL\RealInternalSignature\ClassTypeVisibilityNamespaceRootWithFsi.fs" />
diff --git a/tests/FSharp.Compiler.ComponentTests/Language/StateMachineTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/StateMachineTests.fs
index 36c49541af6..dc929dea744 100644
--- a/tests/FSharp.Compiler.ComponentTests/Language/StateMachineTests.fs
+++ b/tests/FSharp.Compiler.ComponentTests/Language/StateMachineTests.fs
@@ -8,17 +8,9 @@ open FSharp.Test.Compiler
 
 module StateMachineTests =
 
-    let verify3511AndRun code = 
+    let verifyOptimizedAndRun code =
         Fsx code
-        |> withNoOptimize
-        |> compile
-        |> shouldFail
-        |> withWarningCode 3511
-        |> ignore
-
-        Fsx code
-        |> withNoOptimize
-        |> withOptions ["--nowarn:3511"]
+        |> withOptimize
         |> compileExeAndRun
 
     // Inlined helper containing a "if __useResumableCode ..." construct failed to expand correctly,
@@ -76,7 +68,7 @@ task {
 }
 |> fun f -> f.Wait()
 """
-        |> verify3511AndRun
+        |> verifyOptimizedAndRun
         |> shouldSucceed
 
     [<Fact>] // https://github.com/dotnet/fsharp/issues/14806
@@ -100,7 +92,7 @@ let run() =
 run()
 |> fun f -> f.Wait()
 """
-        |> verify3511AndRun
+        |> verifyOptimizedAndRun
         |> shouldSucceed
         
 
@@ -122,7 +114,7 @@ let foo() = task {
 foo()
 |> fun f -> f.Wait()
 """
-        |> verify3511AndRun
+        |> verifyOptimizedAndRun
         |> shouldSucceed
 
     [<FSharp.Test.FactForNETCOREAPP>] // https://github.com/dotnet/fsharp/issues/13386
diff --git a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs
index 2aab772a121..b950e249a99 100644
--- a/tests/FSharp.Compiler.Service.Tests/ExprTests.fs
+++ b/tests/FSharp.Compiler.Service.Tests/ExprTests.fs
@@ -917,8 +917,8 @@ let ``Test Optimized Declarations Project1`` () =
          "let testTypeOf(x) = Operators.TypeOf<'T> () @ (17,24--17,30)";
          "let mutableVar(x) = (if Operators.op_GreaterThan<Microsoft.FSharp.Core.int> (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (20,4--22,16)";
          "let mutableConst(unitVar0) = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (25,16--25,19)";
-         "let testMutableVar = let x: Microsoft.FSharp.Core.int = 1 in (if Operators.op_GreaterThan<Microsoft.FSharp.Core.int> (x,0) then let mutable acc: Microsoft.FSharp.Core.int = x in acc <- x else ()) @ (28,21--28,33)";
-         "let testMutableConst = let mutable acc: Microsoft.FSharp.Core.unit = () in acc <- () @ (29,23--29,38)"]
+         "let testMutableVar = N.mutableVar (1) @ (28,21--28,33)";
+         "let testMutableConst = N.mutableConst (()) @ (29,23--29,38)"]
 
     // printFSharpDecls "" file2.Declarations |> Seq.iter (printfn "%s")
     printfn "// optimized"
diff --git a/tests/FSharp.Compiler.Service.Tests/expected-help-output.bsl b/tests/FSharp.Compiler.Service.Tests/expected-help-output.bsl
index 8b112b0dadc..bbcf59bb8f5 100644
--- a/tests/FSharp.Compiler.Service.Tests/expected-help-output.bsl
+++ b/tests/FSharp.Compiler.Service.Tests/expected-help-output.bsl
@@ -131,6 +131,7 @@
 --strict-indentation[+|-]                Override indentation rules implied
                                          by the language version (off by
                                          default)
+--always-inline[+|-]                     Always inline 'inline' functions
 
 
                 - MISCELLANEOUS -
diff --git a/tests/FSharp.Test.Utilities/Compiler.fs b/tests/FSharp.Test.Utilities/Compiler.fs
index 717590abccd..6e57a6fed07 100644
--- a/tests/FSharp.Test.Utilities/Compiler.fs
+++ b/tests/FSharp.Test.Utilities/Compiler.fs
@@ -1764,6 +1764,7 @@ $ code --diff {outFile} {expectedFile}
                        | :? OpCode as op -> yield (int op.Value &&& 0xffff), op
                        | _ -> () ]
 
+        // The simple name of a type handle (TypeDef/TypeRef); "" for anything else (e.g. TypeSpec).
         let private declaringTypeName (mdReader: MetadataReader) (handle: EntityHandle) =
             if handle.IsNil then ""
             else
@@ -1776,6 +1777,7 @@ $ code --diff {outFile} {expectedFile}
         let rec private tokenName (mdReader: MetadataReader) (token: int) =
             let handle = MetadataTokens.EntityHandle token
             let row = MetadataTokens.GetRowNumber handle
+            // Qualify members with their declaring type so closure/continuation creation is visible.
             let qualify ty nm = if ty = "" then nm else ty + "::" + nm
             match handle.Kind with
             | HandleKind.MethodDefinition ->
diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs
index 7d7ebba13fb..97cc692d7eb 100644
--- a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs
+++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs
@@ -78,59 +78,35 @@ let ApplyDefaults () =
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-			
-.method public static void  ApplyDefaults() cil managed
-{
-  
-  .maxstack  5
-  .locals init (int32 V_0,
-           class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> V_1,
-           class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> V_2,
-           class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> V_3,
-           class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> V_4,
-           bool V_5,
-           bool V_6)
-  IL_0000:  ldc.i4.0
-  IL_0001:  stloc.0
-  IL_0002:  br.s       IL_003c
-
-  IL_0004:  call       class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> DontEliminateForLoops::get_unsolved()
-  IL_0009:  stloc.1
-  IL_000a:  ldloc.1
-  IL_000b:  stloc.2
-  IL_000c:  ldloc.2
-  IL_000d:  stloc.3
-  IL_000e:  ldloc.3
-  IL_000f:  call       instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<!0> class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool>::get_TailOrNull()
-  IL_0014:  stloc.s    V_4
-  IL_0016:  br.s       IL_0034
-
-  IL_0018:  ldloc.3
-  IL_0019:  call       instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool>::get_HeadOrDefault()
-  IL_001e:  stloc.s    V_5
-  IL_0020:  ldloc.s    V_5
-  IL_0022:  stloc.s    V_6
-  IL_0024:  call       void [runtime]System.Console::WriteLine()
-  IL_0029:  ldloc.s    V_4
-  IL_002b:  stloc.3
-  IL_002c:  ldloc.3
-  IL_002d:  call       instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<!0> class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool>::get_TailOrNull()
-  IL_0032:  stloc.s    V_4
-  IL_0034:  ldloc.s    V_4
-  IL_0036:  brtrue.s   IL_0018
-
-  IL_0038:  ldloc.0
-  IL_0039:  ldc.i4.1
-  IL_003a:  add
-  IL_003b:  stloc.0
-  IL_003c:  ldloc.0
-  IL_003d:  ldc.i4.1
-  IL_003e:  ldc.i4.s   10
-  IL_0040:  add
-  IL_0041:  blt.s      IL_0004
-
-IL_0043:  ret
-} 
+  .method public static void  ApplyDefaults() cil managed
+  {
+    
+    .maxstack  5
+    .locals init (int32 V_0,
+             class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> V_1)
+    IL_0000:  ldc.i4.0
+    IL_0001:  stloc.0
+    IL_0002:  br.s       IL_001a
+
+    IL_0004:  call       class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<bool> DontEliminateForLoops::get_unsolved()
+    IL_0009:  stloc.1
+    IL_000a:  ldsfld     class DontEliminateForLoops/ApplyDefaults@8 DontEliminateForLoops/ApplyDefaults@8::@_instance
+    IL_000f:  ldloc.1
+    IL_0010:  call       void [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Iterate<bool>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!0,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,
+                                                                                                  class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1<!!0>)
+    IL_0015:  nop
+    IL_0016:  ldloc.0
+    IL_0017:  ldc.i4.1
+    IL_0018:  add
+    IL_0019:  stloc.0
+    IL_001a:  ldloc.0
+    IL_001b:  ldc.i4.1
+    IL_001c:  ldc.i4.s   10
+    IL_001e:  add
+    IL_001f:  blt.s      IL_0004
+
+    IL_0021:  ret
+  } 
             """
             ]))
 
diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs
index e9547822655..4280ebf4f7a 100644
--- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs
+++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs
@@ -2,12 +2,11 @@
 
 namespace FSharp.Compiler.UnitTests.CodeGen.EmittedIL
 
+open System.Threading.Tasks
 open FSharp.Test
+open FSharp.Test.Compiler
 open Xunit
 
-open System
-open System.Threading.Tasks
-
 // These tests are sensitive to the fact that FSharp.Core is compiled release, not debug
 // The code generated changes slightly in debug mode
 #if !DEBUG 
@@ -37,67 +36,60 @@ let testTask() = task { return 1 }
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-.method public strict virtual instance void MoveNext() cil managed
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
 {
-    .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
-          
-    .maxstack  4
-    .locals init (int32 V_0,
-                    class [runtime]System.Exception V_1,
-                    bool V_2,
-                    int32 V_3,
-                    class [runtime]System.Exception V_4,
-                    class [runtime]System.Exception V_5)
-    IL_0000:  ldarg.0
-    IL_0001:  ldfld      int32 Test/testTask@4::ResumptionPoint
-    IL_0006:  stloc.0
-    .try
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit testTask@4
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
     {
-    IL_0007:  ldc.i4.1
-    IL_0008:  stloc.3
-    IL_0009:  ldarg.0
-    IL_000a:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-    IL_000f:  ldloc.3
-    IL_0010:  stfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::Result
-    IL_0015:  ldc.i4.1
-    IL_0016:  stloc.2
-    IL_0017:  ldloc.2
-    IL_0018:  brfalse.s  IL_0037
-    
-    IL_001a:  ldarg.0
-    IL_001b:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-    IL_0020:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::MethodBuilder
-    IL_0025:  ldarg.0
-    IL_0026:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-    IL_002b:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::Result
-    IL_0030:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetResult(!0)
-    IL_0035:  leave.s    IL_0045
-    
-    IL_0037:  leave.s    IL_0045
-    
-    }  
-    catch [runtime]System.Object 
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_000d:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
     {
-    IL_0039:  castclass  [runtime]System.Exception
-    IL_003e:  stloc.s    V_4
-    IL_0040:  ldloc.s    V_4
-    IL_0042:  stloc.1
-    IL_0043:  leave.s    IL_0045
-    
-    }  
-    IL_0045:  ldloc.1
-    IL_0046:  stloc.s    V_5
-    IL_0048:  ldloc.s    V_5
-    IL_004a:  brtrue.s   IL_004d
-    
-    IL_004c:  ret
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0006:  ldc.i4.1
+      IL_0007:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Return<int32>(!!0)
+      IL_000c:  ret
+    } 
+
+  } 
+
+  .method public static class [runtime]System.Threading.Tasks.Task`1<int32> testTask() cil managed
+  {
     
-    IL_004d:  ldarg.0
-    IL_004e:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-    IL_0053:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::MethodBuilder
-    IL_0058:  ldloc.s    V_5
-    IL_005a:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetException(class [netstandard]System.Exception)
-    IL_005f:  ret
+    .maxstack  5
+    .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+    IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.0
+    IL_0009:  newobj     instance void Test/testTask@4::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+    IL_000e:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<int32,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+    IL_0013:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<int32>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+    IL_0018:  ret
+  } 
+
 } 
                 """
             ]))
@@ -198,169 +190,112 @@ let testTask(t: Task<int>) = task { let! res = t in return res+1 }
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-      .method public strict virtual instance void MoveNext() cil managed
-      {
-        .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
-        
-        .maxstack  5
-        .locals init (int32 V_0,
-                 class [runtime]System.Exception V_1,
-                 bool V_2,
-                 class [runtime]System.Threading.Tasks.Task`1<int32> V_3,
-                 bool V_4,
-                 bool V_5,
-                 int32 V_6,
-                 int32 V_7,
-                 int32 V_8,
-                 int32 V_9,
-                 valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> V_10,
-                 class [runtime]System.Exception V_11,
-                 class [runtime]System.Exception V_12)
-        IL_0000:  ldarg.0
-        IL_0001:  ldfld      int32 Test/testTask@4::ResumptionPoint
-        IL_0006:  stloc.0
-        IL_0007:  ldloc.0
-        IL_0008:  ldc.i4.1
-        IL_0009:  sub
-        IL_000a:  switch     ( 
-                              IL_0015)
-        IL_0013:  br.s       IL_0018
-  
-        IL_0015:  nop
-        IL_0016:  br.s       IL_0019
-  
-        IL_0018:  nop
-        .try
-        {
-          IL_0019:  ldloc.0
-          IL_001a:  ldc.i4.1
-          IL_001b:  sub
-          IL_001c:  switch     ( 
-                                IL_0027)
-          IL_0025:  br.s       IL_002a
-  
-          IL_0027:  nop
-          IL_0028:  br.s       IL_0053
-  
-          IL_002a:  nop
-          IL_002b:  ldarg.0
-          IL_002c:  ldfld      class [runtime]System.Threading.Tasks.Task`1<int32> Test/testTask@4::t
-          IL_0031:  stloc.3
-          IL_0032:  ldarg.0
-          IL_0033:  ldloc.3
-          IL_0034:  callvirt   instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<!0> class [netstandard]System.Threading.Tasks.Task`1<int32>::GetAwaiter()
-          IL_0039:  stfld      valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> Test/testTask@4::awaiter
-          IL_003e:  ldc.i4.1
-          IL_003f:  stloc.s    V_4
-          IL_0041:  ldarg.0
-          IL_0042:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> Test/testTask@4::awaiter
-          IL_0047:  call       instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<int32>::get_IsCompleted()
-          IL_004c:  brfalse.s  IL_0050
-  
-          IL_004e:  br.s       IL_0069
-  
-          IL_0050:  ldc.i4.0
-          IL_0051:  brfalse.s  IL_0057
-  
-          IL_0053:  ldc.i4.1
-          IL_0054:  nop
-          IL_0055:  br.s       IL_0060
-  
-          IL_0057:  ldarg.0
-          IL_0058:  ldc.i4.1
-          IL_0059:  stfld      int32 Test/testTask@4::ResumptionPoint
-          IL_005e:  ldc.i4.0
-          IL_005f:  nop
-          IL_0060:  stloc.s    V_5
-          IL_0062:  ldloc.s    V_5
-          IL_0064:  stloc.s    V_4
-          IL_0066:  nop
-          IL_0067:  br.s       IL_006a
-  
-          IL_0069:  nop
-          IL_006a:  ldloc.s    V_4
-          IL_006c:  brfalse.s  IL_009a
-  
-          IL_006e:  ldarg.0
-          IL_006f:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> Test/testTask@4::awaiter
-          IL_0074:  call       instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<int32>::GetResult()
-          IL_0079:  stloc.s    V_6
-          IL_007b:  ldloc.s    V_6
-          IL_007d:  stloc.s    V_7
-          IL_007f:  ldloc.s    V_7
-          IL_0081:  stloc.s    V_8
-          IL_0083:  ldloc.s    V_8
-          IL_0085:  ldc.i4.1
-          IL_0086:  add
-          IL_0087:  stloc.s    V_9
-          IL_0089:  ldarg.0
-          IL_008a:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-          IL_008f:  ldloc.s    V_9
-          IL_0091:  stfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::Result
-          IL_0096:  ldc.i4.1
-          IL_0097:  nop
-          IL_0098:  br.s       IL_00b3
-  
-          IL_009a:  ldarg.0
-          IL_009b:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-          IL_00a0:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::MethodBuilder
-          IL_00a5:  ldarg.0
-          IL_00a6:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> Test/testTask@4::awaiter
-          IL_00ab:  ldarg.0
-          IL_00ac:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::AwaitUnsafeOnCompleted<valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32>,valuetype Test/testTask@4>(!!0&,
-                                                                                                                                                                                                                                                                      !!1&)
-          IL_00b1:  ldc.i4.0
-          IL_00b2:  nop
-          IL_00b3:  brfalse.s  IL_00c1
-  
-          IL_00b5:  ldarg.0
-          IL_00b6:  ldloc.s    V_10
-          IL_00b8:  stfld      valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<int32> Test/testTask@4::awaiter
-          IL_00bd:  ldc.i4.1
-          IL_00be:  nop
-          IL_00bf:  br.s       IL_00c3
-  
-          IL_00c1:  ldc.i4.0
-          IL_00c2:  nop
-          IL_00c3:  stloc.2
-          IL_00c4:  ldloc.2
-          IL_00c5:  brfalse.s  IL_00e4
-  
-          IL_00c7:  ldarg.0
-          IL_00c8:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-          IL_00cd:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::MethodBuilder
-          IL_00d2:  ldarg.0
-          IL_00d3:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-          IL_00d8:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::Result
-          IL_00dd:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetResult(!0)
-          IL_00e2:  leave.s    IL_00f2
-  
-          IL_00e4:  leave.s    IL_00f2
-  
-        }  
-        catch [runtime]System.Object 
-        {
-          IL_00e6:  castclass  [runtime]System.Exception
-          IL_00eb:  stloc.s    V_11
-          IL_00ed:  ldloc.s    V_11
-          IL_00ef:  stloc.1
-          IL_00f0:  leave.s    IL_00f2
-  
-        }  
-        IL_00f2:  ldloc.1
-        IL_00f3:  stloc.s    V_12
-        IL_00f5:  ldloc.s    V_12
-        IL_00f7:  brtrue.s   IL_00fa
-  
-        IL_00f9:  ret
-  
-        IL_00fa:  ldarg.0
-        IL_00fb:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32> Test/testTask@4::Data
-        IL_0100:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>::MethodBuilder
-        IL_0105:  ldloc.s    V_12
-        IL_0107:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<int32>::SetException(class [netstandard]System.Exception)
-        IL_010c:  ret
-      } 
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
+{
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@4-1'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<int32,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_000d:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32> Invoke(int32 _arg1) cil managed
+    {
+      
+      .maxstack  7
+      .locals init (int32 V_0)
+      IL_0000:  ldarg.1
+      IL_0001:  stloc.0
+      IL_0002:  ldarg.0
+      IL_0003:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_0008:  ldloc.0
+      IL_0009:  ldc.i4.1
+      IL_000a:  add
+      IL_000b:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Return<int32>(!!0)
+      IL_0010:  ret
+    } 
+
+  } 
+
+  .class auto ansi serializable sealed nested assembly beforefieldinit testTask@4
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>
+  {
+    .field public class [runtime]System.Threading.Tasks.Task`1<int32> t
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [runtime]System.Threading.Tasks.Task`1<int32> t, class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [runtime]System.Threading.Tasks.Task`1<int32> Test/testTask@4::t
+      IL_000d:  ldarg.0
+      IL_000e:  ldarg.2
+      IL_000f:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0014:  ret
+    } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<int32>,int32> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0006:  ldarg.0
+      IL_0007:  ldfld      class [runtime]System.Threading.Tasks.Task`1<int32> Test/testTask@4::t
+      IL_000c:  ldarg.0
+      IL_000d:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0012:  newobj     instance void Test/'testTask@4-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_0017:  call       class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!1>,!!2> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority::TaskBuilderBase.Bind<int32,int32,int32>(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase,
+                                                                                                                                                                                                                                                                                                        class [runtime]System.Threading.Tasks.Task`1<!!0>,
+                                                                                                                                                                                                                                                                                                        class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<!!0,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!1>,!!2>>)
+      IL_001c:  ret
+    } 
+
+  } 
+
+  .method public static class [runtime]System.Threading.Tasks.Task`1<int32> testTask(class [runtime]System.Threading.Tasks.Task`1<int32> t) cil managed
+  {
+    
+    .maxstack  6
+    .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+    IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldarg.0
+    IL_0009:  ldloc.0
+    IL_000a:  newobj     instance void Test/testTask@4::.ctor(class [runtime]System.Threading.Tasks.Task`1<int32>,
+                                                              class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+    IL_000f:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<int32,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+    IL_0014:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<int32>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+    IL_0019:  ret
+  } 
+
+} 
                 """
             ]))
 
@@ -486,107 +421,139 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") }
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-        .method public strict virtual instance void 
-            MoveNext() cil managed
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
+{
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@4-1'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
     {
-      .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
       
-      .maxstack  4
-      .locals init (int32 V_0,
-               class [runtime]System.Exception V_1,
-               bool V_2,
-               bool V_3,
-               bool V_4,
-               class [runtime]System.Exception V_5,
-               bool V_6,
-               bool V_7,
-               class [runtime]System.Exception V_8,
-               class [runtime]System.Exception V_9)
+      .maxstack  8
       IL_0000:  ldarg.0
-      IL_0001:  ldfld      int32 Test/testTask@4::ResumptionPoint
-      IL_0006:  stloc.0
-      .try
-      {
-        IL_0007:  ldc.i4.0
-        IL_0008:  stloc.3
-        .try
-        {
-          IL_0009:  nop
-          IL_000a:  ldc.i4.1
-          IL_000b:  stloc.s    V_4
-          IL_000d:  ldloc.s    V_4
-          IL_000f:  stloc.3
-          IL_0010:  leave.s    IL_0032
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_000d:  ret
+    } 
 
-        }  
-        catch [runtime]System.Object 
-        {
-          IL_0012:  castclass  [runtime]System.Exception
-          IL_0017:  stloc.s    V_5
-          IL_0019:  nop
-          IL_001a:  ldstr      "finally"
-          IL_001f:  call       void [runtime]System.Console::WriteLine(string)
-          IL_0024:  ldc.i4.1
-          IL_0025:  stloc.s    V_6
-          IL_0027:  rethrow
-          IL_0029:  ldnull
-          IL_002a:  unbox.any  [FSharp.Core]Microsoft.FSharp.Core.Unit
-          IL_002f:  pop
-          IL_0030:  leave.s    IL_0032
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  nop
+      IL_0001:  ldarg.0
+      IL_0002:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_0007:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Zero<class [FSharp.Core]Microsoft.FSharp.Core.Unit>()
+      IL_000c:  ret
+    } 
 
-        }  
-        IL_0032:  ldloc.3
-        IL_0033:  brfalse.s  IL_0046
-
-        IL_0035:  nop
-        IL_0036:  ldstr      "finally"
-        IL_003b:  call       void [runtime]System.Console::WriteLine(string)
-        IL_0040:  ldc.i4.1
-        IL_0041:  stloc.s    V_7
-        IL_0043:  nop
-        IL_0044:  br.s       IL_0047
+  } 
 
-        IL_0046:  nop
-        IL_0047:  ldloc.3
-        IL_0048:  stloc.2
-        IL_0049:  ldloc.2
-        IL_004a:  brfalse.s  IL_0069
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@4-2'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>
+  {
+    .field static assembly initonly class Test/'testTask@4-2' @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor()
+      IL_0006:  ret
+    } 
 
-        IL_004c:  ldarg.0
-        IL_004d:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-        IL_0052:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-        IL_0057:  ldarg.0
-        IL_0058:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-        IL_005d:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Result
-        IL_0062:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetResult(!0)
-        IL_0067:  leave.s    IL_0077
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  nop
+      IL_0001:  ldstr      "finally"
+      IL_0006:  call       void [runtime]System.Console::WriteLine(string)
+      IL_000b:  ldnull
+      IL_000c:  ret
+    } 
 
-        IL_0069:  leave.s    IL_0077
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void Test/'testTask@4-2'::.ctor()
+      IL_0005:  stsfld     class Test/'testTask@4-2' Test/'testTask@4-2'::@_instance
+      IL_000a:  ret
+    } 
 
-      }  
-      catch [runtime]System.Object 
-      {
-        IL_006b:  castclass  [runtime]System.Exception
-        IL_0070:  stloc.s    V_8
-        IL_0072:  ldloc.s    V_8
-        IL_0074:  stloc.1
-        IL_0075:  leave.s    IL_0077
+  } 
 
-      }  
-      IL_0077:  ldloc.1
-      IL_0078:  stloc.s    V_9
-      IL_007a:  ldloc.s    V_9
-      IL_007c:  brtrue.s   IL_007f
-
-      IL_007e:  ret
-
-      IL_007f:  ldarg.0
-      IL_0080:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-      IL_0085:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-      IL_008a:  ldloc.s    V_9
-      IL_008c:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetException(class [netstandard]System.Exception)
-      IL_0091:  ret
+  .class auto ansi serializable sealed nested assembly beforefieldinit testTask@4
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_000d:  ret
     } 
+
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0006:  ldarg.0
+      IL_0007:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_000c:  ldarg.0
+      IL_000d:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0012:  newobj     instance void Test/'testTask@4-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_0017:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+      IL_001c:  ldsfld     class Test/'testTask@4-2' Test/'testTask@4-2'::@_instance
+      IL_0021:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::TryFinally<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>,
+                                                                                                                                                                                                                                                                                                                                                              class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
+      IL_0026:  ret
+    } 
+
+  } 
+
+  .method public static class [runtime]System.Threading.Tasks.Task`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> testTask() cil managed
+  {
+    
+    .maxstack  5
+    .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+    IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.0
+    IL_0009:  newobj     instance void Test/testTask@4::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+    IL_000e:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+    IL_0013:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+    IL_0018:  ret
+  } 
+
+} 
                 """
             ]))
 
@@ -716,110 +683,142 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 }
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-        .method public strict virtual instance void 
-            MoveNext() cil managed
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
+{
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@4-1'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
     {
-      .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
       
-      .maxstack  4
-      .locals init (int32 V_0,
-               class [runtime]System.Exception V_1,
-               bool V_2,
-               bool V_3,
-               bool V_4,
-               class [runtime]System.Exception V_5,
-               bool V_6,
-               class [runtime]System.Exception V_7,
-               class [runtime]System.Exception V_8,
-               class [runtime]System.Exception V_9,
-               class [runtime]System.Exception V_10,
-               class [runtime]System.Exception V_11)
+      .maxstack  8
       IL_0000:  ldarg.0
-      IL_0001:  ldfld      int32 Test/testTask@4::ResumptionPoint
-      IL_0006:  stloc.0
-      .try
-      {
-        IL_0007:  ldc.i4.0
-        IL_0008:  stloc.3
-        IL_0009:  ldc.i4.0
-        IL_000a:  stloc.s    V_4
-        IL_000c:  ldnull
-        IL_000d:  stloc.s    V_5
-        .try
-        {
-          IL_000f:  nop
-          IL_0010:  ldc.i4.1
-          IL_0011:  stloc.s    V_6
-          IL_0013:  ldloc.s    V_6
-          IL_0015:  stloc.3
-          IL_0016:  leave.s    IL_0028
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_000d:  ret
+    } 
 
-        }  
-        catch [runtime]System.Object 
-        {
-          IL_0018:  castclass  [runtime]System.Exception
-          IL_001d:  stloc.s    V_7
-          IL_001f:  ldc.i4.1
-          IL_0020:  stloc.s    V_4
-          IL_0022:  ldloc.s    V_7
-          IL_0024:  stloc.s    V_5
-          IL_0026:  leave.s    IL_0028
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  nop
+      IL_0001:  ldarg.0
+      IL_0002:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-1'::builder@
+      IL_0007:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Zero<class [FSharp.Core]Microsoft.FSharp.Core.Unit>()
+      IL_000c:  ret
+    } 
 
-        }  
-        IL_0028:  ldloc.s    V_4
-        IL_002a:  brfalse.s  IL_0042
-
-        IL_002c:  ldloc.s    V_5
-        IL_002e:  stloc.s    V_8
-        IL_0030:  ldloc.s    V_8
-        IL_0032:  stloc.s    V_9
-        IL_0034:  ldstr      "with"
-        IL_0039:  call       void [runtime]System.Console::WriteLine(string)
-        IL_003e:  ldc.i4.1
-        IL_003f:  nop
-        IL_0040:  br.s       IL_0044
+  } 
 
-        IL_0042:  ldloc.3
-        IL_0043:  nop
-        IL_0044:  stloc.2
-        IL_0045:  ldloc.2
-        IL_0046:  brfalse.s  IL_0065
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@4-2'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [runtime]System.Exception,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [runtime]System.Exception,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-2'::builder@
+      IL_000d:  ret
+    } 
 
-        IL_0048:  ldarg.0
-        IL_0049:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-        IL_004e:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-        IL_0053:  ldarg.0
-        IL_0054:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-        IL_0059:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Result
-        IL_005e:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetResult(!0)
-        IL_0063:  leave.s    IL_0073
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [runtime]System.Exception _arg1) cil managed
+    {
+      
+      .maxstack  5
+      .locals init (class [runtime]System.Exception V_0)
+      IL_0000:  ldarg.1
+      IL_0001:  stloc.0
+      IL_0002:  ldstr      "with"
+      IL_0007:  call       void [runtime]System.Console::WriteLine(string)
+      IL_000c:  ldarg.0
+      IL_000d:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@4-2'::builder@
+      IL_0012:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Zero<class [FSharp.Core]Microsoft.FSharp.Core.Unit>()
+      IL_0017:  ret
+    } 
 
-        IL_0065:  leave.s    IL_0073
+  } 
 
-      }  
-      catch [runtime]System.Object 
-      {
-        IL_0067:  castclass  [runtime]System.Exception
-        IL_006c:  stloc.s    V_10
-        IL_006e:  ldloc.s    V_10
-        IL_0070:  stloc.1
-        IL_0071:  leave.s    IL_0073
+  .class auto ansi serializable sealed nested assembly beforefieldinit testTask@4
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_000d:  ret
+    } 
 
-      }  
-      IL_0073:  ldloc.1
-      IL_0074:  stloc.s    V_11
-      IL_0076:  ldloc.s    V_11
-      IL_0078:  brtrue.s   IL_007b
-
-      IL_007a:  ret
-
-      IL_007b:  ldarg.0
-      IL_007c:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@4::Data
-      IL_0081:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-      IL_0086:  ldloc.s    V_11
-      IL_0088:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetException(class [netstandard]System.Exception)
-      IL_008d:  ret
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0006:  ldarg.0
+      IL_0007:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_000c:  ldarg.0
+      IL_000d:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0012:  newobj     instance void Test/'testTask@4-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_0017:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+      IL_001c:  ldarg.0
+      IL_001d:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@4::builder@
+      IL_0022:  newobj     instance void Test/'testTask@4-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_0027:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::TryWith<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>,
+                                                                                                                                                                                                                                                                                                                                                           class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [runtime]System.Exception,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+      IL_002c:  ret
     } 
+
+  } 
+
+  .method public static class [runtime]System.Threading.Tasks.Task`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> testTask() cil managed
+  {
+    
+    .maxstack  5
+    .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+    IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.0
+    IL_0009:  newobj     instance void Test/testTask@4::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+    IL_000e:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+    IL_0013:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+    IL_0018:  ret
+  } 
+
+} 
                 """
             ]))
 
@@ -935,89 +934,184 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") }
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-        .method public strict virtual instance void 
-            MoveNext() cil managed
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
+{
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@5-1'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,bool>
+  {
+    .field static assembly initonly class Test/'testTask@5-1' @_instance
+    .method assembly specialname rtspecialname instance void  .ctor() cil managed
     {
-      .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
       
-      .maxstack  4
-      .locals init (int32 V_0,
-               class [runtime]System.Exception V_1,
-               bool V_2,
-               bool V_3,
-               bool V_4,
-               class [runtime]System.Exception V_5,
-               class [runtime]System.Exception V_6)
+      .maxstack  8
       IL_0000:  ldarg.0
-      IL_0001:  ldfld      int32 Test/testTask@5::ResumptionPoint
-      IL_0006:  stloc.0
-      .try
-      {
-        IL_0007:  ldc.i4.1
-        IL_0008:  stloc.3
-        IL_0009:  br.s       IL_001d
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,bool>::.ctor()
+      IL_0006:  ret
+    } 
 
-        IL_000b:  ldstr      "loop"
-        IL_0010:  call       void [runtime]System.Console::WriteLine(string)
-        IL_0015:  ldc.i4.1
-        IL_0016:  stloc.s    V_4
-        IL_0018:  ldloc.s    V_4
-        IL_001a:  stloc.3
-        IL_001b:  ldc.i4.0
-        IL_001c:  stloc.0
-        IL_001d:  ldloc.3
-        IL_001e:  brfalse.s  IL_002b
+    .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  call       int32 Test::get_x()
+      IL_0005:  ldc.i4.4
+      IL_0006:  cgt
+      IL_0008:  ret
+    } 
 
-        IL_0020:  call       int32 Test::get_x()
-        IL_0025:  ldc.i4.4
-        IL_0026:  cgt
-        IL_0028:  nop
-        IL_0029:  br.s       IL_002d
+    .method private specialname rtspecialname static void  .cctor() cil managed
+    {
+      
+      .maxstack  10
+      IL_0000:  newobj     instance void Test/'testTask@5-1'::.ctor()
+      IL_0005:  stsfld     class Test/'testTask@5-1' Test/'testTask@5-1'::@_instance
+      IL_000a:  ret
+    } 
 
-        IL_002b:  ldc.i4.0
-        IL_002c:  nop
-        IL_002d:  brtrue.s   IL_000b
+  } 
 
-        IL_002f:  ldloc.3
-        IL_0030:  stloc.2
-        IL_0031:  ldloc.2
-        IL_0032:  brfalse.s  IL_0051
+  .class auto ansi serializable sealed nested assembly beforefieldinit 'testTask@5-2'
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@5-2'::builder@
+      IL_000d:  ret
+    } 
 
-        IL_0034:  ldarg.0
-        IL_0035:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@5::Data
-        IL_003a:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-        IL_003f:  ldarg.0
-        IL_0040:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@5::Data
-        IL_0045:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Result
-        IL_004a:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetResult(!0)
-        IL_004f:  leave.s    IL_005f
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldstr      "loop"
+      IL_0005:  call       void [runtime]System.Console::WriteLine(string)
+      IL_000a:  ldarg.0
+      IL_000b:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/'testTask@5-2'::builder@
+      IL_0010:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Zero<class [FSharp.Core]Microsoft.FSharp.Core.Unit>()
+      IL_0015:  ret
+    } 
 
-        IL_0051:  leave.s    IL_005f
+  } 
 
-      }  
-      catch [runtime]System.Object 
-      {
-        IL_0053:  castclass  [runtime]System.Exception
-        IL_0058:  stloc.s    V_5
-        IL_005a:  ldloc.s    V_5
-        IL_005c:  stloc.1
-        IL_005d:  leave.s    IL_005f
+  .class auto ansi serializable sealed nested assembly beforefieldinit testTask@5
+         extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>
+  {
+    .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+    .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+    .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+    .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+    .method assembly specialname rtspecialname instance void  .ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  ldarg.1
+      IL_0008:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@5::builder@
+      IL_000d:  ret
+    } 
 
-      }  
-      IL_005f:  ldloc.1
-      IL_0060:  stloc.s    V_6
-      IL_0062:  ldloc.s    V_6
-      IL_0064:  brtrue.s   IL_0067
+    .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@5::builder@
+      IL_0006:  ldsfld     class Test/'testTask@5-1' Test/'testTask@5-1'::@_instance
+      IL_000b:  ldarg.0
+      IL_000c:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@5::builder@
+      IL_0011:  ldarg.0
+      IL_0012:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder Test/testTask@5::builder@
+      IL_0017:  newobj     instance void Test/'testTask@5-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_001c:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+      IL_0021:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::While<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,bool>,
+                                                                                                                                                                                                                                                                                                                                                     class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,class [FSharp.Core]Microsoft.FSharp.Core.Unit>)
+      IL_0026:  ret
+    } 
 
-      IL_0066:  ret
+  } 
 
-      IL_0067:  ldarg.0
-      IL_0068:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> Test/testTask@5::Data
-      IL_006d:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::MethodBuilder
-      IL_0072:  ldloc.s    V_6
-      IL_0074:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit>::SetException(class [netstandard]System.Exception)
-      IL_0079:  ret
-    } 
+  .field static assembly int32 x@4
+  .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+  .method public specialname static int32 get_x() cil managed
+  {
+    
+    .maxstack  8
+    IL_0000:  ldsfld     int32 Test::x@4
+    IL_0005:  ret
+  } 
+
+  .method public specialname static void set_x(int32 'value') cil managed
+  {
+    
+    .maxstack  8
+    IL_0000:  ldarg.0
+    IL_0001:  stsfld     int32 Test::x@4
+    IL_0006:  ret
+  } 
+
+  .method public static class [runtime]System.Threading.Tasks.Task`1<class [FSharp.Core]Microsoft.FSharp.Core.Unit> testTask() cil managed
+  {
+    
+    .maxstack  5
+    .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+    IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+    IL_0005:  stloc.0
+    IL_0006:  ldloc.0
+    IL_0007:  ldloc.0
+    IL_0008:  ldloc.0
+    IL_0009:  newobj     instance void Test/testTask@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+    IL_000e:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+    IL_0013:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<class [FSharp.Core]Microsoft.FSharp.Core.Unit>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+    IL_0018:  ret
+  } 
+
+  .method private specialname rtspecialname static void  .cctor() cil managed
+  {
+    
+    .maxstack  8
+    IL_0000:  ldc.i4.0
+    IL_0001:  stsfld     int32 '<StartupCode$assembly>'.$Test::init@
+    IL_0006:  ldsfld     int32 '<StartupCode$assembly>'.$Test::init@
+    IL_000b:  pop
+    IL_000c:  ret
+  } 
+
+  .method assembly static void  staticInitialization@() cil managed
+  {
+    
+    .maxstack  8
+    IL_0000:  ldc.i4.1
+    IL_0001:  stsfld     int32 Test::x@4
+    IL_0006:  ret
+  } 
+
+  .property int32 x()
+  {
+    .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 09 00 00 00 00 00 ) 
+    .set void Test::set_x(int32)
+    .get int32 Test::get_x()
+  } 
+} 
                 """
             ]))
 #endif
@@ -1095,318 +1189,141 @@ type Generic1InGeneric1<'T>() =
             """,
             (fun verifier -> verifier.VerifyIL [
             """
-  .class public abstract auto ansi sealed Test
+.class public abstract auto ansi sealed Test
+       extends [runtime]System.Object
+{
+  .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
+  .class auto ansi serializable nested public beforefieldinit Generic1InGeneric1`1<T>
          extends [runtime]System.Object
   {
-    .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) 
-    .class auto ansi serializable nested public beforefieldinit Generic1InGeneric1`1<T>
-           extends [runtime]System.Object
+    .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) 
+    .class auto ansi serializable sealed nested assembly beforefieldinit clo@7<T,A>
+           extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>,!A>>
     {
-      .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 ) 
-      .class auto autochar sealed nested assembly beforefieldinit specialname clo@7<T,A>
-             extends [runtime]System.ValueType
-             implements [runtime]System.Runtime.CompilerServices.IAsyncStateMachine,
-                        class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.IResumableStateMachine`1<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>>
+      .field public class [runtime]System.Threading.Tasks.Task`1<!A> computation
+      .field public class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@
+      .custom instance void [runtime]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [runtime]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) 
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
+      .method assembly specialname rtspecialname instance void  .ctor(class [runtime]System.Threading.Tasks.Task`1<!A> computation, class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder builder@) cil managed
       {
         .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
-        .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 06 00 00 00 00 00 ) 
-        .field public valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A> Data
-        .field public int32 ResumptionPoint
-        .field public class [runtime]System.Threading.Tasks.Task`1<!A> computation
-        .field public valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!A> awaiter
-        .method public strict virtual instance void MoveNext() cil managed
-        {
-          .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
-          
-          .maxstack  5
-          .locals init (int32 V_0,
-                   class [runtime]System.Exception V_1,
-                   bool V_2,
-                   class [runtime]System.Threading.Tasks.Task`1<!A> V_3,
-                   bool V_4,
-                   bool V_5,
-                   !A V_6,
-                   !A V_7,
-                   valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!A> V_8,
-                   class [runtime]System.Exception V_9,
-                   class [runtime]System.Exception V_10)
-          IL_0000:  ldarg.0
-          IL_0001:  ldfld      int32 valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::ResumptionPoint
-          IL_0006:  stloc.0
-          IL_0007:  ldloc.0
-          IL_0008:  ldc.i4.1
-          IL_0009:  sub
-          IL_000a:  switch     ( 
-                                IL_0015)
-          IL_0013:  br.s       IL_0018
-  
-          IL_0015:  nop
-          IL_0016:  br.s       IL_001b
-  
-          IL_0018:  nop
-          IL_0019:  ldnull
-          IL_001a:  stloc.1
-          .try
-          {
-            IL_001b:  ldloc.0
-            IL_001c:  ldc.i4.1
-            IL_001d:  sub
-            IL_001e:  switch     ( 
-                                  IL_0029)
-            IL_0027:  br.s       IL_002c
-  
-            IL_0029:  nop
-            IL_002a:  br.s       IL_0055
-  
-            IL_002c:  nop
-            IL_002d:  ldarg.0
-            IL_002e:  ldfld      class [runtime]System.Threading.Tasks.Task`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::computation
-            IL_0033:  stloc.3
-            IL_0034:  ldarg.0
-            IL_0035:  ldloc.3
-            IL_0036:  callvirt   instance valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<!0> class [netstandard]System.Threading.Tasks.Task`1<!A>::GetAwaiter()
-            IL_003b:  stfld      valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::awaiter
-            IL_0040:  ldc.i4.1
-            IL_0041:  stloc.s    V_4
-            IL_0043:  ldarg.0
-            IL_0044:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::awaiter
-            IL_0049:  call       instance bool valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<!A>::get_IsCompleted()
-            IL_004e:  brfalse.s  IL_0052
-  
-            IL_0050:  br.s       IL_006b
-  
-            IL_0052:  ldc.i4.0
-            IL_0053:  brfalse.s  IL_0059
-  
-            IL_0055:  ldc.i4.1
-            IL_0056:  nop
-            IL_0057:  br.s       IL_0062
-  
-            IL_0059:  ldarg.0
-            IL_005a:  ldc.i4.1
-            IL_005b:  stfld      int32 valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::ResumptionPoint
-            IL_0060:  ldc.i4.0
-            IL_0061:  nop
-            IL_0062:  stloc.s    V_5
-            IL_0064:  ldloc.s    V_5
-            IL_0066:  stloc.s    V_4
-            IL_0068:  nop
-            IL_0069:  br.s       IL_006c
-  
-            IL_006b:  nop
-            IL_006c:  ldloc.s    V_4
-            IL_006e:  brfalse.s  IL_0092
-  
-            IL_0070:  ldarg.0
-            IL_0071:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::awaiter
-            IL_0076:  call       instance !0 valuetype [netstandard]System.Runtime.CompilerServices.TaskAwaiter`1<!A>::GetResult()
-            IL_007b:  stloc.s    V_6
-            IL_007d:  ldloc.s    V_6
-            IL_007f:  stloc.s    V_7
-            IL_0081:  ldarg.0
-            IL_0082:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-            IL_0087:  ldloc.s    V_7
-            IL_0089:  stfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::Result
-            IL_008e:  ldc.i4.1
-            IL_008f:  nop
-            IL_0090:  br.s       IL_00ab
-  
-            IL_0092:  ldarg.0
-            IL_0093:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-            IL_0098:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::MethodBuilder
-            IL_009d:  ldarg.0
-            IL_009e:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::awaiter
-            IL_00a3:  ldarg.0
-            IL_00a4:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!A>::AwaitUnsafeOnCompleted<valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1>,valuetype Test/Generic1InGeneric1`1/clo@7<!0,!1>>(!!0&,
-                                                                                                                                                                                                                                                                                         !!1&)
-            IL_00a9:  ldc.i4.0
-            IL_00aa:  nop
-            IL_00ab:  brfalse.s  IL_00c1
-  
-            IL_00ad:  ldarg.0
-            IL_00ae:  ldloca.s   V_8
-            IL_00b0:  initobj    valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!A>
-            IL_00b6:  ldloc.s    V_8
-            IL_00b8:  stfld      valuetype [runtime]System.Runtime.CompilerServices.TaskAwaiter`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::awaiter
-            IL_00bd:  ldc.i4.1
-            IL_00be:  nop
-            IL_00bf:  br.s       IL_00c3
-  
-            IL_00c1:  ldc.i4.0
-            IL_00c2:  nop
-            IL_00c3:  stloc.2
-            IL_00c4:  ldloc.2
-            IL_00c5:  brfalse.s  IL_00e4
-  
-            IL_00c7:  ldarg.0
-            IL_00c8:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-            IL_00cd:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::MethodBuilder
-            IL_00d2:  ldarg.0
-            IL_00d3:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-            IL_00d8:  ldfld      !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::Result
-            IL_00dd:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!A>::SetResult(!0)
-            IL_00e2:  leave.s    IL_00f2
-  
-            IL_00e4:  leave.s    IL_00f2
-  
-          }  
-          catch [runtime]System.Object 
-          {
-            IL_00e6:  castclass  [runtime]System.Exception
-            IL_00eb:  stloc.s    V_9
-            IL_00ed:  ldloc.s    V_9
-            IL_00ef:  stloc.1
-            IL_00f0:  leave.s    IL_00f2
-  
-          }  
-          IL_00f2:  ldloc.1
-          IL_00f3:  stloc.s    V_10
-          IL_00f5:  ldloc.s    V_10
-          IL_00f7:  brtrue.s   IL_00fa
-  
-          IL_00f9:  ret
-  
-          IL_00fa:  ldarg.0
-          IL_00fb:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-          IL_0100:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::MethodBuilder
-          IL_0105:  ldloc.s    V_10
-          IL_0107:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!A>::SetException(class [netstandard]System.Exception)
-          IL_010c:  ret
-        } 
-  
-        .method public strict virtual instance void SetStateMachine(class [runtime]System.Runtime.CompilerServices.IAsyncStateMachine state) cil managed
-        {
-          .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine
-          
-          .maxstack  8
-          IL_0000:  ldarg.0
-          IL_0001:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-          IL_0006:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>::MethodBuilder
-          IL_000b:  ldarg.1
-          IL_000c:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!A>::SetStateMachine(class [netstandard]System.Runtime.CompilerServices.IAsyncStateMachine)
-          IL_0011:  ret
-        } 
-  
-        .method public strict virtual instance int32 get_ResumptionPoint() cil managed
-        {
-          .override  method instance int32 class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.IResumableStateMachine`1<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>>::get_ResumptionPoint()
-          
-          .maxstack  8
-          IL_0000:  ldarg.0
-          IL_0001:  ldfld      int32 valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::ResumptionPoint
-          IL_0006:  ret
-        } 
-  
-        .method public strict virtual instance valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A> get_Data() cil managed
-        {
-          .override  method instance !0 class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.IResumableStateMachine`1<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>>::get_Data()
-          
-          .maxstack  8
-          IL_0000:  ldarg.0
-          IL_0001:  ldfld      valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-          IL_0006:  ret
-        } 
-  
-        .method public strict virtual instance void set_Data(valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A> 'value') cil managed
-        {
-          .override  method instance void class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.IResumableStateMachine`1<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>>::set_Data(!0)
-          
-          .maxstack  8
-          IL_0000:  ldarg.0
-          IL_0001:  ldarg.1
-          IL_0002:  stfld      valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!A>::Data
-          IL_0007:  ret
-        } 
-  
-      } 
-  
-      .method public specialname rtspecialname instance void  .ctor() cil managed
-      {
+        .custom instance void [runtime]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) 
         
         .maxstack  8
         IL_0000:  ldarg.0
-        IL_0001:  callvirt   instance void [runtime]System.Object::.ctor()
+        IL_0001:  call       instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>,!A>>::.ctor()
         IL_0006:  ldarg.0
-        IL_0007:  pop
-        IL_0008:  ret
+        IL_0007:  ldarg.1
+        IL_0008:  stfld      class [runtime]System.Threading.Tasks.Task`1<!1> class Test/Generic1InGeneric1`1/clo@7<!T,!A>::computation
+        IL_000d:  ldarg.0
+        IL_000e:  ldarg.2
+        IL_000f:  stfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder class Test/Generic1InGeneric1`1/clo@7<!T,!A>::builder@
+        IL_0014:  ret
       } 
-  
-      .method public hidebysig instance class [runtime]System.Threading.Tasks.Task`1<int32> Run() cil managed
+
+      .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!A>,!A> Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed
       {
         
         .maxstack  8
         IL_0000:  ldarg.0
-        IL_0001:  ldc.i4.3
-        IL_0002:  call       class [runtime]System.Threading.Tasks.Task`1<!!0> [runtime]System.Threading.Tasks.Task::FromResult<int32>(!!0)
-        IL_0007:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> class Test/Generic1InGeneric1`1<!T>::run<int32>(class [runtime]System.Threading.Tasks.Task`1<!!0>)
-        IL_000c:  ret
-      } 
-  
-      .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1<!!A> run<A>(class [runtime]System.Threading.Tasks.Task`1<!!A> computation) cil managed
-      {
-        .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
-        
-        .maxstack  4
-        .locals init (valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A> V_0,
-                 valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>& V_1)
-        IL_0000:  ldloca.s   V_0
-        IL_0002:  initobj    valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>
-        IL_0008:  ldloca.s   V_0
-        IL_000a:  stloc.1
-        IL_000b:  ldloc.1
-        IL_000c:  ldarg.1
-        IL_000d:  stfld      class [runtime]System.Threading.Tasks.Task`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>::computation
-        IL_0012:  ldloc.1
-        IL_0013:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>::Data
-        IL_0018:  call       valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!!A>::Create()
-        IL_001d:  stfld      valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!A>::MethodBuilder
-        IL_0022:  ldloc.1
-        IL_0023:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>::Data
-        IL_0028:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!A>::MethodBuilder
-        IL_002d:  ldloc.1
-        IL_002e:  call       instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!!0>::Start<valuetype Test/Generic1InGeneric1`1/clo@7<!0,!!0>>(!!0&)
-        IL_0033:  ldloc.1
-        IL_0034:  ldflda     valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!1> valuetype Test/Generic1InGeneric1`1/clo@7<!T,!!A>::Data
-        IL_0039:  ldflda     valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!0> valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!A>::MethodBuilder
-        IL_003e:  call       instance class [netstandard]System.Threading.Tasks.Task`1<!0> valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<!!A>::get_Task()
-        IL_0043:  ret
+        IL_0001:  ldfld      class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder class Test/Generic1InGeneric1`1/clo@7<!T,!A>::builder@
+        IL_0006:  ldarg.0
+        IL_0007:  ldfld      class [runtime]System.Threading.Tasks.Task`1<!1> class Test/Generic1InGeneric1`1/clo@7<!T,!A>::computation
+        IL_000c:  call       class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderExtensions.HighPriority::TaskBuilderBase.ReturnFrom<!A>(class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase,
+                                                                                                                                                                                                                                                                                                 class [runtime]System.Threading.Tasks.Task`1<!!0>)
+        IL_0011:  ret
       } 
-  
+
     } 
-  
+
+    .method public specialname rtspecialname instance void  .ctor() cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  callvirt   instance void [runtime]System.Object::.ctor()
+      IL_0006:  ldarg.0
+      IL_0007:  pop
+      IL_0008:  ret
+    } 
+
+    .method public hidebysig instance class [runtime]System.Threading.Tasks.Task`1<int32> Run() cil managed
+    {
+      
+      .maxstack  8
+      IL_0000:  ldarg.0
+      IL_0001:  ldc.i4.3
+      IL_0002:  call       class [runtime]System.Threading.Tasks.Task`1<!!0> [runtime]System.Threading.Tasks.Task::FromResult<int32>(!!0)
+      IL_0007:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> class Test/Generic1InGeneric1`1<!T>::run<int32>(class [runtime]System.Threading.Tasks.Task`1<!!0>)
+      IL_000c:  ret
+    } 
+
+    .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1<!!A> run<A>(class [runtime]System.Threading.Tasks.Task`1<!!A> computation) cil managed
+    {
+      .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) 
+      
+      .maxstack  6
+      .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0)
+      IL_0000:  call       class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task()
+      IL_0005:  stloc.0
+      IL_0006:  ldloc.0
+      IL_0007:  ldloc.0
+      IL_0008:  ldarg.1
+      IL_0009:  ldloc.0
+      IL_000a:  newobj     instance void class Test/Generic1InGeneric1`1/clo@7<!T,!!A>::.ctor(class [runtime]System.Threading.Tasks.Task`1<!1>,
+                                                                                              class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder)
+      IL_000f:  callvirt   instance class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderBase::Delay<!!0,!!0>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2<class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!1>>)
+      IL_0014:  callvirt   instance class [runtime]System.Threading.Tasks.Task`1<!!0> [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder::Run<!!0>(class [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ResumableCode`2<valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1<!!0>,!!0>)
+      IL_0019:  ret
+    } 
+
   } 
-            """
+
+} 
+                """
             ]))
 #endif
 
 
 #if NETCOREAPP
 
-module ``Check stack traces`` = 
+module ``Check stack traces`` =
     [<Fact>]
     let ``check stack trace of async exception from task``() =
-        let t() =
-            task {
-                let! throws = task {
-                    do! System.Threading.Tasks.Task.Yield()
-                    failwith "Inner task exception"
-                    return ()
-                }
-                return throws
-            }
-            
-        let f() = t().Wait()
-        
-        let stackTrace = try f(); failwith "huh?" with e -> e.ToString()
+        FSharp """
+module Test
 
-        if stackTrace.Contains("huh?") then
-           failwith "unexpected - inner exception not generated correctly"
-        
-        if not (stackTrace.Contains("MoveNext()")) then
-           failwith "expected MoveNext() on stack trace"
+let t() =
+    task {
+        let! throws = task {
+            do! System.Threading.Tasks.Task.Yield()
+            failwith "Inner task exception"
+            return ()
+        }
+        return throws
+    }
+
+let f() = t().Wait()
+
+[<EntryPoint>]
+let main _ =
+    let stackTrace = try f(); failwith "huh?" with e -> e.ToString()
+
+    if stackTrace.Contains("huh?") then
+        failwith "unexpected - inner exception not generated correctly"
+
+    if not (stackTrace.Contains("MoveNext()")) then
+        failwith "expected MoveNext() on stack trace"
 
-        if stackTrace.Contains("End of stack trace from previous location") then
-           failwith "expected emit of CompilerGeneratedAttribute to suppress message in .NET Core stack walking "
+    if stackTrace.Contains("End of stack trace from previous location") then
+        failwith "expected emit of CompilerGeneratedAttribute to suppress message in .NET Core stack walking "
+    0
+"""
+        |> withOptimize
+        |> asExe
+        |> compileExeAndRun
+        |> shouldSucceed
 #endif
 
 
diff --git a/tests/fsharp/tests.fs b/tests/fsharp/tests.fs
index 330ffe93590..10a99ee04ab 100644
--- a/tests/fsharp/tests.fs
+++ b/tests/fsharp/tests.fs
@@ -128,12 +128,12 @@ module CoreTests =
 
 
     [<Fact>]
-    let ``state-machines-non-optimized`` () = 
+    let ``state-machines-optimized-no-tailcalls`` () =
         let cfg = testConfig "core/state-machines"
 
-        
 
-        fsc cfg "%s -o:test.exe -g --tailcalls- --optimize-" cfg.fsc_flags ["test.fsx"]
+
+        fsc cfg "%s -o:test.exe -g --tailcalls- --optimize+" cfg.fsc_flags ["test.fsx"]
 
         peverify cfg "test.exe"
 
