Page MenuHomePhabricator

[CodeGen] Fix warning in getNode for EXTRACT_SUBVECTOR
ClosedPublic

Authored by david-arm on Jun 29 2020, 2:39 AM.

Details

Summary

Fix a warning in getNode() when extracting a subvector from a
concat vector. We can simply replace the call to getVectorNumElements
with getVectorMinNumElements as this follows the defined behaviour
for EXTRACT_SUBVECTOR.

Event Timeline

david-arm created this revision.Jun 29 2020, 2:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2020, 2:39 AM
efriedma accepted this revision.Jun 29 2020, 10:55 AM

What regression test does this affect?

LGTM assuming we have appropriate test coverage.

This revision is now accepted and ready to land.Jun 29 2020, 10:55 AM

Hi @efriedma, sorry yes I forgot to mention in the ticket it fixes an existing warnings in these tests:

clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_set2.c
clang/test/CodeGen/aarch64-sve-intrinsics/acle_sve_st2.c

when compiling them to assembly instead of LLVM IR. In the case of acle_sve_st2.c my patch actually kills off the last remaining warning so I can add a no-warnings check line.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2020, 12:30 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript