[llvm] [LoongArch] Use LSX for scalar FP rounding with explicit rounding mode (PR #114766)
Yingchi Long via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 4 06:52:17 PST 2024
================
@@ -0,0 +1,123 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc --mtriple=loongarch64 --mattr=+lsx < %s | FileCheck %s
+
+;; ceilf
+define float @ceil_f32(float %i) nounwind {
+; CHECK-LABEL: ceil_f32:
----------------
inclyc wrote:
> intrinsics were expanded at the loongarch backend.
You can submit a pre-commit test (what did the backend generated before your commit), and then commit the change & regenerate the test, thus we can see the difference.
> A call to the function in libm was generated.
Did you measured the runtime cost between two implementations? Scalar operations might be cheaper in some context than vector instructions.
https://github.com/llvm/llvm-project/pull/114766
More information about the llvm-commits
mailing list