From b4bf371b34b19d4505b8a330a1b9250047a4b8ca Mon Sep 17 00:00:00 2001
From: florian <florian@freepascal.org>
Date: Fri, 8 Oct 2021 22:58:41 +0200
Subject: [PATCH]   * generate VMOVAPS for (V)Cvtss2CvtSd(V)Cvtsd2ss
 optimization, resolves #39360

---
 compiler/x86/aoptx86.pas | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/x86/aoptx86.pas b/compiler/x86/aoptx86.pas
index 6e73308aa4..962335e757 100644
--- a/compiler/x86/aoptx86.pas
+++ b/compiler/x86/aoptx86.pas
@@ -5886,10 +5886,10 @@ unit aoptx86;
              end
            else
              begin
-               DebugMsg(SPeepholeOptimization + '(V)Cvtss2CvtSd(V)Cvtsd2ss2Vmovss done',p);
+               DebugMsg(SPeepholeOptimization + '(V)Cvtss2CvtSd(V)Cvtsd2ss2Vmovaps done',p);
                taicpu(p).loadreg(1,taicpu(hp1).oper[2]^.reg);
                taicpu(p).ops:=2;
-               taicpu(p).opcode:=A_VMOVSS;
+               taicpu(p).opcode:=A_VMOVAPS;
                RemoveInstruction(hp1);
              end;
            Result:=true;