summaryrefslogtreecommitdiff
path: root/gcc/var-tracking.c
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-25 12:09:27 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2012-02-25 12:09:27 +0000
commit0be329eff8728d984adb170591e01cd499de7a36 (patch)
tree6ab41affb99d878e95476613024ed2c4536fa5c6 /gcc/var-tracking.c
parenta617841ca2bb5f4abc8d14884193dce35df87ceb (diff)
downloadgcc-0be329eff8728d984adb170591e01cd499de7a36.tar.gz
PR debug/52001
* cselib.c (preserve_only_constants): Rename to... (preserve_constants_and_equivs): ... this. Split out... (invariant_or_equiv_p): ... this. Preserve plus expressions of other preserved expressions too. (cselib_reset_table): Adjust. * var-tracking.c (reverse_op): Use canonical value to build reverse operation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184571 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/var-tracking.c')
-rw-r--r--gcc/var-tracking.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index e9b5ca886ae..c6280e2c1f1 100644
--- a/gcc/var-tracking.c
+++ b/gcc/var-tracking.c
@@ -5334,6 +5334,10 @@ reverse_op (rtx val, const_rtx expr, rtx insn)
if (!v || !cselib_preserved_value_p (v))
return;
+ /* Use canonical V to avoid creating multiple redundant expressions
+ for different VALUES equivalent to V. */
+ v = canonical_cselib_val (v);
+
/* Adding a reverse op isn't useful if V already has an always valid
location. Ignore ENTRY_VALUE, while it is always constant, we should
prefer non-ENTRY_VALUE locations whenever possible. */