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

2024-12-13 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/119596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/119596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck edited https://github.com/llvm/llvm-project/pull/119596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-12 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: > > which in its header uses this strange **asm** method of calling LLVM > > intrinsics directly. > > That's something that's always surprised me it works. It's rather unsafe (you > can bypass immarg validation for instance). Plus asm callsites get infected > with overly co

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

2024-12-12 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/119596 >From 68df2622a3ca1b98a0cbf1fc9e6200e12fecbb2e Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Wed, 11 Dec 2024 17:28:38 + Subject: [PATCH 1/2] [libclc] Optimize ceil/fabs/floor/rint/trunc These fun

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

2024-12-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > which in its header uses this strange __asm__ method of calling LLVM > intrinsics directly. That's something that's always surprised me it works. It's rather unsafe (you can bypass immarg validation for instance). Plus asm callsites get infected with overly conservative attrib

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

2024-12-12 Thread Fraser Cormack via cfe-commits
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 hav

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

2024-12-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. LGTM. I'm not sure how this all ends up expanding, I was expecting to see the elementwise builtins used. It would be great if we had update_cc_test_checks style testing for the resulting implementation https://github.com/llvm/llvm-project

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

2024-12-11 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: CC @rjodinchr, @karolherbst https://github.com/llvm/llvm-project/pull/119596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-12-11 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/119596 These functions all map to the corresponding LLVM intrinsics, but the vector intrinsics weren't being generated. The intrinsic mapping from CLC vector function to vector intrinsic was working correctly, but