Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This PR fixes the issue of `FuelVMInstruction`s not being considered in the `memcpyopt` as storing into the destination. E.g., in this example: ``` script { entry fn main() -> u256 { local u256 x local u256 y local u256 z entry(): v0 = get_local ptr u256, x v1 = get_local ptr u256, y v2 = get_local ptr u256, z mem_copy_val v2, v0 wide add v0, v1 to v2 v3 = load v2 ret u256 v3 } } ``` after the `memcpyopt` the `v3 = load v2` got turned into `v3 = load v0` because the `v2` is considered as not being written to. ## Checklist - [ ] I have linked to any relevant issues. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have updated the documentation where relevant (API docs, the reference, and the Sway book). - [ ] If my change requires substantial documentation changes, I have [requested support from the DevRel team](https://github.com/FuelLabs/devrel-requests/issues/new/choose) - [x] I have added tests that prove my fix is effective or that my feature works. - [ ] I have added (or requested a maintainer to add) the necessary `Breaking*` or `New Feature` labels where relevant. - [x] I have done my best to ensure that my PR adheres to [the Fuel Labs Code Review Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md). - [x] I have requested a review from the relevant team or maintainers.
- Loading branch information