View | Details | Return to bug 85832 | Differences between
and this patch

Collapse All | Expand All

(-)gcc/config/i386/sse.md.jj (-9 / +13 lines)
Lines 11210-11235 (define_expand "<avx512>_eq<mode>3<mask_ Link Here
11210
  "ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);")
11210
  "ix86_fixup_binary_operands_no_copy (EQ, <MODE>mode, operands);")
11211
11211
11212
(define_insn "<avx512>_eq<mode>3<mask_scalar_merge_name>_1"
11212
(define_insn "<avx512>_eq<mode>3<mask_scalar_merge_name>_1"
11213
  [(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=Yk")
11213
  [(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=Yk,Yk")
11214
	(unspec:<avx512fmaskmode>
11214
	(unspec:<avx512fmaskmode>
11215
	  [(match_operand:VI12_AVX512VL 1 "nonimmediate_operand" "%v")
11215
	  [(match_operand:VI12_AVX512VL 1 "nonimmediate_operand" "%v,v")
11216
	   (match_operand:VI12_AVX512VL 2 "nonimmediate_operand" "vm")]
11216
	   (match_operand:VI12_AVX512VL 2 "vector_move_operand" "vm,C")]
11217
	  UNSPEC_MASKED_EQ))]
11217
	  UNSPEC_MASKED_EQ))]
11218
  "TARGET_AVX512F && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
11218
  "TARGET_AVX512BW && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
11219
  "vpcmpeq<ssemodesuffix>\t{%2, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %2}"
11219
  "@
11220
   vpcmpeq<ssemodesuffix>\t{%2, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %2}
11221
   vptestm<ssemodesuffix>\t{%1, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %1}"
11220
  [(set_attr "type" "ssecmp")
11222
  [(set_attr "type" "ssecmp")
11221
   (set_attr "prefix_extra" "1")
11223
   (set_attr "prefix_extra" "1")
11222
   (set_attr "prefix" "evex")
11224
   (set_attr "prefix" "evex")
11223
   (set_attr "mode" "<sseinsnmode>")])
11225
   (set_attr "mode" "<sseinsnmode>")])
