Hi!
The following testcase FAILs, because replace_rtx replaces a REG with
CONST_WIDE_INT inside of a SUBREG, which is an invalid transformation
because a SUBREG relies on SUBREG_REG having non-VOIDmode but
CONST_WIDE_INT has VOIDmode.
replace_rtx already has code to deal with it, but it was doing
On Fri, 22 Apr 2022, Jakub Jelinek wrote:
> Hi!
>
> The following testcase FAILs, because replace_rtx replaces a REG with
> CONST_WIDE_INT inside of a SUBREG, which is an invalid transformation
> because a SUBREG relies on SUBREG_REG having non-VOIDmode but
> CONST_WIDE_INT has VOIDmode.
>
> rep
> 2022-04-22 Jakub Jelinek
>
> PR rtl-optimization/105333
> * rtlanal.cc (replace_rtx): Use simplify_subreg or
> simplify_unary_operation if CONST_SCALAR_INT_P rather than just
> CONST_INT_P.
>
> * gcc.dg/pr105333.c: New test.
OK, thanks.
--
Eric Botcazou