Commit b245befc by Jakub Jelinek Committed by Jakub Jelinek

re PR target/91704 ([X86] Codegen for _mm256_cmpgt_epi8 is affected by -funsigned-char)

	PR target/91704
	* config/i386/avxintrin.h (__v32qs): New typedef.
	* config/i386/avx2intrin.h (_mm256_cmpgt_epi8): Use casts to __v32qs
	instead of __v32qi.

	* gcc.target/i386/pr91704.c: New test.

From-SVN: r275507
parent 91dfef96
2019-09-09 Jakub Jelinek <jakub@redhat.com>
PR target/91704
* config/i386/avxintrin.h (__v32qs): New typedef.
* config/i386/avx2intrin.h (_mm256_cmpgt_epi8): Use casts to __v32qs
instead of __v32qi.
2019-09-09 Jose E. Marchesi <jose.marchesi@oracle.com>
* doc/invoke.texi (Option Summary): Cover eBPF.
......
......@@ -258,7 +258,7 @@ extern __inline __m256i
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm256_cmpgt_epi8 (__m256i __A, __m256i __B)
{
return (__m256i) ((__v32qi)__A > (__v32qi)__B);
return (__m256i) ((__v32qs)__A > (__v32qs)__B);
}
extern __inline __m256i
......
......@@ -47,6 +47,7 @@ typedef unsigned int __v8su __attribute__ ((__vector_size__ (32)));
typedef short __v16hi __attribute__ ((__vector_size__ (32)));
typedef unsigned short __v16hu __attribute__ ((__vector_size__ (32)));
typedef char __v32qi __attribute__ ((__vector_size__ (32)));
typedef signed char __v32qs __attribute__ ((__vector_size__ (32)));
typedef unsigned char __v32qu __attribute__ ((__vector_size__ (32)));
/* The Intel API is flexible enough that we must allow aliasing with other
......
2019-09-09 Jakub Jelinek <jakub@redhat.com>
PR target/91704
* gcc.target/i386/pr91704.c: New test.
2019-09-09 Jose E. Marchesi <jose.marchesi@oracle.com>
* gcc.dg/builtins-config.h: eBPF doesn't support C99 standard
......
/* PR target/91704 */
/* { dg-do compile } */
/* { dg-options "-O2 -funsigned-char -mavx2 -mavx512f -masm=att" } */
/* { dg-final { scan-assembler-times "\tvpcmpgtb\t%ymm" 1 } } */
/* { dg-final { scan-assembler-not "\tvpsubusb\t" } } */
/* { dg-final { scan-assembler-not "\tvpcmpeqb\t" } } */
#include <x86intrin.h>
__m256i
foo (__m256i x, __m256i y)
{
return _mm256_cmpgt_epi8 (x, y);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment