https://github.com/wenju-he created 
https://github.com/llvm/llvm-project/pull/163522

0x7ff0000000000000 is +inf. Change it to quiet nan 0x7ff8000000000000.

>From 9a49cb5e37f308fd889dfc5ee96981139c3221d2 Mon Sep 17 00:00:00 2001
From: Wenju He <[email protected]>
Date: Wed, 15 Oct 2025 10:29:34 +0200
Subject: [PATCH] [libclc] Fix double NAN_MASK

0x7ff0000000000000 is +inf. Change it to quiet nan 0x7ff8000000000000.
---
 libclc/clc/lib/generic/math/clc_nan.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libclc/clc/lib/generic/math/clc_nan.inc 
b/libclc/clc/lib/generic/math/clc_nan.inc
index 46e828ba48c7e..47527088960da 100644
--- a/libclc/clc/lib/generic/math/clc_nan.inc
+++ b/libclc/clc/lib/generic/math/clc_nan.inc
@@ -7,7 +7,7 @@
 
//===----------------------------------------------------------------------===//
 
 #if __CLC_FPSIZE == 64
-#define NAN_MASK 0x7ff0000000000000ul
+#define NAN_MASK 0x7ff8000000000000ul
 #elif __CLC_FPSIZE == 32
 #define NAN_MASK 0x7fc00000
 #elif __CLC_FPSIZE == 16

_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to