This function was causing a crash when MaxElements == 1 because
it was trying to create a single element vector type.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
LGTM with a couple testing nits
lib/Target/AArch64/AArch64LegalizerInfo.cpp | ||
---|---|---|
173 ↗ | (On Diff #171202) | It's not for this patch, but we ought to have a version of clampMaxNumElements() that applies to every vector except for those on a whitelist. Maybe, something like: .clampMaxNumElements(0, except({s32}), 1) |
test/CodeGen/AArch64/GlobalISel/legalize-load-fewerElts.mir | ||
5–6 ↗ | (On Diff #171202) | It's better to test the end result rather than the particular action the legalizer takes for this step. Can you drop the -debug-only=legalizer from the run line and test with the output you get without that? |
lib/Target/AArch64/AArch64LegalizerInfo.cpp | ||
---|---|---|
173 ↗ | (On Diff #171202) | I agree. I think we should add the opposite as well, a function that takes a list of types. For example: .clampMaxNumElements(0, {s16, s32, s64, ...}, 1) |
test/CodeGen/AArch64/GlobalISel/legalize-load-fewerElts.mir | ||
5–6 ↗ | (On Diff #171202) |
test/CodeGen/AArch64/GlobalISel/legalize-load-fewerElts.mir | ||
---|---|---|
5–6 ↗ | (On Diff #171202) | Ok. That sounds good to me |