mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
Optimize away unneeded floating-point conversions after loads.
This commit is contained in:
parent
031af54112
commit
c95d8d9f9b
5
DAG.pas
5
DAG.pas
@ -1430,6 +1430,11 @@ case op^.opcode of {check for optimizations of this node}
|
|||||||
op^.left^.optype := totype.optype;
|
op^.left^.optype := totype.optype;
|
||||||
opv := op^.left;
|
opv := op^.left;
|
||||||
end; {if}
|
end; {if}
|
||||||
|
if totype.optype in [cgReal,cgDouble,cgExtended,cgComp] then
|
||||||
|
if (totype.optype = op^.left^.optype) or
|
||||||
|
(totype.optype = cgExtended) or
|
||||||
|
((totype.optype = cgDouble) and (op^.left^.optype = cgReal)) then
|
||||||
|
opv := op^.left;
|
||||||
end {else if}
|
end {else if}
|
||||||
else if op^.q in [$40,$41,$50,$51] then begin
|
else if op^.q in [$40,$41,$50,$51] then begin
|
||||||
{any long type to byte type}
|
{any long type to byte type}
|
||||||
|
Loading…
Reference in New Issue
Block a user