mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-06-06 12:29:33 +00:00
Block invalid movement of bitfield accesses in common subexpression elimination.
This fixes the problem in #44 for the case of using common subexpression elimination only. (Loop invariant removal still causes the problem.)
This commit is contained in:
parent
1e8413138e
commit
ff90151e77
9
DAG.pas
9
DAG.pas
|
@ -2593,9 +2593,9 @@ var
|
||||||
{kill indirect accesses on stores}
|
{kill indirect accesses on stores}
|
||||||
{to indirectly-accessible locations}
|
{to indirectly-accessible locations}
|
||||||
else if op1^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
else if op1^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
||||||
pc_cup,pc_cui,pc_tl1,pc_ind] then begin
|
pc_cup,pc_cui,pc_tl1,pc_ind,pc_sbf,pc_cbf] then begin
|
||||||
if list^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
if list^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
||||||
pc_cup,pc_cui,pc_tl1] then begin
|
pc_cup,pc_cui,pc_tl1,pc_sbf,pc_cbf] then begin
|
||||||
kill := true;
|
kill := true;
|
||||||
stop := true;
|
stop := true;
|
||||||
end {if}
|
end {if}
|
||||||
|
@ -2614,8 +2614,9 @@ var
|
||||||
end {if}
|
end {if}
|
||||||
end {else if}
|
end {else if}
|
||||||
else if list^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
else if list^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
|
||||||
pc_cup,pc_cui,pc_tl1] then
|
pc_cup,pc_cui,pc_tl1,pc_sbf,pc_cbf] then
|
||||||
if Member(op1, c_ind) then begin
|
if Member(op1, c_ind) or (op1^.opcode in [pc_lbf,pc_lbu]) then
|
||||||
|
begin
|
||||||
kill := true;
|
kill := true;
|
||||||
stop := true;
|
stop := true;
|
||||||
end; {if}
|
end; {if}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user