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 combiner move_deaths DEBUG_INSN handling (PR target/84614)


Hi Jakub,

On Fri, Mar 02, 2018 at 12:13:51AM +0100, Jakub Jelinek wrote:
> prev_real_insn doesn't skip over DEBUG_INSNs, on aarch64 on this
> testcase we get both -fcompare-debug failure and wrong-code with -g.
> 
> Instead of adding yet another two:
>       do
>         insn = prev_real_insn (insn);
>       while (DEBUG_INSN_P (insn));
> loops, this patch introduces new functions that stop only at
> NONDEBUG_INSN_P.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, tested with
> cross to aarch64-linux on the testcase, ok for trunk?

Looks good to me, thanks!  (The non-combine parts are arguably obvious
and trivial cleanup).


Segher


> 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR target/84614
> 	* rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
> 	prototypes.
> 	* emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
> 	comments.
> 	(next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
> 	* cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
> 	instead of a loop around prev_real_insn.
> 	* combine.c (move_deaths): Use prev_real_nondebug_insn instead of
> 	prev_real_insn.
> 
> 	* gcc.dg/pr84614.c: New test.


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