cmd/compile/internal/amd64: add SETccmem

Combine setcc and store of result into setcc that writes directly to memory.
Triggers 200+ times in go tool.

Fixes #21630

Change-Id: Iafa22607426f4120140c88fae4b9aecb46e0bba8
Reviewed-on: https://go-review.googlesource.com/67950
Run-TryBot: Ilya Tocar <ilya.tocar@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Ilya Tocar 2017-10-03 14:12:00 -05:00
parent 91121ff704
commit 6b8a3c8889
6 changed files with 1324 additions and 2 deletions

View file

@ -1120,6 +1120,14 @@ var linuxAMD64Tests = []*asmTest{
`,
pos: []string{"\tMOVL\t[^X].*, X.*"},
},
{
fn: `
func $(x uint32) bool {
return x > 4
}
`,
pos: []string{"\tSETHI\t\\("},
},
}
var linux386Tests = []*asmTest{