Recognize copy that is represented as split of a source register to
elements that were reassembled to another register with the same type.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h | ||
---|---|---|
1134 | Should this be merged in with ArtifactValueFinder? |
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h | ||
---|---|---|
1134 | Do you mean whole function or some parts? |
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h | ||
---|---|---|
1134 | I thought the plan was to move everything toward using ArtifactValueFinder, rather than continuing to try to add code to parse every permutation of artifacts |
LGTM in the name of making progress. We do need to start moving all of this stuff into ArtifactValueFinder though
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h | ||
---|---|---|
1138 | Move this below to where instructions could actually be inserted |
We do need to start moving all of this stuff into ArtifactValueFinder though
Like this?
You moved the code, but didn't make the fundamental change. The key point is to start using findValueFromDef to find the non-artifact source instead of trying to handle every permutation of legalization artifacts
I understand now. Could I add a look through bitcast in findValueFromDefImpl? I would expect similar result as in D117328.
I'd leave that for a separate patch. I'm still not sure about treating bitcast as an artifact
Use Value finder to search for unmerged elements. In some tests skips a few combine steps since value finder looks through artifacts.
Sorry I missed this @, was on parental leave at the time. This is a very nice improvement in code quality, thanks!
Should this be merged in with ArtifactValueFinder?