mesa: add missing size check for assignment optimization

(cherry picked from commit aa40de5c6f)
This commit is contained in:
Brian Paul 2008-11-26 09:35:08 -07:00 committed by Brian Paul
parent 96cab36e2e
commit e42ed1ed0b

View file

@ -1321,7 +1321,8 @@ emit_copy(slang_emit_info *emitInfo, slang_ir_node *n)
_slang_is_temp(emitInfo->vt, n->Children[1]->Store) &&
(inst->DstReg.File == n->Children[1]->Store->File) &&
(inst->DstReg.Index == n->Children[1]->Store->Index) &&
!n->Children[0]->Store->IsIndirect) {
!n->Children[0]->Store->IsIndirect &&
n->Children[0]->Store->Size <= 4) {
/* Peephole optimization:
* The Right-Hand-Side has its results in a temporary place.
* Modify the RHS (and the prev instruction) to store its results