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

            Bug ID: 96128
           Summary: [11 Regression] ICE in do_store_flag, at expr.c:12247
                    since
                    r11-1445-g502d63b6d6141597bb18fd23c87736a1b384cf8f
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: s390x-linux-gnu

Since my revision the following fails:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/opaque-vector.c
-march=z13 -c
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/opaque-vector.c: In
function ‘f’:
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/opaque-vector.c:1:65:
internal compiler error: in do_store_flag, at expr.c:12247
    1 | #define B_TEST(TYPE) { TYPE v __attribute__((vector_size(16)));
(void)((v < v) < v); }
      |                                                                
^~~~~~~~~~~~~~~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/opaque-vector.c:7:17:
note: in expansion of macro ‘B_TEST’
    7 | #define T(TYPE) B_TEST(TYPE) T_TEST(TYPE)
      |                 ^~~~~~
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/opaque-vector.c:16:3:
note: in expansion of macro ‘T’
   16 |   T(short)
      |   ^
0xc498c7 do_store_flag
        /home/marxin/Programming/gcc2/gcc/expr.c:12247
0xc3c9a6 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc2/gcc/expr.c:9608
0xaa600b expand_gimple_stmt_1
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:3786
0xaa6258 expand_gimple_stmt
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:3847
0xaae714 expand_gimple_basic_block
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:5888
0xab0576 execute
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:6572
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.

The change is now that the comparison is expanded in GIMPLE to:
(opaque-vector.c.005t.gimple)

f ()
{
  {
    vector(8) short int v;

    _1 = v > { 0, 0, 0, 0, 0, 0, 0, 0 };
  }
  {
    vector(4) int v;

    _2 = v > { 0, 0, 0, 0 };
  }
  {
    vector(2) long int v;

    _3 = v > { 0, 0 };
  }
  {
    vector(2) long long int v;

    _4 = v > { 0, 0 };
  }
}

while before the revision it was to 

f ()
{
  {
    vector(8) short int v;


  }
  {
    vector(4) int v;


  }
  {
    vector(2) long int v;


  }
  {
    vector(2) long long int v;


  }
}

What kind of target hook is responsible for that?

Reply via email to