-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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: internal compiler error: not lowered: v94, Int64Make INT64 INT32 UINT32 #21517
Comments
That line indication is misleading, it's not the
Gives:
I can reproduce this with tip and with go1.9rc2. Not with go1.8.3 |
It is this code
that causes problem. Normally 64-bit div/mod is turned into runtime calls on 32-bit arch, but the front end leaves power-of-two constant division and hopes the SSA backend turns into a shift or AND. The SSA rule is
But isPowerOfTwo returns true only for possitive int64
In this case, however, c==1<<63, doesn't trigger the rule... |
Also reproducible with Go 1.9rc2, but not with Go 1.8. Mark as Go 1.9 issue. |
Change https://golang.org/cl/56890 mentions this issue: |
Change https://golang.org/cl/57070 mentions this issue: |
…od by constant 1<<63 Cherry-pick CL 56890. Normally 64-bit div/mod is turned into runtime calls on 32-bit arch, but the front end leaves power-of-two constant division and hopes the SSA backend turns into a shift or AND. The SSA rule is (Mod64u <t> n (Const64 [c])) && isPowerOfTwo(c) -> (And64 n (Const64 <t> [c-1])) But isPowerOfTwo returns true only for positive int64, which leaves out 1<<63 unhandled. Add a special case for 1<<63. Fixes #21517. Change-Id: Ic91f86fd5e035a8bb64b937c15cb1c38fec917d6 Reviewed-on: https://go-review.googlesource.com/57070 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
go version devel +59413d34c9 Fri Aug 18 06:59:48 2017 +0000 linux/amd64
Checkout github.com/google/syzkaller on 172189e9551b768d48c6d5c038fbf3d5cd88aa8e, run:
produces:
The code is simply:
The text was updated successfully, but these errors were encountered: