It will try to do this, but certainly unable to do this for all cases, such as
func foo(constFunc func(*[100000]int)) {
for a, i := [100000]int{}, 0; i < len(a); i++ {
constFunc(&a)
}
}
in which, the big array a will be duplicated at each step.
Performance downgrade is just one problem, the most serious problem is it will break some code, such as https://gotipplay.golang.org/p/srBxORL4bm__b. The code outputs differently with 1.22 and 1.22-.