Commit e26b7415 authored by Ken Thompson's avatar Ken Thompson

peep: fix optimization bug

R=r
CC=golang-dev
https://golang.org/cl/4105058
parent 2799e0ec
...@@ -366,7 +366,8 @@ subprop(Reg *r0) ...@@ -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) ...@@ -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;
......
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