2008-05-08 Paolo Bonzini <bonzini@gnu.org>
PR target/36090
* simplify-rtx.c (simplify_plus_minus): Create CONST of
similar RTX_CONST_OBJ before CONST_INT.
From-SVN: r135086
+2008-05-08 Paolo Bonzini <bonzini@gnu.org>
+
+ PR target/36090
+ * simplify-rtx.c (simplify_plus_minus): Create CONST of
+ similar RTX_CONST_OBJ before CONST_INT.
+
2008-05-08 Steve Ellcey <sje@cup.hp.com>
* stmt.c (expand_stack_restore): Change sa mode if needed.
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))