On Mon, Mar 3, 2014 at 11:27 PM, Uros Bizjak <ubiz...@gmail.com> wrote:
>> The new gcc.target/i386/prefetchwt1-1.c test currently FAILs on Solaris >> 9/x86: >> >> FAIL: gcc.target/i386/prefetchwt1-1.c (test for excess errors) >> Excess errors: >> /var/gcc/regression/trunk/9-gcc-gas/build/gcc/include/xmmintrin.h:1195:1: >> error: >> inlining failed in call to always_inline '_mm_prefetch': target specific >> option >> mismatch >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/prefetchwt1-1.c:12:5: >> error: called from here >> >> gcc.target/i386/prefetchwt1-1.c: output file does not exist >> UNRESOLVED: gcc.target/i386/prefetchwt1-1.c scan-assembler [ >> \\t]+prefetchwt1[ \ >> \t]+ >> >> This can be fixed by compiling with -msse2. > > Actually, we should take prefetch instructions out of various GCC > target pragmas. Patterns that emit these instructions are designed to > (depending on selected ISA) always emit the most optimal prefetch > instruction. > > The patch also changes the compiler to emit prefetchwt1 only for > _MM_HINT_T1, while for _MM_HINT_T0, it still emits prefetchw. In > addition, the patch corrects wrong MM_HINT_T0 value. > > Patch was bootstrapped and tested on x86_64-pc-linux-gnu {,-m32} and > committed to mainline SVN. > > 2014-03-03 Uros Bizjak <ubiz...@gmail.com> > > * config/i386/xmmintrin.h (enum _mm_hint) <_MM_HINT_ET0>: Correct > hint value. > (_mm_prefetch): Move out of GCC target("sse") pragma. > * config/i386/prfchwintrin.h (_m_prefetchw): Move out of > GCC target("prfchw") pragma. > * config/i386/i386.md (prefetch): Emit prefetchwt1 only > for locality <= 2. > * config/i386/i386.c (ix86_option_override_internal): Enable > -mprfchw with -mprefetchwt1. BTW: There are a couple of new testsuite failures: FAIL: gcc.target/i386/avx512pf-vscatterpf0dpd-1.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0dpd-1.c scan-assembler-times vscatterpf0dpd[ \\\\t]+[^\\n]*%ymm[0-9] 2 UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0dpd-1.c scan-assembler-times vscatterpf0dpd[ \\\\t]+[^\\n]*{%k[1-7] 1 FAIL: gcc.target/i386/avx512pf-vscatterpf0dps-1.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0dps-1.c scan-assembler-times vscatterpf0dps[ \\\\t]+[^\\n]*%zmm[0-9] 2 UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0dps-1.c scan-assembler-times vscatterpf0dps[ \\\\t]+[^\\n]*{%k[1-7] 1 FAIL: gcc.target/i386/avx512pf-vscatterpf0qpd-1.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0qpd-1.c scan-assembler-times vscatterpf0qpd[ \\\\t]+[^\\n]*%zmm[0-9] 2 UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0qpd-1.c scan-assembler-times vscatterpf0qpd[ \\\\t]+[^\\n]*{%k[1-7] 1 FAIL: gcc.target/i386/avx512pf-vscatterpf0qps-1.c (test for excess errors) UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0qps-1.c scan-assembler-times vscatterpf0qps[ \\\\t]+[^\\n]*%zmm[0-9] 2 UNRESOLVED: gcc.target/i386/avx512pf-vscatterpf0qps-1.c scan-assembler-times vscatterpf0qps[ \\\\t]+[^\\n]*{%k[1-7] 1 They are all: FAIL: gcc.target/i386/avx512pf-vscatterpf0dpd-1.c (test for excess errors) Excess errors: /ssd/uros/gcc-build/gcc/include/avx512pfintrin.h:108:3: error: the last argument must be hint 0 or 1 They are due to _MM_HINT_ET0 fix, and probably show that the pattern was not updated when hint constants were adjusted to 2 and 3. Kirill, can you please look at this inconsistency? Uros.