This is an archive of the discontinued LLVM Phabricator instance.

[GISel] Add Trunc/Lshr/BuildVector Folding
ClosedPublic

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

Details

Summary

Similar to the current "Trunc/BuildVector" folding - which folds low element extracts of BuildVectors, folds hi element extracts done using bitshifts.

For D134354

Diff Detail

Event Timeline

Pierre-vh created this revision.Oct 4 2022, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 4:57 AM
Pierre-vh requested review of this revision.Oct 4 2022, 4:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 4 2022, 4:57 AM
arsenm added inline comments.Oct 4 2022, 9:23 AM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
5914–5915

This doesn't really have anything in common with the other fold here. Should it move to a separate match function?

paquette added inline comments.Oct 4 2022, 10:24 AM
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
5914–5915

+1

Pierre-vh updated this revision to Diff 465296.Oct 5 2022, 12:27 AM
Pierre-vh marked 2 inline comments as done.

Address comments

Pierre-vh retitled this revision from [GISel] Handle hi element extract in `matchTruncBuildVectorFold` to [GISel] Add Trunc/Shlr/BuildVector Folding.Oct 5 2022, 12:27 AM
Pierre-vh edited the summary of this revision. (Show Details)
arsenm accepted this revision.Oct 5 2022, 8:07 AM
arsenm added inline comments.
llvm/include/llvm/Target/GlobalISel/Combine.td
953

s/shlr/lshr/?

This revision is now accepted and ready to land.Oct 5 2022, 8:07 AM
Pierre-vh updated this revision to Diff 465665.Oct 6 2022, 12:00 AM
Pierre-vh marked an inline comment as done.

Comment

Pierre-vh retitled this revision from [GISel] Add Trunc/Shlr/BuildVector Folding to [GISel] Add Trunc/Lshr/BuildVector Folding.Oct 6 2022, 12:00 AM
arsenm accepted this revision.Oct 6 2022, 8:12 AM
This revision was landed with ongoing or failed builds.Oct 7 2022, 1:44 AM
This revision was automatically updated to reflect the committed changes.