This function was causing a crash when MaxElements == 1 because
it was trying to create a single element vector type.
Details
Diff Detail
Event Timeline
LGTM with a couple testing nits
lib/Target/AArch64/AArch64LegalizerInfo.cpp | ||
---|---|---|
173 | 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 | 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? |
test/CodeGen/AArch64/GlobalISel/legalize-load-fewerElts.mir | ||
---|---|---|
5–6 | Ok. That sounds good to me |
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: