https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124250
Bug ID: 124250
Summary: [15 Regression] LoongArch: internal compiler error: in
extract_insn, at recog.cc:2882
Product: gcc
Version: 15.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: xry111 at gcc dot gnu.org
Target Milestone: ---
struct SmallVector {
int Size = 0;
long x;
long *data() {
return &x;
}
void push_back() {
Size += 1;
return;
}
};
struct ArrayRef {
long *Data;
long Length;
template <typename C> ArrayRef(C V) : Data(V.data()), Length(V.Size) {}
};
long *end___trans_tmp_2;
struct MutableArrayRef : ArrayRef {
MutableArrayRef(SmallVector V) : ArrayRef(V) {}
long *begin() { return Data; }
long *end() {
end___trans_tmp_2 = Data;
return Data + Length;
}
};
void fitWeights(MutableArrayRef Weights) {
long Max;
unsigned Offset = -Max;
for (long &I : Weights)
I >>= Offset;
SmallVector NewWeights;
NewWeights.push_back();
NewWeights.push_back();
fitWeights(NewWeights);
}
triggers an ICE with g++ 15.2.1 20260226 and -O3 -msimd=lsx:
bug.ii:35:1: error: unrecognizable insn:
35 | }
| ^
(insn 111 109 112 17 (set (reg:V2DI 183)
(vec_duplicate:V2DI (reg:SI 180 [ Offset_110 ]))) "bug.ii":30:7 -1
(nil))
during RTL pass: vregs
bug.ii:35:1: internal compiler error: in extract_insn, at recog.cc:2882
0x29dac77 internal_error(char const*, ...)
../../gcc-backport/gcc/diagnostic-global-context.cc:517
0x29b09c8 fancy_abort(char const*, int, char const*)
../../gcc-backport/gcc/diagnostic.cc:1749
0x17a7925 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-backport/gcc/rtl-error.cc:108
0x17a7966 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc-backport/gcc/rtl-error.cc:116
0x175aad9 extract_insn(rtx_insn*)
../../gcc-backport/gcc/recog.cc:2882
0x1380916 instantiate_virtual_regs_in_insn
../../gcc-backport/gcc/function.cc:1612
0x13819a1 instantiate_virtual_regs
../../gcc-backport/gcc/function.cc:1995
0x1381a80 execute
../../gcc-backport/gcc/function.cc:2042
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.