[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 13:19:24 PDT 2024
ilovepi wrote:
> @ilovepi I minimised the failing issue from: https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/src/graphics/lib/compute/spinel/ext/transform_stack/transform_stack.c to:
>
> ```c++
> #include <math.h>
> #include <stdio.h>
>
> #define SPN_TRANSFORM_STACK_TAN(x_) tanf(x_)
>
> float
> spinel_transform_stack_push_skew_x(float theta)
> {
> float const tan_theta = SPN_TRANSFORM_STACK_TAN(theta);
> return tan_theta;
> }
>
> int main() {
> printf("%f\n", spinel_transform_stack_push_skew_x(1.05f));
> return 0;
> }
> ```
>
> run like so:
>
> ```shell
> farzon at devbox: projects/llvm-project$ <build_dir>/bin/clang <test_path>/test.c -lm -o <test_out_path>/test.out
> farzon at devbox: projects/llvm-project$ ./<test_out_path>/test.out
> 1.743315
> ```
>
> The intrinsic should be able to be lowered now.
Thanks. This seems fine to me. I'll defer to the other reviewers on everything else, but I'm satisfied with the new test. so LGTM from my perspective.
https://github.com/llvm/llvm-project/pull/94559
More information about the llvm-commits
mailing list