[llvm-bugs] [Bug 32411] New: [KNL] _MM_HINT_T0 should be a value from 1 to 2

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 24 09:29:16 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=32411

            Bug ID: 32411
           Summary: [KNL] _MM_HINT_T0 should be a value from 1 to 2
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Headers
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ilia.taraban at intel.com
                CC: llvm-bugs at lists.llvm.org

==============test.c=================
#include <immintrin.h>
__m512i a;
float arr[1000];

int main()
{
    _mm512_prefetch_i32gather_ps(a, (char*)&arr+128, 1, _MM_HINT_T0);
    return 0;
}

======================================

>>>clang -v
clang version 5.0.0 (trunk 298699)
...

>>>clang   -O0  -march=knl  test.c
intrin_gather_scatter.c:7:5: error: argument should be a value from 1 to 2
    _mm512_prefetch_i32gather_ps(a, (char*)&arr+128, 1, _MM_HINT_T0);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../lib/clang/5.0.0/include/avx512pfintrin.h:50:3: note: expanded from macro
'_mm512_prefetch_i32gather_ps'
  __builtin_ia32_gatherpfdps((__mmask16) -1, \
  ^
1 error generated.


======================================
In xmmintrin.h there are such rows like:
#define _MM_HINT_T0 3
#define _MM_HINT_T1 2
#define _MM_HINT_T2 1
#define _MM_HINT_NTA 0

Which I think is contrary to the documentation(_MM_HINT_T0 is 1, _MM_HINT_T1 is
2, _MM_HINT_T2 is 3
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_prefetch_i32gather_ps&expand=4087
and
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm512_prefetch_i32extscatter_ps&expand=4087,4083,4083)
These values was made by lattner in -r 112283.
r112283 | lattner | 2010-08-28 00:10:06 +0400 (Sat, 28 Aug 2010) | 2 lines
Changed paths:
   M /cfe/trunk/lib/Headers/xmmintrin.h

fix incorrect MM_HINT_ definitions, PR8011

>>>svn diff -c 112283
Index: xmmintrin.h
======================================
--- xmmintrin.h (revision 112282)
+++ xmmintrin.h (revision 112283)
@@ -632,9 +632,9 @@
   _mm_store_ps(p, a);
}

-#define _MM_HINT_T0 1
+#define _MM_HINT_T0 3
#define _MM_HINT_T1 2
-#define _MM_HINT_T2 3
+#define _MM_HINT_T2 1
#define _MM_HINT_NTA 0


------------------------
Intel Software Engineer
Ilia Taraban

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170324/67ab88b8/attachment.html>


More information about the llvm-bugs mailing list