[llvm] [ARM]: codegen `llvm.roundeven.v*` (PR #141786)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu May 29 08:16:20 PDT 2025
================
@@ -0,0 +1,78 @@
+; RUN: llc -mtriple=armv8 -mattr=+neon %s -o - | FileCheck %s
+
+; The llvm.arm.neon.frintn intrinsic should be auto-upgraded to the
+; target-independent roundeven intrinsic.
+
+define <4 x half> @frintn_4h(<4 x half> %A) nounwind {
+;CHECK-LABEL: frintn_4h:
+;CHECK: bl llvm.arm.neon.frintn.v4f16
+ %tmp3 = call <4 x half> @llvm.arm.neon.frintn.v4f16(<4 x half> %A)
----------------
davemgreen wrote:
The intrinsics are only valid when the target features allow them. (The front-end usually validates the features allow the intrinsic to be used). For fp16 you might need to add -mattr=+fullfp16. I don't think there is a f64 variant, unlike for AArch64, so that one can be removed.
https://github.com/llvm/llvm-project/pull/141786
More information about the llvm-commits
mailing list