[PATCH] D130594: [RISCV] Inline ceil/floor/trunc for float and double
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 26 12:41:30 PDT 2022
craig.topper added a comment.
In D130594#3680552 <https://reviews.llvm.org/D130594#3680552>, @reames wrote:
> 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?
https://github.com/bminor/glibc/blob/master/sysdeps/riscv/rvf/s_floorf.c
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