[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos
Joshua Batista via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 4 13:20:13 PDT 2022
bob80905 added a comment.
Here is the code I used to test the machine code output:
typedef float float4 __attribute__((ext_vector_type(4)));
void test_builtin_elementwise_sin(float f1, float f2, double d1, double d2,
float4 vf1, float4 vf2)
{
f2 = __builtin_elementwise_sin(f1);
d2 = __builtin_elementwise_sin(d1);
vf2 = __builtin_elementwise_sin(vf1);
}
f2 = __builtin_elementwise_sin(f1); can be swapped for f2 = __builtin_elementwise_cos(f1); to test the cos builtin,
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135011/new/
https://reviews.llvm.org/D135011
More information about the cfe-commits
mailing list