cmd/compile: support unsigned induction variables - #81194
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
19acffb to
5fc704b
Compare
|
This PR (HEAD: 5fc704b) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/823764. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/823764. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be During May-July and Nov-Jan the Go project is in a code freeze, during which Please don’t reply on this GitHub thread. Visit golang.org/cl/823764. |
|
Message from Jorropo: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/823764. |
This change adds unsigned induction-variable matching to the SSA prove pass.
The compiler now recognizes unsigned Less/Leq loop conditions, tracks the induction variable in the unsigned domain, and checks unsigned wraparound using the actual SSA type width. Unsigned induction variables no longer reach the signed-only downward loop inversion path, so they are conservatively skipped there instead of panicking.
Tests cover unsigned BCE loops with steps 1 and 2, plus ascending and descending unsigned loops in the prove diagnostics.
Fixes #65918
Tests: