This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix 70083, lra-induced crash


On 03/10/2016 03:26 AM, Bernd Schmidt wrote:
This crash happens because LRA tries to save an AVX hard reg in a large mode, and it only appears in the function in smaller modes. Stack alignment isn't set up to support the larger mode.

Currently, biggest_mode for hard registers is set up from regno_reg_rtx, set up to a large mode for argument regs. That mode is not necessarily seen in the function itself and may be too large. If that initialization is changed to use VOIDmode, we compute the correct value during lra_push_insns, but then subsequently we clear it to VOIDmode again, and it never seems to get updated. Hence, the patch has several parts: initialize hard reg biggest_mode with VOIDmode, ensure it gets updated during process_bb_lives, and use the value in split_reg.

Bootstrapped and tested on x86_64-linux, ok?

Yes.  Thank you, Bernd.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]