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: [PATCH] Fix ICE in gen_rtx_SUBREG, gen_lowpart_if_possible trying to create an invalid subreg


Andrew_Pinski@PlayStation.Sony.Com wrote:
Hi,
This patch fixes the ICE in gen_rtx_SUBREG when CSE calls gen_lowpart_if_possible but the lowpart would cause an invalid subreg (on spu-elf where a lot of subregs are invalid because of the way the register is laid out). gen_lowpart_if_possible does not check if gen_lowpart_SUBREG would try to create an invalid subreg which causes a crash in gen_rtx_SUBREG. This patch fixes the problem by checking about the invalid subreg in gen_lowpart_if_possible before calling gen_lowpart_SUBREG.

I would use an "&& validate_subreg (...)" (this would make a difference if another "else" was added after the one you are modifying).


Paolo


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