Page MenuHomePhabricator

[GISel] Add redundant bitcast folding combine
ClosedPublic

Authored by Pierre-vh on Oct 4 2022, 4:55 AM.

Details

Summary

Simply folds away bitcasts that cancel each other.

Diff Detail

Event Timeline

Pierre-vh created this revision.Oct 4 2022, 4:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 4:55 AM
Pierre-vh requested review of this revision.Oct 4 2022, 4:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 4:55 AM
arsenm added inline comments.Oct 7 2022, 6:53 PM
llvm/include/llvm/Target/GlobalISel/Combine.td
972–973

I think this one is actually possible with the real matcher.
Can you try something like

match (BITCAST $dst, $src1), (BITCAST $src1, $src0))
Pierre-vh marked an inline comment as done.

Move to tablegen

arsenm accepted this revision.Oct 10 2022, 9:26 AM
This revision is now accepted and ready to land.Oct 10 2022, 9:26 AM
This revision was landed with ongoing or failed builds.Oct 11 2022, 8:03 AM
This revision was automatically updated to reflect the committed changes.