diff options
author | Bin Cheng <bin.cheng@arm.com> | 2017-01-27 14:42:23 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2017-01-27 14:42:23 +0000 |
commit | 3f54004b095d1cd513e63753ee0f8f9f13698347 (patch) | |
tree | ae40843953b1dc70672e14ac10486ab8b3e101a6 /gcc/combine.c | |
parent | f6a24a94a63abf72a349346c0af46426a63aba1a (diff) | |
download | gcc-3f54004b095d1cd513e63753ee0f8f9f13698347.zip gcc-3f54004b095d1cd513e63753ee0f8f9f13698347.tar.gz gcc-3f54004b095d1cd513e63753ee0f8f9f13698347.tar.bz2 |
re PR rtl-optimization/78559 (wrong code due to tree if-conversion?)
PR rtl-optimization/78559
* combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
other_insn in combine.
gcc/testsuite
PR rtl-optimization/78559
* gcc.c-torture/execute/pr78559.c: New test.
From-SVN: r244979
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index c643a0e..727299b 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -4148,7 +4148,16 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0, PATTERN (undobuf.other_insn))) ||(REG_NOTE_KIND (note) == REG_UNUSED && !reg_set_p (XEXP (note, 0), - PATTERN (undobuf.other_insn)))) + PATTERN (undobuf.other_insn))) + /* Simply drop equal note since it may be no longer valid + for other_insn. It may be possible to record that CC + register is changed and only discard those notes, but + in practice it's unnecessary complication and doesn't + give any meaningful improvement. + + See PR78559. */ + || REG_NOTE_KIND (note) == REG_EQUAL + || REG_NOTE_KIND (note) == REG_EQUIV) remove_note (undobuf.other_insn, note); } |