------- Comment #14 from dje at gcc dot gnu dot org 2008-05-02 15:10 ------- The problematic transformation in simplify_plus_minus() is:
/* We suppressed creation of trivial CONST expressions in the combination loop to avoid recursion. Create one manually now. The combination loop should have ensured that there is exactly 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 (n_ops > 1 && GET_CODE (ops[n_ops - 1].op) == CONST_INT && CONSTANT_P (ops[n_ops - 2].op)) { rtx value = ops[n_ops - 1].op; if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg) value = neg_const_int (mode, value); ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, INTVAL (value)); n_ops--; } If that transformation is avoided, the preferred RTL is generated. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36090