[llvm] [AArch64][GISel] Add fp128 and i128 sitofp/uitofp handling (PR #97691)

Thorsten Schütt via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 08:33:47 PDT 2024


================
@@ -1136,16 +1136,13 @@ LegalizerHelper::libcall(MachineInstr &MI, LostDebugLocObserver &LocObserver) {
   }
   case TargetOpcode::G_SITOFP:
   case TargetOpcode::G_UITOFP: {
-    // FIXME: Support other types
     unsigned FromSize = MRI.getType(MI.getOperand(1).getReg()).getSizeInBits();
-    unsigned ToSize = MRI.getType(MI.getOperand(0).getReg()).getSizeInBits();
-    if ((FromSize != 32 && FromSize != 64) || (ToSize != 32 && ToSize != 64))
+    Type *ToTy =
+        getFloatTypeForLLT(Ctx, MRI.getType(MI.getOperand(0).getReg()));
+    if ((FromSize != 32 && FromSize != 64 && FromSize != 128) || !ToTy)
----------------
tschuett wrote:

Some targets might want to extend from 16 bit floats. It seems to be forbidden.

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


More information about the llvm-commits mailing list