-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
math/big: ExampleFloat_Add test failure on s390x #18906
Comments
Interesting. I don't have s390x access, but please keep me posted and ask here if there are any questions I can answer. |
I've started poking a bit at this, but am unlikely to have answers tonight or tomorrow. A few notes as I poke around:
|
Reproduction code for the missing constant folding: package main
import "fmt"
func main() {
x := int8(-1)
fmt.Println(x)
} (This should also get optimized at the generic level, but it currently isn't.) |
CL https://golang.org/cl/36217 mentions this issue. |
CL 36217 adds some generic optimizations for code like this. S390x puzzle remains. I hope @billotosyr has more luck than I. If the above guess at a standalone reproducer doesn't do it, you could try: package main
import "fmt"
//go:noinline
func f() int8 { return -1 }
func main() { fmt.Println(f()) } If not, well, |
These rules trigger 116 times while running make.bash. And at least for the sample code at #18906 (comment) they are providing optimizations not already present in amd64. Updates #18906 Change-Id: I410a480f566f5ab176fc573fb5ac74f9cffec225 Reviewed-on: https://go-review.googlesource.com/36217 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Thanks for taking a look @josharian. This looks like a type propagation issue to me. The
v52 is turned into a The |
Actually,
|
CL https://golang.org/cl/36256 mentions this issue. |
CL https://golang.org/cl/36350 mentions this issue. |
…x SSA rules This CL fixes two issues: 1. Load ops were initially always lowered to unsigned loads, even for signed types. This was fine by itself however LoadReg ops (used to re-load spilled values) were lowered to signed loads for signed types. This meant that spills could invalidate optimizations that assumed the original unsigned load. 2. Types were not always being maintained correctly through rules designed to eliminate unnecessary zero and sign extensions. Updates #18906 and fixes #18958 (backport of CL 36256 to 1.8). Change-Id: Id44953b0f644cad047e8474edbd24e8a344ca9a7 Reviewed-on: https://go-review.googlesource.com/36350 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
These rules trigger 116 times while running make.bash. And at least for the sample code at golang/go#18906 (comment) they are providing optimizations not already present in amd64. Updates #18906 Change-Id: I410a480f566f5ab176fc573fb5ac74f9cffec225 Reviewed-on: https://go-review.googlesource.com/36217 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
The builder started failing when CL 35555 was merged (0358367). The failure looks like this:
I will investigate further tomorrow.
The text was updated successfully, but these errors were encountered: