[PATCH] D83195: [CodeGen] Fix a warning in DAGTypeLegalizer::PromoteIntRes_EXTRACT_SUBVECTOR

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 7 01:43:43 PDT 2020


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83195/new/

https://reviews.llvm.org/D83195





More information about the llvm-commits mailing list