[RISCV] Constrain register class before replaceRegWith in RISCVMergeBaseOffset.
The register being replaced might have a more restrictive register class due to requirements of the using instruction. We should constrain the register class to preserve any restrictions. This was found in our downstream on a custom instruction. I don't have a test case for upstream currently. Differential Revision: https://reviews.llvm.org/D154920
Loading
Please sign in to comment