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: unnecessary compares following FP instructions in ppc64le #17507
Comments
Here is the output when GOSSAFUNC is set: The GT case:
The NE case:
|
Found these lines commented out in the PPC64.rules so I changed them: -// (NE (CMPWconst [0](FLessThan cc)) yes no) -> (FLT cc yes no) That seemed to fix the case I show above but in this function I see some of this: b15: <- b13 v18 05850 (/home/boger/golang/base/go/src/math/mod.go:24) FCMPU F3, F3 |
We need to be sure that's an actual optimizer glitch, and not code that is checking that either operand is a NaN. And guess what:
I assigned myself the bug, if you want to do the uncommenting CL that works too. |
CL https://golang.org/cl/31612 mentions this issue. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?tip
What operating system and processor architecture are you using (
go env
)?Ubuntu 16.04
What did you do?
Looking for performance improvements to the function math.mod when run as part of the math package testcase (math.test).
What did you see instead?
I'm seeing some unusual and unnecessary compare type instructions that are following floating point compare instructions when the compare is gt or lt. The eq and ne appear good.
I'm seeing code like this:
Should be just bgt or blt after the fcmpu.
If the compare following the fcmpu is beq or bne then it avoids the isel like this:
The text was updated successfully, but these errors were encountered: