[llvm] [AArch64][GlobalISel] Add G_FPEXT(G_FCONSTANT) folding (PR #160902)

Ryan Cowan via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 07:25:14 PDT 2025


================
@@ -678,8 +678,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
       .widenScalarToNextPow2(0)
       .clampScalar(0, s8, s64);
   getActionDefinitionsBuilder(G_FCONSTANT)
-      .legalFor({s32, s64, s128})
-      .legalFor(HasFP16, {s16})
+      // Always legalize S16 to prevent G_FCONSTANT being widened to G_CONSTANT
+      .legalFor({s16, s32, s64, s128})
----------------
HolyMolyCowMan wrote:

I have removed this from this commit and have created another PR here (https://github.com/llvm/llvm-project/pull/161205).

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


More information about the llvm-commits mailing list