[llvm] [AArch64][GlobalISel] Expand abs.v4i8 to v4i16 and abs.v2s16 to v2s32 (PR #81231)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 23:27:32 PST 2024
================
@@ -993,6 +993,12 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
ABSActions
.legalFor({s32, s64});
ABSActions.legalFor(PackedVectorAllTypeList)
+ .widenScalarIf(
+ [=](const LegalityQuery &Query) { return Query.Types[0] == v4s8; },
+ [=](const LegalityQuery &Query) { return std::make_pair(0, v4s16); })
+ .widenScalarIf(
+ [=](const LegalityQuery &Query) { return Query.Types[0] == v2s16; },
+ [=](const LegalityQuery &Query) { return std::make_pair(0, v2s32); })
----------------
aemerson wrote:
Can you use `widenVectorEltsToVectorMinSize(0, 64)` here to achieve the same thing?
https://github.com/llvm/llvm-project/pull/81231
More information about the llvm-commits
mailing list