Commit 0c63d605 authored by Taddeus Kroes's avatar Taddeus Kroes

Minor bugfix.

parent d2d13e18
...@@ -74,7 +74,7 @@ def eliminate_common_subexpressions(block): ...@@ -74,7 +74,7 @@ def eliminate_common_subexpressions(block):
occurrences.append(block.pointer - 1) occurrences.append(block.pointer - 1)
if len(occurrences) > 1: if len(occurrences) > 1:
new_reg = find_free_reg(block, pointer, occurrences[-1]) new_reg = find_free_reg(block, occurrences[0], occurrences[-1])
# Replace all occurrences with a move statement # Replace all occurrences with a move statement
for occurrence in occurrences: for occurrence in occurrences:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment