[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-27 Thread Fraser Cormack via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-27 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/128748 >From f827260918c81053d833db6fe81039b7c0990a2f Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 25 Feb 2025 12:27:06 + Subject: [PATCH 1/3] [libclc] Move sqrt to CLC library This is fairly strai

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Fraser Cormack via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Matt Arsenault via cfe-commits
@@ -21,19 +21,17 @@ */ #if __CLC_FPSIZE == 64 -#define __CLC_NAN __builtin_nan("") -#define ZERO 0.0 +#define __CLC_NAN DBL_NAN #elif __CLC_FPSIZE == 32 -#define __CLC_NAN NAN -#define ZERO 0.0f +#define __CLC_NAN FLT_NAN #elif __CLC_FPSIZE == 16 -#define __CLC_NAN (half)NA

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

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

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Fraser Cormack (frasercrmck) Changes This is fairly straightforward for most targets. AMDGPU provides its own implementation of sqrt for double types. This commit moves this into the implementation of CLC sqrt. It uses weak linka

[libclc] [libclc] Move sqrt to CLC library (PR #128748)

2025-02-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/128748 This is fairly straightforward for most targets. AMDGPU provides its own implementation of sqrt for double types. This commit moves this into the implementation of CLC sqrt. It uses weak linkage on the 'de