fix bad mode in a%a optimisation
authorMatthias Braun <matze@braunis.de>
Wed, 1 Aug 2007 18:07:45 +0000 (18:07 +0000)
committerMatthias Braun <matze@braunis.de>
Wed, 1 Aug 2007 18:07:45 +0000 (18:07 +0000)
[r15422]

ir/ir/iropt.c

index cf8bc86..a1f88c6 100644 (file)
@@ -2269,7 +2269,7 @@ static ir_node *transform_node_Mod(ir_node *n) {
                ir_node *a = get_Mod_left(n);
                ir_node *b = get_Mod_right(n);
                ir_node *dummy;
-               ir_mode *mode = get_irn_mode(n);
+               ir_mode *mode = get_Mod_resmode(n);
 
                if (a == b && value_not_zero(a, &dummy)) {
                        /* BEWARE: we can optimize a%a to 0 only if this cannot cause a exception */