Commit 793e4ec3 authored by Cherry Zhang's avatar Cherry Zhang

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: default avatarKeith Randall <khr@golang.org>
parent f37ee0f3
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment