cmd/compile: match Aux/AuxInt more strictly in rewriting rules #44824
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Currently, in a rewriting rule, on the LHS if a value's Aux or AuxInt is not specified, it is ignored by the rule matcher. This is error-prone. One example is a rule introduced in CL https://go-review.googlesource.com/c/go/+/280456, where the ignored Aux/AuxInt causes miscompilation (#44823).
To make it less error-prone, maybe we want the rule matcher to require Aux/AuxInt to be always specified on the LHS (using _ to explicitly ignore)? Or maybe we want it to match the zero value if not specified?
Discussion from CL https://go-review.googlesource.com/c/go/+/299289:
@randall77 :
@josharian :
The text was updated successfully, but these errors were encountered: