[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 5 19:51:27 PDT 2024
farzonl 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:
```cpp
#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:
```bash
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.
https://github.com/llvm/llvm-project/pull/94559
More information about the cfe-commits
mailing list