* Don't widen boolean operands of taddnode if they will be converted to pasbool8 immediately thereafter, doing so only causes generation of useless code. Mantis #20843.

git-svn-id: trunk@20376 -
This commit is contained in:
sergei 2012-02-19 18:49:50 +00:00
parent f8f5c3cd23
commit eda5511ef9

View File

@ -1206,9 +1206,15 @@ implementation
end;
end;
{ 2 booleans? Make them equal to the largest boolean }
{ 2 booleans? }
if (is_boolean(ld) and is_boolean(rd)) then
begin
case nodetype of
xorn,
andn,
orn:
begin
{ Make sides equal to the largest boolean }
if (torddef(left.resultdef).size>torddef(right.resultdef).size) or
(is_cbool(left.resultdef) and not is_cbool(right.resultdef)) then
begin
@ -1223,11 +1229,6 @@ implementation
ttypeconvnode(left).convtype:=tc_bool_2_bool;
typecheckpass(left);
end;
case nodetype of
xorn,
andn,
orn:
begin
end;
ltn,
lten,