+2020-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93670
+ * config/i386/sse.md (VI48F_256_DQ): New mode iterator.
+ (avx512vl_vextractf128<mode>): Use it instead of VI48F_256. Remove
+ TARGET_AVX512DQ from condition.
+ (vec_extract_lo_<mode><mask_name>): Use <mask_avx512dq_condition>
+ instead of <mask_mode512bit_condition> in condition. If
+ TARGET_AVX512DQ is false, emit vextract*64x4 instead of
+ vextract*32x8.
+ (vec_extract_lo_<mode><mask_name>): Drop <mask_avx512dq_condition>
+ from condition.
+
2020-02-12 Kewen Lin <linkw@gcc.gnu.org>
PR target/91052
(set_attr "prefix" "evex")
(set_attr "mode" "<sseinsnmode>")])
+(define_mode_iterator VI48F_256_DQ
+ [V8SI V8SF (V4DI "TARGET_AVX512DQ") (V4DF "TARGET_AVX512DQ")])
+
(define_expand "avx512vl_vextractf128<mode>"
[(match_operand:<ssehalfvecmode> 0 "nonimmediate_operand")
- (match_operand:VI48F_256 1 "register_operand")
+ (match_operand:VI48F_256_DQ 1 "register_operand")
(match_operand:SI 2 "const_0_to_1_operand")
(match_operand:<ssehalfvecmode> 3 "nonimm_or_0_operand")
(match_operand:QI 4 "register_operand")]
- "TARGET_AVX512DQ && TARGET_AVX512VL"
+ "TARGET_AVX512VL"
{
rtx (*insn)(rtx, rtx, rtx, rtx);
rtx dest = operands[0];
(const_int 4) (const_int 5)
(const_int 6) (const_int 7)])))]
"TARGET_AVX512F
- && <mask_mode512bit_condition>
+ && <mask_avx512dq_condition>
&& (<mask_applied> || !(MEM_P (operands[0]) && MEM_P (operands[1])))"
{
if (<mask_applied>
|| (!TARGET_AVX512VL
&& !REG_P (operands[0])
&& EXT_REX_SSE_REG_P (operands[1])))
- return "vextract<shuffletype>32x8\t{$0x0, %1, %0<mask_operand2>|%0<mask_operand2>, %1, 0x0}";
+ {
+ if (TARGET_AVX512DQ)
+ return "vextract<shuffletype>32x8\t{$0x0, %1, %0<mask_operand2>|%0<mask_operand2>, %1, 0x0}";
+ else
+ return "vextract<shuffletype>64x4\t{$0x0, %1, %0|%0, %1, 0x0}";
+ }
else
return "#";
}
(parallel [(const_int 0) (const_int 1)
(const_int 2) (const_int 3)])))]
"TARGET_AVX
- && <mask_avx512vl_condition> && <mask_avx512dq_condition>
+ && <mask_avx512vl_condition>
&& (<mask_applied> || !(MEM_P (operands[0]) && MEM_P (operands[1])))"
{
if (<mask_applied>)
+2020-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/93670
+ * gcc.target/i386/avx512vl-pr93670.c: New test.
+
2020-02-12 Richard Biener <rguenther@suse.de>
PR testsuite/93697
--- /dev/null
+/* PR target/93670 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512vl -mno-avx512dq" } */
+
+#include <x86intrin.h>
+
+__m128i
+f1 (__m256i x)
+{
+ return _mm256_extracti32x4_epi32 (x, 0);
+}
+
+__m128i
+f2 (__m256i x, __m128i w, __mmask8 m)
+{
+ return _mm256_mask_extracti32x4_epi32 (w, m, x, 0);
+}
+
+__m128i
+f3 (__m256i x, __mmask8 m)
+{
+ return _mm256_maskz_extracti32x4_epi32 (m, x, 0);
+}
+
+__m128
+f4 (__m256 x)
+{
+ return _mm256_extractf32x4_ps (x, 0);
+}
+
+__m128
+f5 (__m256 x, __m128 w, __mmask8 m)
+{
+ return _mm256_mask_extractf32x4_ps (w, m, x, 0);
+}
+
+__m128
+f6 (__m256 x, __mmask8 m)
+{
+ return _mm256_maskz_extractf32x4_ps (m, x, 0);
+}
+
+__m128i
+f7 (__m256i x)
+{
+ return _mm256_extracti32x4_epi32 (x, 1);
+}
+
+__m128i
+f8 (__m256i x, __m128i w, __mmask8 m)
+{
+ return _mm256_mask_extracti32x4_epi32 (w, m, x, 1);
+}
+
+__m128i
+f9 (__m256i x, __mmask8 m)
+{
+ return _mm256_maskz_extracti32x4_epi32 (m, x, 1);
+}
+
+__m128
+f10 (__m256 x)
+{
+ return _mm256_extractf32x4_ps (x, 1);
+}
+
+__m128
+f11 (__m256 x, __m128 w, __mmask8 m)
+{
+ return _mm256_mask_extractf32x4_ps (w, m, x, 1);
+}
+
+__m128
+f12 (__m256 x, __mmask8 m)
+{
+ return _mm256_maskz_extractf32x4_ps (m, x, 1);
+}