[llvm] [AArch64][GISel] Allow import of DAG FCVT/CVTF patterns using fixedpoint immediate (PR #215812)

Kieran B via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 06:16:50 PDT 2026


================
@@ -6858,35 +6858,55 @@ multiclass FPToIntegerIntPats<Intrinsic round, string INST> {
 defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzs, "FCVTZS">;
 defm : FPToIntegerIntPats<int_aarch64_neon_fcvtzu, "FCVTZU">;
 
-// This thing just allows us to change the type of the node produced. The imm
-// value we want is already in V from SelectCVTFixedPointVec.
-def fixedpoint_vec_xform : SDNodeXForm<timm, [{
+// These are split by fixed-point width so GlobalISel can route each
+// transformed operand to a renderer that checks the correct #fbits range.
+def fixedpoint_xform32 : SDNodeXForm<timm, [{
+  (void)N;
+  return V;
+}]>;
----------------
kieroxide wrote:

Yes unfortunately

We needed a way to pass the destination width to the renderer, and renderers cannot use template functions.

So I had to pass the width using the function name which seems to be the standard for when passing a value to a renderer.

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


More information about the llvm-commits mailing list