This is an archive of the discontinued LLVM Phabricator instance.

[SVE][CodeGen] Fix bug in DAGCombiner::reduceBuildVecToShuffle
ClosedPublic

Authored by david-arm on Jun 25 2020, 8:22 AM.

Details

Summary

When trying to reduce a BUILD_VECTOR to a SHUFFLE_VECTOR it's
important that we carefully check the vector types that led to
that BUILD_VECTOR. In the test I have attached to this commit
there is a case where the results of two SVE faddv instructions
are being stored to consecutive memory locations. With my fix,
as part of merging those stores we discover that each BUILD_VECTOR
element came from an extract of a SVE vector element and
therefore bail out.

Diff Detail

Event Timeline

david-arm created this revision.Jun 25 2020, 8:22 AM
Herald added a reviewer: efriedma. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
c-rhodes accepted this revision.Jun 29 2020, 6:26 AM

@david-arm LGTM, just a couple of nits in the test that could be fixed

llvm/test/CodeGen/AArch64/sve-merging-stores.ll
4

can this not be %complex?

15

nit: space after first arg

This revision is now accepted and ready to land.Jun 29 2020, 6:26 AM
This revision was automatically updated to reflect the committed changes.