Incorrect code generated with Swift 6.2, whereas 6.1.2 refuses to compile due to "broken module found"

I’ve written up the issue in detail here: Program utilizing variadic generics crashes at runtime with a double-free · Issue #83659 · swiftlang/swift · GitHub

To summarize, I’m having some issues with a module I’m working on that makes generous use of variadic generics. With Swift 6.2, this seems to result in either a double-free or an attempt to free invalid memory. With Swift 6.1.2, the compiler crashes during compilation with the somewhat scary error message:

PHI node entries do not match predecessors!
  %171 = phi i64 [ 0, %167 ], [ %262, %173 ], !dbg !192
label %173
label %249
Instruction does not dominate all uses!
  %262 = add i64 %171, 1, !dbg !192
  %171 = phi i64 [ 0, %167 ], [ %262, %173 ], !dbg !192
Instruction does not dominate all uses!
  %222 = call ptr @llvm.stacksave.p0(), !dbg !192
  call void @llvm.stackrestore.p0(ptr %222), !dbg !264
Instruction does not dominate all uses!
  %184 = call ptr @llvm.stacksave.p0(), !dbg !192
  call void @llvm.stackrestore.p0(ptr %184), !dbg !264
Instruction does not dominate all uses!
  %126 = call ptr @llvm.stacksave.p0(), !dbg !190
  call void @llvm.stackrestore.p0(ptr %126), !dbg !264
Instruction does not dominate all uses!
  %88 = call ptr @llvm.stacksave.p0(), !dbg !190
  call void @llvm.stackrestore.p0(ptr %88), !dbg !264
<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<unknown>:0: note: Broken module found, compilation aborted!

Has anyone run into something similar, and maybe can provide clues to the root issue or suggest a workaround?