[llvm] [AArch64][GISel] Add fp128 and i128 sitofp/uitofp handling (PR #97691)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 01:53:55 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)
----------------
Him188 wrote:
This is a similar check like the one in the G_FPTOUI above. I think it's better to forbid 16-bit types as they are not tested. If other targets want 16-bit floats, they can easily relax this check.
https://github.com/llvm/llvm-project/pull/97691
More information about the llvm-commits
mailing list