[Bug target/89765] New: Multiple problems with vec-insert implementation on PowerPC

kelvin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Mar 18 19:12:00 GMT 2019


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

            Bug ID: 89765
           Summary: Multiple problems with vec-insert implementation on
                    PowerPC
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kelvin at gcc dot gnu.org
                CC: segher at gcc dot gnu.org, wschmidt at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc*-*-*

Created attachment 45993
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45993&action=edit
Reproducer source file

The attached test program demonstrates multiple shortcomings with the
implementation of vec-insert.

If this test program is compiled with

#define SEPARATE_PROBLEM

an internal compiler error results:

$GCC_BUILD/gcc/xgcc -B$GCC_BUILD/gcc/ -g -fno-use-linker-plugin -maltivec -mvsx
-O1 -o vec-insert.exe vec-insert.c
vec-insert.c: In function ‘set_auto_n_uint128’:
vec-insert.c:81:1: error: conversion of an SSA_NAME on the left hand side
   81 | set_auto_n_uint128 (vector unsigned __int128 a, int n, unsigned
__int128 e)
      | ^~~~~~~~~~~~~~~~~~
VIEW_CONVERT_EXPR<__int128 unsigned>(_1);

VIEW_CONVERT_EXPR<__int128 unsigned>(_1) = e;
vec-insert.c:81:1: internal compiler error: verify_gimple failed
0x10b21feb verify_gimple_in_seq(gimple*)
        /home/kelvin/gcc-root/gcc-trunk/gcc/tree-cfg.c:5046
0x1069c747 gimplify_body(tree_node*, bool)
        /home/kelvin/gcc-root/gcc-trunk/gcc/gimplify.c:13712
0x1069cb13 gimplify_function_tree(tree_node*)
        /home/kelvin/gcc-root/gcc-trunk/gcc/gimplify.c:13802
0x103e94d7 cgraph_node::analyze()
        /home/kelvin/gcc-root/gcc-trunk/gcc/cgraphunit.c:667
0x103edb37 analyze_functions
        /home/kelvin/gcc-root/gcc-trunk/gcc/cgraphunit.c:1126
0x103eeebb symbol_table::finalize_compilation_unit()
        /home/kelvin/gcc-root/gcc-trunk/gcc/cgraphunit.c:2837
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Makefile:26: recipe for target 'vec-insert.exe' failed
make: *** [vec-insert.exe] Error 1

When compiled without defining SEPARATE_PROBLEM, the resulting executable
fails, apparently because the translations of the vec_insert built-in  fail to
use modulo arithmetic to compute the index of the selector expression.

(A recent patch corrected similar problems in the implementation of vec-extract
and this test program is derived from one of the regression tests that was
submitted with that patch.)


More information about the Gcc-bugs mailing list