From: Julia Koval Date: Thu, 16 Nov 2017 06:14:54 +0000 (+0100) Subject: Fix GFNI check which didn't work properly in gfni+sse case X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bde4b3ddd631c24de2c24785ee0e62404eed58a4;p=gcc.git Fix GFNI check which didn't work properly in gfni+sse case gcc/ PR target/82983 * config/i386/gfniintrin.h: Add sse check. * config/i386/i386.c (ix86_expand_builtin): Fix gfni check. From-SVN: r254797 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8a716afb006..0068c53d062 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-11-16 Julia Koval + + PR target/82983 + * config/i386/gfniintrin.h: Add sse check. + * config/i386/i386.c (ix86_expand_builtin): Fix gfni check. + 2017-11-16 Julia Koval * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET, diff --git a/gcc/config/i386/gfniintrin.h b/gcc/config/i386/gfniintrin.h index dc07428398a..e9fea2ef00a 100644 --- a/gcc/config/i386/gfniintrin.h +++ b/gcc/config/i386/gfniintrin.h @@ -28,9 +28,9 @@ #ifndef _GFNIINTRIN_H_INCLUDED #define _GFNIINTRIN_H_INCLUDED -#ifndef __GFNI__ +#if !defined(__GFNI__) || !defined(__SSE__) #pragma GCC push_options -#pragma GCC target("gfni") +#pragma GCC target("gfni,sse") #define __DISABLE_GFNI__ #endif /* __GFNI__ */ diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7d4cc61bf4a..b2c2934bcf0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -35191,6 +35191,8 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget, & ix86_isa_flags)) || ((ix86_builtins_isa[fcode].isa & OPTION_MASK_ISA_AVX512VL) && !(ix86_isa_flags & OPTION_MASK_ISA_AVX512VL)) + || ((ix86_builtins_isa[fcode].isa & OPTION_MASK_ISA_GFNI) + && !(ix86_isa_flags & OPTION_MASK_ISA_GFNI)) || ((ix86_builtins_isa[fcode].isa & OPTION_MASK_ISA_MMX) && !(ix86_isa_flags & OPTION_MASK_ISA_MMX)) || (ix86_builtins_isa[fcode].isa2