[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Fraser Cormack via cfe-commits
frasercrmck wrote: It's worth noting that alive2 considers this a correct transformation for the before/after IR, for the scalar float/double versions of __clc_frexp for amdgcn. https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. I haven't spent much time looking at this one, because we have instructions for the two halves https://github.com/llvm/llvm-project/pull/129871 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[libclc] [libclc] Reduce bithacking in CLC frexp (PR #129871)

2025-03-05 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/129871 Also replace some magic constants with named ones. Checking against FP zero and using isnan and isinf functions allows the optimizer to create one unified @llvm.is.fpclass intrinsic. This results in fewer