6c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, r
eleminate MOVLQXZ instructions after MOVL as MOVL implicitely zero extends the result.
This commit is contained in:
parent
972cd5e3fc
commit
f5f9ecdcfa
1 changed files with 15 additions and 2 deletions
|
@ -100,15 +100,28 @@ loop1:
|
|||
case AMOVQ:
|
||||
case AMOVSS:
|
||||
case AMOVSD:
|
||||
if(regtyp(&p->to))
|
||||
if(!regtyp(&p->to))
|
||||
break;
|
||||
if(regtyp(&p->from)) {
|
||||
if(copyprop(r)) {
|
||||
excise(r);
|
||||
t++;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
if(subprop(r) && copyprop(r)) {
|
||||
excise(r);
|
||||
t++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(p->as != AMOVL)
|
||||
break;
|
||||
r1 = rnops(uniqs(r));
|
||||
if(r1 != R){
|
||||
p1 = r1->prog;
|
||||
if(p1->as == AMOVLQZX && p1->from.type == p->to.type && p1->to.type == p->to.type){
|
||||
excise(r1);
|
||||
t++;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue