[llvm] [AArch64][GlobalISel] Expand handling for sitofp and uitofp (PR #71282)

David Green via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 05:40:59 PST 2023


================
@@ -673,10 +673,33 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
 
   getActionDefinitionsBuilder({G_SITOFP, G_UITOFP})
       .legalForCartesianProduct({s32, s64, v2s64, v4s32, v2s32})
+      .legalIf([=](const LegalityQuery &Query) {
+        return HasFP16 &&
----------------
davemgreen wrote:

Hello. This way at least feels clear to me what is going on and matches what we have elsewhere. We might be able to adjust them in the future to clean things up, but for the moment it's probably best to keep G_SITOFP similar to G_FPTOSI.

I'm interested to hear your suggestions if we can make the whole things clearer. Maybe it would be worth having a `.legalIf(HasFP16, {{s16, s32}, {s16, s64}, ...})`

https://github.com/llvm/llvm-project/pull/71282


More information about the llvm-commits mailing list