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: constant division optimization is disabled on arm64 #15382

Closed
zhongweiy opened this issue Apr 20, 2016 · 1 comment
Closed

cmd/compile: constant division optimization is disabled on arm64 #15382

zhongweiy opened this issue Apr 20, 2016 · 1 comment

Comments

@zhongweiy
Copy link
Contributor

  1. What version of Go are you using (go version)?
    go version devel +2c84188 Wed Apr 20 15:36:09 2016 +0800 linux/arm64
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="arm64" GOBIN="" GOEXE="" GOHOSTARCH="arm64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/zw/go" GORACE="" GOROOT="/home/zw/project/go" GOTOOLDIR="/home/zw/project/go/pkg/tool/linux_arm64" CC="gcc" GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build288440353=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1"
  3. What did you do?
    do constant division like:
    func divint64n(x int64) int64 { return x / 7 }

compile above code and dump it on arm64 linux.

  1. What did you expect to see?
    dumped code should not call div instruction for constant division.
  2. What did you see instead?
    dumped code calls div instruction for constant division.
@gopherbot
Copy link

CL https://golang.org/cl/22292 mentions this issue.

@golang golang locked and limited conversation to collaborators Apr 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants