mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:28:05 +02:00
* do not switch around node subtrees if they have different resultdefs, e.g.
because a subtree has been optimized for a 32x32->64 multiplication (so some subtrees have a 32 bit resultdef and others a 64 bit resultdef) git-svn-id: trunk@30033 -
This commit is contained in:
parent
ada5060a34
commit
86bde57b0f
@ -317,7 +317,13 @@ unit optcse;
|
||||
{ for sets, we can do this always }
|
||||
(is_set(n.resultdef))
|
||||
) then
|
||||
while n.nodetype=tbinarynode(n).left.nodetype do
|
||||
while (n.nodetype=tbinarynode(n).left.nodetype) and
|
||||
{ the resulttypes of the operands we'll swap must be equal,
|
||||
required in case of a 32x32->64 multiplication, then we
|
||||
cannot swap out one of the 32 bit operands for a 64 bit one
|
||||
}
|
||||
(tbinarynode(tbinarynode(n).left).left.resultdef=tbinarynode(n).left.resultdef) and
|
||||
(tbinarynode(n).left.resultdef=tbinarynode(n).right.resultdef) do
|
||||
begin
|
||||
csedomain:=true;
|
||||
foreachnodestatic(pm_postprocess,tbinarynode(n).right,@searchsubdomain,@csedomain);
|
||||
|
Loading…
Reference in New Issue
Block a user