[libclc] [libclc] Optimize ceil/fabs/floor/rint/trunc (PR #119596)
Fraser Cormack via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 04:37:59 PST 2024
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 conservative attributes (like convergent, which you can't remove)
Yeah, good point.
> > It should maybe just do: OpenCL builtin -> CLC builtin -> clang builtin?
>
> That's the simplest way to go
I've updated the patch to do just that, using the builtins. I'll update the description accordingly.
https://github.com/llvm/llvm-project/pull/119596
More information about the cfe-commits
mailing list