r333563 - [X86] Remove 'return' from a bunch of intrinsics that return void and use a builtin that returns void.

Craig Topper via cfe-commits cfe-commits at lists.llvm.org
Wed May 30 10:23:45 PDT 2018


Author: ctopper
Date: Wed May 30 10:23:45 2018
New Revision: 333563

URL: http://llvm.org/viewvc/llvm-project?rev=333563&view=rev
Log:
[X86] Remove 'return' from a bunch of intrinsics that return void and use a builtin that returns void.

Found by running the intrinsic headers through -pedantic -ansi.

Modified:
    cfe/trunk/lib/Headers/avx512vlintrin.h
    cfe/trunk/lib/Headers/emmintrin.h
    cfe/trunk/lib/Headers/fxsrintrin.h
    cfe/trunk/lib/Headers/ia32intrin.h
    cfe/trunk/lib/Headers/immintrin.h
    cfe/trunk/lib/Headers/pkuintrin.h
    cfe/trunk/lib/Headers/xmmintrin.h
    cfe/trunk/lib/Headers/xsaveintrin.h
    cfe/trunk/lib/Headers/xsaveoptintrin.h

Modified: cfe/trunk/lib/Headers/avx512vlintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/avx512vlintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/avx512vlintrin.h (original)
+++ cfe/trunk/lib/Headers/avx512vlintrin.h Wed May 30 10:23:45 2018
@@ -7432,7 +7432,7 @@ _mm256_maskz_cvtusepi64_epi16 (__mmask8
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm256_mask_cvtusepi64_storeu_epi16 (void * __P, __mmask8 __M, __m256i __A)
 {
-  return __builtin_ia32_pmovusqw256mem_mask ((__v8hi *) __P, (__v4di) __A, __M);
+  __builtin_ia32_pmovusqw256mem_mask ((__v8hi *) __P, (__v4di) __A, __M);
 }
 
 static __inline__ __m128i __DEFAULT_FN_ATTRS

Modified: cfe/trunk/lib/Headers/emmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/emmintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/emmintrin.h (original)
+++ cfe/trunk/lib/Headers/emmintrin.h Wed May 30 10:23:45 2018
@@ -1979,7 +1979,7 @@ _mm_store1_pd(double *__dp, __m128d __a)
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm_store_pd1(double *__dp, __m128d __a)
 {
-  return _mm_store1_pd(__dp, __a);
+  _mm_store1_pd(__dp, __a);
 }
 
 /// Stores a 128-bit vector of [2 x double] into an unaligned memory

Modified: cfe/trunk/lib/Headers/fxsrintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/fxsrintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/fxsrintrin.h (original)
+++ cfe/trunk/lib/Headers/fxsrintrin.h Wed May 30 10:23:45 2018
@@ -43,7 +43,7 @@
 static __inline__ void __DEFAULT_FN_ATTRS
 _fxsave(void *__p)
 {
-  return __builtin_ia32_fxsave(__p);
+  __builtin_ia32_fxsave(__p);
 }
 
 /// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
@@ -61,7 +61,7 @@ _fxsave(void *__p)
 static __inline__ void __DEFAULT_FN_ATTRS
 _fxrstor(void *__p)
 {
-  return __builtin_ia32_fxrstor(__p);
+  __builtin_ia32_fxrstor(__p);
 }
 
 #ifdef __x86_64__
@@ -78,7 +78,7 @@ _fxrstor(void *__p)
 static __inline__ void __DEFAULT_FN_ATTRS
 _fxsave64(void *__p)
 {
-  return __builtin_ia32_fxsave64(__p);
+  __builtin_ia32_fxsave64(__p);
 }
 
 /// Restores the XMM, MMX, MXCSR and x87 FPU registers from the 512-byte
@@ -96,7 +96,7 @@ _fxsave64(void *__p)
 static __inline__ void __DEFAULT_FN_ATTRS
 _fxrstor64(void *__p)
 {
-  return __builtin_ia32_fxrstor64(__p);
+  __builtin_ia32_fxrstor64(__p);
 }
 #endif
 

Modified: cfe/trunk/lib/Headers/ia32intrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/ia32intrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/ia32intrin.h (original)
+++ cfe/trunk/lib/Headers/ia32intrin.h Wed May 30 10:23:45 2018
@@ -72,7 +72,7 @@ __rdtscp(unsigned int *__A) {
 
 static __inline__ void __attribute__((__always_inline__, __nodebug__))
 _wbinvd(void) {
-  return __builtin_ia32_wbinvd();
+  __builtin_ia32_wbinvd();
 }
 
 #endif /* __IA32INTRIN_H */

Modified: cfe/trunk/lib/Headers/immintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/immintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/immintrin.h (original)
+++ cfe/trunk/lib/Headers/immintrin.h Wed May 30 10:23:45 2018
@@ -282,25 +282,25 @@ _readgsbase_u64(void)
 static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
 _writefsbase_u32(unsigned int __V)
 {
-  return __builtin_ia32_wrfsbase32(__V);
+  __builtin_ia32_wrfsbase32(__V);
 }
 
 static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
 _writefsbase_u64(unsigned long long __V)
 {
-  return __builtin_ia32_wrfsbase64(__V);
+  __builtin_ia32_wrfsbase64(__V);
 }
 
 static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
 _writegsbase_u32(unsigned int __V)
 {
-  return __builtin_ia32_wrgsbase32(__V);
+  __builtin_ia32_wrgsbase32(__V);
 }
 
 static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
 _writegsbase_u64(unsigned long long __V)
 {
-  return __builtin_ia32_wrgsbase64(__V);
+  __builtin_ia32_wrgsbase64(__V);
 }
 
 #endif

Modified: cfe/trunk/lib/Headers/pkuintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/pkuintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/pkuintrin.h (original)
+++ cfe/trunk/lib/Headers/pkuintrin.h Wed May 30 10:23:45 2018
@@ -40,7 +40,7 @@ _rdpkru_u32(void)
 static __inline__ void __DEFAULT_FN_ATTRS
 _wrpkru(unsigned int __val)
 {
-  return __builtin_ia32_wrpkru(__val);
+  __builtin_ia32_wrpkru(__val);
 }
 
 #undef __DEFAULT_FN_ATTRS

Modified: cfe/trunk/lib/Headers/xmmintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xmmintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xmmintrin.h (original)
+++ cfe/trunk/lib/Headers/xmmintrin.h Wed May 30 10:23:45 2018
@@ -2048,7 +2048,7 @@ _mm_store1_ps(float *__p, __m128 __a)
 static __inline__ void __DEFAULT_FN_ATTRS
 _mm_store_ps1(float *__p, __m128 __a)
 {
-  return _mm_store1_ps(__p, __a);
+  _mm_store1_ps(__p, __a);
 }
 
 /// Stores float values from a 128-bit vector of [4 x float] to an

Modified: cfe/trunk/lib/Headers/xsaveintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xsaveintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xsaveintrin.h (original)
+++ cfe/trunk/lib/Headers/xsaveintrin.h Wed May 30 10:23:45 2018
@@ -33,23 +33,23 @@
 
 static __inline__ void __DEFAULT_FN_ATTRS
 _xsave(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xsave(__p, __m);
+  __builtin_ia32_xsave(__p, __m);
 }
 
 static __inline__ void __DEFAULT_FN_ATTRS
 _xrstor(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xrstor(__p, __m);
+  __builtin_ia32_xrstor(__p, __m);
 }
 
 #ifdef __x86_64__
 static __inline__ void __DEFAULT_FN_ATTRS
 _xsave64(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xsave64(__p, __m);
+  __builtin_ia32_xsave64(__p, __m);
 }
 
 static __inline__ void __DEFAULT_FN_ATTRS
 _xrstor64(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xrstor64(__p, __m);
+  __builtin_ia32_xrstor64(__p, __m);
 }
 #endif
 

Modified: cfe/trunk/lib/Headers/xsaveoptintrin.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Headers/xsaveoptintrin.h?rev=333563&r1=333562&r2=333563&view=diff
==============================================================================
--- cfe/trunk/lib/Headers/xsaveoptintrin.h (original)
+++ cfe/trunk/lib/Headers/xsaveoptintrin.h Wed May 30 10:23:45 2018
@@ -33,13 +33,13 @@
 
 static __inline__ void __DEFAULT_FN_ATTRS
 _xsaveopt(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xsaveopt(__p, __m);
+  __builtin_ia32_xsaveopt(__p, __m);
 }
 
 #ifdef __x86_64__
 static __inline__ void __DEFAULT_FN_ATTRS
 _xsaveopt64(void *__p, unsigned long long __m) {
-  return __builtin_ia32_xsaveopt64(__p, __m);
+  __builtin_ia32_xsaveopt64(__p, __m);
 }
 #endif
 




More information about the cfe-commits mailing list