[llvm] [RISCV][GISel] Add ZFA FP legalization and full tests for 9 insn (PR #118723)

Luke Quinn via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 17:41:24 PST 2024


================
@@ -0,0 +1,78 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+
+; RUN: llc -mtriple=riscv32 -mattr=+zfa,+zfh -global-isel < %s \
+; RUN: | FileCheck %s --check-prefixes=CHECK-ZFA-f16
+; RUN: llc -mtriple=riscv64 -mattr=+zfa,+zfh -global-isel < %s \
+; RUN: | FileCheck %s --check-prefixes=CHECK-ZFA-f16
+
+
+define half @fceil(half %a) {
+; CHECK-ZFA-f16-LABEL: fceil:
+; CHECK-ZFA-f16:       # %bb.0:
+; CHECK-ZFA-f16-NEXT:    fround.h fa0, fa0, rup
+; CHECK-ZFA-f16-NEXT:    ret
+    %b = call half @llvm.ceil.f16(half %a)
----------------
lquinn2015 wrote:

yes this is true

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


More information about the llvm-commits mailing list