Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: teach prove about min #30584

Open
josharian opened this Issue Mar 5, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@josharian
Copy link
Contributor

josharian commented Mar 5, 2019

package p

func f(x, y []int) {
	n := len(x)
	if len(y) < n {
		n = len(y)
	}
	for i := 0; i < n; i++ {
		_ = x[i]
		_ = y[i]
	}
}

Ideally there would be no bounds checks in the loop. Right now there are.

This grew out of a conversation in CL 164966.

cc @rasky @aclements @zdjones

@josharian josharian added this to the Unplanned milestone Mar 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.