[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)

Fraser Cormack via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 03:36:04 PST 2024


frasercrmck wrote:

> LGTM. I'm not sure how this all ends up expanding, I was expecting to see the elementwise builtins used.

Yes, I suspect that this code originates from before the builtins were available? The builtins would probably make more sense, tbh. The current method is that we have the OpenCL builtin call the corresponding CLC builtin, which in its header uses this strange `__asm__` method of calling LLVM intrinsics directly. It should maybe just do: OpenCL builtin -> CLC builtin -> clang builtin?

> It would be great if we had update_cc_test_checks style testing for the resulting implementation

Oh yes, I agree. My efforts to introduce testing stalled somewhat. Maybe we can pick up that discussion on #87989?

https://github.com/llvm/llvm-project/pull/119596


More information about the cfe-commits mailing list