This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Constrain register class before replaceRegWith in RISCVMergeBaseOffset.
ClosedPublic

Authored by craig.topper on Jul 10 2023, 10:39 PM.

Details

Summary

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.

Diff Detail

Event Timeline

craig.topper created this revision.Jul 10 2023, 10:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 10:39 PM
craig.topper requested review of this revision.Jul 10 2023, 10:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 10 2023, 10:39 PM
craig.topper retitled this revision from [RISCV] Contrain register class before replaceRegWith in RISCVMergeBaseOffset. to [RISCV] Constrain register class before replaceRegWith in RISCVMergeBaseOffset..Jul 10 2023, 11:29 PM
reames accepted this revision.Jul 11 2023, 8:29 AM

LGTM

This revision is now accepted and ready to land.Jul 11 2023, 8:29 AM
This revision was landed with ongoing or failed builds.Jul 11 2023, 9:54 AM
This revision was automatically updated to reflect the committed changes.