https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83845
--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Author: rsandifo Date: Thu Feb 1 11:02:52 2018 New Revision: 257285 URL: https://gcc.gnu.org/viewcvs?rev=257285&root=gcc&view=rev Log: [AArch64] Tighten aarch64_secondary_reload condition (PR 83845) aarch64_secondary_reload enforced a secondary reload via aarch64_sve_reload_be for memory and pseudo registers, but failed to do the same for subregs of pseudo registers. To avoid this and any similar problems, the patch instead tests for things that the move patterns handle directly; if the operand isn't one of those, we should use the reload pattern instead. The patch fixes an ICE in sve/mask_struct_store_3.c for aarch64_be, where the bogus target description was (rightly) causing LRA to cycle. 2018-02-01 Richard Sandiford <richard.sandif...@linaro.org> gcc/ PR tearget/83845 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten check for operands that need to go through aarch64_sve_reload_be. Reviewed-by: James Greenhalgh <james.greenha...@arm.com> Modified: trunk/gcc/ChangeLog trunk/gcc/config/aarch64/aarch64.c