[Bug target/36090] [4.3/4.4 Regression] ppc64 cacoshl miscompilation
dje at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri May 2 15:11:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list