]> granicus.if.org Git - clang/commitdiff
[X86] Fix a couple places that were using macro arguments twice when of the usages...
authorCraig Topper <craig.topper@intel.com>
Mon, 4 Jun 2018 02:56:18 +0000 (02:56 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 4 Jun 2018 02:56:18 +0000 (02:56 +0000)
One of the arguments was being used when the passthru argument is unused due to the mask being all 1s. But in that case the actual value doesn't matter so we should use undef instead to avoid expanding the macro argument unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@333865 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Headers/avx512fintrin.h

index d0899717c58c36372585411a687c3584321e6f64..abf2da25f2afa11ebc338df142b57e4b02077254 100644 (file)
@@ -2519,7 +2519,8 @@ _mm512_maskz_div_ps(__mmask16 __U, __m512 __A, __m512 __B) {
 
 #define _mm512_roundscale_ps(A, B) \
   (__m512)__builtin_ia32_rndscaleps_mask((__v16sf)(__m512)(A), (int)(B), \
-                                         (__v16sf)(__m512)(A), (__mmask16)-1, \
+                                         (__v16sf)_mm512_undefined_ps(), \
+                                         (__mmask16)-1, \
                                          _MM_FROUND_CUR_DIRECTION)
 
 #define _mm512_mask_roundscale_ps(A, B, C, imm) \
@@ -2550,7 +2551,8 @@ _mm512_maskz_div_ps(__mmask16 __U, __m512 __A, __m512 __B) {
 
 #define _mm512_roundscale_pd(A, B) \
   (__m512d)__builtin_ia32_rndscalepd_mask((__v8df)(__m512d)(A), (int)(B), \
-                                          (__v8df)(__m512d)(A), (__mmask8)-1, \
+                                          (__v8df)_mm512_undefined_pd(), \
+                                          (__mmask8)-1, \
                                           _MM_FROUND_CUR_DIRECTION)
 
 #define _mm512_mask_roundscale_pd(A, B, C, imm) \