we can't negate ConstP
authorMatthias Braun <matze@braunis.de>
Tue, 4 Sep 2007 14:13:59 +0000 (14:13 +0000)
committerMatthias Braun <matze@braunis.de>
Tue, 4 Sep 2007 14:13:59 +0000 (14:13 +0000)
[r15666]

ir/ir/iropt.c

index 7164938..62f43dd 100644 (file)
@@ -2047,7 +2047,7 @@ restart:
                return n;
 
        /* Sub(a, Const) -> Add(a, -Const) */
-       if (is_Const(b)) {
+       if (is_Const(b) && get_irn_mode(b) != mode_P) {
                tarval *tv = get_Const_tarval(b);
 
                tv = tarval_neg(tv);