[llvm] [AArch64] Lower llvm.lrint to SVE2p2 FRINT*X instructions (PR #187319)

Jacob Crawley via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 07:57:07 PDT 2026


================
@@ -5297,6 +5297,35 @@ SDValue AArch64TargetLowering::LowerVectorXRINT(SDValue Op,
   EVT CastVT = VT.changeVectorElementType(
       *DAG.getContext(), Src.getValueType().getVectorElementType());
 
+  unsigned IntBits = VT.getScalarSizeInBits();
+  unsigned FPBits = CastVT.getScalarSizeInBits();
+
+  // Convert fixed-length vectors to scalable and re-emit the same opcode.
+  if (Subtarget->hasSVE2p2() &&
----------------
jacob-crawley wrote:

Done.

I've added scalable and fixed vector tests with 16 bit inputs to test both cases where `UseFRINTX` is used.

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


More information about the llvm-commits mailing list