Quick fix for opt/fehler191.c.
authorSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 15 Jul 2011 09:26:28 +0000 (11:26 +0200)
committerSebastian Buchwald <Sebastian.Buchwald@kit.edu>
Fri, 15 Jul 2011 09:48:33 +0000 (11:48 +0200)
This also fixes 176.gcc and 300.twolf.

ir/ir/iropt.c

index 9f9f0e7..e4e86f4 100644 (file)
@@ -3079,6 +3079,13 @@ static ir_node *transform_node_bitop_shift(ir_node *n)
        if (is_Shl(left)) {
                tv_bitop = tarval_shr(tv2, tv1);
        } else if (is_Shr(left)) {
+               if (is_Or(n)) {
+                       /*
+                        * TODO this can be improved by checking whether
+                        *      the left shift produces an overflow
+                        */
+                       return n;
+               }
                tv_bitop = tarval_shl(tv2, tv1);
        } else {
                assert(is_Rotl(left));