i386: Fix AVX512BW intrin header with __OPTIMIZE__ [PR 118813]
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Hi all,
When moving intrins around for AVX10 implementation in GCC 14,
the intrin _kshiftli_mask32 and _kshiftri_mask32 are wrongly
wrapped by "#if __OPTIMIZE__" instead of "#ifdef __OPTIMIZE__",
leading to the intrin file not `-Wsystem-headers -Wundef` clean
since r14-4490.
Ok for trunk?
Thx,
Haochen
gcc/ChangeLog:
PR target/118813
* config/i386/avx512bwintrin.h: Fix wrong __OPTIMIZE__
wrap.
---
gcc/config/i386/avx512bwintrin.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message-----
> From: Jiang, Haochen <haochen.jiang@intel.com>
> Sent: Monday, February 10, 2025 2:10 PM
> To: gcc-patches@gcc.gnu.org
> Cc: Liu, Hongtao <hongtao.liu@intel.com>; ubizjak@gmail.com
> Subject: [PATCH] i386: Fix AVX512BW intrin header with __OPTIMIZE__ [PR
> 118813]
>
> Hi all,
>
> When moving intrins around for AVX10 implementation in GCC 14, the intrin
> _kshiftli_mask32 and _kshiftri_mask32 are wrongly wrapped by "#if
> __OPTIMIZE__" instead of "#ifdef __OPTIMIZE__", leading to the intrin file not
> `-Wsystem-headers -Wundef` clean since r14-4490.
>
> Ok for trunk?
Ok, and please backport to GCC14 release branch.
>
> Thx,
> Haochen
>
> gcc/ChangeLog:
>
> PR target/118813
> * config/i386/avx512bwintrin.h: Fix wrong __OPTIMIZE__
> wrap.
> ---
> gcc/config/i386/avx512bwintrin.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/i386/avx512bwintrin.h
> b/gcc/config/i386/avx512bwintrin.h
> index 187e15a80ca..47c4c03e796 100644
> --- a/gcc/config/i386/avx512bwintrin.h
> +++ b/gcc/config/i386/avx512bwintrin.h
> @@ -199,7 +199,7 @@ _kunpackw_mask32 (__mmask16 __A, __mmask16
> __B)
> (__mmask32) __B);
> }
>
> -#if __OPTIMIZE__
> +#ifdef __OPTIMIZE__
> extern __inline __mmask32
> __attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
> _kshiftli_mask32 (__mmask32 __A, unsigned int __B)
> --
> 2.31.1
@@ -199,7 +199,7 @@ _kunpackw_mask32 (__mmask16 __A, __mmask16 __B)
(__mmask32) __B);
}
-#if __OPTIMIZE__
+#ifdef __OPTIMIZE__
extern __inline __mmask32
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_kshiftli_mask32 (__mmask32 __A, unsigned int __B)