mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 11:50:17 +02:00
* improved (V)MOVA*(V)MOVA*2(V)MOVA* 2 optimization
git-svn-id: trunk@47079 -
This commit is contained in:
parent
a8b387a166
commit
f284a6eda9
@ -1429,7 +1429,6 @@ unit aoptx86;
|
||||
else if GetNextInstruction(p,hp1) then
|
||||
begin
|
||||
if MatchInstruction(hp1,[taicpu(p).opcode],[S_NO]) and
|
||||
MatchOpType(taicpu(hp1),top_reg,top_reg) and
|
||||
MatchOperand(taicpu(p).oper[1]^,taicpu(hp1).oper[0]^) then
|
||||
begin
|
||||
{ vmova* reg1,reg2
|
||||
@ -1439,7 +1438,8 @@ unit aoptx86;
|
||||
vmova* reg1,reg3 }
|
||||
TransferUsedRegs(TmpUsedRegs);
|
||||
UpdateUsedRegs(TmpUsedRegs, tai(p.next));
|
||||
if not(RegUsedAfterInstruction(taicpu(p).oper[1]^.reg,hp1,TmpUsedRegs)) then
|
||||
if MatchOpType(taicpu(hp1),top_reg,top_reg) and
|
||||
not(RegUsedAfterInstruction(taicpu(p).oper[1]^.reg,hp1,TmpUsedRegs)) then
|
||||
begin
|
||||
DebugMsg(SPeepholeOptimization + '(V)MOVA*(V)MOVA*2(V)MOVA* 1',p);
|
||||
taicpu(p).loadoper(1,taicpu(hp1).oper[1]^);
|
||||
@ -1448,11 +1448,14 @@ unit aoptx86;
|
||||
exit;
|
||||
end
|
||||
{ special case:
|
||||
vmova* reg1,reg2
|
||||
vmova* reg2,reg1
|
||||
vmova* reg1,<op>
|
||||
vmova* <op>,reg1
|
||||
=>
|
||||
vmova* reg1,reg2 }
|
||||
else if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) then
|
||||
vmova* reg1,<op> }
|
||||
else if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) and
|
||||
((taicpu(p).oper[0]^.typ<>top_ref) or
|
||||
(not(vol_read in taicpu(p).oper[0]^.ref^.volatility))
|
||||
) then
|
||||
begin
|
||||
DebugMsg(SPeepholeOptimization + '(V)MOVA*(V)MOVA*2(V)MOVA* 2',p);
|
||||
RemoveInstruction(hp1);
|
||||
|
Loading…
Reference in New Issue
Block a user