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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |rtl-optimization

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> Confirmed.
> 
> #1  0x0000000001a31dad in simplify_context::simplify_binary_operation_1 (
>     this=0x7fffffffcd38, code=<incomplete type>, mode=E_SImode, 
>     op0=0x7ffff669d570, op1=0x7ffff668b3a0, trueop0=0x7ffff669d570, 
>     trueop1=0x7ffff668b3a0)
>     at /space/rguenther/src/gcc-clean/gcc/simplify-rtx.cc:5013
> 5013                  gcc_assert (i < n_elts);
> (gdb) l
> 5008
> 5009                  rtvec vec;
> 5010                  rtx tmp_op, tmp;
> 5011
> 5012                  gcc_assert (GET_CODE (op1) == PARALLEL);
> 5013                  gcc_assert (i < n_elts);
> 
> (vec_select:V4SI (reg:V2SI 314 [ BS_ARG_0 ])
>     (parallel [
>             (const_int 1 [0x1])
>             (const_int 0 [0])
>             (const_int 1 [0x1])
>             (const_int 0 [0])
>         ]))
> $3 = void
> (gdb) p debug_rtx (op1)
> (parallel [
>         (const_int 3 [0x3])
>     ])
> 
> that gdb (version 16.3) cannot print 'code' is quite annoying.
> 
> (gdb) ptype code
> type = enum rtx_code : unsigned int {}
> (gdb) p (unsigned)code
> $7 = 132

OK, using GCC 15 as host compiler works and shows this is VEC_SELECT.

#1  0x00000000019ecb8e in simplify_context::simplify_binary_operation_1 (
    this=0x7fffffffcd68, code=VEC_SELECT, mode=E_SImode, op0=0x7ffff669d570, 
    op1=0x7ffff668b3a0, trueop0=0x7ffff669d570, trueop1=0x7ffff668b3a0)
    at /space/rguenther/src/gcc-clean/gcc/simplify-rtx.cc:5013

The code looks quite confused to me, also "bad" as its local op0/op1 alias
the function parameter names or how it accesses trueop0 to check for
a VEC_SELECT.  I also hope there's sth more obvious than
XVECEXP (trueop1, 0, 0)?  Whatever that's supposed to access.

Obviously not mine, given I have no idea about that.

Reply via email to