https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113950
Bug ID: 113950
Summary: PowerPC, ICE with -O1 or higher compiling
__builtin_vsx_splat_2di test case
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: carll at gcc dot gnu.org
Target Milestone: ---
Power 10 LE
Fedora 38
Test of the __builtin_vsx_splat_2di ICEs on GCC 12 and later.
The following test case generates an ICE for -O1 and above. It does work for
-O0.
void abort (void);
int main ()
{
int i;
vector signed long long vsll_result, vsll_expected_result;
signed long long sll_arg1;
sll_arg1 = 300;
vsll_expected_result = (vector signed long long) {300, 300};
vsll_result = __builtin_vsx_splat_2di (sll_arg1); //ISSUE
for (i = 0; i < 2; i++)
if (vsll_result[i] != vsll_expected_result[i])
abort();
return 0;
}
The test case compiles fine with -O0.
Here is the output when I try to compile with -O1:
gcc -g -O1 compiler-bug.c -o compiler-bug
compiler-bug.c: In function ‘main’:
compiler-bug.c:19:1: error: unrecognizable insn:
19 | }
| ^
(insn 14 13 15 2 (set (reg:V2DI 117 [ _1 ])
(vec_duplicate:V2DI (const_int 300 [0x12c]))) "compiler-bug.c":12:17 -1
(nil))
during RTL pass: vregs
compiler-bug.c:19:1: internal compiler error: in extract_insn, at recog.cc:2791
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccnoI5lr.out file, please attach this to
your bugreport.