Page MenuHomePhabricator

Cancelling out G_MERGE_VALUES/G_UNMERGE pairs sometimes needs a copy
AcceptedPublic

Authored by dsanders on Jan 13 2020, 11:56 AM.

Details

Summary

Specifically, if there are register class constraints they must be
preserved. If there is at least one, then we must emit a copy unless both
vregs have the same constraint.

Event Timeline

dsanders created this revision.Jan 13 2020, 11:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 13 2020, 11:56 AM
Herald added a subscriber: wdng. · View Herald Transcript

Needs tests

llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
402

This is just OldRC == NewRC

406

buildCopy

dsanders updated this revision to Diff 237796.Jan 13 2020, 3:24 PM

+Testcase

dsanders updated this revision to Diff 237799.Jan 13 2020, 3:33 PM

Fix the remaining small issues

arsenm accepted this revision.Jan 13 2020, 3:52 PM

LGTM

This revision is now accepted and ready to land.Jan 13 2020, 3:52 PM