[PATCH] Fix cleanup_auto_inc_dec on x86 (PR rtl-optimization/88416)
Thu Dec 13 18:53:00 GMT 2018
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.
More information about the Gcc-patches