[PATCH] D57117: GlobalISel: Add helper to LLT to get a scalar or vector
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 13:51:50 PST 2019
paquette added inline comments.
================
Comment at: include/llvm/Support/LowLevelTypeImpl.h:73
+ static LLT scalarOrVector(uint16_t NumElements, LLT ScalarTy) {
+ return NumElements == 1 ? ScalarTy : LLT::vector(NumElements, ScalarTy);
----------------
What happens if `NumElements == 0`? Seems good to assert that it's greater than 0 in both functions, unless a vector of 0 elements is the desired behaviour.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57117/new/
https://reviews.llvm.org/D57117
More information about the llvm-commits
mailing list