[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm closed this revision. arsenm added a comment. 15e0fe0b6122e32657b98daf74a1fce028d2e5bf CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://reviews.llvm.org/D156743 __

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D156743#4644285 , @Anastasia wrote: > If we think there are no better alternatives and implementation is generic > enough for every vendor, LGTM! You could argue annotating the raw callsite is better but I don't know how to i

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. If we think there are no better alternatives and implementation is generic enough for every vendor, LGTM! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://revi

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-12 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://reviews.llvm.org/D156743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-09-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://reviews.llvm.org/D156743 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-30 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. ping The alternative is to directly put the !fpmath on the sqrt call sites but I have no idea how to do that CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://reviews.llvm.org/D156743 ___ cfe-commits

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-07 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); Anastasia wrote: > arsenm wrote: > > svenvh wrote: > > > Anastasia wrote: > > > > Is this a

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); arsenm wrote: > svenvh wrote: > > Anastasia wrote: > > > Is this a generic implementation

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); svenvh wrote: > Anastasia wrote: > > Is this a generic implementation enough? Would some tar

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 546814. arsenm marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156743/new/ https://reviews.llvm.org/D156743 Files: clang/lib/Headers/opencl-c-base.h clang/lib/Headers/opencl-c.h clang/lib/Sema/OpenCLBuiltins.td

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-02 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. If we go with this approach, please also remove sqrt from `clang/lib/Sema/OpenCLBuiltins.td` (and ideally add a comment pointing out that sqrt is handled in `opencl-c-base.h`) Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __c

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-01 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/Headers/opencl-c-base.h:832 + +inline float __ovld __cnfn sqrt(float __x) { + return __builtin_elementwise_sqrt(__x); Is this a generic implementation enough? Would some targets not need to do something dif

[PATCH] D156743: clang/OpenCL: Add inline implementations of sqrt in builtin header

2023-08-01 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 546164. arsenm retitled this revision from "[wip] clang/OpenCL: Add inline implementations of sqrt in builtin header" to "clang/OpenCL: Add inline implementations of sqrt in builtin header". arsenm edited the summary of this revision. arsenm added a comment.