Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: internal compiler error: "schedule does not include all values in block" on linux-s390x-ibm #38356
See also #37246.
Steps to reproduce (I used the compiler at revision 83bfe3b and perf at revision 9c9101da83):
git clone https://go.googlesource.com/perf cd perf/internal/stats GOOS=linux GOARCH=s390x go test -c
I printed a bit more information. The scheduler seems to assume the
Floating point ops generating flags was added in CL 209160. I think the oversight in that CL is that the new rules do not force the
The solution is probably to replace these rules with:
Alternatively we could use
Thank you for looking into this issue.
I am able to reproduce it as well.
It looks like so. FWIW, I have tested the CL you sent and can confirm it fixes the problem.
The scheduler assumes two special invariants that apply to tuple selectors (Select0 and Select1 ops): 1. There is only one tuple selector of each type per generator. 2. Tuple selectors and generators reside in the same block. Prior to this CL the assumption was that these invariants would only be broken by the CSE pass. The CSE pass therefore contained code to move and de-duplicate selectors to fix these invariants. However it is also possible to write relatively basic optimization rules that cause these invariants to be broken. For example: (A (Select0 (B))) -> (Select1 (B)) This rule could result in the newly added selector (Select1) being in a different block to the tuple generator (see issue #38356). It could also result in duplicate selectors if this rule matches multiple times for the same tuple generator (see issue #39472). The CSE pass will 'fix' these invariants. However it will only do so when optimizations are enabled (since disabling optimizations disables the CSE pass). This CL moves the CSE tuple selector fixup code into its own pass and makes it mandatory even when optimizations are disabled. This allows tuple selectors to be treated like normal ops for most of the compilation pipeline until after the new pass has run, at which point we need to be careful to maintain the invariant again. Fixes #39472. Change-Id: Ia3f79e09d9c65ac95f897ce37e967ee1258a080b Reviewed-on: https://go-review.googlesource.com/c/go/+/237118 Run-TryBot: Michael Munday <firstname.lastname@example.org> TryBot-Result: Gobot Gobot <email@example.com> Reviewed-by: Keith Randall <firstname.lastname@example.org>