https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80080

--- Comment #16 from iii at gcc dot gnu.org ---
Author: iii
Date: Mon Dec  3 09:49:02 2018
New Revision: 266734

URL: https://gcc.gnu.org/viewcvs?rev=266734&root=gcc&view=rev
Log:
Repeat jump threading after combine

Consider the following RTL:

(insn (set (reg 65) (if_then_else (eq %cc 0) 1 0)))
(insn (parallel [(set %cc (compare (reg 65) 0)) (clobber %scratch)]))
(jump_insn (set %pc (if_then_else (ne %cc 0) (label_ref 23) %pc)))

Combine simplifies this into:

(note NOTE_INSN_DELETED)
(note NOTE_INSN_DELETED)
(jump_insn (set %pc (if_then_else (eq %cc 0) (label_ref 23) %pc)))

opening up the possibility to perform jump threading.

gcc/ChangeLog:

2018-12-03  Ilya Leoshkevich  <i...@linux.ibm.com>

        PR target/80080
        * cfgcleanup.c (class pass_postreload_jump): New pass.
        (pass_postreload_jump::execute): Likewise.
        (make_pass_postreload_jump): Likewise.
        * passes.def: Add pass_postreload_jump before
        pass_postreload_cse.
        * tree-pass.h (make_pass_postreload_jump): New pass.

gcc/testsuite/ChangeLog:

2018-12-03  Ilya Leoshkevich  <i...@linux.ibm.com>

        PR target/80080
        * gcc.target/s390/pr80080-4.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/s390/pr80080-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgcleanup.c
    trunk/gcc/passes.def
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-pass.h

Reply via email to