[libclc] 4ddba3a - libclc: Add parentheses to silence warning

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 29 15:20:02 PST 2022


Author: Matt Arsenault
Date: 2022-12-29T18:19:55-05:00
New Revision: 4ddba3a7061fef81faed2f0fbaba25f4b78f6014

URL: https://github.com/llvm/llvm-project/commit/4ddba3a7061fef81faed2f0fbaba25f4b78f6014
DIFF: https://github.com/llvm/llvm-project/commit/4ddba3a7061fef81faed2f0fbaba25f4b78f6014.diff

LOG: libclc: Add parentheses to silence warning

Fixes #59209

Added: 
    

Modified: 
    libclc/generic/lib/math/acosh.cl

Removed: 
    


################################################################################
diff  --git a/libclc/generic/lib/math/acosh.cl b/libclc/generic/lib/math/acosh.cl
index cc10dd48fadb5..59da511627744 100644
--- a/libclc/generic/lib/math/acosh.cl
+++ b/libclc/generic/lib/math/acosh.cl
@@ -117,7 +117,7 @@ _CLC_OVERLOAD _CLC_DEF double acosh(double x) {
 
     ret = ux >= 0x7FF0000000000000 ? x : ret;
     ret = x == 1.0 ? 0.0 : ret;
-    ret = (ux & SIGNBIT_DP64) != 0UL | x < 1.0 ? as_double(QNANBITPATT_DP64) : ret;
+    ret = ((ux & SIGNBIT_DP64) != 0UL | x < 1.0) ? as_double(QNANBITPATT_DP64) : ret;
 
     return ret;
 }


        


More information about the cfe-commits mailing list