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:
Stephen Heumann 2017-10-28 22:16:10 -05:00
parent 1e8413138e
commit ff90151e77
1 changed files with 5 additions and 4 deletions

View File

@ -2593,9 +2593,9 @@ var
{kill indirect accesses on stores}
{to indirectly-accessible locations}
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,
pc_cup,pc_cui,pc_tl1] then begin
pc_cup,pc_cui,pc_tl1,pc_sbf,pc_cbf] then begin
kill := true;
stop := true;
end {if}
@ -2614,8 +2614,9 @@ var
end {if}
end {else if}
else if list^.opcode in [pc_sto,pc_cpi,pc_iil,pc_ili,pc_idl,pc_ild,
pc_cup,pc_cui,pc_tl1] then
if Member(op1, c_ind) then begin
pc_cup,pc_cui,pc_tl1,pc_sbf,pc_cbf] then
if Member(op1, c_ind) or (op1^.opcode in [pc_lbf,pc_lbu]) then
begin
kill := true;
stop := true;
end; {if}