mirror of https://github.com/golang/go.git
cmd/compile: fix MIPS Zero lower rule
A copy-paste error in CL 38150. Fix build. Change-Id: Ib2afc83564ebe7dab934d45522803e1a191dea18 Reviewed-on: https://go-review.googlesource.com/38292 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
parent
f37ee0f33b
commit
793e4ec3dd
|
|
@ -311,7 +311,7 @@
|
|||
|
||||
// large or unaligned zeroing uses a loop
|
||||
(Zero [s] {t} ptr mem)
|
||||
&& (s > 16 || s%4 != 0) ->
|
||||
&& (s > 16 || t.(Type).Alignment()%4 != 0) ->
|
||||
(LoweredZero [t.(Type).Alignment()]
|
||||
ptr
|
||||
(ADDconst <ptr.Type> ptr [s-moveSize(t.(Type).Alignment(), config)])
|
||||
|
|
|
|||
|
|
@ -8926,14 +8926,14 @@ func rewriteValueMIPS_OpZero(v *Value, config *Config) bool {
|
|||
return true
|
||||
}
|
||||
// match: (Zero [s] {t} ptr mem)
|
||||
// cond: (s > 16 || s%4 != 0)
|
||||
// cond: (s > 16 || t.(Type).Alignment()%4 != 0)
|
||||
// result: (LoweredZero [t.(Type).Alignment()] ptr (ADDconst <ptr.Type> ptr [s-moveSize(t.(Type).Alignment(), config)]) mem)
|
||||
for {
|
||||
s := v.AuxInt
|
||||
t := v.Aux
|
||||
ptr := v.Args[0]
|
||||
mem := v.Args[1]
|
||||
if !(s > 16 || s%4 != 0) {
|
||||
if !(s > 16 || t.(Type).Alignment()%4 != 0) {
|
||||
break
|
||||
}
|
||||
v.reset(OpMIPSLoweredZero)
|
||||
|
|
|
|||
Loading…
Reference in New Issue