소스 검색

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

Yuriy Sydorov 4 년 전
부모
커밋
10acbca828
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      compiler/x86/aoptx86.pas

+ 2 - 1
compiler/x86/aoptx86.pas

@@ -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