[llvm] [AArch64] Simplify codegen for LRINT. (PR #194342)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 09:24:21 PDT 2026


================
@@ -5181,12 +5184,9 @@ SDValue AArch64TargetLowering::LowerVectorXRINT(SDValue Op,
       *DAG.getContext(), Src.getValueType().getVectorElementType());
 
   // Round the floating-point value into a floating-point register with the
-  // current rounding mode.
+  // current rounding mode and convert to an integer.
   SDValue FOp = DAG.getNode(ISD::FRINT, DL, CastVT, Src);
-
-  // Truncate the rounded floating point to an integer.
-  return DAG.getNode(ISD::FP_TO_SINT_SAT, DL, VT, FOp,
-                     DAG.getValueType(VT.getVectorElementType()));
+  return DAG.getFreeze(DAG.getNode(ISD::FP_TO_SINT, DL, VT, FOp));
----------------
efriedma-quic wrote:

Probably SelectionDAGLegalize::ExpandNode is broken, yes.  I'd guess we forgot to update it with various changes to undef/poison handling.

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


More information about the llvm-commits mailing list