* x86: Added the "test $-1,%reg" condition to the MovAndTest2Test optimization.

This commit is contained in:
Yuriy Sydorov 2021-08-09 23:49:58 +03:00
parent c0d57d03c2
commit 10acbca828

View File

@ -2487,7 +2487,8 @@ unit aoptx86;
GetNextInstruction(hp1,hp2) and
MatchInstruction(hp2,A_TEST,[taicpu(p).opsize]) and
MatchOperand(taicpu(hp1).oper[1]^,taicpu(hp2).oper[1]^) and
MatchOperand(taicpu(hp2).oper[0]^,taicpu(hp2).oper[1]^) and
(MatchOperand(taicpu(hp2).oper[0]^,taicpu(hp2).oper[1]^) or
MatchOperand(taicpu(hp2).oper[0]^,-1)) and
GetNextInstruction(hp2,hp3) and
MatchInstruction(hp3,A_Jcc,A_Setcc,[]) and
(taicpu(hp3).condition in [C_E,C_NE]) then