mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2025-01-21 21:32:00 +00:00
Disable an invalid optimization that would suppress stores of address values when they appeared to the left of the comma operator.
This fixes the compca22.c test case. This optimization could be fixed and re-enabled, but to do so, you would have to check if the stored value is ever used subsequently, which is not information that's readily available in the peephole optimization pass. It would also be necessary to check if there are any stores to the same location within the right-side expression, which could kill the optimization.
This commit is contained in:
parent
b9446a28a7
commit
be91f1d1cc
5
DAG.pas
5
DAG.pas
@ -934,11 +934,12 @@ case op^.opcode of {check for optimizations of this node}
|
||||
end; {case pc_bnl}
|
||||
|
||||
pc_bno: begin {pc_bno}
|
||||
if op^.left^.opcode = pc_str then
|
||||
{Invalid optimization disabled}
|
||||
{if op^.left^.opcode = pc_str then
|
||||
if op^.left^.left^.opcode in [pc_lda,pc_lao] then begin
|
||||
ReplaceLoads(op^.left^.left, op^.left, op^.right);
|
||||
opv := op^.right;
|
||||
end; {if}
|
||||
end;} {if}
|
||||
end; {case pc_bno}
|
||||
|
||||
pc_bnt: begin {pc_bnt}
|
||||
|
Loading…
x
Reference in New Issue
Block a user