[PATCH] D130594: [RISCV] Inline ceil/floor/trunc for float and double

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 12:12:59 PDT 2022


reames added a comment.

In D130594#3680540 <https://reviews.llvm.org/D130594#3680540>, @craig.topper wrote:

> The code in libm is already special cased for RISC-V and is I think optimal. It uses a range check and static rounding mode on the generated instructions. Other than removing the call overhead, the rest of this code is worse than what is in libm.

Do you have a pointer to the exact code you're looking at?  I thought I'd looked at the right libm implementation, and it wasn't as fully optimized as your describing.

Assuming you're correct - you probably are - would a patch which "just" inlines the libm version be reasonable?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130594/new/

https://reviews.llvm.org/D130594



More information about the llvm-commits mailing list