[PATCH] D107017: [GlobalISel] Allow the ArtifactValueFinder to return the best available register on failure.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 28 17:34:35 PDT 2021


aemerson created this revision.
aemerson added reviewers: paquette, arsenm, Petar.Avramovic, foad.
aemerson added a project: LLVM.
Herald added a subscriber: rovka.
aemerson requested review of this revision.
Herald added a subscriber: wdng.

In some cases, like with inserts, we may have a matching size register already, but still decide to try to look further. This change adds a FailureReg parameter to findValueFromDef() which is returned if nothing could be done. Use this to return (on failure to find anything better) the inserted register when processing a G_INSERT.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107017

Files:
  llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
  llvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107017.362590.patch
Type: text/x-patch
Size: 14721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/87864b98/attachment-0001.bin>


More information about the llvm-commits mailing list