aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/check.go
diff options
context:
space:
mode:
authorfanzha02 <fannie.zhang@arm.com>2020-08-27 17:34:59 +0800
committerKeith Randall <khr@golang.org>2020-09-03 14:45:27 +0000
commitae658cb19a265f3f4694cd4aec508b4565bda6aa (patch)
tree8c6fdaa2dd0938cb4d0e89e83013031c85f572f9 /src/cmd/compile/internal/ssa/check.go
parenta538b59fd2428ba4d13f296d7483febf2fc05f97 (diff)
downloadgo-ae658cb19a265f3f4694cd4aec508b4565bda6aa.tar.gz
go-ae658cb19a265f3f4694cd4aec508b4565bda6aa.zip
cmd/compile: store the comparison pseudo-ops of arm64 conditional instructions in AuxInt
The current implementation stores the comparison pseudo-ops of arm64 conditional instructions (CSEL/CSEL0) in Aux, this patch modifies it and stores it in AuxInt, which can avoid the allocation. Change-Id: I0b69e51f63acd84c6878c6a59ccf6417501a8cfc Reviewed-on: https://go-review.googlesource.com/c/go/+/252517 Run-TryBot: fannie zhang <Fannie.Zhang@arm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/check.go')
-rw-r--r--src/cmd/compile/internal/ssa/check.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/ssa/check.go b/src/cmd/compile/internal/ssa/check.go
index 98e1b79334..828f645b39 100644
--- a/src/cmd/compile/internal/ssa/check.go
+++ b/src/cmd/compile/internal/ssa/check.go
@@ -171,10 +171,10 @@ func checkFunc(f *Func) {
canHaveAuxInt = true
canHaveAux = true
case auxCCop:
- if _, ok := v.Aux.(Op); !ok {
- f.Fatalf("bad type %T for CCop in %v", v.Aux, v)
+ if opcodeTable[Op(v.AuxInt)].name == "OpInvalid" {
+ f.Fatalf("value %v has an AuxInt value that is a valid opcode", v)
}
- canHaveAux = true
+ canHaveAuxInt = true
case auxS390XCCMask:
if _, ok := v.Aux.(s390x.CCMask); !ok {
f.Fatalf("bad type %T for S390XCCMask in %v", v.Aux, v)