On Wed, Oct 10, 2012 at 10:42:10AM +0200, Richard Biener wrote:
> Ah, no, make_ssa_name (TREE_TYPE (rhs), NULL) is even better. On
> the 4.7 branch you need to create a new temp var ...
Ok, here is what I've committed to trunk after bootstrap/regtest:
2012-10-10 Jakub Jelinek
PR tree
On Wed, Oct 10, 2012 at 10:42:10AM +0200, Richard Biener wrote:
> Yeah, I meant we can negate all constants by doing
>
> tem = - CONSTANT;
Yeah, that is what I meant. tem = - INT_MIN; is undefined overflow.
>
> right? Or wait ... even if we have
>
> red = x - y;
>
> if y is INT_MIN then t
On Wed, 10 Oct 2012, Jakub Jelinek wrote:
> On Wed, Oct 10, 2012 at 10:21:59AM +0200, Richard Biener wrote:
> > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> >
> > Err, why? Can't we negate a constant, too?
>
> Not all of them, say INT_MIN can't be negated.
> Though,
On Wed, Oct 10, 2012 at 10:21:59AM +0200, Richard Biener wrote:
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> Err, why? Can't we negate a constant, too?
Not all of them, say INT_MIN can't be negated.
Though,
int
foo (int n)
{
int i, d;
for (i = 0, d = 0; i < n;
On Wed, 10 Oct 2012, Jakub Jelinek wrote:
> Hi!
>
> As the testcase shows, a REAL_CST can appear in MINUS_EXPR as second operand
> (that is not canonicalized to PLUS_EXPR of negated value, unlike integer
> constants (with exception of minimum value)). The following patch handles
> constants ther
Hi!
As the testcase shows, a REAL_CST can appear in MINUS_EXPR as second operand
(that is not canonicalized to PLUS_EXPR of negated value, unlike integer
constants (with exception of minimum value)). The following patch handles
constants there and punts if it isn't SSA_NAME or a constant that can