This is an archive of the discontinued LLVM Phabricator instance.

[DAGCombiner] Fold truncate(build_vector(x,y)) -> build_vector(truncate(x),truncate(y))
ClosedPublic

Authored by RKSimon on Mar 21 2019, 10:35 AM.

Details

Summary

If scalar truncates are free, attempt to pre-truncate build_vectors source operands.

Only attempt to do this before legalization as we often end up with truncations/extensions during build_vector lowering.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.Mar 21 2019, 10:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 21 2019, 10:35 AM
spatel accepted this revision.Mar 26 2019, 11:51 AM

LGTM

This revision is now accepted and ready to land.Mar 26 2019, 11:51 AM
This revision was automatically updated to reflect the committed changes.