https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119966
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Dimitar Dimitrov <dimi...@gcc.gnu.org>: https://gcc.gnu.org/g:eb2ea476db2182939f585df7d806225649ee4f62 commit r16-718-geb2ea476db2182939f585df7d806225649ee4f62 Author: Dimitar Dimitrov <dimi...@dinux.eu> Date: Sat May 3 22:38:30 2025 +0300 emit-rtl: Allow extra checks for paradoxical subregs [PR119966] When a paradoxical subreg is detected, validate_subreg exits early, thus skipping the important checks later in the function. Fix by continuing with the checks instead of declaring early that the paradoxical subreg is valid. One of the newly allowed subsequent checks needed to be disabled for paradoxical subregs. It turned out that combine attempts to create a paradoxical subreg of mem even for strict-alignment targets. That is invalid and should eventually be rejected, but is temporarily left allowed to prevent regressions for armv8l-unknown-linux-gnueabihf. See PR120329 for more details. Tests I did: - No regressions were found for C and C++ for the following targets: - native x86_64-pc-linux-gnu - cross riscv64-unknown-linux-gnu - cross riscv32-none-elf - Sanity checked armv8l-unknown-linux-gnueabihf by cross-building up to including libgcc. Linaro CI bot further confirmed there are no regressions. - Sanity checked powerpc64-unknown-linux-gnu by building native toolchain, but I could not setup qemu-user for DejaGnu testing. PR target/119966 gcc/ChangeLog: * emit-rtl.cc (validate_subreg): Do not exit immediately for paradoxical subregs. Filter subsequent tests which are not valid for paradoxical subregs. Co-authored-by: Richard Sandiford <richard.sandif...@arm.com> Signed-off-by: Dimitar Dimitrov <dimi...@dinux.eu>