[llvm] [AArch64][GlobalISel] Improve lowering of vector fp16 fptrunc and fpext (PR #163398)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 10:11:01 PDT 2025
================
@@ -817,10 +818,24 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
.legalFor(
{{s16, s32}, {s16, s64}, {s32, s64}, {v4s16, v4s32}, {v2s32, v2s64}})
.libcallFor({{s16, s128}, {s32, s128}, {s64, s128}})
- .clampNumElements(0, v4s16, v4s16)
- .clampNumElements(0, v2s32, v2s32)
+ .moreElementsToNextPow2(1)
+ .customIf([](const LegalityQuery &Q) {
----------------
davemgreen wrote:
Could it be added to the "TODO: Handle vectors directly" part by checking that the mid-sized vector is legal-ish?
https://github.com/llvm/llvm-project/pull/163398
More information about the llvm-commits
mailing list