[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa5d14f757bb1: Add builtin_elementwise_sin and builtin_elementwise_cos (authored by bob80905, committed by python3kgae). Changed prior to commit: https://reviews.llvm.org/D135011?vs=474628=474667#toc

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 474628. bob80905 added a comment. - add dependency on architecture before testing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files:

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Florian Hahn via Phabricator via cfe-commits
fhahn accepted this revision. fhahn added a comment. LGTM with the suggested changes, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/test/Sema/aarch64-sve-vector-trig-ops.c:4 +// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify + +#include Need limit to aarch64 enabled with // REQUIRES: aarch64-registered-target

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 474570. bob80905 added a comment. - make format change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files: clang/docs/LanguageExtensions.rst

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-10 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. This revision is now accepted and ready to land. LGTM to me with those formatting fixes. Comment at: clang/test/CodeGen/builtins-elementwise-math.c:337 +void test_builtin_elementwise_cos(float f1, float f2,

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-09 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-11-02 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-26 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-19 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. Ping, could someone please take a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits mailing list

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-12 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 467201. bob80905 added a comment. - drop llvm from release notes description. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files:

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-12 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/ReleaseNotes.rst:473 --- +- Add ``__builtin_elementwise_sin`` and ``__builtin_elementwise_cos`` llvm builtins for floating point types only. Drop "llvm" from this

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-12 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-05 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 465446. bob80905 added a comment. - shorten builtin description, group sin and cos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files:

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-05 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: clang/docs/LanguageExtensions.rst:607 + T __builtin_elementwise_cos(T x)return the ratio of the adjacent side length over thefloating point types + hypoteneuse side

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/LanguageExtensions.rst:606 T __builtin_elementwise_ceil(T x) return the smallest integral value greater than or equal to xfloating point types + T __builtin_elementwise_cos(T x)return the

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/docs/LanguageExtensions.rst:607 + T __builtin_elementwise_cos(T x)return the ratio of the adjacent side length over thefloating point types + hypoteneuse

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D135011#3835553 , @bob80905 wrote: > - add sve tests to prove compiler doesn't crash Thank you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 465236. bob80905 added a comment. - add new line to end of new files Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135011/new/ https://reviews.llvm.org/D135011 Files: clang/docs/LanguageExtensions.rst

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 updated this revision to Diff 465235. bob80905 added a comment. Herald added subscribers: frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso,

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135011#3834739 , @bob80905 wrote: > 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,

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Joshua Batista via Phabricator via cfe-commits
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);

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Joshua Batista via Phabricator via cfe-commits
bob80905 added a comment. In D135011#3831452 , @craig.topper wrote: > Does these support scalable vector types from ARM SVE or RISC-V? I can't > remember what the rest of the __builtin_elementwise do. I ask because the > backends will probably crash

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-04 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added a comment. In D135011#3831452 , @craig.topper wrote: > Does these support scalable vector types from ARM SVE or RISC-V? I can't > remember what the rest of the __builtin_elementwise do. I ask because the > backends will probably

[PATCH] D135011: Add builtin_elementwise_sin and builtin_elementwise_cos

2022-10-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Ah, I'd forgotten we had a bunch of elementwise builtins already. I wouldn't be surprised if I asked for that in that patch, actually, especially because the existing ones include some functions like `max` and `min` where you could easily imagine them being