From 03071709a940f30a6a231732f0966b7a446b8447 Mon Sep 17 00:00:00 2001 From: florian Date: Wed, 8 Aug 2012 21:21:45 +0000 Subject: [PATCH] * the transformation (a or/and b) or/and c into a or/and (b or/and c) can be applied for booleans as well git-svn-id: trunk@22041 - --- compiler/optcse.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/compiler/optcse.pas b/compiler/optcse.pas index 39d5286a12..8512ab1bc3 100644 --- a/compiler/optcse.pas +++ b/compiler/optcse.pas @@ -251,8 +251,9 @@ unit optcse; } if (n.nodetype in [andn,orn,addn,muln]) and (n.nodetype=tbinarynode(n).left.nodetype) and - { do is optimizations only for integers, reals (no currency!), vectors and sets } - (is_integer(n.resultdef) or is_real(n.resultdef) or is_vector(n.resultdef) or is_set(n.resultdef)) and + { do is optimizations only for integers, reals (no currency!), vectors, sets or booleans } + (is_integer(n.resultdef) or is_real(n.resultdef) or is_vector(n.resultdef) or is_set(n.resultdef) or + is_boolean(n.resultdef)) and { either if fastmath is on } ((cs_opt_fastmath in current_settings.optimizerswitches) or { or for the logical operators, they cannot overflow }