On 3/4/21 2:11 AM, Jakub Jelinek wrote:
> Hi!
>
> The following testcase ICEs on aarch64. The problem is that
> op0 is (subreg:HI (reg:HF ...) 0) and because we can't create a SUBREG of a
> SUBREG and aarch64 doesn't have HImode insv, only SImode insv,
> store_bit_field_using_insv tries to create (subreg:SI (reg:HF ...) 0)
> which is not valid for the target and so gen_rtx_SUBREG ICEs.
>
> The following patch fixes it by punting if the to be created SUBREG
> doesn't validate, callers of store_bit_field_using_insv can handle
> the fallback.
>
> Bootstrapped/regtested on x86_64-linux, i686-linux and aarch64-linux, ok for
> trunk?
>
> 2021-03-03 Jakub Jelinek <ja...@redhat.com>
>
> PR middle-end/93235
> * expmed.c (store_bit_field_using_insv): Return false of xop0 is a
> SUBREG and a SUBREG to op_mode can't be created.
>
> * gcc.target/aarch64/pr93235.c: New test.
OK
jeff