[llvm] ISel/AArch64/SVE: custom lower vector ISD::[L]LRINT (PR #89035)

David Green via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 11:06:47 PDT 2024


================
@@ -4362,6 +4366,40 @@ SDValue AArch64TargetLowering::LowerFP_TO_INT_SAT(SDValue Op,
   return DAG.getNode(ISD::TRUNCATE, DL, DstVT, Sat);
 }
 
+SDValue AArch64TargetLowering::LowerVectorXRINT(SDValue Op,
+                                                SelectionDAG &DAG) const {
+  EVT VT = Op.getValueType();
+  SDValue Src = Op.getOperand(0);
+  SDLoc DL(Op);
+
+  assert(VT.isVector() && "Expected vector type");
+
+  EVT ContainerVT = VT;
+  EVT SrcVT = Src.getValueType();
+  EVT CastVT =
+      ContainerVT.changeVectorElementType(SrcVT.getVectorElementType());
+
+  if (VT.isFixedLengthVector()) {
----------------
davemgreen wrote:

I think that this and the convertFromScalableVector may be able to removed, if we can rely on the FRINT and FP_TO_SINT being handled successfully already for fixed-length vectors.

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


More information about the llvm-commits mailing list