aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2008-11-11 23:23:23 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2008-11-11 23:23:23 +0000
commit2f1e2391d8d60d887cfffe7d7b619ea2eff82f66 (patch)
tree4d810b4b30d1bbc66dec48c7363f8c9f1f5358a3
parent5dbd125c5c3e1e45dfa6710224743e74c4c40622 (diff)
downloadgcc-2f1e2391d8d60d887cfffe7d7b619ea2eff82f66.zip
gcc-2f1e2391d8d60d887cfffe7d7b619ea2eff82f66.tar.gz
gcc-2f1e2391d8d60d887cfffe7d7b619ea2eff82f66.tar.bz2
re PR rtl-optimization/37363 (Fix for PR 36090 causes libstdc++ regressions)
gcc/ PR rtl-optimization/37363 * simplify-rtx.c (simplify_plus_minus): Don't create (const (minus ...)) expresisons. From-SVN: r141774
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/simplify-rtx.c18
2 files changed, 6 insertions, 18 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d5803f..4fee1bb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR rtl-optimization/37363
+ * simplify-rtx.c (simplify_plus_minus): Don't create (const (minus ...))
+ expresisons.
+
2008-11-11 Eric Botcazou <ebotcazou@adacore.com>
* ira-lives.c (process_bb_node_lives): Restore EH_RETURN_DATA_REGNO
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index c7cd218..dd91e12 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -3678,24 +3678,6 @@ simplify_plus_minus (enum rtx_code code, enum machine_mode mode, rtx op0,
one CONST_INT, and the sort will have ensured that it is last
in the array and that any other constant will be next-to-last. */
- if (GET_CODE (ops[n_ops - 1].op) == CONST_INT)
- i = n_ops - 2;
- else
- i = n_ops - 1;
-
- if (i >= 1
- && ops[i].neg
- && !ops[i - 1].neg
- && CONSTANT_P (ops[i].op)
- && GET_CODE (ops[i].op) == GET_CODE (ops[i - 1].op))
- {
- ops[i - 1].op = gen_rtx_MINUS (mode, ops[i - 1].op, ops[i].op);
- ops[i - 1].op = gen_rtx_CONST (mode, ops[i - 1].op);
- if (i < n_ops - 1)
- ops[i] = ops[i + 1];
- n_ops--;
- }
-
if (n_ops > 1
&& GET_CODE (ops[n_ops - 1].op) == CONST_INT
&& CONSTANT_P (ops[n_ops - 2].op))