re PR tree-optimization/77820 (A jump threading opportunity with conditionals)
authorJiufu Guo <guojiufu@linux.ibm.com>
Thu, 13 Jun 2019 18:55:55 +0000 (18:55 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 13 Jun 2019 18:55:55 +0000 (12:55 -0600)
commit1d53751dd563d30e4400e4a2da530d8ea07da44b
treefe574e451699bdc6fbd522af705e92cbdab93e9c
parent351ac9c582a8b73e8783618c369f25bbbb24eac9
re PR tree-optimization/77820 (A jump threading opportunity with conditionals)

PR tree-optimization/77820
* tree-ssa-threadedge.c
(edge_forwards_cmp_to_conditional_jump_through_empty_bb_p): New
function.
(thread_across_edge): Add call to
edge_forwards_cmp_to_conditional_jump_through_empty_bb_p.

PR tree-optimization/77820
* gcc.dg/tree-ssa/phi_on_compare-1.c: New testcase.
* gcc.dg/tree-ssa/phi_on_compare-2.c: New testcase.
* gcc.dg/tree-ssa/phi_on_compare-3.c: New testcase.
* gcc.dg/tree-ssa/phi_on_compare-4.c: New testcase.
* gcc.dg/tree-ssa/split-path-6.c: Update testcase.
* gcc.target/sh/pr51244-20.c: Update testcase.

Co-Authored-By: Lijia He <helijia@linux.ibm.com>
From-SVN: r272261
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/phi_on_compare-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c
gcc/testsuite/gcc.target/sh/pr51244-20.c
gcc/tree-ssa-threadedge.c