Quellcode durchsuchen

* apply ShlOp2Shl optimization also to floating point operations

florian vor 3 Jahren
Ursprung
Commit
1a66cde35b
1 geänderte Dateien mit 5 neuen und 2 gelöschten Zeilen
  1. 5 2
      compiler/x86/aoptx86.pas

+ 5 - 2
compiler/x86/aoptx86.pas

@@ -6559,8 +6559,11 @@ unit aoptx86;
         if MatchOpType(taicpu(p), top_const, top_reg) and
         if MatchOpType(taicpu(p), top_const, top_reg) and
           (taicpu(p).oper[0]^.val in [1..3]) and
           (taicpu(p).oper[0]^.val in [1..3]) and
           GetNextInstruction(p, hp1) and
           GetNextInstruction(p, hp1) and
-          MatchInstruction(hp1,A_MOV,A_LEA,[]) and
-          MatchOpType(taicpu(hp1), top_ref, top_reg) and
+          ((MatchInstruction(hp1,A_MOV,A_LEA,[]) and
+           MatchOpType(taicpu(hp1), top_ref, top_reg)) or
+           (MatchInstruction(hp1,A_FST,A_FSTP,A_FLD,[]) and
+           MatchOpType(taicpu(hp1), top_ref))
+          ) and
           (taicpu(p).oper[1]^.reg=taicpu(hp1).oper[0]^.ref^.index) and
           (taicpu(p).oper[1]^.reg=taicpu(hp1).oper[0]^.ref^.index) and
           (taicpu(p).oper[1]^.reg<>taicpu(hp1).oper[0]^.ref^.base) and
           (taicpu(p).oper[1]^.reg<>taicpu(hp1).oper[0]^.ref^.base) and
           (taicpu(hp1).oper[0]^.ref^.scalefactor in [0,1]) then
           (taicpu(hp1).oper[0]^.ref^.scalefactor in [0,1]) then