mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 06:54:05 +02:00
* 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:
parent
f8f5c3cd23
commit
eda5511ef9
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user