     m.doSomething()
 }
 
+// CHECK-LABEL: define swiftcc void @"$s21move_function_dbginfo15copyableArgTestyyAA5KlassCnF"(%T21move_function_dbginfo5KlassC* %0)
+//
+// In contrast, we should have a dbg.declare for m since we aren't
+// CHECK: call void @llvm.dbg.declare(metadata {{.*}}** %m.debug, metadata ![[M_COPYABLE_VALUE_TEST:[0-9]*]],
+//
+// We should have a llvm.dbg.addr for k since we moved it.
+// CHECK: call void @llvm.dbg.addr(metadata {{.*}}** %k.debug, metadata ![[K_COPYABLE_VALUE_METADATA:[0-9]*]], metadata !DIExpression()), !dbg ![[ADDR_LOC:[0-9]*]]
+// CHECK-NEXT: br
+//
+// Our undef should be an llvm.dbg.value. Counter-intuitively this works for
+// both llvm.dbg.addr /and/ llvm.dbg.value. Importantly though its metadata
+// should be for k since that is the variable that we are telling the debugger
+// is no longer defined.
+// CHECK: call void @llvm.dbg.value(metadata %T21move_function_dbginfo5KlassC* undef, metadata ![[K_COPYABLE_VALUE_METADATA]], metadata !DIExpression()), !dbg ![[ADDR_LOC]]
+// CHECK-NOT: br label
+//
+// CHECK: ret void
+// CHECK-NEXT: }
+//
+// DWARF: DW_AT_linkage_name{{.*}}("$s3out15copyableArgTestyyAA5KlassCnF")
+// DWARF-NEXT: DW_AT_name ("copyableArgTest")
+// DWARF-NEXT: DW_AT_decl_file
+// DWARF-NEXT: DW_AT_decl_line
+// DWARF-NEXT: DW_AT_type
+// DWARF-NEXT: DW_AT_external	(true)
+//
+// DWARF: DW_TAG_formal_parameter
+// DWARF-NEXT: DW_AT_location	(0x{{[a-z0-9]+}}:
+// DWARF-NEXT:    [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
+// DWARF-NEXT: DW_AT_name	("k")
+// DWARF-NEXT: DW_AT_decl_file	(
+// DWARF-NEXT: DW_AT_decl_line	(
+// DWARF-NEXT: DW_AT_type	(
+//
+// DWARF: DW_TAG_variable
+// DWARF-NEXT: DW_AT_location	(DW_OP_fbreg
+// DWARF-NEXT: DW_AT_name	("m")
+// DWARF-NEXT: DW_AT_decl_file	(
+// DWARF-NEXT: DW_AT_decl_line	(
+// DWARF-NEXT: DW_AT_type	(
+public func copyableArgTest(_ k: __owned Klass) {
+    k.doSomething()
+    let m = _move(k)
+    m.doSomething()
+}
+
 // CHECK-LABEL: define swiftcc void @"$s21move_function_dbginfo15copyableVarTestyyF"()
 // CHECK: call void @llvm.dbg.declare(metadata %T21move_function_dbginfo5KlassC** %m.debug,
 // CHECK: call void @llvm.dbg.addr(metadata %T21move_function_dbginfo5KlassC** [[VAR:%.*]], metadata ![[K_COPYABLE_VAR_METADATA:[0-9]+]], metadata !DIExpression()), !dbg ![[ADDR_LOC:[0-9]*]]

    k.doSomething()
}

// CHECK-LABEL: define swiftcc void @"$s21move_function_dbginfo037addressOnlyVarTestCCFlowReinitInBlockG0yyxmAA1PRzlF"(
// CHECK: entry:
// CHECK: call void @llvm.dbg.addr(metadata %T21move_function_dbginfo1PP* [[VAR:%.*]], metadata ![[K_ADDRESSONLY_VAR_CCFLOW_REINIT_IN_BLOCK_METADATA:[0-9]+]], metadata !DIExpression()), !dbg ![[ADDR_LOC:[0-9]*]]

    m.doSomething()
}

// CHECK-LABEL: define swiftcc void @"$s21move_function_dbginfo23addressOnlyValueArgTestyyxnAA1PRzlF"(
// CHECK: @llvm.dbg.declare(metadata %swift.type** %T1,
// CHECK: @llvm.dbg.declare(metadata i8** %m.debug,
// CHECK: @llvm.dbg.addr(metadata %swift.opaque** %k.debug, metadata ![[K_ADDR_LET_METADATA:[0-9]+]], metadata !DIExpression(DW_OP_deref)), !dbg ![[ADDR_LOC:[0-9]*]]
// CHECK-NEXT: br
// CHECK: @llvm.dbg.value(metadata %swift.opaque* undef, metadata ![[K_ADDR_LET_METADATA]], metadata !DIExpression(DW_OP_deref)), !dbg ![[ADDR_LOC]]
// CHECK: ret void
// CHECK-NEXT: }
//
// DWARF: DW_AT_linkage_name   ("$s3out23addressOnlyValueArgTestyyxnAA1PRzlF")
// DWARF-NEXT: DW_AT_name      ("addressOnlyValueArgTest")
// DWARF-NEXT: DW_AT_decl_file (
// DWARF-NEXT: DW_AT_decl_line (
// DWARF-NEXT: DW_AT_type      (
// DWARF-NEXT: DW_AT_external  (
//
// DWARF: DW_TAG_formal_parameter
// DWARF-NEXT: DW_AT_location  (0x{{[a-z0-9]+}}:
// DWARF-NEXT:    [0x{{[a-z0-9]+}}, 0x{{[a-z0-9]+}}):
// DWARF-NEXT: DW_AT_name      ("k")
// DWARF-NEXT: DW_AT_decl_file (
// DWARF-NEXT: DW_AT_decl_line (
// DWARF-NEXT: DW_AT_type      (
//
// DWARF: DW_TAG_variable
// DWARF-NEXT: DW_AT_location  (
// DWARF-NEXT: DW_AT_name      ("$\317\204_0_0")
// DWARF-NEXT: DW_AT_type      (
// DWARF-NEXT: DW_AT_artificial        (true)
//
// DWARF: DW_TAG_variable
// DWARF-NEXT: DW_AT_location  (
// DWARF-NEXT: DW_AT_name      ("m")
// DWARF-NEXT: DW_AT_decl_file (
// DWARF-NEXT: DW_AT_decl_line (
// DWARF-NEXT: DW_AT_type      (
public func addressOnlyValueArgTest<T : P>(_ k: __owned T) {
    k.doSomething()
    let m = _move(k)
    m.doSomething()
}

// CHECK-LABEL: define swiftcc void @"$s21move_function_dbginfo18addressOnlyVarTestyyxAA1PRzlF"(%swift.opaque* noalias nocapture %0, %swift.type* %T, i8** %T.P)
// CHECK: @llvm.dbg.declare(metadata %swift.type** %T1,
// CHECK: @llvm.dbg.declare(metadata %swift.opaque** %x.debug,
