https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96744

--- Comment #2 from Hongtao.liu <crazylht at gmail dot com> ---
Created attachment 49107
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49107&action=edit
Enable spill to mask only under m_core_AVX512

this patch will fail

cat test.c
----
#include<immintrin.h>
void
_mm512_2intersect_epi32_cut (__m512i __A, __m512i __B, __mmask16 *__U,
    __mmask16 *__M)
{
  __builtin_ia32_2intersectd512 (__U, __M, (__v16si) __A, (__v16si) __B);
}

 void
_mm512_2intersect_epi64_cut (__m512i __A, __m512i __B, __mmask8 *__U,
    __mmask8 *__M)
{
  __builtin_ia32_2intersectq512 (__U, __M, (__v8di) __A, (__v8di) __B);
}
---

with gcc -O2 -mavx512vp2intersect -mavx512bw -mavx512dq
during RTL pass: reload
dump file: avx-1_cut.c.287r.reload
avx-1_cut.c: In function ‘_mm512_2intersect_epi32_cut’:
avx-1_cut.c:7:1: internal compiler error: in emit_move_multi_word, at
expr.c:3680
    7 | }
      | ^
0xd59c56 emit_move_multi_word
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/expr.c:3680
0xd5a2e3 emit_move_insn_1(rtx_def*, rtx_def*)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/expr.c:3802
0xd5ab32 emit_move_insn(rtx_def*, rtx_def*)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/expr.c:3935
0x1024e79 lra_emit_move(rtx_def*, rtx_def*)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra.c:502
0x1043bb3 curr_insn_transform
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra-constraints.c:4440
0x10459d4 lra_constraints(bool)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra-constraints.c:5031
0x1029896 lra(_IO_FILE*)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra.c:2415
0xfba828 do_reload
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/ira.c:5525
0xfbad1e execute
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/ira.c:5711
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Need to add define_insn for movp2qi/movp2hi?

with  -mavx512vp2intersect -mavx512bw -mavx512dq -m32 got different failure
message.

avx-1_cut.c: In function ‘_mm512_2intersect_epi32_cut’:
avx-1_cut.c:7:1: internal compiler error: maximum number of generated reload
insns per insn achieved (90)
    7 | }
      | ^
0x1045568 lra_constraints(bool)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra-constraints.c:4954
0x1029896 lra(_IO_FILE*)
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/lra.c:2415
0xfba828 do_reload
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/ira.c:5525
0xfbad1e execute
       
/export/users2/liuhongt/gcc/gnu-toolchain/tune_spill_to_mask/gcc/ira.c:5711
Please submit a full bug report,

Not sure about this one.

Reply via email to