Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix s2i improperly clobbering its child's register
Previously, the Power codegen's implementation of the s2i opcode would attempt to reuse the child node's register if its reference count was 1. While this works most of the time, this causes issues if the child node itself reused a register from its child. In this case, the clobbered register may belong to a node whose reference count is not 1, which can result in incorrect behaviour. In general, there is no reason to try and reuse the register of the child node in s2i, since an extsh instruction is always required. Doing so does not avoid any register shuffles or additional instructions. Accordingly, the s2i evaluator will now always allocate its own register. Signed-off-by: Ben Thomas <ben@benthomas.ca>
- Loading branch information