This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Fix a warning in DAGTypeLegalizer::PromoteIntRes_EXTRACT_SUBVECTOR
ClosedPublic

Authored by david-arm on Jul 6 2020, 1:47 AM.

Details

Summary

Fixes up one warning in this test:

sve-sext-zext.ll

Diff Detail

Event Timeline

david-arm created this revision.Jul 6 2020, 1:47 AM
Herald added a project: Restricted Project. · View Herald Transcript

@david-arm , can you please update the patch adding context?

Thanks!

Francesco

david-arm updated this revision to Diff 275920.Jul 6 2020, 11:51 PM
sdesmalen accepted this revision.Jul 7 2020, 1:43 AM

nit: The title and commit message speaks of fixing warnings (in some test), but I think many people who don't follow our developments closely will not know what those 'warnings' relate to. Perhaps you can phrase the title as [CodeGen] Fix wrong use of getVectorNumElements in PromoteIntRes_EXTRACT_SUBVECTOR. Also I think it's worth explaining in the commit message why you're moving this code, e.g. getVectorNumElements is not safe for scalable vectors and should normally use getVectorElementCount instead. But because at this point in the code only fixed-width vectors are used, the use of getVectorNumElements is valid.

LGTM otherwise.

This revision is now accepted and ready to land.Jul 7 2020, 1:43 AM
fpetrogalli accepted this revision.Jul 7 2020, 9:02 AM

LGTM! Thank you

This revision was automatically updated to reflect the committed changes.