aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorEaswaran Raman <eraman@google.com>2014-09-05 22:23:26 +0000
committerEaswaran Raman <eraman@gcc.gnu.org>2014-09-05 22:23:26 +0000
commit14e4c2af4386b531f94a0ccdeb64d6282bc60415 (patch)
tree402ca864e3336212cecef4013cf31f42d3c49309 /gcc/ifcvt.c
parent8a03df77b1b29bc1a1609a68d694890a28e089a4 (diff)
downloadgcc-14e4c2af4386b531f94a0ccdeb64d6282bc60415.zip
gcc-14e4c2af4386b531f94a0ccdeb64d6282bc60415.tar.gz
gcc-14e4c2af4386b531f94a0ccdeb64d6282bc60415.tar.bz2
re PR rtl-optimization/62146 (CSE replaces constant with an expression incorrectly)
2014-09-05 Easwaran Raman <eraman@google.com> PR rtl-optimization/62146 * ifcvt.c (dead_or_predicable): Make removal of REG_EQUAL note of hoisted instruction unconditional. testsuite: * testsuite/g++.dg/opt/pr62146.C: New. From-SVN: r214977
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index eee04cc..bce9fb3 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -4403,17 +4403,14 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
insn = head;
do
{
- rtx note, set;
+ rtx note;
if (! INSN_P (insn))
continue;
note = find_reg_note (insn, REG_EQUAL, NULL_RTX);
if (! note)
continue;
- set = single_set (insn);
- if (!set || !function_invariant_p (SET_SRC (set))
- || !function_invariant_p (XEXP (note, 0)))
- remove_note (insn, note);
+ remove_note (insn, note);
} while (insn != end && (insn = NEXT_INSN (insn)));
/* PR46315: when moving insns above a conditional branch, the REG_EQUAL