This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix cleanup_auto_inc_dec on x86 (PR rtl-optimization/88416)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>, Alexandre Oliva <aoliva at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Dec 2018 11:52:56 -0700
- Subject: Re: [PATCH] Fix cleanup_auto_inc_dec on x86 (PR rtl-optimization/88416)
- References: <20181211164357.GZ12380@tucnak>
On 12/11/18 9:43 AM, Jakub Jelinek wrote:
> As mentioned in the PR, x86 (maybe a couple of other targets) isn't an
> AUTO_INC_DEC target, it doesn't have REG_INC notes nor wants the generic
> code to synthetize any pre/post inc/dec/modify, but does support push/pop
> patterns that use those RTL codes.
> If unlucky enough, as on the following testcase, we can end up with trying
> to propagate such pre/post inc/dec into a DEBUG_INSN, which is invalid.
> As cleanup_auto_inc_dec calls copy_rtx which is pretty much the same
> function as cleanup_auto_inc_dec in the way how it performs deep copy of the
> RTX, except that cleanup_auto_inc_dec also handles the pre/post
> inc/dec/modify, I think the easiest fix is just to remove the special case,
> it shouldn't make it any slower on !AUTO_INC_DEC targets.
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 2018-12-11 Jakub Jelinek <firstname.lastname@example.org>
> PR rtl-optimization/88416
> * valtrack.c (cleanup_auto_inc_dec): Handle pre/post-inc/dec/modify
> even if !AUTO_INC_DEC.
> * gcc.target/i386/pr88416.c: New test.