]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: rewrite cmov(x, x, cond) into x
authorJorropo <jorropo.pgm@gmail.com>
Sat, 26 Jul 2025 01:36:15 +0000 (03:36 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 28 Jul 2025 18:06:07 +0000 (11:06 -0700)
commit94645d241320fe0617a4f158a4e1b64a643bb10f
tree32e92cd7df7f8205f0308ee19dcbb2ec787b50e0
parent10c5cf68d40e2b26336e4b4e59d4c2f3fc3f03b9
cmd/compile: rewrite cmov(x, x, cond) into x

I don't think branchelim will intentionally generate theses.
But at the time where branchelim is generating them they might different,
and through opt process they become the same value.

Change-Id: I4a19f1db14c08057b7e782a098f4c18ca36ab7fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/690519
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Mark Freeman <mark@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/_gen/generic.rules
src/cmd/compile/internal/ssa/rewritegeneric.go