[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 01:17:29 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:
I think that either this can be a lowerIf and make the G_FPTRUNC_ODD lowering generic so that all targets can use it, or could G_FPTRUNC_ODD be an AArch64 specific instruction? My preference would be for the first if we can make it generic.
https://github.com/llvm/llvm-project/pull/163398
More information about the llvm-commits
mailing list