11224
11226
11225
(define_insn "<avx512>_eq<mode>3<mask_scalar_merge_name>_1"
11227
(define_insn "<avx512>_eq<mode>3<mask_scalar_merge_name>_1"
11226
  [(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=Yk")
11228
  [(set (match_operand:<avx512fmaskmode> 0 "register_operand" "=Yk,Yk")
11227
	(unspec:<avx512fmaskmode>
11229
	(unspec:<avx512fmaskmode>
11228
	  [(match_operand:VI48_AVX512VL 1 "nonimmediate_operand" "%v")
11230
	  [(match_operand:VI48_AVX512VL 1 "nonimmediate_operand" "%v,v")
11229
	   (match_operand:VI48_AVX512VL 2 "nonimmediate_operand" "vm")]
11231
	   (match_operand:VI48_AVX512VL 2 "vector_move_operand" "vm,C")]
11230
	  UNSPEC_MASKED_EQ))]
11232
	  UNSPEC_MASKED_EQ))]
11231
  "TARGET_AVX512F && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
11233
  "TARGET_AVX512F && !(MEM_P (operands[1]) && MEM_P (operands[2]))"
11232
  "vpcmpeq<ssemodesuffix>\t{%2, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %2}"
11234
  "@
11235
   vpcmpeq<ssemodesuffix>\t{%2, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %2}
11236
   vptestm<ssemodesuffix>\t{%1, %1, %0<mask_scalar_merge_operand3>|%0<mask_scalar_merge_operand3>, %1, %1}"
11233
  [(set_attr "type" "ssecmp")
11237
  [(set_attr "type" "ssecmp")
11234
   (set_attr "prefix_extra" "1")
11238
   (set_attr "prefix_extra" "1")
11235
   (set_attr "prefix" "evex")
11239
   (set_attr "prefix" "evex")
(-)gcc/testsuite/gcc.target/i386/avx512f-pr85832.c.jj (+19 lines)
Line 0 Link Here
1
/* PR target/85832 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -mavx512f -mno-avx512vl -mno-avx512bw -masm=att" } */
4
/* { dg-final { scan-assembler-times {\mvptestmd\M} 1 } } */
5
/* { dg-final { scan-assembler-times {\mvptestmq\M} 1 } } */
6
7
#include <x86intrin.h>
8
9
int
10
f1 (__m512i x)
11
{
12
  return _mm512_cmpeq_epi32_mask (x, _mm512_setzero_si512 ());
13
}
14
15
int
16
f2 (__m512i x)
17
{
18
  return _mm512_cmpeq_epi64_mask (x, _mm512_setzero_si512 ());
19
}
(-)gcc/testsuite/gcc.target/i386/avx512vl-pr85832.c.jj (+31 lines)
Line 0 Link Here
1
/* PR target/85832 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -mavx512vl -mno-avx512bw -masm=att" } */
4
/* { dg-final { scan-assembler-times {\mvptestmd\M} 2 } } */
5
/* { dg-final { scan-assembler-times {\mvptestmq\M} 2 } } */
6
7
#include <x86intrin.h>
8
9
int
10
f1 (__m256i x)
11
{
12
  return _mm256_cmpeq_epi32_mask (x, _mm256_setzero_si256 ());
13
}
14
15
int
16
f2 (__m256i x)
17
{
18
  return _mm256_cmpeq_epi64_mask (x, _mm256_setzero_si256 ());
19
}
20
21
int
22
f3 (__m128i x)
23
{
24
  return _mm_cmpeq_epi32_mask (x, _mm_setzero_si128 ());
25
}
26
27
int
28
f4 (__m128i x)
29
{
30
  return _mm_cmpeq_epi64_mask (x, _mm_setzero_si128 ());
31
}
(-)gcc/testsuite/gcc.target/i386/avx512bw-pr85832.c.jj (+19 lines)
Line 0 Link Here
1
/* PR target/85832 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -mavx512bw -mno-avx512vl -masm=att" } */
4
/* { dg-final { scan-assembler-times {\mvptestmb\M} 1 } } */
5
/* { dg-final { scan-assembler-times {\mvptestmw\M} 1 } } */
6
7
#include <x86intrin.h>
8
9
int
10
f1 (__m512i x)
11
{
12
  return _mm512_cmpeq_epi8_mask (x, _mm512_setzero_si512 ());
13
}
14
15
int
16
f2 (__m512i x)
17
{
18
  return _mm512_cmpeq_epi16_mask (x, _mm512_setzero_si512 ());
19
}
(-)gcc/testsuite/gcc.target/i386/avx512vlbw-pr85832.c.jj (+31 lines)
Line 0 Link Here
1
/* PR target/85832 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2 -mavx512vl -mavx512bw -masm=att" } */
4
/* { dg-final { scan-assembler-times {\mvptestmb\M} 2 } } */
5
/* { dg-final { scan-assembler-times {\mvptestmw\M} 2 } } */
6
7
#include <x86intrin.h>
8
9
int
10
f1 (__m256i x)
11
{
12
  return _mm256_cmpeq_epi8_mask (x, _mm256_setzero_si256 ());
13
}
14
15
int
16
f2 (__m256i x)
17
{
18
  return _mm256_cmpeq_epi16_mask (x, _mm256_setzero_si256 ());
19
}
20
21
int
22
f3 (__m128i x)
23
{
24
  return _mm_cmpeq_epi8_mask (x, _mm_setzero_si128 ());
25
}
26
27
int
28
f4 (__m128i x)
29
{
30
  return _mm_cmpeq_epi16_mask (x, _mm_setzero_si128 ());
31
}

Return to bug 85832