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

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 2 00:51:20 PDT 2021


foad added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:756-759
+    /// Try to find a source of the value defined in the def \p DefReg, starting
+    /// at position \p StartBit with size \p Size.
+    /// \returns an empty Register if no value could be found, or \p DefReg if
+    /// if that was the best we could do.
----------------
Surely DefReg is always a safe "best" return value? Why would you ever need to return Register() instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107017/new/

https://reviews.llvm.org/D107017



More information about the llvm-commits mailing list