diff options
author | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-08-08 21:21:45 +0000 |
---|---|---|
committer | florian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2012-08-08 21:21:45 +0000 |
commit | 37d47dbff0d09fb28453a194d77502b3ee853552 (patch) | |
tree | 9f2116f35dee1d36729165bbf2e460f23a650ab0 /compiler/optcse.pas | |
parent | 82d192e733f16c90334ad9c78efb0d00a66dea74 (diff) | |
download | fpc-37d47dbff0d09fb28453a194d77502b3ee853552.tar.gz |
* 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: http://svn.freepascal.org/svn/fpc/trunk@22041 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler/optcse.pas')
-rw-r--r-- | compiler/optcse.pas | 5 |
1 files 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 } |