(define_mode_iterator VI1_AVX512VNNI
[(V64QI "TARGET_AVX512VNNI") (V32QI "TARGET_AVX2") V16QI])
-(define_mode_iterator VI1_AVX512VNNIBW
- [(V64QI "TARGET_AVX512BW || TARGET_AVX512VNNI")
- (V32QI "TARGET_AVX2") V16QI])
-
(define_mode_iterator VI12_256_512_AVX512VL
[V64QI (V32QI "TARGET_AVX512VL")
V32HI (V16HI "TARGET_AVX512VL")])
(define_expand "sdot_prod<ssedvecmodelower><mode>"
[(match_operand:<ssedvecmode> 0 "register_operand")
- (match_operand:VI1_AVX512VNNIBW 1 "register_operand")
- (match_operand:VI1_AVX512VNNIBW 2 "register_operand")
+ (match_operand:VI1_AVX512 1 "register_operand")
+ (match_operand:VI1_AVX512 2 "register_operand")
(match_operand:<ssedvecmode> 3 "register_operand")]
"TARGET_SSE2"
{
(define_expand "udot_prod<ssedvecmodelower><mode>"
[(match_operand:<ssedvecmode> 0 "register_operand")
- (match_operand:VI1_AVX512VNNIBW 1 "register_operand")
- (match_operand:VI1_AVX512VNNIBW 2 "register_operand")
+ (match_operand:VI1_AVX512 1 "register_operand")
+ (match_operand:VI1_AVX512 2 "register_operand")
(match_operand:<ssedvecmode> 3 "register_operand")]
"TARGET_SSE2"
{
--- /dev/null
+/* PR target/126098 */
+/* { dg-do compile } */
+/* { dg-options "-mavx512vnni -O3" } */
+
+/* AVX512VNNI does not imply AVX512BW, so the byte (V64QI) dot-product must
+ not be advertised as available: emulating it needs vpmovsxbw on 512-bit
+ vectors, which requires AVX512BW. Advertising it led to an unrecognizable
+ (sign_extend:V32HI (reg:V32QI)) insn and an ICE in extract_insn. */
+
+char *fn_c, *fn_d;
+int fn() {
+ int res = 0;
+ for (int i = 0; i < 64; ++i)
+ res += fn_c[i] * fn_d[i];
+ return res;
+}