On Mon, 14 Oct 2024, Andre Vieira (lists) wrote:

> Hi,
> 
> This patch fixes constant folding of BIT_INSER_EXPR for BYTES_BIG_ENDIAN
> targets.
> 
> Regression tested on aarch64be-none-elf.
> 
> Almost committed this as obvious, but I wanted to double check the testcase
> with a maintainer. I decided to not make the test be big-endian specific, nor
> to add any specific checks, since before this patch it would abort on a
> big-endian target and fail an execution test.  Just thought that anything else
> might end up being somewhat sensitive to testisms.
> 
> OK for trunk?

OK for trunk and backports.

Thanks,
Richard.

> 
> gcc/ChangeLog:
> 
>       PR middle-end/116997
>       * fold-const.cc (fold_ternary_loc): Fix BIT_INSERT_EXPR constant
>       folding
>       for BYTES_BIG_ENDIAN targets.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/vect/pr116997.c: New test.
> 
> Co-author: Andrew Pinski <quic_apin...@quicinc.com>
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to