This is an archive of the discontinued LLVM Phabricator instance.

[MIPatternMatch]: Add ICstRegMatch
ClosedPublic

Authored by Petar.Avramovic on Apr 1 2021, 8:03 AM.

Details

Summary

Matches G_CONSTANT and returns its def register.

Diff Detail

Event Timeline

Petar.Avramovic requested review of this revision.Apr 1 2021, 8:03 AM
Petar.Avramovic created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2021, 8:03 AM
foad added a comment.Apr 26 2021, 6:40 AM

Looks reasonable but should have at least one unit test.

llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
93

Move all of this up to line 69 ish, just after m_ICst(int64_t &)?

Add unit test.

foad accepted this revision.Apr 26 2021, 7:10 AM
This revision is now accepted and ready to land.Apr 26 2021, 7:10 AM
This revision was landed with ongoing or failed builds.Apr 27 2021, 2:03 AM
This revision was automatically updated to reflect the committed changes.