Browse Source

Use faster check for type of tai object

Pierre Muller 1 year ago
parent
commit
81157e9846
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/x86/aoptx86.pas

+ 1 - 1
compiler/x86/aoptx86.pas

@@ -4535,7 +4535,7 @@ unit aoptx86;
                       end
                       end
                     else if (taicpu(hp2).oper[0]^.typ = top_ref) and
                     else if (taicpu(hp2).oper[0]^.typ = top_ref) and
                       GetNextInstruction(hp2, hp4) and
                       GetNextInstruction(hp2, hp4) and
-                      (hp4 is taicpu) and (taicpu(hp4).opcode = A_MOV) then
+                      (hp4.typ = ait_instruction) and (taicpu(hp4).opcode = A_MOV) then
                       { Optimise the following first:
                       { Optimise the following first:
                           movl [mem1],reg1
                           movl [mem1],reg1
                           movl [mem1],reg2
                           movl [mem1],reg2