public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 @ 2023-03-22 7:22 malat at debian dot org 2023-03-22 7:41 ` [Bug target/109244] " juzhe.zhong at rivai dot ai ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: malat at debian dot org @ 2023-03-22 7:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 Bug ID: 109244 Summary: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: malat at debian dot org Target Milestone: --- Created attachment 54726 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54726&action=edit Preprocessed source I cannot compile highway project on riscv64/Debian. It fails with: hwy/contrib/sort/vqsort-inl.h:1386:1: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 Compilation line: /usr/lib/gcc-snapshot/bin/g++ -freport-bug -DHWY_SHARED_DEFINE -Dhwy_contrib_EXPORTS -I/home/mathieu/debian/highway -g -O2 -ffile-prefix-map=/home/mathieu/debian/highway=. -fstack-protector-strong -Wformat -Werror=format-security -DHWY_BROKEN_EMU128=0 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wno-builtin-macro-redefined -D__DATE__=\"redacted\" -D__TIMESTAMP__=\"redacted\" -D__TIME__=\"redacted\" -fmerge-all-constants -Wall -Wextra -Wconversion -Wsign-conversion -Wvla -Wnon-virtual-dtor -fmath-errno -fno-exceptions -march=rv64gcv1p0 -Werror -MD -MT CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_f32d.cc.o -MF CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_f32d.cc.o.d -o CMakeFiles/hwy_contrib.dir/hwy/contrib/sort/vqsort_f32d.cc.o -c /home/mathieu/debian/highway/hwy/contrib/sort/vqsort_f32d.cc ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org @ 2023-03-22 7:41 ` juzhe.zhong at rivai dot ai 2023-03-22 7:50 ` malat at debian dot org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: juzhe.zhong at rivai dot ai @ 2023-03-22 7:41 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 --- Comment #1 from JuzheZhong <juzhe.zhong at rivai dot ai> --- Hi, thank you for reporting it. After several tries. I am pretty sure this issue has been fixed by this patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-March/614393.html I have several bug fix patches pending in the GCC mail list. Let's me ping @Kito to merge patches. Thank you so much. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org 2023-03-22 7:41 ` [Bug target/109244] " juzhe.zhong at rivai dot ai @ 2023-03-22 7:50 ` malat at debian dot org 2023-03-22 8:03 ` juzhe.zhong at rivai dot ai ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: malat at debian dot org @ 2023-03-22 7:50 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 --- Comment #2 from Mathieu Malaterre <malat at debian dot org> --- Thanks for the quick update. I'll stop my test until this is merged. As a side note, I am also seeing this one in my log: internal compiler error: in finalize_new_accesses, at rtl-ssa/changes.cc:471 133 | } | ^ 0xf6b49f rtl_ssa::function_info::finalize_new_accesses(rtl_ssa::insn_change&) ../../src/gcc/rtl-ssa/changes.cc:471 0xf656cd rtl_ssa::function_info::change_insns(array_slice<rtl_ssa::insn_change*>) ../../src/gcc/rtl-ssa/changes.cc:659 0xf6551f rtl_ssa::function_info::change_insn(rtl_ssa::insn_change&) ../../src/gcc/rtl-ssa/changes.cc:717 0x57eeb1 change_insn ../../src/gcc/config/riscv/riscv-vsetvl.cc:1027 0x57eeb1 pass_vsetvl::cleanup_insns() const ../../src/gcc/config/riscv/riscv-vsetvl.cc:3929 0x59070b pass_vsetvl::lazy_vsetvl() ../../src/gcc/config/riscv/riscv-vsetvl.cc:4189 0x590891 pass_vsetvl::execute(function*) ../../src/gcc/config/riscv/riscv-vsetvl.cc:4219 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org 2023-03-22 7:41 ` [Bug target/109244] " juzhe.zhong at rivai dot ai 2023-03-22 7:50 ` malat at debian dot org @ 2023-03-22 8:03 ` juzhe.zhong at rivai dot ai 2023-03-23 1:51 ` kito at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: juzhe.zhong at rivai dot ai @ 2023-03-22 8:03 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 --- Comment #3 from JuzheZhong <juzhe.zhong at rivai dot ai> --- (In reply to Mathieu Malaterre from comment #2) > Thanks for the quick update. I'll stop my test until this is merged. > > As a side note, I am also seeing this one in my log: > > internal compiler error: in finalize_new_accesses, at rtl-ssa/changes.cc:471 > 133 | } > | ^ > 0xf6b49f rtl_ssa::function_info::finalize_new_accesses(rtl_ssa::insn_change&) > ../../src/gcc/rtl-ssa/changes.cc:471 > 0xf656cd > rtl_ssa::function_info::change_insns(array_slice<rtl_ssa::insn_change*>) > ../../src/gcc/rtl-ssa/changes.cc:659 > 0xf6551f rtl_ssa::function_info::change_insn(rtl_ssa::insn_change&) > ../../src/gcc/rtl-ssa/changes.cc:717 > 0x57eeb1 change_insn > ../../src/gcc/config/riscv/riscv-vsetvl.cc:1027 > 0x57eeb1 pass_vsetvl::cleanup_insns() const > ../../src/gcc/config/riscv/riscv-vsetvl.cc:3929 > 0x59070b pass_vsetvl::lazy_vsetvl() > ../../src/gcc/config/riscv/riscv-vsetvl.cc:4189 > 0x590891 pass_vsetvl::execute(function*) > ../../src/gcc/config/riscv/riscv-vsetvl.cc:4219 Is this ICE also comes from compiling the codes that you attach in this PR? If yes, I am pretty sure this issue has been fixed since I compile the attachment you gave with no fails now. Let's wait for kito to merge all the bug fix patches (there are about 5 bug fix patches pending in the GCC mail list) Thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org ` (2 preceding siblings ...) 2023-03-22 8:03 ` juzhe.zhong at rivai dot ai @ 2023-03-23 1:51 ` kito at gcc dot gnu.org 2023-03-23 3:22 ` cvs-commit at gcc dot gnu.org 2023-03-23 3:23 ` kito at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: kito at gcc dot gnu.org @ 2023-03-23 1:51 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 --- Comment #4 from Kito Cheng <kito at gcc dot gnu.org> --- Gonna commit the fix soon, and following code is the reduced case which is reduced from your attachment. Reduced case (reduced by creduce) typedef int a; using c = float; template < typename > using e = int; #pragma riscv intrinsic "vector" template < typename, int, int f > struct aa { using g = int; template < typename > static constexpr int h() { return f; } template < typename i > using ab = aa< i, 0, h< i >() >; }; template < int f > struct p { using j = aa< float, 6, f >; }; template < int f > struct k { using j = typename p< f >::j; }; template < typename, int f > using ac = typename k< f >::j; template < class ad > using l = typename ad::g; template < class g, class ad > using ab = typename ad::ab< g >; template < class ad > using ae = ab< e< ad >, ad >; template < int m > vuint32mf2_t ai(aa< a, m, -1 >, a aj) { return __riscv_vmv_v_x_u32mf2(aj, 0); } template < int m > vfloat32mf2_t ai(aa< c, m, -1 >, c); template < class ad > using ak = decltype(ai(ad(), l< ad >())); template < class ad > ak< ad > al(ad d) { ae< decltype(d) > am; return an(d, ai(am, 0)); } template < typename g, int m > vuint8mf2_t ao(aa< g, m, -1 >, vuint32mf2_t n) { return __riscv_vreinterpret_v_u32mf2_u8mf2(n); } template < int m > vuint32mf2_t ap(aa< a, m, -1 >, vuint8mf2_t n) { return __riscv_vreinterpret_v_u8mf2_u32mf2(n); } template < typename g, int m > vuint8mf2_t ao(aa< g, m, -1 >, vfloat32mf2_t n) { return __riscv_vreinterpret_v_u32mf2_u8mf2( __riscv_vreinterpret_v_f32mf2_u32mf2(n)); } template < int m > vfloat32mf2_t ap(aa< c, m, -1 >, vuint8mf2_t); template < class ad, class aq > ak< ad > an(ad d, aq n) { return ap(d, ao(d, n)); } vbool64_t av(vuint32mf2_t, vuint32mf2_t); template < class ad > bool ba(ad, vbool64_t); template < class ad > using bb = decltype(al(ad())); template < typename g > using be = ac< g, -1 >; struct bf { template < class ad > bool bh(ad, bb< ad > bi) { ae< ad > am; return ba(am, av(an(am, bi), al(am))); } }; int bo; template < class ad, class bl, typename g > void o(ad d, bl bn, g) { bb< ad > bq = al(d); for (; bo;) { int br = bn.bh(d, bq); if (__builtin_expect(br, 0)) for (;;) ; } } template < class ad, class bl, typename g > void bs(ad d, bl bn, g) { g bu; o(d, bn, bu); } template < class ad, class bl, typename g > void bv(ad d, bl bn, g *, int, g *bt) { bs(d, bn, bt); } float by; int bz; float ca; void b() { be< float > d; bf bn; bv(d, bn, &by, bz, &ca); } ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org ` (3 preceding siblings ...) 2023-03-23 1:51 ` kito at gcc dot gnu.org @ 2023-03-23 3:22 ` cvs-commit at gcc dot gnu.org 2023-03-23 3:23 ` kito at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-03-23 3:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kito Cheng <kito@gcc.gnu.org>: https://gcc.gnu.org/g:cd0c433e5faba9a18f64881cd761a53a530aa798 commit r13-6823-gcd0c433e5faba9a18f64881cd761a53a530aa798 Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai> Date: Wed Mar 22 10:49:56 2023 +0800 RISC-V: Fix LRA issue for LMUL < 1 vector spillings [PR109244] In order to decrease the memory traffic, we don't use whole register load/store for the LMUL less than 1 and mask mode, so those case will require one extra general purpose register for setting up VL register, but it's not allowed during LRA process, so we defined few special move patterns used for LRA, which will defer the expansion after LRA. gcc/ChangeLog: PR target/109244 * config/riscv/riscv-protos.h (emit_vlmax_vsetvl): Define as global. (emit_vlmax_op): Ditto. * config/riscv/riscv-v.cc (get_sew): New function. (emit_vlmax_vsetvl): Adapt function. (emit_pred_op): Ditto. (emit_vlmax_op): Ditto. (emit_nonvlmax_op): Ditto. (legitimize_move): Fix LRA ICE. (gen_no_side_effects_vsetvl_rtx): Adapt function. * config/riscv/vector.md (@mov<V_FRACT:mode><P:mode>_lra): New pattern. (@mov<VB:mode><P:mode>_lra): Ditto. (*mov<V_FRACT:mode><P:mode>_lra): Ditto. (*mov<VB:mode><P:mode>_lra): Ditto. gcc/testsuite/ChangeLog: PR target/109244 * g++.target/riscv/rvv/base/pr109244.C: New test. * gcc.target/riscv/rvv/base/binop_vv_constraint-4.c: Adapt testcase. * gcc.target/riscv/rvv/base/binop_vv_constraint-6.c: Ditto. * gcc.target/riscv/rvv/base/binop_vx_constraint-127.c: Ditto. * gcc.target/riscv/rvv/base/spill-1.c: Ditto. * gcc.target/riscv/rvv/base/spill-2.c: Ditto. * gcc.target/riscv/rvv/base/spill-3.c: Ditto. * gcc.target/riscv/rvv/base/spill-5.c: Ditto. * gcc.target/riscv/rvv/base/spill-7.c: Ditto. * g++.target/riscv/rvv/base/bug-18.C: New test. * gcc.target/riscv/rvv/base/merge_constraint-3.c: New test. * gcc.target/riscv/rvv/base/merge_constraint-4.c: New test. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/109244] internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org ` (4 preceding siblings ...) 2023-03-23 3:22 ` cvs-commit at gcc dot gnu.org @ 2023-03-23 3:23 ` kito at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: kito at gcc dot gnu.org @ 2023-03-23 3:23 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109244 Kito Cheng <kito at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #6 from Kito Cheng <kito at gcc dot gnu.org> --- Fixed, let us know if you got any issue on compiling or testing highway! ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-23 3:23 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-22 7:22 [Bug c++/109244] New: internal compiler error: in setup_preferred_alternate_classes_for_new_pseudos, at ira.cc:2892 malat at debian dot org 2023-03-22 7:41 ` [Bug target/109244] " juzhe.zhong at rivai dot ai 2023-03-22 7:50 ` malat at debian dot org 2023-03-22 8:03 ` juzhe.zhong at rivai dot ai 2023-03-23 1:51 ` kito at gcc dot gnu.org 2023-03-23 3:22 ` cvs-commit at gcc dot gnu.org 2023-03-23 3:23 ` kito at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).