]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: don't generate commutative rules for (Op x x)
authorJosh Bleecher Snyder <josharian@gmail.com>
Mon, 6 Jan 2020 21:15:49 +0000 (13:15 -0800)
committerJosh Bleecher Snyder <josharian@gmail.com>
Thu, 20 Feb 2020 04:51:33 +0000 (04:51 +0000)
commita63ed10d448d96d2f580e229ed46c02b5cd7a1a4
tree10e511cec75e9bb85ef02c7a2e28a8c89c516ac4
parent715e8bbe636ae9aa7365ff8415dcbf1b5f57b009
cmd/compile: don't generate commutative rules for (Op x x)

If the two commutative arguments are perfectly identical,
then swapping them will never have an effect.

Passes toolstash-check for the relevant architectures,
that is, linux-386, linux-386-387, linux-amd64, linux-s390x.

Change-Id: I19f91644867d8d174bd01f872abe4809013872ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/213698
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/gen/rulegen.go
src/cmd/compile/internal/ssa/rewrite386.go
src/cmd/compile/internal/ssa/rewriteAMD64.go
src/cmd/compile/internal/ssa/rewriteS390X.go