Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: internal compiler error: not lowered: v94, Int64Make INT64 INT32 UINT32 #21517
go version devel +59413d34c9 Fri Aug 18 06:59:48 2017 +0000 linux/amd64
Checkout github.com/google/syzkaller on 172189e9551b768d48c6d5c038fbf3d5cd88aa8e, run:
The code is simply:
That line indication is misleading, it's not the
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...
…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 <email@example.com> Reviewed-by: Keith Randall <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com>