Remove ValueParamPattern case from deduction (#6869)

This case is redundant: when deducing against a runtime parameter
pattern, the type is all that matters, and the type is added to the
deduction earlier. Additionally deducing the same argument against
parameter's subpattern just creates duplicate work, because the
subpattern has the same type.
This commit is contained in:
Geoff Romer
2026-03-10 21:15:38 +00:00
committed by GitHub
parent 6304df1db9
commit ba6257891e
28 changed files with 539 additions and 744 deletions
@@ -68,10 +68,10 @@ fn M() -> i32 {
// CHECK:STDOUT: ; Function Attrs: nounwind
// CHECK:STDOUT: define linkonce_odr i32 @_CG.Main.bfb441135f07cbe1(i32 %x) #0 !dbg !23 {
// CHECK:STDOUT: entry:
// CHECK:STDOUT: %.loc25_6.3.temp = alloca i32, align 4, !dbg !28
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.3.temp), !dbg !28
// CHECK:STDOUT: %.loc25_6.2.temp = alloca i32, align 4, !dbg !28
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc25_6.2.temp), !dbg !28
// CHECK:STDOUT: %H.call = call i32 @_CH.Main.64ccbb8e5d9a0b8e(i32 %x), !dbg !28
// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.3.temp, align 4, !dbg !28
// CHECK:STDOUT: store i32 %H.call, ptr %.loc25_6.2.temp, align 4, !dbg !28
// CHECK:STDOUT: call void @_CF.Main.b88d1103f417c6d4(i32 %x), !dbg !29
// CHECK:STDOUT: ret i32 %x, !dbg !30
// CHECK:STDOUT: }