mirror of git://gcc.gnu.org/git/gcc.git
				
				
				
			adxintrin.h: Remove guarding __ADX__ check.
Changelog
        * config/i386/adxintrin.h: Remove guarding __ADX__ check.
        * config/i386/x86intrin.h: Likewise.
        * config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove
        OPTION_MASK_ISA_ADX from needed options for
        __builtin_ia32_addcarryx_u32 and __builtin_ia32_addcarryx_u64.
        (ix86_expand_builtin): Use add<mode>3_carry in expanding of
        IX86_BUILTIN_ADDCARRYX32 and IX86_BUILTIN_ADDCARRYX64.
testsuite/Changelog
        * gcc.target/i386/adx-addxcarry32-3.c: New.
        * gcc.target/i386/adx-addxcarry64-3.c: New.
From-SVN: r190254
			
			
This commit is contained in:
		
							parent
							
								
									0c02ab396e
								
							
						
					
					
						commit
						9319fa21f4
					
				|  | @ -1,3 +1,13 @@ | |||
| 2012-08-09  Michael Zolotukhin  <michael.v.zolotukhin@intel.com> | ||||
| 
 | ||||
| 	* config/i386/adxintrin.h: Remove guarding __ADX__ check. | ||||
| 	* config/i386/x86intrin.h: Likewise. | ||||
| 	* config/i386/i386.c (ix86_init_mmx_sse_builtins): Remove | ||||
| 	OPTION_MASK_ISA_ADX from needed options for | ||||
| 	__builtin_ia32_addcarryx_u32 and __builtin_ia32_addcarryx_u64. | ||||
| 	(ix86_expand_builtin): Use add<mode>3_carry in expanding of | ||||
| 	IX86_BUILTIN_ADDCARRYX32 and IX86_BUILTIN_ADDCARRYX64. | ||||
| 
 | ||||
| 2012-08-09  Andrey Belevantsev  <abel@ispras.ru> | ||||
| 
 | ||||
| 	PR rtl-optimization/53701 | ||||
|  |  | |||
|  | @ -25,10 +25,6 @@ | |||
| # error "Never use <adxintrin.h> directly; include <x86intrin.h> instead." | ||||
| #endif | ||||
| 
 | ||||
| #ifndef __ADX__ | ||||
| # error "Flag-preserving add-carry instructions not enabled" | ||||
| #endif /* __ADX__ */ | ||||
| 
 | ||||
| #ifndef _ADXINTRIN_H_INCLUDED | ||||
| #define _ADXINTRIN_H_INCLUDED | ||||
| 
 | ||||
|  |  | |||
|  | @ -27968,9 +27968,9 @@ ix86_init_mmx_sse_builtins (void) | |||
| 	       INT_FTYPE_PULONGLONG, IX86_BUILTIN_RDSEED64_STEP); | ||||
| 
 | ||||
|   /* ADCX */ | ||||
|   def_builtin (OPTION_MASK_ISA_ADX, "__builtin_ia32_addcarryx_u32", | ||||
|   def_builtin (0, "__builtin_ia32_addcarryx_u32", | ||||
| 	       UCHAR_FTYPE_UCHAR_UINT_UINT_PUNSIGNED, IX86_BUILTIN_ADDCARRYX32); | ||||
|   def_builtin (OPTION_MASK_ISA_ADX && OPTION_MASK_ISA_64BIT, | ||||
|   def_builtin (OPTION_MASK_ISA_64BIT, | ||||
| 	       "__builtin_ia32_addcarryx_u64", | ||||
| 	       UCHAR_FTYPE_UCHAR_ULONGLONG_ULONGLONG_PULONGLONG, | ||||
| 	       IX86_BUILTIN_ADDCARRYX64); | ||||
|  | @ -30343,12 +30343,12 @@ rdseed_step: | |||
|       return target; | ||||
| 
 | ||||
|     case IX86_BUILTIN_ADDCARRYX32: | ||||
|       icode = CODE_FOR_adcxsi3; | ||||
|       icode = TARGET_ADX ? CODE_FOR_adcxsi3 : CODE_FOR_addsi3_carry; | ||||
|       mode0 = SImode; | ||||
|       goto addcarryx; | ||||
| 
 | ||||
|     case IX86_BUILTIN_ADDCARRYX64: | ||||
|       icode = CODE_FOR_adcxdi3; | ||||
|       icode = TARGET_ADX ? CODE_FOR_adcxdi3 : CODE_FOR_adddi3_carry; | ||||
|       mode0 = DImode; | ||||
| 
 | ||||
| addcarryx: | ||||
|  |  | |||
|  | @ -105,8 +105,6 @@ | |||
| #include <prfchwintrin.h> | ||||
| #endif | ||||
| 
 | ||||
| #ifdef __ADX__ | ||||
| #include <adxintrin.h> | ||||
| #endif | ||||
| 
 | ||||
| #endif /* _X86INTRIN_H_INCLUDED */ | ||||
|  |  | |||
|  | @ -1,3 +1,8 @@ | |||
| 2012-08-09  Michael Zolotukhin  <michael.v.zolotukhin@intel.com> | ||||
| 
 | ||||
| 	* gcc.target/i386/adx-addxcarry32-3.c: New. | ||||
| 	* gcc.target/i386/adx-addxcarry64-3.c: New. | ||||
| 
 | ||||
| 2012-08-09  Andrey Belevantsev  <abel@ispras.ru> | ||||
| 
 | ||||
| 	PR rtl-optimization/53701 | ||||
|  |  | |||
|  | @ -0,0 +1,15 @@ | |||
| /* { dg-do compile } */ | ||||
| /* { dg-options "-mno-adx -O2" } */ | ||||
| /* { dg-final { scan-assembler "adcl" } } */ | ||||
| 
 | ||||
| #include <x86intrin.h> | ||||
| 
 | ||||
| volatile unsigned char c; | ||||
| volatile unsigned int x, y; | ||||
| unsigned int *sum; | ||||
| 
 | ||||
| void extern | ||||
| adx_test (void) | ||||
| { | ||||
|     c = _addcarryx_u32 (c, x, y, sum); | ||||
| } | ||||
|  | @ -0,0 +1,15 @@ | |||
| /* { dg-do compile { target { ! ia32 } } } */ | ||||
| /* { dg-options "-mno-adx -O2" } */ | ||||
| /* { dg-final { scan-assembler "adcq" } } */ | ||||
| 
 | ||||
| #include <x86intrin.h> | ||||
| 
 | ||||
| volatile unsigned char c; | ||||
| volatile unsigned long long x, y; | ||||
| unsigned long long *sum; | ||||
| 
 | ||||
| void extern | ||||
| adx_test (void) | ||||
| { | ||||
|     c = _addcarryx_u64 (c, x, y, sum); | ||||
| } | ||||
		Loading…
	
		Reference in New Issue
	
	 Michael Zolotukhin
						Michael Zolotukhin