[GlobalISel] Allow the ArtifactValueFinder to return the best available register on failure.
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 CurrentBest register to the value finder state, and any time a method fails to make progress, returns that register (which may just be an empty Register). To facilitate this, add a new entry point to the findValueFromDef() function which initializes this state. Also fix the build vector finder to return the current build_vector if all sources are being requested. Differential Revision: https://reviews.llvm.org/D107017
Loading
Please sign in to comment