1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:44:40 -07:00

peep: fix optimization bug

R=r
CC=golang-dev
https://golang.org/cl/4105058
This commit is contained in:
Ken Thompson 2011-02-07 17:21:04 -08:00
parent 2799e0ecb9
commit e26b741523

View File

@ -366,7 +366,8 @@ subprop(Reg *r0)
case ADIVD: case ADIVD:
case ADIVF: case ADIVF:
if(p->to.type == v1->type) if(p->to.type == v1->type)
if(p->to.reg == v1->reg) { if(p->to.reg == v1->reg)
if(p->scond == 0) {
if(p->reg == NREG) if(p->reg == NREG)
p->reg = p->to.reg; p->reg = p->to.reg;
goto gotit; goto gotit;
@ -378,6 +379,7 @@ subprop(Reg *r0)
case AMOVW: case AMOVW:
if(p->to.type == v1->type) if(p->to.type == v1->type)
if(p->to.reg == v1->reg) if(p->to.reg == v1->reg)
if(p->scond == 0)
goto gotit; goto gotit;
break; break;