diff options
author | johnvg | 2002-02-13 11:39:09 +0000 |
---|---|---|
committer | johnvg | 2002-02-13 11:39:09 +0000 |
commit | c6fb415ab8570682418a39325410a8bb402657b5 (patch) | |
tree | 25167662d0b766d6c66c8392e7337744cafe0477 /backendC/CleanCompilerSources/optimisations.c | |
parent | compare strictness annotations of constructors (diff) |
fix bug in the reuse unique nodes optimisation
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1020 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'backendC/CleanCompilerSources/optimisations.c')
-rw-r--r-- | backendC/CleanCompilerSources/optimisations.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/backendC/CleanCompilerSources/optimisations.c b/backendC/CleanCompilerSources/optimisations.c index 94c14cc..4a99315 100644 --- a/backendC/CleanCompilerSources/optimisations.c +++ b/backendC/CleanCompilerSources/optimisations.c @@ -1960,9 +1960,16 @@ static Bool insert_unique_fill_node (NodeP node,FreeUniqueNodeIdsP *f_node_ids,i # else DetermineSizeOfState (node_id_p->nid_state,&e_a_size2,&e_b_size2); # endif - if (e_a_size1!=e_a_size2 || e_b_size1!=e_b_size2 || - ((e_a_size1 | e_a_size2)!=0 && a_size1!=a_size2) || - ((e_b_size1 | e_b_size2)!=0 && b_size1+node_a_size!=b_size2+total_a_size2)) + if (e_a_size1!=e_a_size2 || + e_b_size1!=e_b_size2 || + (e_a_size1!=0 && (a_size1!=a_size2 || + ((a_size1==1 || (a_size1==0 && e_a_size1>1)) && + ((node_size==2) != (total_a_size2+total_b_size2==2))) + )) || + (e_b_size1!=0 && (b_size1+node_a_size!=b_size2+total_a_size2 || + ((b_size1+node_a_size==1 || (b_size1+node_a_size==0 && e_b_size1>1)) && + ((node_size==2) != (total_a_size2+total_b_size2==2))) + ))) { argument_overwrite_bits|=1<<n; } else { |