This is an archive of the discontinued LLVM Phabricator instance.

[DAG] Don't convert undef to 0 when creating buildvector
ClosedPublic

Authored by dmgreen on Mar 4 2022, 8:46 AM.

Details

Summary

When inserting undef into buildvectors created from shuffles of buildvectors, we convert elements to the largest needed type. This had the effect of converting undef into 0, which isn't needed as the buildvector implicitly truncates and trunc(zext(undef)) == undef.

Diff Detail

Event Timeline

dmgreen created this revision.Mar 4 2022, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 8:46 AM
dmgreen requested review of this revision.Mar 4 2022, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 4 2022, 8:46 AM
RKSimon accepted this revision.Mar 4 2022, 8:55 AM

LGTM

This revision is now accepted and ready to land.Mar 4 2022, 8:55 AM
probinson added inline comments.
llvm/test/CodeGen/AArch64/arm64-vshuffle.ll
4

I think FileCheck is case-sensitive with regard to suffixes? So should be CHECK-LABEL. Willing to be proven wrong but that was my impression.

Oh yeah, good point. Will do, thanks.

This revision was landed with ongoing or failed builds.Mar 6 2022, 10:35 AM
This revision was automatically updated to reflect the committed changes.