[PATCH] D149842: Scalarizer: limit scalarization for small element types
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 01:11:49 PDT 2023
foad accepted this revision.
foad added a comment.
This revision is now accepted and ready to land.
LGTM overall, though I have only reviewed some of it carefully and skimmed the rest.
================
Comment at: llvm/lib/Transforms/Scalar/Scalarizer.cpp:66
+static cl::opt<unsigned> ClScalarizeMinBits(
+ "scalarize-min-bits", cl::init(0), cl::Hidden,
----------------
I think a comment here would help, along the lines of "split vectors larger than this size into fragments, where each fragment is either a vector no larger than this size or a scalar".
Also can you say something (either here or somewhere else prominent) about the implications for whether or not we split an operation with different vector sized operands or result, like `zext <4 x i8> %val to <4 x i32>`?
================
Comment at: llvm/lib/Transforms/Scalar/Scalarizer.cpp:608
+ } else {
+ Split.NumPacked = ScalarizeMinBits / ElemTy->getScalarSizeInBits();
+ if (Split.NumPacked >= NumElems)
----------------
Do you have any test cases for when this division is not exact?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149842/new/
https://reviews.llvm.org/D149842
More information about the llvm-commits
mailing list