From 2a44ffe51bf56f86ad3043e9f578e268b860e4dc Mon Sep 17 00:00:00 2001 From: "J. Gareth \"Curious Kit\" Moreton" Date: Thu, 24 Nov 2022 21:30:03 +0000 Subject: [PATCH] * x86: BZHI optimisation now sets the subtract and shift nodes to 'do not execute' as they are skipped over. --- compiler/x86/nx86add.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/x86/nx86add.pas b/compiler/x86/nx86add.pas index 364be7c00f..de1a22c929 100644 --- a/compiler/x86/nx86add.pas +++ b/compiler/x86/nx86add.pas @@ -2051,6 +2051,8 @@ unit nx86add; secondpass(left); { Skip the subtract and shift nodes completely } + Include(right.flags, nf_do_not_execute); + Include(taddnode(right).left.flags, nf_do_not_execute); { Helps avoid all the awkward typecasts } indexnode := tshlshrnode(taddnode(right).left).right;