[FuzzMutate] Prevent the mutator from generating illegal memory operations
This PR prevents the mutator from generating illegal memory operations for AMDGCN. In particular, direct store and load instructions on addrspace(8) are not permitted. This PR fixes that by properly introducing casts to addrspace(7) when required.
:white_check_mark: With the latest revision this PR passed the C/C++ code formatter.
Can you attach an AMDGCN specific test case? IIUC the isAMDGCN branch you added won't be tested by current test cases at all.
@DataCorrupted thanks for the review. I'll provide the unit test.
@DataCorrupted thanks again for the feedback. I've added a unit test. We are also planning to incorporate this check into the Verifier in an independent PR. Once that is done, I can also remove the adhoc check for addrspace 8 in a new PR.
The last failure looks unrelated to this PR. I have just rebased to try again.
Thanks @DataCorrupted, I missed those cases.
@DataCorrupted thanks again for your review and feedback. I've addressed the remaining comments. In case the latest changes look good to you, I think the PR could be merged.