This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Fix warnings in sve-vector-splat.ll and sve-trunc.ll
ClosedPublic

Authored by david-arm on Jul 2 2020, 3:04 AM.

Details

Summary

This patch fixes all remaining warnings in:

llvm/test/CodeGen/AArch64/sve-trunc.ll
llvm/test/CodeGen/AArch64/sve-vector-splat.ll

I hit some warnings related to getCopyPartsToVector. I fixed two
issues:

  1. In widenVectorToPartType() we assumed that we'd always be

using BUILD_VECTOR nodes to expand from one vector type to another,
which is incorrect for scalable vector types. I've fixed this for now
by simply bailing out immediately for scalable vectors.

  1. In getCopyToPartsVector() I've changed the code to compare

the element counts of different types.

Diff Detail

Event Timeline

david-arm created this revision.Jul 2 2020, 3:04 AM
fpetrogalli accepted this revision.Jul 2 2020, 7:41 PM

LGTM, thank you.

This revision is now accepted and ready to land.Jul 2 2020, 7:41 PM
This revision was automatically updated to reflect the committed changes.