From e4fa7928f940ee580d3af58fefaeb2f651dc1472 Mon Sep 17 00:00:00 2001 From: svenbarth Date: Fri, 18 Mar 2016 14:24:55 +0000 Subject: [PATCH] Fix for Mantis #29527. i386/popt386.pas, PeepHoleOptPass1: * disable the call to RegLoadedWithNewValue() as that method isn't implemented for any of the x86 optimizers (but add a ToDo so that it isn't forgotten) git-svn-id: trunk@33273 - --- compiler/i386/popt386.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/i386/popt386.pas b/compiler/i386/popt386.pas index 653e94a6bc..22a6933e03 100644 --- a/compiler/i386/popt386.pas +++ b/compiler/i386/popt386.pas @@ -1422,8 +1422,10 @@ begin { reg2 must not be used after the sequence considered, so it must be either deallocated or loaded with a new value } (GetNextInstruction(hp2,hp3) and - (FindRegDealloc(getsupreg(taicpu(hp2).oper[0]^.reg),tai(hp3)) or - RegLoadedWithNewValue(getsupreg(taicpu(hp2).oper[0]^.reg), false, hp3))) then + (FindRegDealloc(getsupreg(taicpu(hp2).oper[0]^.reg),tai(hp3)) + { TODO: implement RegLoadedWithNewValue for i386, x86_64 and maybe also i8086 } + {or + RegLoadedWithNewValue(getsupreg(taicpu(hp2).oper[0]^.reg), false, hp3)})) then { change movsX/movzX reg/ref, reg2 } { add/sub/or/... reg3/$const, reg2 } { mov reg2 reg/ref }